[
  {
    "path": ".gitignore",
    "content": "*.vo\n*.glob\n*.aux\n.coqdeps.d\ncore.make\ncore.make.conf\n*_build\n*.merlin\n"
  },
  {
    "path": "CompCert-LICENSE.txt",
    "content": "All files in this distribution are part of the CompCert verified compiler.\n\nThe CompCert verified compiler is Copyright by Institut National de\nRecherche en Informatique et en Automatique (INRIA) and\nAbsInt Angewandte Informatik GmbH.\n\nThe CompCert verified compiler is distributed under the terms of the\nINRIA Non-Commercial License Agreement given below or under the terms\nof a Software Usage Agreement of AbsInt Angewandte Informatik GmbH.\nThe latter is a separate contract document.\n\nThe INRIA Non-Commercial License Agreement is a non-free license that\ngrants you the right to use the CompCert verified compiler for\neducational, research or evaluation purposes only, but prohibits\nany commercial use.\n\nFor commercial use you need a Software Usage Agreement from\nAbsInt Angewandte Informatik GmbH.\n\nThe following files in this distribution are dual-licensed both under\nthe INRIA Non-Commercial License Agreement and under the Free Software\nFoundation GNU General Public License, either version 2 or (at your\noption) any later version:\n\n  all files in the lib/ directory\n\n  all files in the common/ directory\n\n  cfrontend/C2C.ml\n  cfrontend/Clight.v\n  cfrontend/ClightBigstep.v\n  cfrontend/Cop.v\n  cfrontend/CPragmas.ml\n  cfrontend/Csem.v\n  cfrontend/Cstrategy.v\n  cfrontend/Csyntax.v\n  cfrontend/Ctypes.v\n  cfrontend/Ctyping.v\n  cfrontend/PrintClight.ml\n  cfrontend/PrintCsyntax.ml\n\n  backend/Cminor.v\n  backend/PrintCminor.ml\n\n  all files in the cparser/ directory\n\n  all files in the exportclight/ directory\n\n  the Archi.v, CBuiltins.ml, and extractionMachdep.v files\n  in directories arm, powerpc, riscV, x86, x86_32, x86_64\n\n  extraction/extraction.v\n\n  configure\n  Makefile\n  Makefile.extr\n  Makefile.menhir\n\nA copy of the GNU General Public License version 2 is included below.\nThe choice between the two licenses for the files listed above is left\nto the user.  If you opt for the GNU General Public License, these\nfiles are free software and can be used both in commercial and\nnon-commercial contexts, subject to the terms of the GNU General\nPublic License.\n\nThe files contained in the flocq/ directory and its subdirectories are\ntaken from the Flocq project, http://flocq.gforge.inria.fr/. The files\ncontained in the MenhirLib directory are taken from the Menhir\nproject, http://gallium.inria.fr/~fpottier/menhir/. The files from the\nFlocq project and the files in the MenhirLib directory are Copyright\n2010-2019 INRIA and distributed under the terms of the GNU Lesser\nGeneral Public Licence, either version 3 of the licence, or (at your\noption) any later version. A copy of the GNU Lesser General Public\nLicence version 3 is included below.\n\nThe files contained in the runtime/ directory and its subdirectories\nare Copyright 2013-2017 INRIA and distributed under the terms of the BSD\n3-clause license, included below.\n\n----------------------------------------------------------------------\n\nINRIA Non-Commercial License Agreement for the CompCert verified compiler\n\n1. Background: Institut National de Recherche en Informatique et en\n   Automatique (the \"Provider\") developed the CompCert verified\n   compiler (the \"Software\") and seeks to distribute the Software for\n   public use and benefit.\n\n2. Grant: The Provider hereby grants to you a revocable, nonexclusive,\n   nontransferable, royalty-free and worldwide license (the \"License\")\n   to use the Software solely for educational, research, or evaluation\n   purposes, in accordance with Paragraph 3 below and subject to the\n   terms and conditions of this License Agreement (the\n   \"Agreement\"). The License entitles you to use the Software to\n   conduct research or education and to create Derivative Works solely\n   for academic, non-commercial research endeavors of the Licensee (A\n   \"Derivative Work\" is a work that is a modification of, enhancement\n   to, derived from, or based upon the Software).\n\n3. Limitations on Use: The License is limited to noncommercial\n   use. Noncommercial use relates only to educational, research,\n   personal or evaluation purposes. Any other use is commercial use.\n   You may not use the Software in connection with any activities\n   which purpose is to procure a commercial gain to you or others.\n\n4. Limitations on Distribution: If you distribute the Software or any\n   derivative works of the Software, you will distribute them under\n   the same terms and conditions as in this License, and you will not\n   grant other rights to the Software or derivative works that are\n   different from those provided by this License.\n\n5. Ownership: The Software and the accompanying documentation are\n   licensed, not sold, to you. The Software is a proprietary product\n   of the Provider and is protected under French copyright law and\n   international treaty revisions. The Provider retains all rights not\n   specifically granted to you hereunder, including ownership of the\n   Software and all copyrights, trade secrets, or other intellectual\n   property rights in the Software and any accompanying information.\n\n6. Publication Credit: You agree to acknowledge the INRIA CompCert\n   research project with appropriate citations in any publication or\n   presentation containing research results obtained in whole or in\n   part through the use of the Software.\n\n7. Term of License: The License is effective upon receipt by you of\n   the Software and shall continue until terminated. The License will\n   terminate immediately without notice by the Provider if you fail to\n   comply with the terms and conditions of this Agreement. Upon\n   termination of this License, you shall immediately discontinue all\n   use of the Software provided hereunder, and return to the Provider\n   or destroy the original and all copies of all such Software. All of\n   your obligations under this Agreement shall survive the termination\n   of the License.\n\n8. Warranty: THE PROVIDER MAKES NO REPRESENTATIONS ABOUT THE\n   SUITABILITY, USE, OR PERFORMANCE OF THIS SOFTWARE OR ABOUT ANY\n   CONTENT OR INFORMATION MADE ACCESSIBLE BY THE SOFTWARE, FOR ANY\n   PURPOSE. THE SOFTWARE IS PROVIDED \"AS IS,\" WITHOUT EXPRESS OR\n   IMPLIED WARRANTIES INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED\n   WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR\n   NONINFRINGEMENT WITH RESPECT TO THE SOFTWARE. THE PROVIDER IS NOT\n   OBLIGATED TO SUPPORT OR ISSUE UPDATES TO THE SOFTWARE.\n\n9. Limitation on Liability: This Software is provided free of charge\n   and, accordingly, the Provider shall not be liable under any theory\n   for any damages suffered by you or any user of the Software. UNDER\n   NO CIRCUMSTANCES SHALL PROVIDER BE LIABLE TO YOU OR ANY OTHER\n   PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR\n   CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT\n   LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER\n   FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER ECONOMIC LOSS OR\n   COMMERCIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THIS\n   SOFTWARE, EVEN IF PROVIDER SHALL HAVE BEEN INFORMED OF THE\n   POSSIBILITY OF SUCH DAMAGES, OR FOR ANY THIRD-PARTY CLAIMS.\n\n10. Disputes: The Parties agree to attempt to settle amicably any\n   controversy or claim arising under this Agreement or a breach of\n   this Agreement. Thereafter, both parties agree that all disputes\n   between them arising out of or relating to this Agreement, shall\n   be submitted to non-binding mediation unless the parties mutually\n   agree otherwise. All parties agree to exercise their best effort\n   in good faith to resolve all disputes in mediation. This Agreement\n   shall be governed and construed in accordance with the laws of\n   France.\n\n11. Entire Agreement: This Agreement contains the entire agreement\n   between the parties with respect to the subject matter hereof, and\n   it shall not be modified or amended except by an instrument in\n   writing signed by both parties hereto.\n\n----------------------------------------------------------------------\n\n                      GNU GENERAL PUBLIC LICENSE\n                         Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\t\t\t    Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n\t\t    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n\t\t\t    NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n\t\t     END OF TERMS AND CONDITIONS\n\n\t    How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License along\n    with this program; if not, write to the Free Software Foundation, Inc.,\n    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n\n    Gnomovision version 69, Copyright (C) year name of author\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n  <signature of Ty Coon>, 1 April 1989\n  Ty Coon, President of Vice\n\nThis General Public License does not permit incorporating your program into\nproprietary programs.  If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.\n\n----------------------------------------------------------------------\n\n                  GNU LESSER GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\n  This version of the GNU Lesser General Public License incorporates\nthe terms and conditions of version 3 of the GNU General Public\nLicense, supplemented by the additional permissions listed below.\n\n  0. Additional Definitions.\n\n  As used herein, \"this License\" refers to version 3 of the GNU Lesser\nGeneral Public License, and the \"GNU GPL\" refers to version 3 of the GNU\nGeneral Public License.\n\n  \"The Library\" refers to a covered work governed by this License,\nother than an Application or a Combined Work as defined below.\n\n  An \"Application\" is any work that makes use of an interface provided\nby the Library, but which is not otherwise based on the Library.\nDefining a subclass of a class defined by the Library is deemed a mode\nof using an interface provided by the Library.\n\n  A \"Combined Work\" is a work produced by combining or linking an\nApplication with the Library.  The particular version of the Library\nwith which the Combined Work was made is also called the \"Linked\nVersion\".\n\n  The \"Minimal Corresponding Source\" for a Combined Work means the\nCorresponding Source for the Combined Work, excluding any source code\nfor portions of the Combined Work that, considered in isolation, are\nbased on the Application, and not on the Linked Version.\n\n  The \"Corresponding Application Code\" for a Combined Work means the\nobject code and/or source code for the Application, including any data\nand utility programs needed for reproducing the Combined Work from the\nApplication, but excluding the System Libraries of the Combined Work.\n\n  1. Exception to Section 3 of the GNU GPL.\n\n  You may convey a covered work under sections 3 and 4 of this License\nwithout being bound by section 3 of the GNU GPL.\n\n  2. Conveying Modified Versions.\n\n  If you modify a copy of the Library, and, in your modifications, a\nfacility refers to a function or data to be supplied by an Application\nthat uses the facility (other than as an argument passed when the\nfacility is invoked), then you may convey a copy of the modified\nversion:\n\n   a) under this License, provided that you make a good faith effort to\n   ensure that, in the event an Application does not supply the\n   function or data, the facility still operates, and performs\n   whatever part of its purpose remains meaningful, or\n\n   b) under the GNU GPL, with none of the additional permissions of\n   this License applicable to that copy.\n\n  3. Object Code Incorporating Material from Library Header Files.\n\n  The object code form of an Application may incorporate material from\na header file that is part of the Library.  You may convey such object\ncode under terms of your choice, provided that, if the incorporated\nmaterial is not limited to numerical parameters, data structure\nlayouts and accessors, or small macros, inline functions and templates\n(ten or fewer lines in length), you do both of the following:\n\n   a) Give prominent notice with each copy of the object code that the\n   Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the object code with a copy of the GNU GPL and this license\n   document.\n\n  4. Combined Works.\n\n  You may convey a Combined Work under terms of your choice that,\ntaken together, effectively do not restrict modification of the\nportions of the Library contained in the Combined Work and reverse\nengineering for debugging such modifications, if you also do each of\nthe following:\n\n   a) Give prominent notice with each copy of the Combined Work that\n   the Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the Combined Work with a copy of the GNU GPL and this license\n   document.\n\n   c) For a Combined Work that displays copyright notices during\n   execution, include the copyright notice for the Library among\n   these notices, as well as a reference directing the user to the\n   copies of the GNU GPL and this license document.\n\n   d) Do one of the following:\n\n       0) Convey the Minimal Corresponding Source under the terms of this\n       License, and the Corresponding Application Code in a form\n       suitable for, and under terms that permit, the user to\n       recombine or relink the Application with a modified version of\n       the Linked Version to produce a modified Combined Work, in the\n       manner specified by section 6 of the GNU GPL for conveying\n       Corresponding Source.\n\n       1) Use a suitable shared library mechanism for linking with the\n       Library.  A suitable mechanism is one that (a) uses at run time\n       a copy of the Library already present on the user's computer\n       system, and (b) will operate properly with a modified version\n       of the Library that is interface-compatible with the Linked\n       Version.\n\n   e) Provide Installation Information, but only if you would otherwise\n   be required to provide such information under section 6 of the\n   GNU GPL, and only to the extent that such information is\n   necessary to install and execute a modified version of the\n   Combined Work produced by recombining or relinking the\n   Application with a modified version of the Linked Version. (If\n   you use option 4d0, the Installation Information must accompany\n   the Minimal Corresponding Source and Corresponding Application\n   Code. If you use option 4d1, you must provide the Installation\n   Information in the manner specified by section 6 of the GNU GPL\n   for conveying Corresponding Source.)\n\n  5. Combined Libraries.\n\n  You may place library facilities that are a work based on the\nLibrary side by side in a single library together with other library\nfacilities that are not Applications and are not covered by this\nLicense, and convey such a combined library under terms of your\nchoice, if you do both of the following:\n\n   a) Accompany the combined library with a copy of the same work based\n   on the Library, uncombined with any other library facilities,\n   conveyed under the terms of this License.\n\n   b) Give prominent notice with the combined library that part of it\n   is a work based on the Library, and explaining where to find the\n   accompanying uncombined form of the same work.\n\n  6. Revised Versions of the GNU Lesser General Public License.\n\n  The Free Software Foundation may publish revised and/or new versions\nof the GNU Lesser General Public License from time to time. Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.\n\n  Each version is given a distinguishing version number. If the\nLibrary as you received it specifies that a certain numbered version\nof the GNU Lesser General Public License \"or any later version\"\napplies to it, you have the option of following the terms and\nconditions either of that published version or of any later version\npublished by the Free Software Foundation. If the Library as you\nreceived it does not specify a version number of the GNU Lesser\nGeneral Public License, you may choose any version of the GNU Lesser\nGeneral Public License ever published by the Free Software Foundation.\n\n  If the Library as you received it specifies that a proxy can decide\nwhether future versions of the GNU Lesser General Public License shall\napply, that proxy's public statement of acceptance of any version is\npermanent authorization for you to choose that version for the\nLibrary.\n\n----------------------------------------------------------------------\n\n                     BSD License\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright\n      notice, this list of conditions and the following disclaimer in the\n      documentation and/or other materials provided with the distribution.\n    * Neither the name of the <organization> nor the\n      names of its contributors may be used to endorse or promote products\n      derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT\nHOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\nEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "README.md",
    "content": "# The DeepSEA Language\n\nYou can download a zip file from the [releases\npage](https://github.com/shentufoundation/deepsea/releases). Please see the [DeepSEA language reference](https://github.com/shentufoundation/deepsea/blob/master/DeepSEA%20language%20reference.pdf) for installation and usage instructions.  \n\nThe zip file includes pre-built binaries for Linux (Ubuntu) and MacOS. Since they use some system libraries, it is possible that they will not work on every version of Linux or MacOS. It is also easy to build the binaries from source yourself, following the instructions in the `src` directory. \n\nThe DeepSEA compiler includes files taken and modified from CompCert, so it is developed pursuant to the CompCert licence. In particular, it may only be used for educational, research, personal or evaluation purposes, and not for commercial use.\n"
  },
  {
    "path": "contracts/amm/.csdp.cache",
    "content": ""
  },
  {
    "path": "contracts/amm/amm/RefineAMM.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module amm.RefineAMM for amm.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import DeepSpec.Linking.\nRequire Import amm.EdsgerIdents.\nRequire Import amm.DataTypes.\nRequire Import amm.DataTypeOps.\nRequire Import amm.DataTypeProofs.\nRequire Import layerlib.LayerCalculusLemma.\nRequire Import layerlib.RefinementTactic.\nRequire Import layerlib.RefinementTacticAux.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\n\nRequire Import amm.LayerAMM.\nRequire Import amm.LSimAMMLIB.\n\nSection EdsgerGen.\n\n\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nContext`{CTXT_prf : !Layer_AMM_Context_prf}.\nContext`{AMMLIB_pres_inv : !AMMLIB_preserves_invariants}.\nContext`{AMM_pres_inv : !AMM_preserves_invariants}.\n\nExisting Instances AMM_overlay_spec AMM_underlay_spec.\n\nRecord relate_RData (j : meminj) (habd : GetHighData) (labd : GetLowData) : Prop\n    := mkrelate_RData {\n  (* FixedSupplyToken *)\n  FixedSupplyToken__totalSupply_re : ;\n  FixedSupplyToken_balances_re : ;\n  FixedSupplyToken_allowances_re : ;\n  (* FixedSupplyToken1 *)\n  FixedSupplyToken1__totalSupply_re : ;\n  FixedSupplyToken1_balances_re : ;\n  FixedSupplyToken1_allowances_re : ;\n  (* LiquidityToken *)\n  LiquidityToken__totalSupply_re : ;\n  LiquidityToken_balances_re : ;\n  LiquidityToken_allowances_re : \n}.\n\nRecord match_RData (habd : GetHighData) (m : mem) (j : meminj) : Prop\n    := MATCH_RDATA {\n  AutomatedMarketMaker__token0_ma : variable_match AutomatedMarketMaker_AutomatedMarketMaker__token0_var habd m;\n  AutomatedMarketMaker__token1_ma : variable_match AutomatedMarketMaker_AutomatedMarketMaker__token1_var habd m;\n  AutomatedMarketMaker__owner_ma : variable_match AutomatedMarketMaker_AutomatedMarketMaker__owner_var habd m;\n  AutomatedMarketMaker__reserve0_ma : variable_match AutomatedMarketMaker_AutomatedMarketMaker__reserve0_var habd m;\n  AutomatedMarketMaker__reserve1_ma : variable_match AutomatedMarketMaker_AutomatedMarketMaker__reserve1_var habd m;\n  AutomatedMarketMaker_blockTimestampLast_ma : variable_match AutomatedMarketMaker_AutomatedMarketMaker_blockTimestampLast_var habd m;\n  AutomatedMarketMaker_price0CumulativeLast_ma : variable_match AutomatedMarketMaker_AutomatedMarketMaker_price0CumulativeLast_var habd m;\n  AutomatedMarketMaker_price1CumulativeLast_ma : variable_match AutomatedMarketMaker_AutomatedMarketMaker_price1CumulativeLast_var habd m;\n  AutomatedMarketMaker_kLast_ma : variable_match AutomatedMarketMaker_AutomatedMarketMaker_kLast_var habd m\n}.\n\nLocal Hint Resolve MATCH_RDATA.\n\nGlobal Instance rel_ops: CompatRelOps GetHighDataX GetLowDataX :=\n{\n  relate_AbData f d1 d2 := relate_RData f d1 d2;\n  match_AbData d1 m f := match_RData d1 m f;\n  new_glbl := var_AutomatedMarketMaker_AutomatedMarketMaker__token0_ident :: var_AutomatedMarketMaker_AutomatedMarketMaker__token1_ident :: var_AutomatedMarketMaker_AutomatedMarketMaker__owner_ident :: var_AutomatedMarketMaker_AutomatedMarketMaker__reserve0_ident :: var_AutomatedMarketMaker_AutomatedMarketMaker__reserve1_ident :: var_AutomatedMarketMaker_AutomatedMarketMaker_blockTimestampLast_ident :: var_AutomatedMarketMaker_AutomatedMarketMaker_price0CumulativeLast_ident :: var_AutomatedMarketMaker_AutomatedMarketMaker_price1CumulativeLast_ident :: var_AutomatedMarketMaker_AutomatedMarketMaker_kLast_ident :: nil\n}.\n\nGlobal Instance AutomatedMarketMaker_AutomatedMarketMaker__token0_hyper_ltype_static :\n    HyperLTypeStatic AutomatedMarketMaker_AutomatedMarketMaker__token0_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl AutomatedMarketMaker_AutomatedMarketMaker__token0_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance AutomatedMarketMaker_AutomatedMarketMaker__token1_hyper_ltype_static :\n    HyperLTypeStatic AutomatedMarketMaker_AutomatedMarketMaker__token1_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl AutomatedMarketMaker_AutomatedMarketMaker__token1_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance AutomatedMarketMaker_AutomatedMarketMaker__owner_hyper_ltype_static :\n    HyperLTypeStatic AutomatedMarketMaker_AutomatedMarketMaker__owner_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl AutomatedMarketMaker_AutomatedMarketMaker__owner_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance AutomatedMarketMaker_AutomatedMarketMaker__reserve0_hyper_ltype_static :\n    HyperLTypeStatic AutomatedMarketMaker_AutomatedMarketMaker__reserve0_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl AutomatedMarketMaker_AutomatedMarketMaker__reserve0_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance AutomatedMarketMaker_AutomatedMarketMaker__reserve1_hyper_ltype_static :\n    HyperLTypeStatic AutomatedMarketMaker_AutomatedMarketMaker__reserve1_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl AutomatedMarketMaker_AutomatedMarketMaker__reserve1_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance AutomatedMarketMaker_AutomatedMarketMaker_blockTimestampLast_hyper_ltype_static :\n    HyperLTypeStatic AutomatedMarketMaker_AutomatedMarketMaker_blockTimestampLast_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl AutomatedMarketMaker_AutomatedMarketMaker_blockTimestampLast_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance AutomatedMarketMaker_AutomatedMarketMaker_price0CumulativeLast_hyper_ltype_static :\n    HyperLTypeStatic AutomatedMarketMaker_AutomatedMarketMaker_price0CumulativeLast_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl AutomatedMarketMaker_AutomatedMarketMaker_price0CumulativeLast_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance AutomatedMarketMaker_AutomatedMarketMaker_price1CumulativeLast_hyper_ltype_static :\n    HyperLTypeStatic AutomatedMarketMaker_AutomatedMarketMaker_price1CumulativeLast_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl AutomatedMarketMaker_AutomatedMarketMaker_price1CumulativeLast_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance AutomatedMarketMaker_AutomatedMarketMaker_kLast_hyper_ltype_static :\n    HyperLTypeStatic AutomatedMarketMaker_AutomatedMarketMaker_kLast_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl AutomatedMarketMaker_AutomatedMarketMaker_kLast_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nLemma relate_incr:\n  forall abd abd' f f',\n    relate_RData f abd abd' ->\n    inject_incr f f' ->\n    relate_RData f' abd abd'.\nProof.\n  inversion 1; subst; intros; simpl in *.\n  repeat match goal with\n  | H : _ /\\ _ |- _ => destruct H\n  end.\n  repeat (constructor; simpl; eauto).\nQed.\nGlobal Instance rel_prf: CompatRel GetHighDataX GetLowDataX.\nProof.\n  constructor; [ destruct 1 .. |]; intros.\n  - constructor; eapply inject_match_correct; eauto with typeclass_instances.\n  - constructor; eapply store_match_correct; eauto with typeclass_instances.\n  - constructor; eapply alloc_match_correct; eauto with typeclass_instances.\n  - constructor; eapply free_match_correct; eauto with typeclass_instances.\n  - constructor; eapply storebytes_match_correct; eauto with typeclass_instances.\n  - eapply relate_incr; eauto.\nQed.\n\n(*\nLocal Instance: ExternalCallsOps (mwd GetLowDataX) := CompatExternalCalls.compatlayer_extcall_ops AMMLIB_Layer.\nLocal Instance: CompilerConfigOps _ := CompatExternalCalls.compatlayer_compiler_config_ops AMMLIB_Layer.\n*)\n\nInstance AMM_hypermem : MemoryModel.HyperMem\n  := { Hcompatrel := {| crel_prf := rel_prf |} }.\n\nClass AMM_Underlay_preserves_invariants := {\n  AMM_Underlay_FixedSupplyToken_constructor_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) FixedSupplyToken_constructor_spec | 5;\n  AMM_Underlay_FixedSupplyToken_balanceOf_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) FixedSupplyToken_balanceOf_spec | 5;\n  AMM_Underlay_FixedSupplyToken_transfer_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) FixedSupplyToken_transfer_spec | 5;\n  AMM_Underlay_FixedSupplyToken_approve_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) FixedSupplyToken_approve_spec | 5;\n  AMM_Underlay_FixedSupplyToken_transferFrom_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) FixedSupplyToken_transferFrom_spec | 5;\n  AMM_Underlay_FixedSupplyToken1_constructor_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) FixedSupplyToken1_constructor_spec | 5;\n  AMM_Underlay_FixedSupplyToken1_balanceOf_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) FixedSupplyToken1_balanceOf_spec | 5;\n  AMM_Underlay_FixedSupplyToken1_transfer_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) FixedSupplyToken1_transfer_spec | 5;\n  AMM_Underlay_FixedSupplyToken1_approve_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) FixedSupplyToken1_approve_spec | 5;\n  AMM_Underlay_FixedSupplyToken1_transferFrom_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) FixedSupplyToken1_transferFrom_spec | 5;\n  AMM_Underlay_LiquidityToken_constructor_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) LiquidityToken_constructor_spec | 5;\n  AMM_Underlay_LiquidityToken_mint_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) LiquidityToken_mint_spec | 5;\n  AMM_Underlay_LiquidityToken_burn_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) LiquidityToken_burn_spec | 5;\n  AMM_Underlay_LiquidityToken_totalSupply_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) LiquidityToken_totalSupply_spec | 5;\n  AMM_Underlay_LiquidityToken_balanceOf_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) LiquidityToken_balanceOf_spec | 5;\n  AMM_Underlay_LiquidityToken_transfer_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) LiquidityToken_transfer_spec | 5;\n  AMM_Underlay_LiquidityToken_approve_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) LiquidityToken_approve_spec | 5;\n  AMM_Underlay_LiquidityToken_transferFrom_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) LiquidityToken_transferFrom_spec | 5;\n  AMM_Underlay_AutomatedMarketMakerLib_constructor_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) AutomatedMarketMakerLib_constructor_spec | 5;\n  AMM_Underlay_AutomatedMarketMakerLib_getAmountIn_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) AutomatedMarketMakerLib_getAmountIn_spec | 5;\n  AMM_Underlay_AutomatedMarketMakerLib_getBalanceAdjusted_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) AutomatedMarketMakerLib_getBalanceAdjusted_spec | 5;\n  AMM_Underlay_AutomatedMarketMakerLib_min_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) AutomatedMarketMakerLib_min_spec | 5\n}.\nInstance AMM'AMMLIB_preserves_invariants : AMM_Underlay_preserves_invariants.\nProof. esplit; apply AMMLIB_pres_inv. Defined.\n\n(*\nLemma passthrough_correct:\n  sim (crel (CompatRel0 := rel_prf) _ _) AMM_Layer_passthrough AMMLIB_Layer.\nProof.\n  Local Opaque simRR mapsto layer_mapsto_primitive.\n  unfold GlobalLayerSpec, MemoryModel.GetHighDataX.\n  simpl.\n\n  sim_oplus; simpl.\n\n  Local Transparent simRR mapsto layer_mapsto_primitive.\nQed.*)\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/amm/amm/_CoqProject",
    "content": "-R ../../.. DeepSpec\n-R . amm\n./EdsgerIdents.v\n./DataTypes.v\n./DataTypeOps.v\n./DataTypeProofs.v\n./LayerAMMLIB.v\n./LayerAMM.v\n./ObjFixedSupplyTokenCodeProofs.v\n./ObjFixedSupplyToken1CodeProofs.v\n./ObjLiquidityTokenCodeProofs.v\n./ObjAutomatedMarketMakerCodeProofs.v\n"
  },
  {
    "path": "contracts/amm/amm/prf.v",
    "content": "Require Import amm.DataTypes.\nRequire Import amm.DataTypeOps.\nRequire Import lib.Monad.StateMonadOption.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import ZArith.\nRequire Import core.HyperTypeInst.\nRequire Import backend.MachineModel.\nRequire Import amm.LayerAMMLIB.\nRequire Import amm.LayerAMM.\n\nDefinition state := global_abstract_data_type.\n\nDefinition init_state := init_global_abstract_data.\n\nDefinition wei := Z.\n\nDefinition addr := int256.\n\nDefinition blocknumber := int256.\n\nExisting Instance GlobalLayerSpec.\n\nSection step.\n\n  Context (contract_address : addr).\n\n  Section mstep.\n  (* These are the parameters which are constant within a given block. *)\n  Context (coinbase : int256)\n          (timestamp : int256)\n          (number : int256)\n          (balance : int256 -> int256)\n          (blockhash : int256 -> int256)\n          (prev_contract_state : state).\n\n  Definition make_machine_env (caller: addr)\n                              : machine_env state\n    := {| me_address := contract_address;\n          me_origin := caller;\n          me_caller := caller; (* need update after every control-flow transfer *)\n          me_callvalue := Int256.repr (0);\n          me_coinbase := coinbase; \n          me_timestamp := timestamp;\n          me_number := number;\n          me_balance := balance;\n          me_blockhash := blockhash;\n          (* not implemented *)\n          me_transfer _ _ _ _ _ := False;\n          me_callmethod _ _ _ _ _ _ _ _ _ _ := False;\n          me_log _ _ _ := prev_contract_state;\n        |}.\n\n  Import MonadNotation.\n\n  Definition lif {A:Type}\n                 (caller : addr)\n                 (cmd : machine_env state -> osT global_abstract_data_type A)\n    : osT state A :=\n    st  <- get;;\n    let me := make_machine_env caller in\n    match runStateT (cmd me) st with\n    | None => mzero\n    | Some (v, st') => put st' ;; ret v\n    end.\n\n  (* osT state int256 = \n    state transformer with option monad, state is state, and value is int256 *)\n  Print osT. (* = fun D : Type => stateT D option *)\n  Print stateT. (* (S : Type) (m : Type -> Type) (t : Type) : Type := mkStateT\n  { runStateT : S -> m (t * S)%type } *)\n\n  Print runStateT. (* takes monad transformer, state, returns m (t * S) *)\n\n  (* How the state of the system changes in a single method call made by player p. *)\n  Inductive mstep u (st st' : state) : Prop :=\n  | FixedSupplyToken_constructor_step : forall r , runStateT (FixedSupplyToken_constructor_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken_totalSupply_step : forall r , runStateT (FixedSupplyToken_totalSupply_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken_balanceOf_step : forall r tokenOwner, runStateT (FixedSupplyToken_balanceOf_opt tokenOwner (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken_transfer_step : forall r toA tokens, runStateT (FixedSupplyToken_transfer_opt toA tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken_approve_step : forall r spender tokens, runStateT (FixedSupplyToken_approve_opt spender tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken_transferFrom_step : forall r fromA toA tokens, runStateT (FixedSupplyToken_transferFrom_opt fromA toA tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken1_constructor_step : forall r , runStateT (FixedSupplyToken1_constructor_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken1_totalSupply_step : forall r , runStateT (FixedSupplyToken1_totalSupply_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken1_balanceOf_step : forall r tokenOwner, runStateT (FixedSupplyToken1_balanceOf_opt tokenOwner (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken1_transfer_step : forall r toA tokens, runStateT (FixedSupplyToken1_transfer_opt toA tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken1_approve_step : forall r spender tokens, runStateT (FixedSupplyToken1_approve_opt spender tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken1_transferFrom_step : forall r fromA toA tokens, runStateT (FixedSupplyToken1_transferFrom_opt fromA toA tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | LiquidityToken_constructor_step : forall r , runStateT (LiquidityToken_constructor_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | LiquidityToken_mint_step : forall r toA value, runStateT (LiquidityToken_mint_opt toA value (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | LiquidityToken_burn_step : forall r fromA value, runStateT (LiquidityToken_burn_opt fromA value (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | LiquidityToken_totalSupply_step : forall r , runStateT (LiquidityToken_totalSupply_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | LiquidityToken_balanceOf_step : forall r tokenOwner, runStateT (LiquidityToken_balanceOf_opt tokenOwner (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | LiquidityToken_transfer_step : forall r toA tokens, runStateT (LiquidityToken_transfer_opt toA tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | LiquidityToken_approve_step : forall r spender tokens, runStateT (LiquidityToken_approve_opt spender tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | LiquidityToken_transferFrom_step : forall r fromA toA tokens, runStateT (LiquidityToken_transferFrom_opt fromA toA tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMakerLib_constructor_step : forall r , runStateT (AutomatedMarketMakerLib_constructor_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMakerLib_getAmountIn_step : forall r balance amountOut reserve, runStateT (AutomatedMarketMakerLib_getAmountIn_opt balance amountOut reserve (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMakerLib_getBalanceAdjusted_step : forall r balance amountIn, runStateT (AutomatedMarketMakerLib_getBalanceAdjusted_opt balance amountIn (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMakerLib_min_step : forall r x y, runStateT (AutomatedMarketMakerLib_min_opt x y (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_constructor_step : forall r , runStateT (AutomatedMarketMaker_constructor_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_mint_step : forall r toA, runStateT (AutomatedMarketMaker_mint_opt toA (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_burn_step : forall r toA, runStateT (AutomatedMarketMaker_burn_opt toA (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_simpleSwap0_step : forall r toA, runStateT (AutomatedMarketMaker_simpleSwap0_opt toA (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_swap_step : forall r amount0Out amount1Out toA, runStateT (AutomatedMarketMaker_swap_opt amount0Out amount1Out toA (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_skim_step : forall r toA, runStateT (AutomatedMarketMaker_skim_opt toA (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_sync_step : forall r , runStateT (AutomatedMarketMaker_sync_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_k_step : forall r , runStateT (AutomatedMarketMaker_k_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_quote0_step : forall r amount0, runStateT (AutomatedMarketMaker_quote0_opt amount0 (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_getAmountOut0_step : forall r amount0In, runStateT (AutomatedMarketMaker_getAmountOut0_opt amount0In (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | AutomatedMarketMaker_getAmountIn0_step : forall r amount0Out, runStateT (AutomatedMarketMaker_getAmountIn0_opt amount0Out (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n.\n\n  (* We can compute a new block by letting the players call the contract \n     in some arbitrary order. *)\n     Inductive multi_mstep : state -> state -> Prop := \n     | multi_mstep_reflexive : forall (st : state), multi_mstep st st\n     | multi_mstep_transitive : forall (st st' st'' : state) u,\n         multi_mstep st st' -> mstep u st' st'' -> multi_mstep st st''.\n\n\n     (* A block is sufficiently synchronous if every player got a chance to submit a \n        transaction to to. *)\n     (* TODO, I think this definition is fine for now, but it seems little too clever,\n        should probably re-state this using some straightforward tracking of the states\n        we pass through. *)\n     Definition multi_mstep_synchronous st1 st2 :=\n       forall u, exists st st',\n                   multi_mstep st1 st /\\ mstep u st st' /\\ multi_mstep st' st2.\n\n     (* Here are a bunch of induction principles inspired by linear temporal logic. *)\n\n     (* Prove that some property P holds \"globally\", i.e. for each state along a \n        path.\n        You can also specify a property Pprev which is known to hold for the\n        prev_contract_state. If not needed, it can just be True.\n    *)\n     Lemma multi_mstep_Global_ind : forall (Pprev P : state -> Prop),\n         (forall u st st', Pprev prev_contract_state -> P st -> mstep u st st' -> P st') ->\n          Pprev prev_contract_state -> forall st st', P st -> multi_mstep st st' -> P st'.\n     Proof.\n       induction 4; eauto.\n     Qed.\n\n     (*\n     (* Prove that P holds \"until\" Q  along a path. \n        \"Until\" is a liveness assertion, so we need the synchronicity assumption. *)\n     Lemma multi_mstep_Until_ind : forall (Pprev P Q : state -> Prop),\n         (forall p st st', Pprev prev_contract_state -> P st -> In p players\n                           -> mstep p st st' -> (P st' \\/ Q st')) ->\n                           Pprev prev_contract_state ->\n                           forall st,\n                             P st -> exists st',  multi_mstep st st' -> (P st' \\/ Q st').\n     Proof.\n       induction 4; eauto *)\n\n     End mstep.\n\n\n     Definition Int256_incr x := Int256.add x Int256.one.\n\n     Inductive bstep (n : blocknumber) : state -> state -> Prop :=\n     | bstep_step : forall coinbase timestamp balance blockhash st st',\n         multi_mstep coinbase timestamp n balance blockhash st st st' ->\n         bstep n st st'.\n\n     Inductive multi_bstep : blocknumber -> state -> blocknumber -> state -> Prop := \n     | multi_bstep_reflexive : forall n (st : state), multi_bstep n st n st\n     | multi_bstep_transitive : forall n n'  (st st' st'' : state),\n       multi_bstep n st n' st' -> bstep (Int256_incr n') st' st'' -> multi_bstep n st (Int256_incr n') st''.\n\n     (* multi_bstep is the step relation without any synchronicity assumption.\n        This is sufficient to prove some safety properties, but for most interesting \n        theorems we instead need to use this synchronous version: *)\n\n     Inductive bstep_synch (n : blocknumber) : state -> state -> Prop :=\n     | bstep_synch_step : forall coinbase timestamp balance blockhash st st',\n         multi_mstep_synchronous coinbase timestamp n balance blockhash st st st' ->\n         bstep_synch n st st'.\n\n     Inductive multi_bstep_synch : blocknumber -> state -> blocknumber -> state -> Prop := \n     | multi_bstep_synch_reflexive : forall n (st : state), multi_bstep_synch n st n st\n     | multi_bstep_synch_transitive : forall n n'  (st st' st'' : state),\n       multi_bstep_synch n st n' st' -> bstep_synch (Int256_incr n') st' st'' -> multi_bstep_synch n st (Int256_incr n') st''.\n\n     Lemma multi_bstep_Global_ind : forall (P : state -> Prop),\n         (forall coinbase timestamp number balance blockhash prev_block u st st',\n             P prev_block\n             -> P st\n             -> mstep coinbase timestamp number balance blockhash prev_block u st st'\n             -> P st')\n         -> forall n st n' st',\n           P st -> multi_bstep n st n' st' -> P st'.\n     Proof.\n       induction 3.\n       - auto.\n       - inversion H2; subst.\n         eapply multi_mstep_Global_ind with (st:=st') (prev_contract_state := st').\n         + intros.\n           refine (H _ _ _ _ _ _ _ _ _ _ _ H6); auto.\n         + apply IHmulti_bstep; assumption.\n         + apply IHmulti_bstep; assumption.\n         + exact H3.\n     Qed.\n   End step.\n\n   Section DeepSEAGenericProof.\n\n     Lemma Int256Tree_reduce : forall (i: int256) (v: Z) (t: Int256Tree.t Z), Int256Tree.get_default 0%Z i (Int256Tree.set i v t) = v.\n     Proof.\n       intros.\n       unfold Int256Tree.get_default.\n       rewrite Int256Tree.gss .\n       reflexivity.\n     Qed.\n\n     Lemma Int256Tree_mreduce : forall (i j : int256) (v v': Z) (t: Int256Tree.t Z), \n       i <> j ->\n       Int256Tree.get_default 0%Z i (Int256Tree.set j v' (Int256Tree.set i v t)) = v.\n     Proof.\n       intros.\n       unfold Int256Tree.get_default.\n       rewrite Int256Tree.gso.\n       rewrite Int256Tree.gss.\n       reflexivity.\n       exact H.\n     Qed.\n\n     Lemma Int256Tree_mireduce : forall (i j k : int256) (v v': Z) (t: Int256Tree.t Z), \n       i <> j ->\n       i <> k ->\n       j <> k ->\n       Int256Tree.get_default 0%Z i (Int256Tree.set j v' (Int256Tree.set k v t)) = \n       Int256Tree.get_default 0%Z i t.\n     Proof.\n       intros.\n       unfold Int256Tree.get_default.\n       rewrite Int256Tree.gso.\n       rewrite Int256Tree.gso.\n       reflexivity.\n       exact H0.\n       exact H.\n     Qed.\n\n     Lemma add_sub_inv : forall (i j : Z32), (i + j - i)%Z = j.\n     Proof.\n       intros.\n       omega.\n     Qed.\n   End DeepSEAGenericProof.\n\n   Section Proof.   \n     Context (* (strategies : strategy_tuple) *)\n             (initial_balances : addr -> Z)\n             (contract_address : int256).\n\n     Context (init_bt init_rt : int256)\n             (init_coinbase : int256)\n             (init_timestamp : int256)\n             (init_number : int256)\n             (init_blockhash : int256 -> int256)\n             (pre_init_state init_state : state).\n\n     (* These are the parameters which are constant within a given block. *)\n     Context (coinbase : int256)\n             (timestamp : int256)\n             (number : int256)\n             (balance : int256 -> int256)\n             (blockhash : int256 -> int256)\n             (prev_contract_state : state).\n\n     Require Import lib.Monad.RunStateTInv.\n     Require Import lib.ArithInv.\n\n     Definition make_machine_env_wrapped prev_st user :=\n      make_machine_env contract_address coinbase timestamp number balance blockhash prev_st user.\n\n     Lemma make_machine_env_caller_eq : forall st caller, me_caller (make_machine_env_wrapped st caller) = caller.\n      Proof. auto. Qed.\n\n     Lemma make_machine_env_address_eq : forall st caller, me_address (make_machine_env_wrapped st caller) = contract_address.\n      Proof. auto. Qed.\n\nTransparent FixedSupplyToken_constructor_opt.\nTransparent FixedSupplyToken_totalSupply_opt.\nTransparent FixedSupplyToken_balanceOf_opt.\nTransparent FixedSupplyToken_transfer_opt.\nTransparent FixedSupplyToken_approve_opt.\nTransparent FixedSupplyToken_transferFrom_opt.\nTransparent FixedSupplyToken1_constructor_opt.\nTransparent FixedSupplyToken1_totalSupply_opt.\nTransparent FixedSupplyToken1_balanceOf_opt.\nTransparent FixedSupplyToken1_transfer_opt.\nTransparent FixedSupplyToken1_approve_opt.\nTransparent FixedSupplyToken1_transferFrom_opt.\nTransparent LiquidityToken_constructor_opt.\nTransparent LiquidityToken_mint_opt.\nTransparent LiquidityToken_burn_opt.\nTransparent LiquidityToken_totalSupply_opt.\nTransparent LiquidityToken_balanceOf_opt.\nTransparent LiquidityToken_transfer_opt.\nTransparent LiquidityToken_approve_opt.\nTransparent LiquidityToken_transferFrom_opt.\nTransparent AutomatedMarketMakerLib_constructor_opt.\nTransparent AutomatedMarketMakerLib_getAmountIn_opt.\nTransparent AutomatedMarketMakerLib_getBalanceAdjusted_opt.\nTransparent AutomatedMarketMakerLib_min_opt.\nTransparent AutomatedMarketMaker_constructor_opt.\nTransparent AutomatedMarketMaker_mint_opt.\nTransparent AutomatedMarketMaker_burn_opt.\nTransparent AutomatedMarketMaker_simpleSwap0_opt.\nTransparent AutomatedMarketMaker_swap_opt.\nTransparent AutomatedMarketMaker_skim_opt.\nTransparent AutomatedMarketMaker_sync_opt.\nTransparent AutomatedMarketMaker_k_opt.\nTransparent AutomatedMarketMaker_quote0_opt.\nTransparent AutomatedMarketMaker_getAmountOut0_opt.\nTransparent AutomatedMarketMaker_getAmountIn0_opt.\nDefinition FixedSupplyToken_address := (Int256.repr 65587).\nDefinition FixedSupplyToken1_address := (Int256.repr 65586).\nDefinition LiquidityToken_address := (Int256.repr 65585).\nDefinition AutomatedMarketMaker_address := (Int256.repr 65584).\n\nDefinition not_contract_address (addr: int256) :=\n  addr <> FixedSupplyToken_address /\\\n  addr <> FixedSupplyToken1_address /\\\n  addr <> LiquidityToken_address /\\\n  addr <> AutomatedMarketMaker_address.\n\nAxiom taddr : contract_address = AutomatedMarketMaker_address.\n\nLtac rds :=\nunfold FixedSupplyToken_constructor_opt in *;\nunfold FixedSupplyToken_totalSupply_opt in *;\nunfold FixedSupplyToken_balanceOf_opt in *;\nunfold FixedSupplyToken_transfer_opt in *;\nunfold FixedSupplyToken_approve_opt in *;\nunfold FixedSupplyToken_transferFrom_opt in *;\nunfold FixedSupplyToken1_constructor_opt in *;\nunfold FixedSupplyToken1_totalSupply_opt in *;\nunfold FixedSupplyToken1_balanceOf_opt in *;\nunfold FixedSupplyToken1_transfer_opt in *;\nunfold FixedSupplyToken1_approve_opt in *;\nunfold FixedSupplyToken1_transferFrom_opt in *;\nunfold LiquidityToken_constructor_opt in *;\nunfold LiquidityToken_mint_opt in *;\nunfold LiquidityToken_burn_opt in *;\nunfold LiquidityToken_totalSupply_opt in *;\nunfold LiquidityToken_balanceOf_opt in *;\nunfold LiquidityToken_transfer_opt in *;\nunfold LiquidityToken_approve_opt in *;\nunfold LiquidityToken_transferFrom_opt in *;\nunfold AutomatedMarketMakerLib_constructor_opt in *;\nunfold AutomatedMarketMakerLib_getAmountIn_opt in *;\nunfold AutomatedMarketMakerLib_getBalanceAdjusted_opt in *;\nunfold AutomatedMarketMakerLib_min_opt in *;\nunfold AutomatedMarketMaker_constructor_opt in *;\nunfold AutomatedMarketMaker_mint_opt in *;\nunfold AutomatedMarketMaker_burn_opt in *;\nunfold AutomatedMarketMaker_simpleSwap0_opt in *;\nunfold AutomatedMarketMaker_swap_opt in *;\nunfold AutomatedMarketMaker_skim_opt in *;\nunfold AutomatedMarketMaker_sync_opt in *;\nunfold AutomatedMarketMaker_k_opt in *;\nunfold AutomatedMarketMaker_quote0_opt in *;\nunfold AutomatedMarketMaker_getAmountOut0_opt in *;\nunfold AutomatedMarketMaker_getAmountIn0_opt in *;\ninv_runStateT;\nsubst;\ninv_arith;\nsimpl;\ntry rewrite make_machine_env_caller_eq in *;\ntry rewrite make_machine_env_address_eq in *;\ntry rewrite Int256Tree_reduce in *;\ntry rewrite Int256Tree_mreduce in *;\ntry rewrite Int256Tree_mireduce in *;\nauto.\n\n  Definition compute_k (s: state) := \n    Z.mul (AutomatedMarketMaker__reserve0 s) (AutomatedMarketMaker__reserve1 s).\n\n  Definition get_balance0 (s: state) (a: addr) :=\n    (Int256Tree.get_default (0%Z)\n      a (FixedSupplyToken_balances s)).\n\n  Definition get_balance1 (s: state) (a: addr) :=\n    (Int256Tree.get_default 0%Z\n      a (FixedSupplyToken1_balances s)).\n\n  (* need to transfer balance first, assume token0 transfer first *)\n  (* should have been approve and then transferFrom, here we are hacking a bit *)\n  (* prove that after every possible function call, whichever layers, the \n  k = _reserve0 * _reserve1 is strictly increasing for simpleSwap0:\n\n  newState = simpleSwap0 oldState /\\ compute_k newState > compute_k oldState *)\n  Theorem increasing_k_simpleSwap0 : (forall r r' \n    (s s' s'' : state) \n    (trader : addr) \n    (swapAmount0 : Z32), \n    (swapAmount0 > 0)%Z -> (* trasferring an amount > 0 *)\n    ((AutomatedMarketMaker__reserve0 s) > 0)%Z -> \n    ((AutomatedMarketMaker__reserve1 s) > 0)%Z ->\n    not_contract_address trader -> \n    get_balance0 s AutomatedMarketMaker_address = (AutomatedMarketMaker__reserve0 s) -> (* assumes that the reserve is the same as balance at s *)\n    get_balance1 s AutomatedMarketMaker_address = (AutomatedMarketMaker__reserve1 s) ->\n    runStateT (FixedSupplyToken_transfer_opt AutomatedMarketMaker_address swapAmount0 (make_machine_env_wrapped s trader)) s = Some (r, s') ->\n    runStateT (AutomatedMarketMaker_simpleSwap0_opt trader (make_machine_env_wrapped s trader)) s' = Some (r', s'') -> \n    Z.lt (compute_k s) (compute_k s'')).\n  Proof.\n  intros.\n  unfold get_balance0 in *.\n  unfold get_balance1 in *.\n  unfold compute_k.\n  unfold AutomatedMarketMaker_simpleSwap0_opt in *.\n  unfold FixedSupplyToken1_transfer_opt in *.\n  unfold FixedSupplyToken_balanceOf_opt in *.\n  unfold FixedSupplyToken1_balanceOf_opt in *.\n  unfold FixedSupplyToken_transfer_opt in *.\n  inv_runStateT.\n  rds.\n\n  repeat match goal with\n  | [ |- context[AutomatedMarketMaker__reserve1 ?X]] => remember (AutomatedMarketMaker__reserve1 X) as R1\n  end.\n  repeat match goal with\n  | [ |- context[AutomatedMarketMaker__reserve0 ?X]] => remember (AutomatedMarketMaker__reserve0 X) as R0\n  end.\n  match goal with \n  | [ |- context[Z.mul (Z.add ?X _) _]] => replace X with R0 (* rewrite -> H1 *)\n  end.\n  match goal with \n  | [ |- context[Z.sub ?X _]] => replace X with R1\n  end.\n  remember swapAmount0 as delta0.\n\nEnd Proof.\n"
  },
  {
    "path": "contracts/amm/amm/prf_int.v",
    "content": "Require Import amm.DataTypes.\nRequire Import amm.DataTypeOps.\nRequire Import amm.LayerAMM.\nRequire Import lib.Monad.StateMonadOption.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import ZArith.\nRequire Import core.HyperTypeInst. \n(* for `hashvalue`, maybe should move that to some different file. *)\nRequire Import backend.MachineModel.\n\n(* PROOFS: \n   2. balance tracks reserve\n   3. increasing k -> algebra\n   4. no path independence, splitting trades is strictly more expensive -> algebra, appendix D\n   5. liquidity token economics is right, i.e., UNI-V2 tracks the actual share of pool --> actually, where is the trading of UNI-V2 Pair tokens? What is its value?\n   6. MOD: slippage control\n   7. ... cost of manipulation (hard)\n*)\n\n(* global_abstract_data_type *)\n\nDefinition state := global_abstract_data_type.\n\nDefinition init_state := init_global_abstract_data.\n\nDefinition wei := Z.\n\nDefinition addr := int256.\n\nDefinition blocknumber := int256.\n\nExisting Instance GlobalLayerSpec.\n\nSection step.\n\n  Context (token0_address token1_address amm_address : addr).\n\n  Section mstep.\n  (* These are the parameters which are constant within a given block. *)\n  Context (coinbase : int256)\n          (timestamp : int256)\n          (number : int256)\n          (balance : int256 -> int256)\n          (blockhash : int256 -> int256)\n          (prev_contract_state : state).\n\n  Definition make_machine_env (caller: addr)\n                              : machine_env state\n    := {| me_address := amm_address;\n          me_origin := caller;\n          me_caller := caller;\n          me_callvalue := Int256.repr (0);\n          me_coinbase := coinbase; \n          me_timestamp := timestamp;\n          me_number := number;\n          me_balance := balance;\n          me_blockhash := blockhash;\n          (* not implemented *)\n          me_transfer _ _ _ _ _ := False;\n          me_callmethod _ _ _ _ _ _ _ _ _ _ := False;\n          me_log _ _ _ := prev_contract_state;\n        |}.\n\n  Import MonadNotation.\n\n  Definition lif {A:Type}\n                 (caller : addr)\n                 (cmd : machine_env state -> osT global_abstract_data_type A)\n    : osT state A :=\n    st  <- get;;\n    let me := make_machine_env caller in\n    match runStateT (cmd me) st with\n    | None => mzero\n    | Some (v, st') => put st' ;; ret v\n    end.\n\n  Definition lifted_simpleSwap0 :=\n    fun (caller: addr) (callvalue: wei) (toA: addr) => lif caller\n      (AutomatedMarketMaker_simpleSwap0_opt toA).\n\n  Definition lifted_LiquidityToken_mint :=\n    fun (caller: addr) (callvalue: wei) (toA: addr) (value: Z) => lif caller\n      (LiquidityToken_mint_opt toA value).\n\n  (* osT state int256 = \n    state transformer with option monad, state is state, and value is int256 *)\n  Print osT. (* = fun D : Type => stateT D option *)\n  Print stateT. (* (S : Type) (m : Type -> Type) (t : Type) : Type := mkStateT\n  { runStateT : S -> m (t * S)%type } *)\n\n  Print runStateT. (* takes monad transformer, state, returns m (t * S) *)\n\n  (* How the state of the system changes in a single method call made by player p. *)\n  (* for simplicity we only model functions that modify states and can be called by user *)\n  Inductive mstep u (st st' : state) : Prop :=\n  (* fixed supply tokens *)\n  | FixedSupplyToken0_transfer_step : \n      forall toA tokens r, runStateT (FixedSupplyToken_transfer_opt toA tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | FixedSupplyToken1_transfer_step : \n      forall toA tokens r, runStateT (FixedSupplyToken1_transfer_opt toA tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | FixedSupplyToken0_approve_step : \n      forall spender tokens r, runStateT (FixedSupplyToken_approve_opt spender tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | FixedSupplyToken1_approve_step : \n      forall spender tokens r, runStateT (FixedSupplyToken1_approve_opt spender tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | FixedSupplyToken0_transferFrom_step : \n      forall fromA toA tokens r, runStateT (FixedSupplyToken_transferFrom_opt fromA toA tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | FixedSupplyToken1_transferFrom_step : \n      forall fromA toA tokens r, runStateT (FixedSupplyToken1_transferFrom_opt fromA toA tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  (* amm *)\n  | AutomatedMarketMaker_mint_step : \n      forall toA r, runStateT (AutomatedMarketMaker_mint_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | AutomatedMarketMaker_burn_step : \n      forall toA r, runStateT (AutomatedMarketMaker_burn_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | AutomatedMarketMaker_simpleSwap0_step : \n      forall toA r, runStateT (AutomatedMarketMaker_simpleSwap0_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  .\n\n  (* How the state of the system changes in a single method call made by player p. *)\n  (* for simplicity we only model functions that modify states and can be called by user *)\n  Inductive mstep_amm u (st st' : state) : Prop :=\n  (* amm *)\n  | AutomatedMarketMaker_mint_ammstep : \n      forall toA r, runStateT (AutomatedMarketMaker_mint_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep_amm u st st'\n  | AutomatedMarketMaker_burn_ammstep : \n      forall toA r, runStateT (AutomatedMarketMaker_burn_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep_amm u st st'\n  | AutomatedMarketMaker_simpleSwap0_ammstep : \n      forall toA r, runStateT (AutomatedMarketMaker_simpleSwap0_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep_amm u st st'\n  | AutomatedMarketMaker_skim_ammstep : \n      forall toA r, runStateT (AutomatedMarketMaker_skim_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep_amm u st st'\n  | AutomatedMarketMaker_sync_ammstep : \n      forall r, runStateT (AutomatedMarketMaker_sync_opt (make_machine_env u)) st = Some (r, st')\n      -> mstep_amm u st st'\n  .\n\n  (* We can compute a new block by letting the players call the contract \n     in some arbitrary order. *)\n  Inductive multi_mstep : state -> state -> Prop := \n  | multi_mstep_reflexive : forall (st : state), multi_mstep st st\n  | multi_mstep_transitive : forall (st st' st'' : state) u,\n      multi_mstep st st' -> mstep u st' st'' -> multi_mstep st st''.\n\n\n  (* A block is sufficiently synchronous if every player got a chance to submit a \n     transaction to to. *)\n  (* TODO, I think this definition is fine for now, but it seems little too clever,\n     should probably re-state this using some straightforward tracking of the states\n     we pass through. *)\n  Definition multi_mstep_synchronous st1 st2 :=\n    forall u, exists st st',\n                multi_mstep st1 st /\\ mstep u st st' /\\ multi_mstep st' st2.\n\n  (* Here are a bunch of induction principles inspired by linear temporal logic. *)\n\n  (* Prove that some property P holds \"globally\", i.e. for each state along a \n     path.\n     You can also specify a property Pprev which is known to hold for the\n     prev_contract_state. If not needed, it can just be True.\n *)\n  Lemma multi_mstep_Global_ind : forall (Pprev P : state -> Prop),\n      (forall u st st', Pprev prev_contract_state -> P st -> mstep u st st' -> P st') ->\n       Pprev prev_contract_state -> forall st st', P st -> multi_mstep st st' -> P st'.\n  Proof.\n    induction 4; eauto.\n  Qed.\n\n  (*\n  (* Prove that P holds \"until\" Q  along a path. \n     \"Until\" is a liveness assertion, so we need the synchronicity assumption. *)\n  Lemma multi_mstep_Until_ind : forall (Pprev P Q : state -> Prop),\n      (forall p st st', Pprev prev_contract_state -> P st -> In p players\n                        -> mstep p st st' -> (P st' \\/ Q st')) ->\n                        Pprev prev_contract_state ->\n                        forall st,\n                          P st -> exists st',  multi_mstep st st' -> (P st' \\/ Q st').\n  Proof.\n    induction 4; eauto *)\n\n  End mstep.\n\n  \n  Definition Int256_incr x := Int256.add x Int256.one.\n  \n  Inductive bstep (n : blocknumber) : state -> state -> Prop :=\n  | bstep_step : forall coinbase timestamp balance blockhash st st',\n      multi_mstep coinbase timestamp n balance blockhash st st st' ->\n      bstep n st st'.\n\n  Inductive multi_bstep : blocknumber -> state -> blocknumber -> state -> Prop := \n  | multi_bstep_reflexive : forall n (st : state), multi_bstep n st n st\n  | multi_bstep_transitive : forall n n'  (st st' st'' : state),\n    multi_bstep n st n' st' -> bstep (Int256_incr n') st' st'' -> multi_bstep n st (Int256_incr n') st''.\n  \n  (* multi_bstep is the step relation without any synchronicity assumption.\n     This is sufficient to prove some safety properties, but for most interesting \n     theorems we instead need to use this synchronous version: *)\n\n  Inductive bstep_synch (n : blocknumber) : state -> state -> Prop :=\n  | bstep_synch_step : forall coinbase timestamp balance blockhash st st',\n      multi_mstep_synchronous coinbase timestamp n balance blockhash st st st' ->\n      bstep_synch n st st'.\n\n  Inductive multi_bstep_synch : blocknumber -> state -> blocknumber -> state -> Prop := \n  | multi_bstep_synch_reflexive : forall n (st : state), multi_bstep_synch n st n st\n  | multi_bstep_synch_transitive : forall n n'  (st st' st'' : state),\n    multi_bstep_synch n st n' st' -> bstep_synch (Int256_incr n') st' st'' -> multi_bstep_synch n st (Int256_incr n') st''.\n\n  Lemma multi_bstep_Global_ind : forall (P : state -> Prop),\n      (forall coinbase timestamp number balance blockhash prev_block u st st',\n          P prev_block\n          -> P st\n          -> mstep coinbase timestamp number balance blockhash prev_block u st st'\n          -> P st')\n      -> forall n st n' st',\n        P st -> multi_bstep n st n' st' -> P st'.\n  Proof.\n    induction 3.\n    - auto.\n    - inversion H2; subst.\n      eapply multi_mstep_Global_ind with (st:=st') (prev_contract_state := st').\n      + intros.\n        refine (H _ _ _ _ _ _ _ _ _ _ _ H6); auto.\n      + apply IHmulti_bstep; assumption.\n      + apply IHmulti_bstep; assumption.\n      + exact H3.\n  Qed.\nEnd step.\n\nSection DeepSEAGenericProof.\n\n  Lemma Int256Tree_reduce : forall (i: int256) (v: Z) (t: Int256Tree.t Z), Int256Tree.get_default 0%Z i (Int256Tree.set i v t) = v.\n  Proof.\n    intros.\n    unfold Int256Tree.get_default.\n    rewrite Int256Tree.gss .\n    reflexivity.\n  Qed.\n\n  Lemma Int256Tree_mreduce : forall (i j : int256) (v v': Z) (t: Int256Tree.t Z), \n    i <> j ->\n    Int256Tree.get_default 0%Z i (Int256Tree.set j v' (Int256Tree.set i v t)) = v.\n  Proof.\n    intros.\n    unfold Int256Tree.get_default.\n    rewrite Int256Tree.gso.\n    rewrite Int256Tree.gss.\n    reflexivity.\n    exact H.\n  Qed.\n\n  Lemma Int256Tree_mireduce : forall (i j k : int256) (v v': Z) (t: Int256Tree.t Z), \n    i <> j ->\n    i <> k ->\n    j <> k ->\n    Int256Tree.get_default 0%Z i (Int256Tree.set j v' (Int256Tree.set k v t)) = \n    Int256Tree.get_default 0%Z i t.\n  Proof.\n    intros.\n    unfold Int256Tree.get_default.\n    rewrite Int256Tree.gso.\n    rewrite Int256Tree.gso.\n    reflexivity.\n    exact H0.\n    exact H.\n  Qed.\n\n  Lemma add_sub_inv : forall (i j : Z32), (i + j - i)%Z = j.\n  Proof.\n    intros.\n    omega.\n  Qed.\n\n  (* Lemmas on Inequalities over Z *)\n  Lemma ZInEq_ladd : (forall (i j k : Z32), (i > j + k <-> i - k > j)%Z).\n  Proof.\n  intros. omega.\n  Qed.\n  Hint Rewrite ZInEq_ladd : ZInEq.\n\n  Axiom ZInEq_multpos : (forall (a b c : Z32), c > 0 -> a > b <-> a * c > b * c)%Z.\n  Hint Rewrite ZInEq_multpos : ZInEq.\n\n  Axiom ZInEq_ldiv : (forall (a b c : Z32), b > 0 -> a / b > c <-> a > b * c)%Z.\n\n  Axiom ZInEq_denadd : (forall (a b c : Z32), c > 0 -> a / b > a / (b + c))%Z.\n\n  Lemma increasing_k_math : forall (i j k : Z), (i > 0 -> j > 0 -> k > 0 -> \n    i * j < (i + k) * (j - (k * 997 * j) / (i * 1000 + k * 997)))%Z.\n  Proof.\n    From Coq Require Import ZArith Psatz.\n    Open Scope Z_scope.\n    simpl. Fail lia. Print Lia.lia. Print Lia.zchecker_no_abstract.\n    intros.\n    (*\n    psatz Z 100.\n    lia.\n\n    assert (forall (v v' v'' : Z), v'' > 0 -> v < v' -> v * v'' < v' * v'').\n      intros. \n      pose (H19 := H16 (v * v'') (v' * v'')); clearbody H19.\n      apply H19.\n      unfold Z.sub.\n      apply mul_sub_distr.\n    pose (H17 := H16 (i * j) ((i + k) * (j - k * 997 * j / (i * 1000 + k * 997))) (i * 1000 + k * 997)); clearbody H17.\n    *)\n    assert (0 < (i * 1000 + k * 997)). omega.\n    (* multiplied both sides by the denominator of the divisor and needed to use comparisons between \"(W / V) * V\" and W *)\n    pose (Zmult_nc:=(Zmult_lt_compat_r (i * j) ((i + k) * (j - k * 997 * j / (i * 1000 + k * 997))) (i * 1000 + k * 997) H2)); clearbody Zmult_nc.\n  Admitted.\nEnd DeepSEAGenericProof.\n\nSection AMMProof.\n  Context (token0_address token1_address amm_address : addr).\n\n  Context (* (strategies : strategy_tuple) *)\n          (initial_balances : addr -> Z)\n          (contract_address : int256).\n\n  Context (init_bt init_rt : int256)\n          (init_coinbase : int256)\n          (init_timestamp : int256)\n          (init_number : int256)\n          (init_blockhash : int256 -> int256)\n          (pre_init_state init_state : state).\n\n  (* These are the parameters which are constant within a given block. *)\n  Context (coinbase : int256)\n          (timestamp : int256)\n          (number : int256)\n          (balance : int256 -> int256)\n          (blockhash : int256 -> int256)\n          (prev_contract_state : state).\n\n  Require Import lib.Monad.RunStateTInv.\n  Require Import lib.ArithInv.\n\n  Definition compute_k (s: state) := \n    Z.mul (AutomatedMarketMaker__reserve0 s) (AutomatedMarketMaker__reserve1 s).\n\n  Definition get_balance0 (s: state) (a: addr) :=\n    (Int256Tree.get_default (0%Z)\n      a (FixedSupplyToken_balances s)).\n\n  Definition get_balance1 (s: state) (a: addr) :=\n    (Int256Tree.get_default 0%Z\n      a (FixedSupplyToken1_balances s)).\n\n  Definition make_machine_env_wrapped prev_st user :=\n    make_machine_env amm_address coinbase timestamp number balance blockhash prev_st user.\n\n  Lemma make_machine_env_caller_eq : forall st caller, me_caller (make_machine_env_wrapped st caller) = caller.\n  Proof. auto. Qed.\n\n  Lemma make_machine_env_address_eq : forall st caller, me_address (make_machine_env_wrapped st caller) = amm_address.\n  Proof. auto. Qed.\n\nTransparent FixedSupplyToken_constructor_opt.\nTransparent FixedSupplyToken_totalSupply_opt.\nTransparent FixedSupplyToken_balanceOf_opt.\nTransparent FixedSupplyToken_transfer_opt.\nTransparent FixedSupplyToken_approve_opt.\nTransparent FixedSupplyToken_transferFrom_opt.\nTransparent FixedSupplyToken1_constructor_opt.\nTransparent FixedSupplyToken1_totalSupply_opt.\nTransparent FixedSupplyToken1_balanceOf_opt.\nTransparent FixedSupplyToken1_transfer_opt.\nTransparent FixedSupplyToken1_approve_opt.\nTransparent FixedSupplyToken1_transferFrom_opt.\nTransparent LiquidityToken_constructor_opt.\nTransparent LiquidityToken_mint_opt.\nTransparent LiquidityToken_burn_opt.\nTransparent LiquidityToken_totalSupply_opt.\nTransparent LiquidityToken_balanceOf_opt.\nTransparent LiquidityToken_transfer_opt.\nTransparent LiquidityToken_approve_opt.\nTransparent LiquidityToken_transferFrom_opt.\nTransparent AutomatedMarketMakerLib_constructor_opt.\nTransparent AutomatedMarketMakerLib_getAmountIn_opt.\nTransparent AutomatedMarketMakerLib_getBalanceAdjusted_opt.\nTransparent AutomatedMarketMakerLib_min_opt.\nTransparent AutomatedMarketMaker_constructor_opt.\nTransparent AutomatedMarketMaker_mint_opt.\nTransparent AutomatedMarketMaker_burn_opt.\nTransparent AutomatedMarketMaker_simpleSwap0_opt.\nTransparent AutomatedMarketMaker_swap_opt.\nTransparent AutomatedMarketMaker_skim_opt.\nTransparent AutomatedMarketMaker_sync_opt.\nTransparent AutomatedMarketMaker_k_opt.\nTransparent AutomatedMarketMaker_quote0_opt.\nTransparent AutomatedMarketMaker_getAmountOut0_opt.\nTransparent AutomatedMarketMaker_getAmountIn0_opt.\nDefinition FixedSupplyToken_address := (Int256.repr 65587).\nDefinition FixedSupplyToken1_address := (Int256.repr 65586).\nDefinition LiquidityToken_address := (Int256.repr 65585).\nDefinition AutomatedMarketMaker_address := (Int256.repr 65584).\n\nLtac rds :=\nunfold FixedSupplyToken_constructor_opt in *;\nunfold FixedSupplyToken_totalSupply_opt in *;\nunfold FixedSupplyToken_balanceOf_opt in *;\nunfold FixedSupplyToken_transfer_opt in *;\nunfold FixedSupplyToken_approve_opt in *;\nunfold FixedSupplyToken_transferFrom_opt in *;\nunfold FixedSupplyToken1_constructor_opt in *;\nunfold FixedSupplyToken1_totalSupply_opt in *;\nunfold FixedSupplyToken1_balanceOf_opt in *;\nunfold FixedSupplyToken1_transfer_opt in *;\nunfold FixedSupplyToken1_approve_opt in *;\nunfold FixedSupplyToken1_transferFrom_opt in *;\nunfold LiquidityToken_constructor_opt in *;\nunfold LiquidityToken_mint_opt in *;\nunfold LiquidityToken_burn_opt in *;\nunfold LiquidityToken_totalSupply_opt in *;\nunfold LiquidityToken_balanceOf_opt in *;\nunfold LiquidityToken_transfer_opt in *;\nunfold LiquidityToken_approve_opt in *;\nunfold LiquidityToken_transferFrom_opt in *;\nunfold AutomatedMarketMakerLib_constructor_opt in *;\nunfold AutomatedMarketMakerLib_getAmountIn_opt in *;\nunfold AutomatedMarketMakerLib_getBalanceAdjusted_opt in *;\nunfold AutomatedMarketMakerLib_min_opt in *;\nunfold AutomatedMarketMaker_constructor_opt in *;\nunfold AutomatedMarketMaker_mint_opt in *;\nunfold AutomatedMarketMaker_burn_opt in *;\nunfold AutomatedMarketMaker_simpleSwap0_opt in *;\nunfold AutomatedMarketMaker_swap_opt in *;\nunfold AutomatedMarketMaker_skim_opt in *;\nunfold AutomatedMarketMaker_sync_opt in *;\nunfold AutomatedMarketMaker_k_opt in *;\nunfold AutomatedMarketMaker_quote0_opt in *;\nunfold AutomatedMarketMaker_getAmountOut0_opt in *;\nunfold AutomatedMarketMaker_getAmountIn0_opt in *;\ninv_runStateT;\nsubst;\ninv_arith;\nsimpl in *;\ntry rewrite make_machine_env_caller_eq in *;\ntry rewrite make_machine_env_address_eq in *;\ntry rewrite Int256Tree_reduce in *;\ntry rewrite Int256Tree_mreduce in *;\ntry rewrite Int256Tree_mireduce in *;\nauto.\n\n  (* need to transfer balance first, assume token0 transfer first *)\n  (* should have been approve and then transferFrom, here we are hacking a bit *)\n  (* prove that after every possible function call, whichever layers, the \n  k = _reserve0 * _reserve1 is strictly increasing for simpleSwap0:\n\n  newState = simpleSwap0 oldState /\\ compute_k newState > compute_k oldState *)\n  Theorem increasing_k_simpleSwap0 : (forall r r' \n    (s s' s'' : state) \n    (trader : addr) \n    (swapAmount0 : Z32), \n    (swapAmount0 > 0)%Z -> (* trasferring an amount > 0 *)\n    ((AutomatedMarketMaker__reserve0 s) > 0)%Z -> \n    ((AutomatedMarketMaker__reserve1 s) > 0)%Z ->\n    amm_address <> trader -> \n    get_balance0 s amm_address = (AutomatedMarketMaker__reserve0 s) -> (* assumes that the reserve is the same as balance at s *)\n    get_balance1 s amm_address = (AutomatedMarketMaker__reserve1 s) ->\n    runStateT (FixedSupplyToken_transfer_opt amm_address swapAmount0 (make_machine_env_wrapped s trader)) s = Some (r, s') ->\n    runStateT (AutomatedMarketMaker_simpleSwap0_opt trader (make_machine_env_wrapped s amm_address)) s' = Some (r', s'') -> \n    Z.lt (compute_k s) (compute_k s'')).\n  Proof.\n  intros.\n  unfold get_balance0 in H0.\n  unfold get_balance1 in H1.\n  unfold AutomatedMarketMaker_simpleSwap0_opt in *.\n  unfold FixedSupplyToken1_transfer_opt in *.\n  unfold FixedSupplyToken_balanceOf_opt in *.\n  unfold FixedSupplyToken1_balanceOf_opt in *.\n  unfold FixedSupplyToken_transfer_opt in *.\n  inv_runStateT.\n  rewrite -> make_machine_env_caller_eq in *.\n  rewrite -> make_machine_env_address_eq in *.\n  subst.\n  inv_arith.\n  unfold compute_k.\n  simpl.\n\n  rewrite Int256Tree_reduce in *.\n  rewrite Int256Tree_mreduce in *.\n  repeat match goal with\n  | [ |- context[AutomatedMarketMaker__reserve1 ?X]] => remember (AutomatedMarketMaker__reserve1 X) as R1\n  end.\n  repeat match goal with\n  | [ |- context[AutomatedMarketMaker__reserve0 ?X]] => remember (AutomatedMarketMaker__reserve0 X) as R0\n  end.\n  match goal with \n  | [ |- context[Z.mul (Z.add ?X _) _]] => replace X with R0 (* rewrite -> H1 *)\n  end.\n  match goal with \n  | [ |- context[Z.sub ?X _]] => replace X with R1\n  end.\n  remember swapAmount0 as delta0.\n\n  pose (IKM := increasing_k_math R0 R1 delta0 H0 H1 H); clearbody IKM.\n  rewrite add_sub_inv.\n  exact IKM.\n  exact H2.\n  Qed.\n\nLemma balance_tracks_reserve_inv : forall u s s', \n  u <> amm_address -> \n  get_balance0 s amm_address = (AutomatedMarketMaker__reserve0 s) ->\n  get_balance1 s amm_address = (AutomatedMarketMaker__reserve1 s) -> \n  mstep_amm amm_address coinbase timestamp number balance blockhash prev_contract_state u s s' ->\n  get_balance0 s amm_address = (AutomatedMarketMaker__reserve0 s') /\\\n  get_balance1 s amm_address = (AutomatedMarketMaker__reserve1 s').\nProof.\n  intros u s s' Hun Hps0 Hps1 Hstp.\n  unfold get_balance0 in *.\n  unfold get_balance1 in *.\n  destruct Hstp; rds. (* FIXME: rds should be able to automatically solve all the goals if we have \n                          machine_env updating implemented *)\nAdmitted.\n\nAxiom anything : False.\n\n(* splitting trades is strictly more expensive, if you split one trade into two trades with combined\n    same amount, then you swapped for less alternative tokens *)\nTheorem path_dependency : forall r r' rd rd' rd'' rd''' \n    (s s' s'' sd' sd'' sd''' sd'''' : state) \n    (trader : addr) \n    (swapAmount0 : Z32)\n    (swapAmount0D0 swapAmount0D1 : Z32), \n    (swapAmount0D0 > 0)%Z ->\n    (swapAmount0D1 > 0)%Z ->\n    (swapAmount0D0 + swapAmount0D1 = swapAmount0)%Z ->\n    (swapAmount0 > 0)%Z -> (* trasferring an amount > 0 *)\n    ((AutomatedMarketMaker__reserve0 s) > 0)%Z -> \n    ((AutomatedMarketMaker__reserve1 s) > 0)%Z ->\n    amm_address <> trader -> \n    get_balance0 s amm_address = (AutomatedMarketMaker__reserve0 s) -> (* assumes that the reserve is the same as balance at s *)\n    get_balance1 s amm_address = (AutomatedMarketMaker__reserve1 s) ->\n    (* swapping in one trade *)\n    runStateT (FixedSupplyToken0_transfer_opt amm_address swapAmount0 (make_machine_env_wrapped s trader)) s = Some (r, s') ->\n    runStateT (AutomatedMarketMaker_simpleSwap0_opt trader (make_machine_env_wrapped s amm_address)) s' = Some (r', s'') -> \n    (* swapping in two trades *)\n    runStateT (FixedSupplyToken0_transfer_opt amm_address swapAmount0D0 (make_machine_env_wrapped s trader)) s = Some (rd, sd') ->\n    runStateT (AutomatedMarketMaker_simpleSwap0_opt trader (make_machine_env_wrapped s amm_address)) sd' = Some (rd', sd'') -> \n    runStateT (FixedSupplyToken0_transfer_opt amm_address swapAmount0D1 (make_machine_env_wrapped s trader)) sd'' = Some (rd'', sd''') ->\n    runStateT (AutomatedMarketMaker_simpleSwap0_opt trader (make_machine_env_wrapped s amm_address)) sd''' = Some (rd''', sd'''') -> \n    (* the ending balance is different *)\n    (r' > rd' + rd''')%Z.\nProof.\n  (* generic tactic *)\n  intros.\n  unfold get_balance0 in *.\n  unfold get_balance1 in *.\n  Time rds. (* finish in 182 secs, or 3m2s *)\n  rewrite !H6. rewrite !H7. \n  remember (AutomatedMarketMaker__reserve0 m121) as a.\n  remember (AutomatedMarketMaker__reserve1 m121) as b.\n  remember (swapAmount0D0) as c.\n  remember (swapAmount0D1) as d.\n  rewrite !add_sub_inv. (* need inequality rewriting rules *)\n\n  assert (d * 997 * R1 / (R0 * 1000 + d * 997) > d * 997 * R1 / (R0 * 1000 + d * 997 + d' * 997))%Z.\n  assert (d' * 997 > 0)%Z. omega.\n  match goal with\n  | [ |- context[Z.gt (Z.div ?A ?B) (Z.div ?A (Z.add ?B ?C))]] => pose (HZInEq_denadd := ZInEq_denadd A B C H31); clearbody HZInEq_denadd\n  end.\n  exact HZInEq_denadd.\n  apply H31.\n  rewrite Zgt_trans.\n  nia.\n  unfold AutomatedMarketMaker_simpleSwap0_opt in *.\n  unfold FixedSupplyToken1_transfer_opt in *.\n  unfold FixedSupplyToken0_balanceOf_opt in *.\n  unfold FixedSupplyToken1_balanceOf_opt in *.\n  unfold FixedSupplyToken0_transfer_opt in *.\n\n  Opaque bind ret get gets put modify guard mzero.\n\n  Import MonadNotation.\n  inv_runStateT1 H13.\n  subst.\n  inv_arith.\n  simpl in *.\n\n  inv_runStateT1 H12.\n  subst.\n  autorewrite with updates in *.\n  rewrite !Int256Tree_reduce in *.\n  simpl in *.\n  inv_arith.\n\n  inv_runStateT1  H11.\n  subst.\n  simpl in *.\n  autorewrite with updates in *.\n  inv_arith.\n  rewrite !(@Int256Tree_Properties.get_default_so _ (0%Z) a25 a) in * by (exact H22).\n  rewrite !Int256Tree_Properties.get_default_ss in *.\n\n  inv_runStateT1 H9.\n  subst.\n  simpl in *.\n  autorewrite with updates in *.\n  inv_arith.\n\n  inv_runStateT1 H8.\n  subst.\n  simpl in *.\n  autorewrite with updates in *.\n  rewrite !Int256Tree_Properties.get_default_ss in *.\n\n  inv_runStateT1   H10.\n  subst.\n  simpl in *.\n  autorewrite with updates in *.\n  rewrite !Int256Tree_Properties.get_default_ss in *.\n\n  (* These lines are to test if the resulting proof term can be checked reasonably quickly, but it seems it works. *)\n  (* destruct anything.\n  Time Qed. *)\n  \nAdmitted.\n"
  },
  {
    "path": "contracts/amm/amm/subdir.mk",
    "content": "# WARNING: This file is generated by Edsger, the DeepSEA compiler.\n#          All modification will be lost when regenerating.\namm_FILES = \\\namm/CertiKOS.v \\\namm/DataTypeOps.v \\\namm/DataTypeProofs.v \\\namm/DataTypes.v \\\namm/EdsgerIdents.v \\\namm/LSimAMM.v \\\namm/LSimAMMLIB.v \\\namm/LSrcAMM.v \\\namm/LSrcAMMLIB.v \\\namm/LayerAMM.v \\\namm/LayerAMMLIB.v \\\namm/ObjAutomatedMarketMakerCode.v \\\namm/ObjAutomatedMarketMakerCodeProofs.v \\\namm/ObjAutomatedMarketMakerLibCode.v \\\namm/ObjAutomatedMarketMakerLibCodeProofs.v \\\namm/ObjFixedSupplyToken1Code.v \\\namm/ObjFixedSupplyToken1CodeProofs.v \\\namm/ObjFixedSupplyTokenCode.v \\\namm/ObjFixedSupplyTokenCodeProofs.v \\\namm/ObjLiquidityTokenCode.v \\\namm/ObjLiquidityTokenCodeProofs.v \\\namm/ObjSimAutomatedMarketMaker.v \\\namm/ObjSimAutomatedMarketMakerLib.v \\\namm/ObjSimFixedSupplyToken.v \\\namm/ObjSimFixedSupplyToken1.v \\\namm/ObjSimLiquidityToken.v \\\namm/RefineAMM.v \\\namm/Symbols.v\n"
  },
  {
    "path": "contracts/amm/amm.ds",
    "content": "(* TODO: add emit Events *)\n\n(* PROOFS: \n   1. change re-defined layers\n   2. balance tracks reserve\n   3. increasing k -> algebra\n   4. no path independence, splitting trades is strictly more expensive -> algebra, appendix D\n   5. liquidity token economics is right, i.e., UNI-V2 tracks the actual share of pool --> actually, where is the trading of UNI-V2 Pair tokens? What is its value?\n   6. MOD: slippage control\n   7. ... cost of manipulation (hard)\n*)\n\nobject signature ERC20Interface = {\n  constructor : unit -> unit;\n  mint : address * int -> unit;\n  burn : address * int -> unit;\n  totalSupply : unit -> int;\n  balanceOf : address -> int;\n  transfer : address * int -> bool;\n  approve : address * int -> bool;\n  transferFrom : address * address * int -> bool\n}\n\nobject LiquidityToken : ERC20Interface {\n  let _totalSupply : int := 0\n  let balances : mapping[address] int := mapping_init\n  let allowances : mapping[address] mapping[address] int := mapping_init\n\n  let constructor () =\n    balances[msg_sender] := 100000\n\n  let mint (toA, value) = \n    let totalSupply = _totalSupply in\n    _totalSupply := totalSupply + value;\n    let to_bal = balances[toA] in\n    balances[toA] := to_bal + value\n\n  let burn (fromA, value) = \n    let totalSupply = _totalSupply in\n    _totalSupply := totalSupply - value;\n    let from_bal = balances[fromA] in\n    balances[fromA] := from_bal - value\n\n  let totalSupply () =\n    let bal0 = balances[address(0x0)] in\n    let totalSupply = _totalSupply in\n    let resultU = totalSupply - bal0 in\n    resultU\n\n  let balanceOf tokenOwner =\n    let bal = balances[tokenOwner] in\n    let resultU = bal in\n    resultU\n     \n  let transfer(toA, tokens) =\n    let fromA = msg_sender in\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n\n  let approve (spender, tokens) =\n    allowances[msg_sender][spender] := tokens;\n    let resultU = true in\n    resultU\n\n  let transferFrom (fromA, toA, tokens) =\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    let allowed = allowances[fromA][toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens /\\ allowed >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n}\n\nobject signature FixedERC20Interface = {\n  constructor : unit -> unit;\n  const totalSupply : unit -> int;\n  balanceOf : address -> int;\n  transfer : address * int -> bool;\n  approve : address * int -> bool;\n  transferFrom : address * address * int -> bool\n}\n\nobject FixedSupplyToken : FixedERC20Interface {\n  let _totalSupply : int := 100000\n  let balances : mapping[address] int := mapping_init\n  let allowances : mapping[address] mapping[address] int := mapping_init\n\n  let constructor () =\n    _totalSupply := 100000;\n    balances[msg_sender] := 100000\n\n  let totalSupply () =\n    let bal0 = balances[address(0x0)] in\n    let totalSupply = _totalSupply in\n    let resultU = totalSupply - bal0 in\n    resultU\n\n  let balanceOf tokenOwner =\n    let bal = balances[tokenOwner] in\n    let resultU = bal in\n    resultU\n     \n  let transfer(toA, tokens) =\n    let fromA = msg_sender in\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n\n  let approve (spender, tokens) =\n    allowances[msg_sender][spender] := tokens;\n    let resultU = true in\n    resultU\n\n  let transferFrom (fromA, toA, tokens) =\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    let allowed = allowances[fromA][toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens /\\ allowed >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n}\n\n(* this AMM supports ERC20 tokens, ETH can be incorporated as WETH for trading *)\nobject signature AMMInterface = {\n  constructor : unit -> unit;\n  (* swap : int * int * address -> unit; *)\n\n  coarsed simpleSwap0 : address -> int; (* transfer token0 to amm, results number of token1 swapped *)\n\n  (* router *)\n  (* swapTokensForExactTokens\n  swapExactTokensForTokens\n  addLiquidity (* why restrain the liquidity to not depreciating an asset too much? *)\n  removeLiquidity *)\n\n  (* fund management functions *)\n  coarsed mint : address -> unit; (* provide liquidity to this pair *)\n  coarsed burn : address -> unit; (* remove liquidity from this pair *)\n  \n  coarsed skim : address -> unit; (* arbitrage to force balances to match reserves *)\n  coarsed sync : unit -> unit; (* force reserves to match balances *)\n  k : unit -> int; (* get the constant product *)\n\n  (* oracles *)\n  (* we do not provide Uniswap V2 version of smoothed oracles at this moment *)\n  quote0 : int -> int; (* given some amount of an asset and pair reserves, returns an equivalent amount of the other asset *)\n  getAmountOut0 : int -> int; (* given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset *)\n  getAmountIn0 : int -> int; (* given an output amount of an asset and pair reserves, returns a required input amount of the other asset *)\n}\n\n(* assuming 0.3% txn fee, excluding the 0.05% additional fee in Uniswap V2 design *)\n(* we do not support liquidity tokens at the moment *)\nobject AutomatedMarketMaker \n  ( liquidityToken: ERC20Interface, \n    erc20Token0: FixedERC20Interface, \n    erc20Token1: FixedERC20Interface) : AMMInterface {\n\n  let _token0 : address := address(0xdac17f958d2ee523a2206206994597c13d831ec7) (* USDT *)\n  let _token1 : address := address(0x6b175474e89094c44da98b954eedeac495271d0f) (* DAI *)\n  let _owner : address := address(0x0)\n  let _reserve0 : int := 0\n  let _reserve1 : int := 0\n  let blockTimestampLast : int := 0 (* new oracle *)\n  let price0CumulativeLast : int := 0 (* new oracle *)\n  let price1CumulativeLast : int := 0 (* new oracle *)\n  let kLast : int := 0 (* reserve0 * reserve1, as of immediately after the most recent liquidity event *)\n\n  let constructor () =\n    _owner := msg_sender\n\n  (* transfer token0 and token1 to this contract, then mint liquidity tokens *)\n  let mint (toA) = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let amount0 = balance0 - reserve0 in\n    let amount1 = balance1 - reserve1 in\n    (* update reserve 0 and reserve 1 *)\n    let totalSupply = liquidityToken.totalSupply() in\n    let liquidity = if totalSupply = 0 \n      then \n        begin\n          liquidityToken.mint(address(0x0), 1000); (* lock the first liquidity tokens*)\n          amount0 * amount1 - 1000 (* in Uniswap this should be square-rooted *)\n        end\n      else\n        let x = amount0 * totalSupply / reserve0 in \n        let y = amount1 * totalSupply / reserve1 in\n        if x < y then x else y\n    in\n    assert (liquidity > 0);\n    liquidityToken.mint(toA, liquidity);\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  (* need toA first transfer liquidity tokens to this contract, then operate *)\n  (* it does not use ERC20 style allowances, just direct transfer *)\n  let burn (toA) = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let liquidity = liquidityToken.balanceOf(this_address) in\n    let totalSupply = liquidityToken.totalSupply() in\n    let amount0 = liquidity * balance0 / totalSupply in\n    let amount1 = liquidity * balance1 / totalSupply in\n    assert (amount0 > 0 /\\ amount1 > 0);\n    liquidityToken.burn(this_address, liquidity);\n    let success = erc20Token0.transfer(toA, amount0) in\n    assert (success);\n    let success = erc20Token1.transfer(toA, amount1) in\n    assert (success);\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  (* adhere to the stanford paper formalization, targeted for vanilla proof *)\n  let simpleSwap0 (toA) = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let amount0In = balance0 - reserve0 in\n    let token0 = _token0 in\n    let token1 = _token1 in\n    assert (toA <> token0 /\\ toA <> token1);\n    assert (amount0In > 0);\n    assert (reserve0 > 0 /\\ reserve1 > 0);\n    let amountInWithFee = amount0In * 997 in\n    let numerator = amountInWithFee * reserve1 in\n    let denominator = reserve0 * 1000 + amountInWithFee in\n    let result = numerator / denominator in\n    let success = erc20Token1.transfer(toA, result) in\n    assert (success);\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    _reserve0 := balance0;\n    _reserve1 := balance1;\n    let resultU = result in\n    resultU\n\n  (* derives from Uniswap V2 flashswap, but not flashswap since DeepSEA does not allow control-flow aggregation  *)\n  (* first transfer tokens to this contract, then call swap to swap them *)\n  (* notice this does not refund, so possibly not optimal rate *)\n  (* let swap (amount0Out, amount1Out, toA) = \n    assert (amount0Out > 0 \\/ amount1Out > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let token0 = _token0 in\n    let token1 = _token1 in\n    assert (amount0Out < reserve0 /\\ amount1Out < reserve1);\n    assert (toA <> token0 /\\ toA <> token1);\n    (* check the assets satisfy what is wanted *)\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    (* we can prove that balance > reserve here *)\n    let amount0In = helper.getAmountIn(balance0, 0, reserve0) in (* balance0 - reserve0 *)\n    let amount1In = helper.getAmountIn(balance1, 0, reserve1) in\n    assert (amount0In > 0 \\/ amount1In > 0);\n    let balance0Adjusted = helper.getBalanceAdjusted(balance0 - amount0Out, amount0In) in\n    let balance1Adjusted = helper.getBalanceAdjusted(balance1 - amount1Out, amount1In) in\n    assert (balance0Adjusted * balance1Adjusted > reserve0 * reserve1 * 1000 * 1000);\n\n    (* sending money *)\n    let _ = if amount0Out > 0 then\n      let success = erc20Token0.transfer(toA, amount0Out) in\n      assert (success);\n      ()\n    else \n      ()\n    in\n    let _ = if amount1Out > 0 then\n      let success = erc20Token1.transfer(toA, amount1Out) in\n      assert (success);\n      ()\n    else\n      ()\n    in\n    (* flash swap style: sent money (amount0Out, amount1Out) to msg_sender, now wait to get back *)\n    (* after got money back *)\n    (* let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let amount0In = helper.getAmountIn(balance0, amount0Out, reserve0) in\n    let amount1In = helper.getAmountIn(balance1, amount1Out, reserve1) in\n    assert (amount0In > 0 \\/ amount1In > 0);\n    let balance0Adjusted = helper.getBalanceAdjusted(balance0, amount0In) in\n    let balance1Adjusted = helper.getBalanceAdjusted(balance1, amount1In) in\n    assert (balance0Adjusted * balance1Adjusted > reserve0 * reserve1 * 1000 * 1000); *)\n    (* update the reserves, also update the oracle if possible *)\n    _reserve0 := balance0;\n    _reserve1 := balance1 *)\n\n  let skim (toA) = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let skim0 = balance0 - reserve0 in\n    let skim1 = balance1 - reserve1 in\n    let success = erc20Token0.transfer(toA, skim0) in\n    assert (success);\n    let success = erc20Token1.transfer(toA, skim1) in\n    assert (success)\n\n  let sync () = \n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  let k () = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let resultU = reserve0 * reserve1 in\n    resultU\n\n  (* Uniswap did not use Q112 library to do this computation *)\n\n  (* given amount0 of token0, the equivalent value in token1 *)\n  let quote0 (amount0) = \n    assert (amount0 > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    assert (reserve0 > 0 /\\ reserve1 > 0); (* prove that this can be dropped? *)\n    let resultU = amount0 * reserve1 / reserve0 in\n    resultU\n\n  let getAmountOut0 (amount0In) = \n    assert (amount0In > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    assert (reserve0 > 0 /\\ reserve1 > 0);\n    let amountInWithFee = amount0In * 997 in\n    let numerator = amountInWithFee * reserve1 in\n    let denominator = reserve0 * 1000 + amountInWithFee in\n    let resultU = numerator / denominator in\n    resultU\n\n  let getAmountIn0 (amount0Out) =\n    assert (amount0Out > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    assert (reserve0 > 0 /\\ reserve1 > 0);\n    let numerator = reserve1 * amount0Out * 1000 in\n    let denominator = (reserve0 - amount0Out) * 997 in\n    let resultU = (numerator / denominator) + 1 in\n    resultU\n\n}\n\nlayer signature AMMLibSig = {\n  erc20Token0 : FixedERC20Interface;\n  erc20Token1 : FixedERC20Interface;\n  liquidityToken : ERC20Interface;\n}\n\nlayer AMMLIB : [{}] AMMLibSig = {\n  erc20Token0 = address(0x10033) <: FixedSupplyToken;\n  erc20Token1 = address(0x10032) <: (clone FixedSupplyToken); (* cloned an object *)\n  liquidityToken = address(0x10031) <: LiquidityToken;\n}\n\nlayer signature AMMSig = {\n  amm : AMMInterface\n}\n\nlayer AMM : [AMMLibSig] AMMSig = {\n  amm = address(0x10030) <: AutomatedMarketMaker\n}\n\nlayer COMPLETE = AMM @ AMMLIB"
  },
  {
    "path": "contracts/amm/cst_man.v",
    "content": "Add LoadPath \"./amm\" as amm.\n\n(*From Coq Require Import ssreflect ssrfun ssrbool.\nSet Implicit Arguments.\nUnset Strict Implicit.\nUnset Printing Implicit Defensive.*)\nRequire Import Reals.\nRequire Import Lra.\nRequire Import Lia.\nRequire Import Interval.Tactic.\nRequire Import Interval.Real.Taylor.\nRequire Import Interval.Poly.Datatypes.\nRequire Import Interval.Poly.Taylor_poly.\nRequire Import Interval.Poly.Taylor_model_sharp.\nRequire Import Interval.Interval.Interval_compl.\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import amm.LayerAMM.\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import amm.EdsgerIdents.\nRequire Import amm.DataTypes.\nRequire Import amm.DataTypeOps.\nRequire Import amm.DataTypeProofs.\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.StateMonad.\nRequire Import DeepSpec.lib.Monad.OptionMonad.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.core.SynthesisStmt.\nRequire Import DeepSpec.core.SynthesisFunc.\nRequire Import backend.MachineModel.\nExisting Instance MonadState_DS.\nExisting Instance MonadZero_DS.\nRequire Export amm.LayerAMMLIB.\nFrom Coquelicot Require Import Coquelicot.\nRequire Import Interval.Missing.Coquelicot.\n\nImport DeepSpec.lib.Monad.Monad.MonadNotation.\n\nModule TR := TaylorPoly FullR PolR.\nModule SPoly := SeqPoly FullR.\nSection C_man.\nImport core.MemoryModel.\nContext {memModelOps : MemoryModelOps mem}.\n\nDefinition state := global_abstract_data_type.\n\nDefinition init_state := init_global_abstract_data.\n\nDefinition wei := Z.\n\nDefinition addr := int256.\n\nDefinition blocknumber := int256.\n\nExisting Instance GlobalLayerSpec.\n\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nOpen Scope R_scope.\n\nRequire Import lib.Monad.RunStateTInv.\nRequire Import lib.ArithInv.\n\nDefinition reserve_beta (s : state) : Z := (DataTypeOps.AutomatedMarketMaker__reserve0 s).\n\nDefinition reserve_alpha (s : state) : Z := (DataTypeOps.AutomatedMarketMaker__reserve1 s).\n\nDefinition get_balance0 (s: state) (a: addr) :=\n    (Int256Tree.get_default (0%Z)\n      a (FixedSupplyToken_balances s)).\n\nContext (token0_address token1_address amm_address : addr).\n\nContext (coinbase : int256)\n          (timestamp : int256)\n          (number : int256)\n          (balance : int256 -> int256)\n          (blockhash : int256 -> int256)\n          (prev_contract_state : state).\n\n Definition make_machine_env (caller: addr)\n                              : machine_env state\n    := {| me_address := amm_address;\n          me_origin := caller;\n          me_caller := caller;\n          me_callvalue := Int256.repr (0);\n          me_coinbase := coinbase; \n          me_timestamp := timestamp;\n          me_number := number;\n          me_chainid := Int256.zero;\n          me_selfbalance := Int256.zero;\n          me_balance := balance;\n          me_blockhash := blockhash;\n          (* not implemented *)\n          me_transfer _ _ d := (Int256.one, d);\n          me_callmethod _ _ _ _ _ _ _ _ _ _ := False;\n          me_log _ _ _ := prev_contract_state;\n        |}.\n\nSet Typeclasses Debug.\nVariable (s s': state).\nVariables (a toA : addr).\nVariable (r : Z32).\n\nDefinition delta_beta : Z := (get_balance0 s a) - (reserve_beta s).\nHypothesis del_alp : runStateT (AutomatedMarketMaker_simpleSwap0_opt toA (make_machine_env a)) s = Some (r , s').\n \nDefinition delta_alpha : Z := r.\nDefinition market_price : R := (IZR (delta_beta))/(IZR (delta_alpha)).\nDefinition eps : R := (IZR ((reserve_beta s) + delta_beta)/ (IZR ((reserve_alpha s) - delta_alpha) * market_price)) - (1%R).\n\nDefinition f (x : R) := x + (1 / x).\n\nDefinition kappa := (5/100)%R. (* approximation of (3/2) - (sqrt 2).*)\n\nDefinition T_f_1 (n : nat) := \nmatch n with\n | 0%nat => (fun x => sqrt(1+x) + (1/sqrt (1 + x)))\n | 1%nat => (fun x => 1/(2* sqrt(1+x)) - (1/ (2 * (1 + x) * (sqrt (1 + x)))))\n | 2%nat => (fun x => (2 - x)/ (4 * ((1 + x)^2) * sqrt(1 +x)))\n | _ => (fun x => 0%R)\nend.\n\nLemma lower_bnd : forall eta , 0 <= eta <= 1 ->\n(2 - eta) / (8 * ((1 + eta)^2) * sqrt (1 + eta)) >= 1 / 48.\nProof. intros.\n       interval with (i_bisect eta).\nQed.\n\nLemma pos_deriv : forall x: R, x >= 1 ->\n1 - (1/ sqrt(1 + x)) - 5/100 >= 0.\nProof. intros.\n       interval.\nQed.\n\nDefinition extended_f (x : R) : R :=\n((sqrt(1 + x) - 1)^2  - ((5/100) * (1 + x))).\n\nDefinition extended_f' (x : R) : R :=\n1 - (1/ sqrt(1 + x)) - 5/100.\n\nDefinition P_gt_1 (x : R) : Prop := (x >=1)%R.\n\nLemma is_deriv_f : forall (x : R),\nP_gt_1 x ->\nDerive.is_derive extended_f x (extended_f' x).\nProof. intros. \n       unfold extended_f.\n       unfold extended_f'.\n       apply (is_derive_minus (fun x0 : R => (sqrt (1 + x0) - 1)^2 ) (fun x0 : R => 5 / 100 * (1 + x0)) x \n       (1 - 1/ sqrt (1 + x)) (5 / 100)).\n       + replace (1 - 1 / sqrt (1 + x)) with (scal (1 / (2 * sqrt (1 + x))) (2 * (sqrt (1 + x) - 1))).\n         apply (is_derive_comp (fun x0 : R => x0 ^ 2) (fun x0 : R => sqrt (1 + x0) -1) x (2 * (sqrt (1 +x) -1)) (1 / (2 * sqrt (1 + x)))).\n         ++ replace 2 with (INR 2 * 1).\n            replace (sqrt (1 + x) -1) with ((sqrt (1+x) -1) ^ Init.Nat.pred 2) at 2.\n            apply (is_derive_pow (fun x0 : R => x0) 2%nat (sqrt (1 +x)-1) 1).\n            replace 1 with (@one R_Ring) at 3.\n            apply (@is_derive_id R_AbsRing).\n            unfold one. simpl. reflexivity.\n            unfold Init.Nat.pred. simpl. lra.\n            change (INR 2) with 2. lra.\n         ++ replace (1 / (2 * sqrt (1+x))) with (1 / (2 * sqrt (1+x)) - 0) by lra.\n            apply (is_derive_minus (fun x0 : R => sqrt (1 + x0)) (fun x0 : R => 1%R) x (1 / (2 * sqrt (1 + x))) (0%R)).\n            - replace (1 / (2 * sqrt (1 + x))) with (scal 1 (1 / (2 * sqrt (1 + x)))).\n              apply (is_derive_comp (fun x0 : R => sqrt x0) (fun x0 : R => 1 + x0) x (1 / (2 * sqrt (1 + x))) 1).\n              apply (is_derive_sqrt (fun x0 : R => x0) (1 +x) 1).\n              replace 1 with (@one R_Ring) at 2.\n              apply (@is_derive_id R_AbsRing).\n              unfold one. simpl. reflexivity. unfold P_gt_1 in H. lra.\n              replace 1 with (0 + 1) at 1 by lra.\n              apply (is_derive_plus (fun x0 : R => 1%R) (fun x0 : R => x0) x 0 1).\n              replace 0 with (@zero R_Ring).              \n              apply (@is_derive_const R_AbsRing).\n              unfold zero. simpl. reflexivity.\n              replace 1 with (@one R_Ring).\n              apply (@is_derive_id R_AbsRing).\n              unfold one. simpl. reflexivity.\n              unfold scal. simpl. unfold mult. simpl. lra.\n              replace 0 with (@zero R_Ring).              \n              apply (@is_derive_const R_AbsRing).\n              unfold zero. simpl. reflexivity.\n              unfold scal. simpl. unfold mult. simpl. \n              rewrite -> !Rmult_minus_distr_l. field. apply not_eq_sym. apply Rlt_not_eq.\n              unfold P_gt_1 in H. interval.\n      + replace (5/100) with (5/100 * 1) at 1 by lra.\n        apply (is_derive_scal (fun x0 : R => 1 + x0) x (5/100) 1).\n        replace 1 with (0 + 1) at 1 by lra.\n        apply (is_derive_plus (fun x0 : R => 1%R) (fun x0 : R => x0) x 0 1).\n        replace 0 with (@zero R_Ring).\n        apply (@is_derive_const R_AbsRing).\n        unfold zero. simpl. reflexivity.\n        replace 1 with (@one R_Ring).\n        apply (@is_derive_id R_AbsRing).\n        unfold one. simpl. reflexivity.\nQed.\n\nLemma eps_sq : eps >= 1 ->\n(sqrt(1 + eps) - 1)^2  - ((5/100) * (1 + eps)) >= 0.\nProof. intros.\n       assert (Hcon : Stdlib.connected P_gt_1).\n        { unfold Stdlib.connected. intros. unfold P_gt_1. unfold P_gt_1 in H0.\n          destruct H2. apply (Rge_trans z x 1). apply Rle_ge. apply H2. apply H0. }\n       assert (Hincr : (Rincr P_gt_1 extended_f)).\n        { apply (Rderive_pos_imp_incr Hcon is_deriv_f).\n          unfold Rpos_over. intros. apply Rge_le. unfold extended_f'. \n          apply pos_deriv. unfold P_gt_1 in H0. apply H0. }\n       assert (H_incr_implies : (extended_f 1) >= 0 -> (Rincr P_gt_1 extended_f) ->\n               eps >= 1 -> ((sqrt(1 + eps) - 1)^2  - ((5/100) * (1 + eps))) >= 0).\n         { intros.\n           replace ((sqrt (1 + eps) - 1) ^ 2 - 5 / 100 * (1 + eps)) with (extended_f eps).\n           assert (H_1 : extended_f 1 >=0).\n           { unfold extended_f. interval. }\n           assert (H_2 : extended_f eps >= extended_f 1). \n           { unfold Rincr in Hincr. apply Rle_ge. apply Hincr.\n             unfold P_gt_1. lra. unfold P_gt_1. apply H. apply Rge_le . apply H.  }\n        apply (Rge_trans (extended_f eps) (extended_f 1) 0).\n        apply H_2.\n        apply H_1.\n        unfold extended_f.\n        reflexivity. }\n        apply H_incr_implies.\n        unfold extended_f. simpl.\n        interval. apply Hincr. apply H.\nQed.\n\nLtac deriv_sqrt x := try (apply (derivable_pt_lim_comp (fun x0 : R => 1 + x0) (fun x0 : R => sqrt x0) x (1) (1 / (2 * (sqrt (1 + x))))));\n                   try (replace 1%R with (0 + 1)%R at 1 by lra);\n                   try (apply (derivable_pt_lim_plus (fun x0 : R => 1) id x 0 1));\n                   try (apply derivable_pt_lim_const);\n                   try (apply derivable_pt_lim_id);\n                   try (replace (1 / (2 * sqrt (1 + x))) with (/ (2 * sqrt (1 + x))) by lra);\n                   try (apply derivable_pt_lim_sqrt);\n                   try (apply Fourier_util.Rlt_zero_pos_plus1).\n\nLemma deriv_lim_T_f : forall (k : nat) (x : R),\n(k <= 1)%nat ->\n0 < x < 1 ->\nderivable_pt_lim (T_f_1 k) x (T_f_1 (S k) x).\nProof. intros.\n       assert (Hk : (k =0)%nat \\/ (k = 1)%nat) by lia.\n       destruct Hk.\n       - rewrite -> H1. simpl.\n         replace (1 / (2 * sqrt (1 + x)) - 1 / (2 * (1 + x) * sqrt (1 + x))) with\n         (1 / (2 * sqrt (1 + x)) + - 1 / (2 * (1 + x) * sqrt (1 + x))) by lra.\n         apply (derivable_pt_lim_plus (fun x0 : R => sqrt (1 + x0)) (fun x0 : R => 1 / sqrt (1 + x0)) x (1 / (2 * sqrt (1 + x))) \n         (- 1 / (2 * (1 + x) * sqrt (1 + x)))).\n         -- replace (1 / (2 * sqrt (1 + x))) with (1 / (2 * sqrt (1 + x)) * 1) by lra.\n            apply (derivable_pt_lim_comp (fun x0 : R => 1 + x0) (fun x0 : R => sqrt x0) x (1) (1 / (2 * (sqrt (1 + x))))).\n            replace 1%R with (0 + 1)%R at 1 by lra.\n            apply (derivable_pt_lim_plus (fun x0 : R => 1) id x 0 1).\n            apply derivable_pt_lim_const.\n            apply derivable_pt_lim_id.\n            replace (1 / (2 * sqrt (1 + x))) with (/ (2 * sqrt (1 + x))) by lra.\n            apply derivable_pt_lim_sqrt.\n            apply Fourier_util.Rlt_zero_pos_plus1.\n            destruct H0. apply H0.\n         -- replace (-1 / (2 * (1 + x) * sqrt (1 + x))) with (-1 / (1 + x) * / (2 * sqrt (1 + x))).\n            apply (derivable_pt_lim_comp (fun x0 : R => sqrt (1 + x0)) (fun x0 : R => 1 / x0) x (/ (2 * sqrt (1 + x))) (-1 / (1 + x))).\n            replace (/ (2 * sqrt (1 + x))) with (1 / (2 * sqrt (1 + x)) * 1) by lra.\n            apply (derivable_pt_lim_comp (fun x0 : R => 1 + x0) (fun x0 : R => sqrt x0) x (1) (1 / (2 * (sqrt (1 + x))))).\n            replace 1%R with (0 + 1)%R at 1 by lra.\n            apply (derivable_pt_lim_plus (fun x0 : R => 1) id x 0 1).\n            apply derivable_pt_lim_const.\n            apply derivable_pt_lim_id.\n            replace (1 / (2 * sqrt (1 + x))) with (/ (2 * sqrt (1 + x))) by lra.\n            apply derivable_pt_lim_sqrt.\n            apply Fourier_util.Rlt_zero_pos_plus1.\n            destruct H0. apply H0.\n            replace (-1 / (1 + x)) with ((0 * sqrt (1 + x) - 1 * 1) / (sqrt (1 + x))²).\n            apply (derivable_pt_lim_div (fun x0 : R => 1%R) (fun x0 : R => x0) (sqrt (1 + x)) 0 1).\n            apply derivable_pt_lim_const.\n            apply derivable_pt_lim_id.\n            apply not_eq_sym.\n            apply Rlt_not_eq.\n            apply sqrt_lt_R0.\n            apply Fourier_util.Rlt_zero_pos_plus1.\n            destruct H0. apply H0.\n            replace (0 * sqrt (1 + x)) with 0 by lra.\n            replace (0 - 1* 1) with (-1)%R by lra.\n            rewrite -> Rsqr_sqrt. reflexivity. apply Rlt_le.\n            apply Fourier_util.Rlt_zero_pos_plus1. destruct H0. apply H0.\n            unfold Rdiv.\n            field. split.\n            apply not_eq_sym.\n            apply Rlt_not_eq.\n            apply sqrt_lt_R0.\n            apply Fourier_util.Rlt_zero_pos_plus1.\n            destruct H0. apply H0.\n            apply not_eq_sym.\n            apply Rlt_not_eq.\n            apply Fourier_util.Rlt_zero_pos_plus1.\n            destruct H0. apply H0.\n         - rewrite -> H1. simpl.\n           replace ((2 - x) / (4 * ((1 + x) * ((1 + x) * 1)) * sqrt (1 + x))) with\n           ((-1 / (4 * (1 + x) * sqrt (1 + x))) - (-3/(4 * (1 + x) * (1 + x) * sqrt (1 + x)))).\n           apply (derivable_pt_lim_minus (fun x0 : R => 1 / (2 * sqrt (1 + x0))) (fun x0 : R => 1 / (2 * (1 + x0) * sqrt (1 + x0))) x (-1 / (4 * (1 + x) * sqrt (1 + x))) \n           (-3/(4 * (1 + x) * (1 + x) * sqrt (1 + x)))).\n           -- replace (-1 / (4 * (1 + x) * sqrt (1 + x))) with (1 / 2 * (- 1 / (2 * (1 + x) * sqrt (1 + x)))).\n              apply (derivable_pt_lim_locally_ext (mult_real_fct (1/2) (fun x0 : R => 1 / sqrt (1 + x0))) (fun x0 : R => 1 / (2 * sqrt (1 + x0)) ) x 0 1 \n              (1 / 2 * (- 1 / (2 * (1 + x) * sqrt (1 + x))))). apply H0.\n              intros. unfold mult_real_fct. field. apply not_eq_sym. apply Rlt_not_eq.\n              apply sqrt_lt_R0. apply Fourier_util.Rlt_zero_pos_plus1. destruct H2. apply H2. \n              apply (derivable_pt_lim_scal (fun x0 : R => 1 / sqrt (1 + x0)) (1/2)%R x (- 1 / (2 * (1 + x) * sqrt (1 + x)))).\n              replace (-1 / (2 * (1 + x) * sqrt (1 + x))) with (-1 / (1 + x) * / (2 * sqrt (1 + x))).\n              apply (derivable_pt_lim_comp (fun x0 : R => sqrt (1 + x0)) (fun x0 : R => 1 / x0) x (/ (2 * sqrt (1 + x))) (-1 / (1 + x))).\n              replace (/ (2 * sqrt (1 + x))) with (1 / (2 * sqrt (1 + x)) * 1) by lra.\n              apply (derivable_pt_lim_comp (fun x0 : R => 1 + x0) (fun x0 : R => sqrt x0) x (1) (1 / (2 * (sqrt (1 + x))))).\n              replace 1%R with (0 + 1)%R at 1 by lra.\n              apply (derivable_pt_lim_plus (fun x0 : R => 1) id x 0 1).\n              apply derivable_pt_lim_const.\n              apply derivable_pt_lim_id.\n              replace (1 / (2 * sqrt (1 + x))) with (/ (2 * sqrt (1 + x))) by lra.\n              apply derivable_pt_lim_sqrt.\n              apply Fourier_util.Rlt_zero_pos_plus1.\n              destruct H0. apply H0.\n              replace (-1 / (1 + x)) with ((0 * sqrt (1 + x) - 1 * 1) / (sqrt (1 + x))²).\n              apply (derivable_pt_lim_div (fun x0 : R => 1%R) (fun x0 : R => x0) (sqrt (1 + x)) 0 1).\n              apply derivable_pt_lim_const.\n              apply derivable_pt_lim_id.\n              apply not_eq_sym.\n              apply Rlt_not_eq.\n              apply sqrt_lt_R0.\n              apply Fourier_util.Rlt_zero_pos_plus1.\n              destruct H0. apply H0.\n              replace (0 * sqrt (1 + x)) with 0 by lra.\n              replace (0 - 1* 1) with (-1)%R by lra.\n              Search (sqrt (_))².\n              rewrite -> Rsqr_sqrt. reflexivity. apply Rlt_le.\n              apply Fourier_util.Rlt_zero_pos_plus1. destruct H0. apply H0.\n              unfold Rdiv.\n              field. split.\n              apply not_eq_sym.\n              apply Rlt_not_eq.\n              apply sqrt_lt_R0.\n              apply Fourier_util.Rlt_zero_pos_plus1.\n              destruct H0. apply H0.\n              apply not_eq_sym.\n              apply Rlt_not_eq.\n              apply Fourier_util.Rlt_zero_pos_plus1.\n              destruct H0. apply H0.\n              field. split. apply not_eq_sym. apply Rlt_not_eq. apply sqrt_lt_R0.\n              apply Fourier_util.Rlt_zero_pos_plus1. destruct H0. apply H0. apply not_eq_sym.\n              apply Rlt_not_eq. apply Fourier_util.Rlt_zero_pos_plus1. destruct H0. apply H0.\n           -- replace (-3 / (4 * (1 + x) * (1 + x) * sqrt (1 + x))) with \n              ((1/ 2) * (-3 / (2 * (1 + x) * (1 + x) * sqrt (1 + x)))).\n              apply (derivable_pt_lim_locally_ext (mult_real_fct (1/2) (fun x0 : R => 1 / ((1 + x0) * sqrt (1 + x0)))) \n               (fun x0 : R => 1 / (2 * (1 + x0)* sqrt (1 + x0)) ) x 0 1 \n              (1 / 2 * (- 3 / (2 * (1 + x) * (1 + x) * sqrt (1 + x))))). apply H0.\n              intros. unfold mult_real_fct. field. split. apply not_eq_sym. apply Rlt_not_eq.\n              apply sqrt_lt_R0. apply Fourier_util.Rlt_zero_pos_plus1. destruct H2. apply H2. \n              apply not_eq_sym. apply Rlt_not_eq.\n              apply Fourier_util.Rlt_zero_pos_plus1. destruct H2. apply H2.\n              apply (derivable_pt_lim_scal (fun x0 : R => 1 / ((1 + x0) * sqrt (1 + x0))) (1/2)%R x (- 3 / (2 * (1 + x) * (1 + x) * sqrt (1 + x)))). \n              replace (-3 / (2 * (1 + x) * (1 + x) * sqrt (1 + x))) with \n              ( -1 / ((1 + x) * (1 + x) * (1 + x)) * (3 / 2 * sqrt (1 + x))).\n              apply (derivable_pt_lim_comp (fun x0 : R => (1 + x0) * sqrt (1 + x0)) \n              (fun x0 : R => 1 / x0) x ((3 / 2) * sqrt (1 + x)) (-1 / ((1 + x) * (1 + x) * (1 + x)))).\n            ++ replace (3 / 2 * sqrt (1 + x)) with (1 * sqrt (1 + x) + (1 + x) * (1 / (2 * sqrt (1 + x)))).\n               apply (derivable_pt_lim_locally_ext (mult_fct (fun x0 : R => 1 + x0) (fun x0 : R => sqrt (1 + x0)))\n               (fun x0 : R => (1 + x0) * (sqrt (1 + x0))) x 0 1 (1 * sqrt (1 + x) + (1 + x) * (1 / (2 * sqrt (1 + x))))).\n               apply H0. intros. \n               unfold mult_fct. reflexivity.\n               apply (derivable_pt_lim_mult (fun x0 : R => 1 + x0) (fun x0 : R => sqrt (1 + x0)) x 1 (1/ (2 * sqrt (1 + x)))).\n               replace 1%R with (0 + 1)%R at 1 by lra.\n               apply (derivable_pt_lim_plus (fun x0 : R => 1) id x 0 1).\n               apply derivable_pt_lim_const.\n               apply derivable_pt_lim_id.\n               replace (1 / (2 * sqrt (1 + x))) with (1 / (2 * sqrt (1 + x)) * 1) by lra.\n               apply (derivable_pt_lim_comp (fun x0 : R => 1 + x0) (fun x0 : R => sqrt x0) x 1 (1 / (2 * sqrt (1 + x)))).        \n               replace 1%R with (0 + 1)%R at 1 by lra.\n               apply (derivable_pt_lim_plus (fun x0 : R => 1) id x 0 1).\n               apply derivable_pt_lim_const.\n               apply derivable_pt_lim_id.\n               replace (1 / (2 * sqrt (1 + x))) with (/ (2 * sqrt (1 + x))) by lra.\n               apply derivable_pt_lim_sqrt.\n               apply Fourier_util.Rlt_zero_pos_plus1. destruct H0. apply H0.\n               replace ((1 + x) * (1 / (2 * sqrt (1 + x)))) with ((1 + x) / (2 * sqrt (1 + x))) by lra.\n               replace ((1 + x) / (2 * sqrt (1 + x))) with (sqrt (1 + x) / 2).\n               lra.\n               apply (Stdlib.Rdiv_eq_reg (sqrt (1 + x)) 2 (1 + x) (2 * sqrt (1 + x))).\n               replace (sqrt (1 + x) * (2 * sqrt (1 + x))) with (2 * (sqrt (1 + x) * sqrt (1 + x))) by lra.\n               apply (Rmult_eq_compat_l 2 (sqrt (1 + x) * sqrt (1 + x)) (1 + x)).\n               apply sqrt_sqrt. apply Rlt_le. apply Fourier_util.Rlt_zero_pos_plus1. destruct H0. apply H0.\n               apply not_eq_sym. apply Rlt_not_eq. lra. apply not_eq_sym. apply Rlt_not_eq.\n               apply Rmult_lt_0_compat. lra. apply sqrt_lt_R0. apply Fourier_util.Rlt_zero_pos_plus1. destruct H0. apply H0.\n               replace (-1 / ((1 + x) * (1 + x) * (1 + x))) with ((0 *((1 + x) * sqrt (1 + x)) - 1 * 1) / ((1 + x) * sqrt (1 + x))²).\n               apply (derivable_pt_lim_locally_ext ((fun x0 : R => 1) / (fun x0 : R => x0))%F  (fun x0 : R => 1 / x0) ((1 + x) * sqrt (1 + x)) 0 3\n               ((0 * ((1 + x) * sqrt (1 + x)) - 1 * 1) /((1 + x) * sqrt (1 + x))²)).\n               split. interval. interval. intros. unfold div_fct. reflexivity.\n               apply (derivable_pt_lim_div (fun x0 : R => 1%R) (fun x0 : R => x0) ((1 + x) * sqrt (1 + x)) 0 1).\n               apply derivable_pt_lim_const.\n               apply derivable_pt_lim_id.\n               apply not_eq_sym. apply Rlt_not_eq. apply Rmult_lt_0_compat. apply Fourier_util.Rlt_zero_pos_plus1.\n               destruct H0. apply H0. apply sqrt_lt_R0. apply Fourier_util.Rlt_zero_pos_plus1. destruct H0. apply H0.\n               replace (0 * ((1 + x) * sqrt (1 + x)) - 1 * 1) with (-1)%R by lra.\n               rewrite -> Rsqr_mult.\n               rewrite -> Rsqr_sqrt.\n               rewrite -> Rsqr_pow2. field.\n               apply not_eq_sym. apply Rlt_not_eq. apply Fourier_util.Rlt_zero_pos_plus1. destruct H0. apply H0.\n               apply Rlt_le. apply Fourier_util.Rlt_zero_pos_plus1. destruct H0. apply H0. \n               ring_simplify.\n               replace (-1 / ((1 + x) * (1 + x) * (1 + x)) * (3 / 2) *sqrt (1 + x)) with \n               (-1 / ((1 + x) * (1 + x) * (1 +x)) * (3 * sqrt (1 + x)/ 2)) by lra.\n               replace (-1 / ((1 + x) * (1 + x) * (1 + x)) * (3 * sqrt (1 + x) / 2)) with \n               ((-1 * (3 * sqrt (1+ x)) /(((1 +x) * (1 + x) * (1 + x)) * 2))).\n               eapply Stdlib.Rdiv_eq_reg. \n               assert (forall x y z : R, (x * y) * z = x * (y * z)).\n               { intros. ring. }\n               assert (sqrt (1+x) ^ 2 = 1+x).\n               { unfold pow. replace (sqrt (1 + x) * 1) with (sqrt (1 + x)) by lra.\n                 apply sqrt_sqrt. apply Rlt_le. lra. } \n               field_simplify. rewrite !H3. field.\n               apply not_eq_sym. apply Rlt_not_eq. apply Rmult_lt_0_compat ; try lra.\n               apply Rmult_lt_0_compat ; try lra. apply Rmult_lt_0_compat; lra.\n               apply not_eq_sym. apply Rlt_not_eq. apply Rmult_lt_0_compat ; try lra.\n               apply Rmult_lt_0_compat ; try lra. apply sqrt_lt_R0. lra.\n               assert (forall x y z w : R, w <> 0 -> z <> 0 -> (x * y) / (z * w) = (x / z) * (y / w)).\n               { intros. field. split. apply H2. apply H3. }\n               apply (H2 (-1)%R (3 * sqrt (1 + x)) ((1 + x) * (1 + x) * (1 + x)) 2). lra.\n               apply not_eq_sym. apply Rlt_not_eq. apply Rmult_lt_0_compat ; try lra.\n               apply Rmult_lt_0_compat ; try lra.\n               symmetry. replace (-3)%R with (1 *-3)%R at 1 by lra.\n               replace 4%R  with (2 * 2)%R at 1 by lra.\n               assert (forall x y z w : R, w <> 0 -> z <> 0 -> (x * y) / (z * w) = (x / z) * (y / w)).\n               { intros. field. split. apply H2. apply H3. }\n               replace (2 * 2 * (1 + x) * (1 + x) * sqrt (1 + x)) with \n               (2 * (2 * (1 + x) * (1 + x) * sqrt (1 + x))) by lra.\n               apply (H2 1 (-3)%R 2 (2 * (1 + x) * (1 + x) * sqrt (1 + x))).\n               apply not_eq_sym. apply Rlt_not_eq. apply Rmult_lt_0_compat ; try lra.\n               apply Rmult_lt_0_compat ; try lra. apply sqrt_lt_R0. lra. lra.\n               rewrite -> (Rdiv_minus (-1)%R (4 * (1 + x) * sqrt (1 + x)) (-3)%R (4 * (1 + x) * (1 + x) * sqrt (1 + x))).\n               field. split. apply not_eq_sym. apply Rlt_not_eq. apply sqrt_lt_R0. lra.\n               apply not_eq_sym. apply Rlt_not_eq. lra.\n               apply not_eq_sym. apply Rlt_not_eq. apply Rmult_lt_0_compat ; try lra. apply sqrt_lt_R0. lra.\n               apply not_eq_sym. apply Rlt_not_eq. apply Rmult_lt_0_compat ; try lra. apply Rmult_lt_0_compat ; try lra.\n               apply sqrt_lt_R0. lra.\nQed.\n\nLemma cont_lim_T_f : forall (k : nat) (x : R),\n(k <= 1)%nat ->\n0 <= x <= 1 -> continuity_pt (T_f_1 k) x.\nProof. intros. \n       assert (Hk : (k =0)%nat \\/ (k = 1)%nat) by lia.\n       destruct Hk.\n       - rewrite -> H1. simpl.\n         apply (continuity_pt_plus (fun x0 : R => sqrt (1 +x0)) (fun x0 : R => 1 / sqrt (1 + x0)) x).\n         apply (continuity_pt_comp (fun x0 : R => 1 + x0) (fun x0 : R => sqrt x0) x).\n         apply (continuity_pt_plus (fun x0 : R => 1%R) (fun x0 : R => x0) x).\n         apply (continuity_pt_const (fun _ : R => 1) x).\n         unfold constant. reflexivity.\n         apply (continuity_pt_id x).\n         apply (continuity_pt_sqrt (1 +x)). lra.\n         apply (continuity_pt_comp (fun x0 : R => sqrt ( 1 + x0)) (fun x0 : R => 1/ x0) x).\n         apply (continuity_pt_comp (fun x0 : R => 1 + x0) (fun x0 : R => sqrt x0) x).\n         apply (continuity_pt_plus (fun x0 : R => 1%R) (fun x0 : R => x0) x).\n         apply (continuity_pt_const (fun _ : R => 1) x).\n         unfold constant. reflexivity.\n         apply (continuity_pt_id x).\n         apply (continuity_pt_sqrt (1 +x)). lra.\n         apply (continuity_pt_locally_ext (/ (fun x0 : R => x0))%F (fun x0 : R => 1/ x0) 1 (sqrt (1 +x))). lra.\n         intros. unfold inv_fct. lra.\n         apply (continuity_pt_inv (fun x0 : R => x0) (sqrt (1 +x))).\n         apply (continuity_pt_id (sqrt (1 +x))).\n         apply not_eq_sym. apply Rlt_not_eq. interval.\n       - rewrite -> H1. simpl.\n         apply (continuity_pt_minus (fun x0 : R => 1 / (2 * sqrt (1 + x0))) (fun x0 : R => 1 / (2 * (1 + x0) * sqrt (1 + x0))) x).\n         apply (continuity_pt_comp (fun x0 : R => 2 * sqrt ( 1 + x0)) (fun x0 : R => 1/ x0) x).\n         apply (continuity_pt_locally_ext ((fun x0 : R => 2%R) * (fun x0 : R => sqrt (1 + x0)))%F \n         (fun x0 : R => 2 * sqrt ( 1 + x0)) 1 x). lra. intros. unfold mult_fct. reflexivity.\n         apply (continuity_pt_mult (fun _ : R => 2) (fun x0 : R => sqrt (1 + x0)) x).\n         apply (continuity_pt_const (fun _ : R => 2) x).\n         unfold constant. reflexivity.\n         apply (continuity_pt_comp (fun x0 : R => 1 + x0) (fun x0 : R => sqrt x0) x).\n         apply (continuity_pt_plus (fun x0 : R => 1%R) (fun x0 : R => x0) x).\n         apply (continuity_pt_const (fun _ : R => 1) x).\n         unfold constant. reflexivity.\n         apply (continuity_pt_id x).\n         apply (continuity_pt_sqrt (1 +x)). lra.\n         apply (continuity_pt_locally_ext (/ (fun x0 : R => x0))%F (fun x0 : R => 1/ x0) 1 (2 * sqrt (1 +x))). lra.\n         intros. unfold inv_fct. Locate \"/\". lra.\n         apply (continuity_pt_inv (fun x0 : R => x0) (2 * sqrt (1 +x))).\n         apply (continuity_pt_id (2 * sqrt (1 +x))).\n         apply not_eq_sym. apply Rlt_not_eq. apply Rmult_lt_0_compat. lra. interval.\n         apply (continuity_pt_comp (fun x0 : R => 2 * (1 + x0) * sqrt ( 1 + x0)) (fun x0 : R => 1/ x0) x).\n         apply (continuity_pt_locally_ext\n          ((fun x0 : R => 2%R) * (fun x0 : R => ((1 + x0) * sqrt (1 + x0))%R))%F \n          (fun x0 : R => 2 * (1 + x0) * sqrt ( 1 + x0))\n          1 x). lra. intros. unfold mult_fct.\n          lra.\n         apply continuity_pt_mult.\n         apply continuity_pt_const. unfold constant. reflexivity.\n         apply (continuity_pt_locally_ext \n         ((fun x0 : R => (1 + x0)%R) * (fun x0 : R => sqrt (1 + x0)))%F \n         (fun x0 : R => (1 + x0) * sqrt (1 + x0)) 1 x). lra. intros. unfold mult_fct. reflexivity.\n         apply continuity_pt_mult.\n         apply continuity_pt_plus.\n         apply continuity_pt_const. unfold constant. reflexivity.\n         apply continuity_pt_id.\n         apply (continuity_pt_comp (fun x0 : R => 1 + x0) (fun x0 : R => sqrt x0) x).\n         apply (continuity_pt_plus (fun x0 : R => 1%R) (fun x0 : R => x0) x).\n         apply (continuity_pt_const (fun _ : R => 1) x).\n         unfold constant. reflexivity.\n         apply (continuity_pt_id x).\n         apply (continuity_pt_sqrt (1 +x)). lra.\n         apply (continuity_pt_locally_ext (/ (fun x0 : R => x0))%F (fun x0 : R => 1/ x0) 1 (2 * (1 + x) * sqrt (1 +x))). lra.\n         intros. unfold inv_fct. Locate \"/\". lra.\n         apply (continuity_pt_inv (fun x0 : R => x0) (2 * (1 + x) * sqrt (1 +x))).\n         apply continuity_pt_id.\n         apply not_eq_sym. apply Rlt_not_eq. apply Rmult_lt_0_compat. lra. interval.\nQed.\n\n\nLemma taylor_m : 0 < eps <= 1 ->\nexists eta ,\n (0 <> eps -> (0 < eta < eps \\/ eps < eta < 0)) /\\ sqrt (1 + eps) + 1/sqrt(1 + eps) -2 =  (((2 - eta) / (8* ((1 + eta)^2) * sqrt (1 + eta))) * eps^2).\nProof. intros.\n       About Taylor.Taylor_Lagrange.\n       edestruct (Taylor.Taylor_Lagrange 0 1 1 T_f_1) with 0 eps.\n         ++ apply deriv_lim_T_f.\n         ++ apply cont_lim_T_f.\n         ++ interval.\n         ++ lra.\n         ++ exists x. \n            destruct H0 as [H1 H2]. cbn in H1.\n            split.\n            - apply H2.\n            - rewrite !Rplus_0_r in H1.\n              rewrite !Rminus_0_r in H1.\n              rewrite !sqrt_1 in H1.\n              rewrite !Rcomplements.Rdiv_1 in H1.\n              rewrite !Rmult_1_r in H1.\n              rewrite !Rcomplements.Rminus_eq_0 in H1.\n              rewrite !Rmult_0_l in H1.\n              replace (1 + 1 + 0)%R with 2%R in H1 by lra.\n              replace (1 + 1)%R with 2%R in H1 by lra.\n              unfold pow. rewrite !Rmult_1_r. rewrite -> H1.\n              field. \n              assert (Hsqrt : x > -1 -> sqrt (1 + x) <> 0).\n               { intros. apply not_eq_sym. apply Rlt_not_eq. apply sqrt_lt_R0. lra. }\n              assert (Heps : 0 < x < eps ).\n               { destruct H2 ; lra. }\n              split.\n              apply Hsqrt. lra. lra.\nQed.\n\nLemma cst_func_0_1 : 0 <= eps <= 1 ->\nsqrt (1 + eps) + 1/sqrt(1 + eps) -2 >= (1/48) * (eps ^2).\nProof. intros.\n       assert (Heq_dec : {0 < eps} + {0 = eps}).\n       { apply Rle_lt_or_eq_dec. destruct H. apply H. }\n       destruct Heq_dec.  \n       + destruct taylor_m as [eta H2].\n         lra.\n         destruct H2 as [H2a H2b].\n         assert (Heta : (2 - eta) / (8 * (1 + eta) ^ 2 * sqrt (1 + eta)) >= 1/48).\n         { apply lower_bnd. destruct H2a.\n           apply Rlt_not_eq. apply r0.\n           split. apply Rlt_le.  apply H0. \n           destruct H. apply Rlt_le. apply (Rlt_le_trans eta eps 1).\n           destruct H0. apply H2. apply H1. \n           assert (Hc : eps < 0).\n           { destruct H0. apply (Rlt_trans eps eta 0). apply H0. apply H1. } lra. }\n       rewrite -> H2b.\n       apply (Rmult_ge_compat_r (eps^2) ((2 - eta) /\n       (8 * (1 + eta) ^ 2 * sqrt (1 + eta))) (1/48)).\n       apply Rle_ge. apply pow2_ge_0. apply Heta.\n       + rewrite <- e. simpl.\n         replace (1 + 0)%R with 1%R by lra.\n         replace (0 * 1)%R with 0%R by lra.\n         rewrite !sqrt_1. lra.\nQed.\n\nLemma cst_func_ge_1 : eps >= 1 ->\nsqrt ( 1 + eps) + (1 / sqrt (1 + eps)) -2 >= ((5/100) * sqrt (1 + eps)).\nProof. intros.\n       apply (Rminus_ge (sqrt ( 1 + eps) + (1 / sqrt (1 + eps)) -2) ((5/100) * sqrt (1 + eps))).\n       replace (sqrt (1 + eps) + 1 / sqrt (1 + eps) - 2 - 5 / 100 * sqrt (1 + eps)) with \n       ((1 / sqrt ( 1 + eps)) * ((sqrt(1 + eps) - 1)^2  - ((5/100) * (1 + eps)))).\n       replace 0%R with ((1 / sqrt (1 + eps)) * 0) by lra.\n       apply (Rmult_ge_compat_l (1 / sqrt ( 1 + eps)) ((sqrt(1 + eps) - 1)^2  - ((5/100) * (1 + eps))) 0%R).\n       interval. apply eps_sq. apply H.\n       assert  (Hsqr : (sqrt (1 + eps))^2 = 1 + eps).\n        { unfold pow. replace (sqrt (1 + eps) * 1) with (sqrt (1 + eps)) by lra. apply sqrt_sqrt. interval. }\n       field_simplify ; try interval. rewrite !Hsqr. field ; interval.\nQed.\n\nEnd C_man."
  },
  {
    "path": "contracts/amm/math_lemma.v",
    "content": "Require Import ZArith.\nRequire Import DeepSpec.cclib.Integers.\nRequire Import Zorder.\nRequire Import Lia.\nRequire Import QArith.\nRequire Import Lqa.\nRequire Import QArith_base.\n\n(* to solve the inequality in prt_inf.v , first solev it in Q using some standard arithmetic properties,\nthen use properties of inject and transitivity of < to show it holds over Z *)\n(*Axiom ZInEq_multpos : (forall (a b c : Z32), c > 0 -> a > b <-> a * c > b * c)%Z.\n  Hint Rewrite ZInEq_multpos : ZInEq.\n\nAxiom ZInEq_ldiv : (forall (a b c : Z32), b > 0 -> a / b > c <-> a > b * c)%Z.\n\nAxiom ZInEq_denadd : (forall (a b c : Z32), c > 0 -> a / b > a / (b + c))%Z.\n*)\n(* Properties of fractions *)\n(* this axiom is a lemma in a later version of the standard library *)\nAxiom Qinv_plus_distr : forall a b c, ( c > 0 -> ((a + b)/c = a/c + b/c))%Q .\n\nAxiom Qinv_minus_distr : forall a b c, ( c > 0 -> ((a - b)/c = a/c - b/c))%Q.\n\nAxiom Qinv_mult : forall a b, (a * / b = a / b)%Q.\n\nNotation \"[ i ]\" := (inject_Z i) : Q_scope. \n\nLemma common_denom : forall (a b c : Q), (c > 0 -> ((a - (b/c)) == (a*c - b)/c))%Q.\nProof. intros.\n       setoid_replace a with (a * c / c) at 1.\n       setoid_rewrite <- Qinv_minus_distr. reflexivity. lra.\n       Search ( _ * _)%Q.\n       symmetry. apply Qdiv_mult_l.\n       apply Qnot_eq_sym.\n         apply Qlt_not_eq. lra.\nQed.\n \nLemma mul_denom : forall ( a b c d : Q), (d > 0 -> a*d < b*c -> a < b*(c/d))%Q.\nProof.  intros.\n        replace (b * (c / d)) with (b * c / d).\nSearch (_ / _)%Q.\n        apply Qlt_shift_div_l. apply H. apply H0. \n        unfold Qdiv. Search (_ * _)%Q. Admitted.\n\nLemma increasing_k_math_rat : forall (i j k : Q), (i > 0 -> j > 0 -> k > 0 ->\n i * j < (i + k) * (j - (k * [997] * j) / (i * [1000] + k * [997])))%Q.\nProof. intros.\n       assert (H1a : [1000] >0 ).\n            { change 0 with [0]. rewrite <- Zlt_Qlt. lia. }\n       assert (H1b : [997] >0).\n            { change 0 with [0]. rewrite <- Zlt_Qlt. lia. }\n       setoid_replace (j - k * [997]* j / (i * [1000] +  k*[997]))%Q with \n       (((j * (i * [1000] + k * [997])) - (k * [997] *j))/ (i * [1000] + k * [997]))%Q.\n       + apply (mul_denom (i * j)%Q (i + k)%Q (j * (i * [1000] + k * [997]) - k * [997] * j)%Q \n         (i * [1000] + k * [997])%Q ). \n         nra. ring_simplify.\n         assert (H2 : (997 < 1000)%Z).\n          { lia. }\n         eapply Qplus_lt_r. repeat apply Qmult_lt_r ; auto.\n       + eapply common_denom. nra.\nQed.\n\nSearch inject_Z.\nLemma inject_Z_minus : forall x y , [x - y] = [x] - [y].\nProof. intros.\n       change (x - y)%Z with (x + - y) %Z.\n       rewrite -> inject_Z_plus. rewrite -> inject_Z_opp.\n       change ([x] + - [y])%Q with ([x] - [y])%Q. reflexivity.\nQed.\n\nLemma inject_Z_div_pos : forall x y , (x > 0)%Z -> (y > 0)%Z -> ([x / y] <= [x] / [y])%Q.\nProof. intros.\n       rewrite -> (Z_div_mod_eq x y).\n       destruct (x mod y)%Z eqn : Hrem.\n       + replace (y * (x / y) + 0)%Z with (y * (x / y))%Z by lia.\n         replace (y * (x / y))%Z with  ((x / y) * y)%Z by lia.\n         rewrite -> Z.div_mul.\n         rewrite -> inject_Z_mult.\n         setoid_rewrite -> Qdiv_mult_l.\n         apply Qle_refl.\n         apply Qnot_eq_sym.\n         apply Qlt_not_eq.\n         change 0 with [0]. rewrite <- Zlt_Qlt. lia.\n         apply Z.neq_sym. apply Z.lt_neq. lia.\n       + replace (y * (x / y))%Z with  ((x / y) * y)%Z by lia.\n         rewrite -> Z.div_add_l.\n         repeat rewrite -> inject_Z_plus.\n         rewrite -> inject_Z_mult.\n         assert (Hpos : (Z.pos p / y)%Z = 0%Z).\n         { apply Z.div_small. rewrite <- Hrem. apply Z_mod_lt. lia. } \n         rewrite -> Hpos.\n         rewrite -> Qinv_plus_distr.\n         setoid_rewrite -> Qdiv_mult_l.\n         rewrite -> Qplus_le_r.\n         replace ([Z.pos p] / [y])%Q with ([Z.pos p] * (/ [y]))%Q .\n         apply Qmult_le_0_compat.\n         change 0 with [0]. rewrite <- Zle_Qle. lia.\n         apply Qinv_le_0_compat.\n         change 0 with [0].\n         rewrite <- Zle_Qle.\n         apply Z.lt_le_incl. lia.\n         apply Qinv_mult.\n         apply Qnot_eq_sym.\n         apply Qlt_not_eq.\n         change 0 with [0] ; rewrite <- Zlt_Qlt; lia.\n         change 0 with [0] ; rewrite <- Zlt_Qlt; lia.\n         apply Z.neq_sym. apply Z.lt_neq. lia.\n       + assert (Hneg : (0 <= (x mod y) < y)%Z).\n          { apply Z_mod_lt. lia. }\n         rewrite -> Hrem in Hneg. \n         lia. \n       + lia.\nQed.\n\nLemma Qminus_le_l : forall x y z , x >= y -> z - x <= z - y.\nProof. Admitted.\n\nLemma increasing_k_math : forall (i j k : Z), (i > 0 -> j > 0 -> k > 0 ->\n i * j < (i + k) * (j - (k * 997 * j) / (i * 1000 + k * 997)))%Z.\nProof. intros.\n       rewrite -> Zlt_Qlt.\n       repeat rewrite -> inject_Z_mult.\n       repeat rewrite -> inject_Z_plus.\n       rewrite -> inject_Z_minus.\n       assert (Hineq1 : [j] - [k * 997 * j]/[i * 1000 + k * 997] <= \n               [j] - [k * 997 * j / (i * 1000 + k * 997)]).\n       { eapply Qminus_le_l. eapply inject_Z_div_pos. \n        Search (_ > _)%Z (_ > _) %Z (_ * _ > _)%Z. repeat (apply Zmult_gt_0_compat). lia. lia. lia. lia. } \n       assert ( Hineq2 : [i] * [j] < ([i] + [k]) * ([j] - [k * 997 * j] / [i * 1000 + k * 997])).\n       { repeat rewrite -> inject_Z_mult.\n         rewrite -> inject_Z_plus.\n         repeat rewrite -> inject_Z_mult.\n         apply (increasing_k_math_rat [i] [j] [k]) ;\n         change 0 with [0]; rewrite <- Zlt_Qlt; lia. }\n       apply (Qlt_le_trans ([i] * [j]) (([i] + [k]) *\n         ([j] -\n          [k * 997 * j] / [i * 1000 + k * 997])) (([i] + [k]) * ([j] -\n         [k * 997 * j / (i * 1000 + k * 997)]))).\n       apply Hineq2.\n       rewrite Qmult_le_l.\n       apply Hineq1.\n       assert (Hq1 : [i] > 0).\n       { change 0 with [0]. rewrite <- Zlt_Qlt. lia. }\n       assert (Hq2 : [k] > 0).\n       { change 0 with [0]. rewrite <- Zlt_Qlt. lia. }\n       lra.\nQed.\n\nSearch (_ < _)%Z (_ < _)%Z (_ - _ < _ - _)%Z.\n(*Lemma mul_denom : forall ( a b c d : Z), (a > 0 -> c > 0 -> d > 0 ->\na*d < b*c -> a < b*c/d)%Z .\nProof. \nAdmitted.\n\nLemma common_denom : forall (a b c : Z) , ( c > 0 -> (a + (b/c)) = (a*c + b)/c )%Z.\nProof. Admitted.\n\nLemma increasing_k_math : forall (i j k : Z), (i > 0 -> j > 0 -> k > 0 -> \n    i * j < (i + k) * (j - (k * 997 * j) / (i * 1000 + k * 997)))%Z.\nProof. intros.\n       replace (j - k * 997 * j / (i * 1000 + k * 997))%Z with \n       (((j * (i * 1000 + k * 997)) - (k * 997 *j))/ (i * 1000 + k * 997))%Z.\n       + apply (mul_denom (i * j)%Z (i + k)%Z (j * (i * 1000 + k * 997) - k * 997 * j)%Z \n         (i * 1000 + k * 997)%Z ). replace (i * j < (i + k) * ((j * (i * 1000 + k * 997) - k * 997 * j) /\n         (i * 1000 + k * 997)))%Z with\n         (i * j * (i * 1000 + k * 997) < (i + k) * (j * (i * 1000 + k * 997) - k * 997 * j))%Z.\n         replace (i * j * (i * 1000 + k * 997))%Z with (i * j * i * 1000 + i *j * k * 997)%Z by lia.\n         replace ((i + k) * (j * (i * 1000 + k * 997) - k * 997 * j))%Z with \n         ((i + k) * (j * i * 1000 + j * k * 997 - k * 997 *j))%Z by lia.\n         replace (j * k * 997)%Z with (k * 997 * j)%Z by lia.\n         replace (j * i * 1000 + k * 997 * j - k * 997 * j)% Z with (j * i * 1000)%Z by lia.\n         replace ((i + k) * (j * i * 1000))%Z with (i * j * i * 1000 + k * j * i * 1000)%Z by lia.\n         replace (i * j * i * 1000 + i * j * k * 997)%Z with \n         (i * j * k * 997 + i * j * i * 1000)%Z by lia.\n         replace (i * j * i * 1000 + k * j * i * 1000)%Z with (k * j * i * 1000 + i * j * i * 1000)%Z by lia.\n         eapply Zplus_lt_compat_r.\n         replace (i * j * k * 997)%Z with (997 * i * j * k)%Z by lia.\n         replace (k * j * i * 1000)%Z with (1000 * i * j * k)%Z by lia.\n         eapply Zmult_gt_0_lt_compat_r. apply H1.\n         eapply Zmult_gt_0_lt_compat_r. apply H0.\n         eapply Zmult_gt_0_lt_compat_r. apply H. lia. eapply mul_denom.\n    From Coq Require Import ZArith Psatz.\n    Open Scope Z_scope.\n    simpl. Fail lia. Print Lia.lia. Print Lia.zchecker_no_abstract.\n    intros.\n    (*\n    psatz Z 100.\n    lia.\n\n    assert (forall (v v' v'' : Z), v'' > 0 -> v < v' -> v * v'' < v' * v'').\n      intros. \n      pose (H19 := H16 (v * v'') (v' * v'')); clearbody H19.\n      apply H19.\n      unfold Z.sub.\n      apply mul_sub_distr.\n    pose (H17 := H16 (i * j) ((i + k) * (j - k * 997 * j / (i * 1000 + k * 997))) (i * 1000 + k * 997)); clearbody H17.\n    *)\n    assert (0 < (i * 1000 + k * 997)). omega.\n    (* multiplied both sides by the denominator of the divisor and needed to use comparisons between \"(W / V) * V\" and W *)\n    pose (Zmult_nc:=(Zmult_lt_compat_r (i * j) ((i + k) * (j - k * 997 * j / (i * 1000 + k * 997))) (i * 1000 + k * 997) H2)); clearbody Zmult_nc.\n  Admitted.*)"
  },
  {
    "path": "contracts/amm/prf_int.v",
    "content": "Add LoadPath \"./amm\" as amm.\n\nRequire Import amm.DataTypes.\nRequire Import amm.DataTypeOps.\nRequire Import amm.LayerAMM.\nRequire Import lib.Monad.StateMonadOption.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import ZArith.\nRequire Import core.HyperTypeInst. \n(* for `hashvalue`, maybe should move that to some different file. *)\nRequire Import backend.MachineModel.\nRequire Import amm.splitting_trades.\n\n(* PROOFS: \n   2. balance tracks reserve\n   3. increasing k -> algebra\n   4. no path independence, splitting trades is strictly more expensive -> algebra, appendix D\n   5. liquidity token economics is right, i.e., UNI-V2 tracks the actual share of pool --> actually, where is the trading of UNI-V2 Pair tokens? What is its value?\n   6. MOD: slippage control\n   7. ... cost of manipulation (hard)\n*)\n\nSection WithMem.\nImport core.MemoryModel.\nContext {memModelOps : MemoryModelOps mem}.\n\n(* global_abstract_data_type *)\n\nDefinition state := global_abstract_data_type.\n\nDefinition init_state := init_global_abstract_data.\n\nDefinition wei := Z.\n\nDefinition addr := int256.\n\nDefinition blocknumber := int256.\n\nExisting Instance GlobalLayerSpec.\n\nSection step.\n\n  Context (token0_address token1_address amm_address : addr).\n\n  Section mstep.\n  (* These are the parameters which are constant within a given block. *)\n  Context (coinbase : int256)\n          (timestamp : int256)\n          (number : int256)\n          (balance : int256 -> int256)\n          (blockhash : int256 -> int256)\n          (prev_contract_state : state).\n\n  Definition make_machine_env (caller: addr)\n                              : machine_env state\n    := {| me_address := amm_address;\n          me_origin := caller;\n          me_caller := caller;\n          me_callvalue := Int256.repr (0);\n          me_coinbase := coinbase; \n          me_timestamp := timestamp;\n          me_number := number;\n          me_chainid := Int256.zero;\n          me_selfbalance := Int256.zero;\n          me_balance := balance;\n          me_blockhash := blockhash;\n          (* not implemented *)\n          me_transfer _ _ d := (Int256.one, d);\n          me_callmethod _ _ _ _ _ _ _ _ _ _ := False;\n          me_log _ _ _ := prev_contract_state;\n        |}.\n\n  Import MonadNotation.\n\n  Definition lif {A:Type}\n                 (caller : addr)\n                 (cmd : machine_env state -> osT global_abstract_data_type A)\n    : osT state A :=\n    st  <- get;;\n    let me := make_machine_env caller in\n    match runStateT (cmd me) st with\n    | None => mzero\n    | Some (v, st') => put st' ;; ret v\n    end.\n\n  Set Typeclasses Debug.\n  \n  Definition lifted_simpleSwap0 :=\n    fun (caller: addr) (callvalue: wei) (toA: addr) => lif caller\n      (AutomatedMarketMaker_simpleSwap0_opt toA).\n\nAbout lifted_simpleSwap0.\nAbout AutomatedMarketMaker_simpleSwap0_opt.\n\n  Definition lifted_LiquidityToken_mint :=\n    fun (caller: addr) (callvalue: wei) (toA: addr) (value: Z) => lif caller\n      (LiquidityToken_mint_opt toA value).\n\n  (* osT state int256 = \n    state transformer with option monad, state is state, and value is int256 *)\n  Print osT. (* = fun D : Type => stateT D option *)\n  Print stateT. (* (S : Type) (m : Type -> Type) (t : Type) : Type := mkStateT\n  { runStateT : S -> m (t * S)%type } *)\n\n  Print runStateT. (* takes monad transformer, state, returns m (t * S) *)\n\n  (* How the state of the system changes in a single method call made by player p. *)\n  (* for simplicity we only model functions that modify states and can be called by user *)\n  Inductive mstep u (st st' : state) : Prop :=\n  (* fixed supply tokens *)\n\n    (*TODO: fix these definitions. *)\n  | FixedSupplyToken_transfer_step : \n      forall toA tokens r, runStateT (FixedSupplyToken_transfer_opt toA tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | FixedSupplyToken1_transfer_step : \n      forall toA tokens r, runStateT (FixedSupplyToken1_transfer_opt toA tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | FixedSupplyToken_approve_step : \n      forall spender tokens r, runStateT (FixedSupplyToken_approve_opt spender tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | FixedSupplyToken1_approve_step : \n      forall spender tokens r, runStateT (FixedSupplyToken1_approve_opt spender tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | FixedSupplyToken0_transferFrom_step : \n      forall fromA toA tokens r, runStateT (FixedSupplyToken_transferFrom_opt fromA toA tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | FixedSupplyToken1_transferFrom_step : \n      forall fromA toA tokens r, runStateT (FixedSupplyToken1_transferFrom_opt fromA toA tokens (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  (* amm *)\n  | AutomatedMarketMaker_mint_step : \n      forall toA r, runStateT (AutomatedMarketMaker_mint_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | AutomatedMarketMaker_burn_step : \n      forall toA r, runStateT (AutomatedMarketMaker_burn_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  | AutomatedMarketMaker_simpleSwap0_step : \n      forall toA r, runStateT (AutomatedMarketMaker_simpleSwap0_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep u st st'\n  .\n\nAbout mstep.\n\n  (* How the state of the system changes in a single method call made by player p. *)\n  (* for simplicity we only model functions that modify states and can be called by user *)\n  Inductive mstep_amm u (st st' : state) : Prop :=\n  (* amm *)\n  | AutomatedMarketMaker_mint_ammstep : \n      forall toA r, runStateT (AutomatedMarketMaker_mint_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep_amm u st st'\n  | AutomatedMarketMaker_burn_ammstep : \n      forall toA r, runStateT (AutomatedMarketMaker_burn_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep_amm u st st'\n  | AutomatedMarketMaker_simpleSwap0_ammstep : \n      forall toA r, runStateT (AutomatedMarketMaker_simpleSwap0_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep_amm u st st'\n  | AutomatedMarketMaker_skim_ammstep : \n      forall toA r, runStateT (AutomatedMarketMaker_skim_opt toA (make_machine_env u)) st = Some (r, st')\n      -> mstep_amm u st st'\n  | AutomatedMarketMaker_sync_ammstep : \n      forall r, runStateT (AutomatedMarketMaker_sync_opt (make_machine_env u)) st = Some (r, st')\n      -> mstep_amm u st st'\n  .\n\n  (* We can compute a new block by letting the players call the contract \n     in some arbitrary order. *)\n  Inductive multi_mstep : state -> state -> Prop := \n  | multi_mstep_reflexive : forall (st : state), multi_mstep st st\n  | multi_mstep_transitive : forall (st st' st'' : state) u,\n      multi_mstep st st' -> mstep u st' st'' -> multi_mstep st st''.\n\n\n  (* A block is sufficiently synchronous if every player got a chance to submit a \n     transaction to to. *)\n  (* TODO, I think this definition is fine for now, but it seems little too clever,\n     should probably re-state this using some straightforward tracking of the states\n     we pass through. *)\n  Definition multi_mstep_synchronous st1 st2 :=\n    forall u, exists st st',\n                multi_mstep st1 st /\\ mstep u st st' /\\ multi_mstep st' st2.\n\n  (* Here are a bunch of induction principles inspired by linear temporal logic. *)\n\n  (* Prove that some property P holds \"globally\", i.e. for each state along a \n     path.\n     You can also specify a property Pprev which is known to hold for the\n     prev_contract_state. If not needed, it can just be True.\n *)\n  Lemma multi_mstep_Global_ind : forall (Pprev P : state -> Prop),\n      (forall u st st', Pprev prev_contract_state -> P st -> mstep u st st' -> P st') ->\n       Pprev prev_contract_state -> forall st st', P st -> multi_mstep st st' -> P st'.\n  Proof.\n    induction 4; eauto.\n  Qed.\n\n  (*\n  (* Prove that P holds \"until\" Q  along a path. \n     \"Until\" is a liveness assertion, so we need the synchronicity assumption. *)\n  Lemma multi_mstep_Until_ind : forall (Pprev P Q : state -> Prop),\n      (forall p st st', Pprev prev_contract_state -> P st -> In p players\n                        -> mstep p st st' -> (P st' \\/ Q st')) ->\n                        Pprev prev_contract_state ->\n                        forall st,\n                          P st -> exists st',  multi_mstep st st' -> (P st' \\/ Q st').\n  Proof.\n    induction 4; eauto *)\n\n  End mstep.\n\n  \n  Definition Int256_incr x := Int256.add x Int256.one.\n  \n  Inductive bstep (n : blocknumber) : state -> state -> Prop :=\n  | bstep_step : forall coinbase timestamp balance blockhash st st',\n      multi_mstep coinbase timestamp n balance blockhash st st st' ->\n      bstep n st st'.\n\n  Inductive multi_bstep : blocknumber -> state -> blocknumber -> state -> Prop := \n  | multi_bstep_reflexive : forall n (st : state), multi_bstep n st n st\n  | multi_bstep_transitive : forall n n'  (st st' st'' : state),\n    multi_bstep n st n' st' -> bstep (Int256_incr n') st' st'' -> multi_bstep n st (Int256_incr n') st''.\n  \n  (* multi_bstep is the step relation without any synchronicity assumption.\n     This is sufficient to prove some safety properties, but for most interesting \n     theorems we instead need to use this synchronous version: *)\n\n  Inductive bstep_synch (n : blocknumber) : state -> state -> Prop :=\n  | bstep_synch_step : forall coinbase timestamp balance blockhash st st',\n      multi_mstep_synchronous coinbase timestamp n balance blockhash st st st' ->\n      bstep_synch n st st'.\n\n  Inductive multi_bstep_synch : blocknumber -> state -> blocknumber -> state -> Prop := \n  | multi_bstep_synch_reflexive : forall n (st : state), multi_bstep_synch n st n st\n  | multi_bstep_synch_transitive : forall n n'  (st st' st'' : state),\n    multi_bstep_synch n st n' st' -> bstep_synch (Int256_incr n') st' st'' -> multi_bstep_synch n st (Int256_incr n') st''.\n\n  Lemma multi_bstep_Global_ind : forall (P : state -> Prop),\n      (forall coinbase timestamp number balance blockhash prev_block u st st',\n          P prev_block\n          -> P st\n          -> mstep coinbase timestamp number balance blockhash prev_block u st st'\n          -> P st')\n      -> forall n st n' st',\n        P st -> multi_bstep n st n' st' -> P st'.\n  Proof.\n    induction 3.\n    - auto.\n    - inversion H2; subst.\n      eapply multi_mstep_Global_ind with (st:=st') (prev_contract_state := st').\n      + intros.\n        refine (H _ _ _ _ _ _ _ _ _ _ _ H6); auto.\n      + apply IHmulti_bstep; assumption.\n      + apply IHmulti_bstep; assumption.\n      + exact H3.\n  Qed.\nEnd step.\n\nSection DeepSEAGenericProof.\n\n  Lemma Int256Tree_reduce : forall (i: int256) (v: Z) (t: Int256Tree.t Z), Int256Tree.get_default 0%Z i (Int256Tree.set i v t) = v.\n  Proof.\n    intros.\n    unfold Int256Tree.get_default.\n    rewrite Int256Tree.gss .\n    reflexivity.\n  Qed.\n\n  Lemma Int256Tree_mreduce : forall (i j : int256) (v v': Z) (t: Int256Tree.t Z), \n    i <> j ->\n    Int256Tree.get_default 0%Z i (Int256Tree.set j v' (Int256Tree.set i v t)) = v.\n  Proof.\n    intros.\n    unfold Int256Tree.get_default.\n    rewrite Int256Tree.gso.\n    rewrite Int256Tree.gss.\n    reflexivity.\n    exact H.\n  Qed.\n\n  Lemma Int256Tree_mireduce : forall (i j k : int256) (v v': Z) (t: Int256Tree.t Z), \n    i <> j ->\n    i <> k ->\n    j <> k ->\n    Int256Tree.get_default 0%Z i (Int256Tree.set j v' (Int256Tree.set k v t)) = \n    Int256Tree.get_default 0%Z i t.\n  Proof.\n    intros.\n    unfold Int256Tree.get_default.\n    rewrite Int256Tree.gso.\n    rewrite Int256Tree.gso.\n    reflexivity.\n    exact H0.\n    exact H.\n  Qed.\n\n  Lemma add_sub_inv : forall (i j : Z32), (i + j - i)%Z = j.\n  Proof.\n    intros.\n    omega.\n  Qed.\n\n  (* Lemmas on Inequalities over Z *)\n  Lemma ZInEq_ladd : (forall (i j k : Z32), (i > j + k <-> i - k > j)%Z).\n  Proof.\n  intros. omega.\n  Qed.\n  Hint Rewrite ZInEq_ladd : ZInEq.\n\n  Axiom ZInEq_multpos : (forall (a b c : Z32), c > 0 -> a > b <-> a * c > b * c)%Z.\n  Hint Rewrite ZInEq_multpos : ZInEq.\n\n  Axiom ZInEq_ldiv : (forall (a b c : Z32), b > 0 -> a / b > c <-> a > b * c)%Z.\n\n  Axiom ZInEq_denadd : (forall (a b c : Z32), c > 0 -> a / b > a / (b + c))%Z.\n\n  Lemma increasing_k_math : forall (i j k : Z), (i > 0 -> j > 0 -> k > 0 -> \n    i * j < (i + k) * (j - (k * 997 * j) / (i * 1000 + k * 997)))%Z.\n  Proof.\n    From Coq Require Import ZArith Psatz.\n    Open Scope Z_scope.\n    simpl. Fail lia. Print Lia.lia. Print Lia.zchecker_no_abstract.\n    intros.\n    (*\n    psatz Z 100.\n    lia.\n\n    assert (forall (v v' v'' : Z), v'' > 0 -> v < v' -> v * v'' < v' * v'').\n      intros. \n      pose (H19 := H16 (v * v'') (v' * v'')); clearbody H19.\n      apply H19.\n      unfold Z.sub.\n      apply mul_sub_distr.\n    pose (H17 := H16 (i * j) ((i + k) * (j - k * 997 * j / (i * 1000 + k * 997))) (i * 1000 + k * 997)); clearbody H17.\n    *)\n    assert (0 < (i * 1000 + k * 997)). omega.\n    (* multiplied both sides by the denominator of the divisor and needed to use comparisons between \"(W / V) * V\" and W *)\n    pose (Zmult_nc:=(Zmult_lt_compat_r (i * j) ((i + k) * (j - k * 997 * j / (i * 1000 + k * 997))) (i * 1000 + k * 997) H2)); clearbody Zmult_nc.\n  Admitted.\nEnd DeepSEAGenericProof.\n\nSection AMMProof.\n  Context (token0_address token1_address amm_address : addr).\n\n  Context (* (strategies : strategy_tuple) *)\n          (initial_balances : addr -> Z)\n          (contract_address : int256).\n\n  Context (init_bt init_rt : int256)\n          (init_coinbase : int256)\n          (init_timestamp : int256)\n          (init_number : int256)\n          (init_blockhash : int256 -> int256)\n          (pre_init_state init_state : state).\n\n  (* These are the parameters which are constant within a given block. *)\n  Context (coinbase : int256)\n          (timestamp : int256)\n          (number : int256)\n          (balance : int256 -> int256)\n          (blockhash : int256 -> int256)\n          (prev_contract_state : state).\n\n  Require Import lib.Monad.RunStateTInv.\n  Require Import lib.ArithInv.\n\n  Definition compute_k (s: state) := \n    Z.mul (AutomatedMarketMaker__reserve0 s) (AutomatedMarketMaker__reserve1 s).\n\n  Definition get_balance0 (s: state) (a: addr) :=\n    (Int256Tree.get_default (0%Z)\n      a (FixedSupplyToken_balances s)).\n\n  Definition get_balance1 (s: state) (a: addr) :=\n    (Int256Tree.get_default 0%Z\n      a (FixedSupplyToken1_balances s)).\n\n  Definition make_machine_env_wrapped prev_st user :=\n    make_machine_env amm_address coinbase timestamp number balance blockhash prev_st user.\n\n  Lemma make_machine_env_caller_eq : forall st caller, me_caller (make_machine_env_wrapped st caller) = caller.\n  Proof. auto. Qed.\n\n  Lemma make_machine_env_address_eq : forall st caller, me_address (make_machine_env_wrapped st caller) = amm_address.\n  Proof. auto. Qed.\n\n  Transparent AutomatedMarketMaker_simpleSwap0_opt.\n  Transparent FixedSupplyToken1_balanceOf_opt.\n  Transparent FixedSupplyToken_balanceOf_opt.\n  Transparent FixedSupplyToken_transfer_opt.\n  Transparent FixedSupplyToken1_transfer_opt.\n\n  (* need to transfer balance first, assume token0 transfer first *)\n  (* should have been approve and then transferFrom, here we are hacking a bit *)\n  (* prove that after every possible function call, whichever layers, the \n  k = _reserve0 * _reserve1 is strictly increasing for simpleSwap0:\n\n  newState = simpleSwap0 oldState /\\ compute_k newState > compute_k oldState *)\n  Theorem increasing_k_simpleSwap0 : (forall r r' \n    (s s' s'' : state) \n    (trader : addr) \n    (swapAmount0 : Z32), \n    (swapAmount0 > 0)%Z -> (* trasferring an amount > 0 *)\n    ((AutomatedMarketMaker__reserve0 s) > 0)%Z -> \n    ((AutomatedMarketMaker__reserve1 s) > 0)%Z ->\n    amm_address <> trader -> \n    get_balance0 s amm_address = (AutomatedMarketMaker__reserve0 s) -> (* assumes that the reserve is the same as balance at s *)\n    get_balance1 s amm_address = (AutomatedMarketMaker__reserve1 s) ->\n    runStateT (FixedSupplyToken_transfer_opt amm_address swapAmount0 (make_machine_env_wrapped s trader)) s = Some (r, s') ->\n    runStateT (AutomatedMarketMaker_simpleSwap0_opt trader (make_machine_env_wrapped s amm_address)) s' = Some (r', s'') -> \n    Z.lt (compute_k s) (compute_k s'')).\n  Proof.\n  intros.\n  unfold get_balance0 in H0.\n  unfold get_balance1 in H1.\n  unfold AutomatedMarketMaker_simpleSwap0_opt in *.\n  unfold FixedSupplyToken_transfer_opt in *.\n  unfold FixedSupplyToken_balanceOf_opt in *.\n  unfold FixedSupplyToken_balanceOf_opt in *.\n  unfold FixedSupplyToken_transfer_opt in *.\n  inv_runStateT.\n  rewrite -> make_machine_env_caller_eq in *.\n  rewrite -> make_machine_env_address_eq in *.\n  subst.\n  inv_arith.\n  unfold compute_k.\n  simpl.\n\n  (* TODO: this proof now doesn't work, try to figure out what went wrong. *)\n  (*\n  rewrite Int256Tree_reduce in *.\n  rewrite Int256Tree_mreduce in *.\n  repeat match goal with\n  | [ |- context[AutomatedMarketMaker__reserve1 ?X]] => remember (AutomatedMarketMaker__reserve1 X) as R1\n  end.\n  repeat match goal with\n  | [ |- context[AutomatedMarketMaker__reserve0 ?X]] => remember (AutomatedMarketMaker__reserve0 X) as R0\n  end.\n  match goal with \n  | [ |- context[Z.mul (Z.add ?X _) _]] => replace X with R0 (* rewrite -> H1 *)\n  end.\n  match goal with \n  | [ |- context[Z.sub ?X _]] => replace X with R1\n  end.\n  remember swapAmount0 as delta0.\n\n  pose (IKM := increasing_k_math R0 R1 delta0 H0 H1 H); clearbody IKM.\n  rewrite add_sub_inv.\n  exact IKM.\n  exact H2.\n  Qed.\n   *)\n  Admitted.\n\nTransparent AutomatedMarketMaker_mint_opt.\nTransparent AutomatedMarketMaker_burn_opt.\nTransparent AutomatedMarketMaker_skim_opt.\nTransparent AutomatedMarketMaker_sync_opt.\nTransparent LiquidityToken_burn_opt.\nTransparent LiquidityToken_mint_opt.\nTransparent LiquidityToken_totalSupply_opt.\nTransparent LiquidityToken_balanceOf_opt.\n\n\n(* Without this, \"subst\" seems to run forever when there are many equalities in the context. *)\nUnset Regular Subst Tactic.\n\nLtac rds :=\n  unfold AutomatedMarketMaker_mint_opt in *;\n  unfold AutomatedMarketMaker_burn_opt in *;\n  unfold AutomatedMarketMaker_simpleSwap0_opt in *;\n  unfold AutomatedMarketMaker_skim_opt in *;\n  unfold AutomatedMarketMaker_sync_opt in *;\n  unfold LiquidityToken_totalSupply_opt in *;\n  unfold LiquidityToken_balanceOf_opt in *;\n  unfold LiquidityToken_burn_opt in *;\n  unfold LiquidityToken_mint_opt in *;\n  unfold FixedSupplyToken1_transfer_opt in *;\n  unfold FixedSupplyToken_balanceOf_opt in *;\n  unfold FixedSupplyToken1_balanceOf_opt in *;\n  unfold FixedSupplyToken_transfer_opt in *;\n  inv_runStateT;\n  subst;\n  inv_arith;\n  simpl in *;\n  try rewrite make_machine_env_caller_eq in *;\n  try rewrite make_machine_env_address_eq in *;\n  autorewrite with updates in *;\n  try rewrite !Int256Tree_Properties.get_default_ss in *;\n  try rewrite !Int256Tree_Properties.get_default_so in *;\n  (* try rewrite Int256Tree_reduce in *;\n  try rewrite Int256Tree_mreduce in *; *)\n  try rewrite Int256Tree_mireduce in *;\n  auto.\n\nLemma balance_tracks_reserve_inv : forall u s s', \n  u <> amm_address -> \n  get_balance0 s amm_address = (AutomatedMarketMaker__reserve0 s) ->\n  get_balance1 s amm_address = (AutomatedMarketMaker__reserve1 s) -> \n  mstep_amm amm_address coinbase timestamp number balance blockhash prev_contract_state u s s' ->\n  get_balance0 s amm_address = (AutomatedMarketMaker__reserve0 s') /\\\n  get_balance1 s amm_address = (AutomatedMarketMaker__reserve1 s').\nProof.\n  intros u s s' Hun Hps0 Hps1 Hstp.\n  unfold get_balance0 in *.\n  unfold get_balance1 in *.\n  (*\n  destruct Hstp; rds. (* FIXME: rds should be able to automatically solve all the goals if we have \n                          machine_env updating implemented *)\n*)\nAdmitted.\n\nAxiom anything : False.\n\n(* splitting trades is strictly more expensive, if you split one trade into two trades with combined\n    same amount, then you swapped for less alternative tokens *)\nTheorem path_dependency : forall r r' rd rd' rd'' rd''' \n    (s s' s'' sd' sd'' sd''' sd'''' : state) \n    (trader : addr) \n    (swapAmount0 : Z32)\n    (swapAmount0D0 swapAmount0D1 : Z32), \n    (swapAmount0D0 > 0)%Z ->\n    (swapAmount0D1 > 0)%Z ->\n    (swapAmount0D0 + swapAmount0D1 = swapAmount0)%Z ->\n    (swapAmount0 > 0)%Z -> (* trasferring an amount > 0 *)\n    ((AutomatedMarketMaker__reserve0 s) > 0)%Z -> \n    ((AutomatedMarketMaker__reserve1 s) > 0)%Z ->\n    amm_address <> trader -> \n    get_balance0 s amm_address = (AutomatedMarketMaker__reserve0 s) -> (* assumes that the reserve is the same as balance at s *)\n    get_balance1 s amm_address = (AutomatedMarketMaker__reserve1 s) ->\n    (* swapping in one trade *)\n    runStateT (FixedSupplyToken_transfer_opt amm_address swapAmount0 (make_machine_env_wrapped s trader)) s = Some (r, s') ->\n    runStateT (AutomatedMarketMaker_simpleSwap0_opt trader (make_machine_env_wrapped s amm_address)) s' = Some (r', s'') -> \n    (* swapping in two trades *)\n    runStateT (FixedSupplyToken_transfer_opt amm_address swapAmount0D0 (make_machine_env_wrapped s trader)) s = Some (rd, sd') ->\n    runStateT (AutomatedMarketMaker_simpleSwap0_opt trader (make_machine_env_wrapped s amm_address)) sd' = Some (rd', sd'') -> \n    runStateT (FixedSupplyToken_transfer_opt amm_address swapAmount0D1 (make_machine_env_wrapped s trader)) sd'' = Some (rd'', sd''') ->\n    runStateT (AutomatedMarketMaker_simpleSwap0_opt trader (make_machine_env_wrapped s amm_address)) sd''' = Some (rd''', sd'''') -> \n    (* the ending balance is different *)\n    (r' > rd' + rd''')%Z.\nProof.\n  (* generic tactic *)\n  intros.\n  (*replace (r' > rd' + rd''')%Z with (r' -(rd' + rd''') > 0)%Z.\n  eapply split_trade_int.*)\n  unfold get_balance0 in *.\n  unfold get_balance1 in *.\n  (* Time rds. (* finish in 182 secs, or 3m2s *) (* Seems a bit faster with Unset Regular Subst. *) *)\n\n\n  unfold AutomatedMarketMaker_mint_opt in *;\n  unfold AutomatedMarketMaker_burn_opt in *;\n  unfold AutomatedMarketMaker_simpleSwap0_opt in *;\n  unfold AutomatedMarketMaker_skim_opt in *;\n  unfold AutomatedMarketMaker_sync_opt in *;\n  unfold LiquidityToken_totalSupply_opt in *;\n  unfold LiquidityToken_balanceOf_opt in *;\n  unfold LiquidityToken_burn_opt in *;\n  unfold LiquidityToken_mint_opt in *;\n  unfold FixedSupplyToken1_transfer_opt in *;\n  unfold FixedSupplyToken_balanceOf_opt in *;\n  unfold FixedSupplyToken1_balanceOf_opt in *;\n  unfold FixedSupplyToken_transfer_opt in *;\n  inv_runStateT;\n  subst.\n  inv_arith;\n  simpl in *;\n  try rewrite make_machine_env_caller_eq in *;\n  try rewrite make_machine_env_address_eq in *.\n  autorewrite with updates in *.\n  try rewrite !Int256Tree_Properties.get_default_ss in *.\n  try rewrite Int256Tree_mireduce in * by congruence .\n  try rewrite !Int256Tree_Properties.get_default_so in * by congruence.\n  (* try rewrite Int256Tree_reduce in *;\n  try rewrite Int256Tree_mreduce in *; *) \n\n  \n  \n  rewrite !Int256Tree_Properties.get_default_ss in *.\n  subst.\n  \n  rewrite !H6. rewrite !H7.\n  remember (swapAmount0D0) as c.\n  remember (swapAmount0D1) as d.\n  remember (AutomatedMarketMaker__reserve0 m92) as a.\n  remember (AutomatedMarketMaker__reserve1 m92) as b.\n  autorewrite with updates.\n  rewrite !Int256Tree_Properties.get_default_ss.\n\n  rewrite !add_sub_inv. (* need inequality rewtiting rules *) \n\n\n \n  (*assert (d * 997 * R1 / (R0 * 1000 + d * 997) > d * 997 * R1 / (R0 * 1000 + d * 997 + d' * 997))%Z.\n  assert (d' * 997 > 0)%Z. omega.\n  match goal with\n  | [ |- context[Z.gt (Z.div ?A ?B) (Z.div ?A (Z.add ?B ?C))]] => pose (HZInEq_denadd := ZInEq_denadd A B C H31); clearbody HZInEq_denadd\n  end.\n  exact HZInEq_denadd.\n  apply H31.\n  rewrite Zgt_trans.\n  nia.\n  unfold AutomatedMarketMaker_simpleSwap0_opt in *.\n  unfold FixedSupplyToken1_transfer_opt in *.\n  unfold FixedSupplyToken0_balanceOf_opt in *.\n  unfold FixedSupplyToken1_balanceOf_opt in *.\n  unfold FixedSupplyToken0_transfer_opt in *.\n\n  Opaque bind ret get gets put modify guard mzero.\n\n  Import MonadNotation.\n  inv_runStateT1 H13.\n  subst.\n  inv_arith.\n  simpl in *.\n\n  inv_runStateT1 H12.\n  subst.\n  autorewrite with updates in *.\n  rewrite !Int256Tree_reduce in *.\n  simpl in *.\n  inv_arith.\n\n  inv_runStateT1  H11.\n  subst.\n  simpl in *.\n  autorewrite with updates in *.\n  inv_arith.\n  rewrite !(@Int256Tree_Properties.get_default_so _ (0%Z) a25 a) in * by (exact H22).\n  rewrite !Int256Tree_Properties.get_default_ss in *.\n\n  inv_runStateT1 H9.\n  subst.\n  simpl in *.\n  autorewrite with updates in *.\n  inv_arith.\n\n  inv_runStateT1 H8.\n  subst.\n  simpl in *.\n  autorewrite with updates in *.\n  rewrite !Int256Tree_Properties.get_default_ss in *.\n\n  inv_runStateT1   H10.\n  subst.\n  simpl in *.\n  autorewrite with updates in *.\n  rewrite !Int256Tree_Properties.get_default_ss in *.\n\n  *)\n  (* These lines are to test if the resulting proof term can be checked reasonably quickly, but it seems it works. *)\n  (* destruct anything.\n  Time Qed. *)\n  \nAdmitted.\n\nEnd AMMProof.\nEnd WithMem.\n"
  },
  {
    "path": "contracts/amm-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\c9\\01\\24\\60\\00\\01\\7f\\60\\01\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\01\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\00\\01\\7f\\60\\03\\7f\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\00\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\1a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\1b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\1c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\1d\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\1e\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\1b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\1b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\1a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\1a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\01\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\1a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\1f\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\1f\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\1a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\20\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\1f\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\1a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\21\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\1f\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\1b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\1d\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\22\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\1b\\03\\23\\22\\0b\\0b\\0b\\01\\1a\\23\\01\\23\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\8e\\da\\03\\22\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\c5\\06\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\c2\\f0\\89\\d3\\06\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\c4\\96\\bf\\cd\\78\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\dd\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\23\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\bf\\d4\\b3\\c1\\78\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\de\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\24\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\8a\\c8\\e9\\ec\\06\\46\\04\\40\\23\\00\\41\\e0\\00\\46\\45\\04\\40\\41\\df\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\25\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\f7\\9e\\97\\e1\\7b\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\e0\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\26\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\e9\\95\\5b\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\e1\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\27\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\e1\\98\\d0\\a7\\7b\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\e2\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\28\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\bc\\d4\\cd\\b4\\7d\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\e3\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\29\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\cf\\ac\\fb\\bd\\06\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\e4\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\2a\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\fd\\d7\\ee\\9e\\07\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\e5\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\2b\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\89\\51\\01\\05\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\a0\\8d\\06\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\a0\\8d\\06\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\80\\06\\10\\08\\41\\80\\06\\28\\02\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\a0\\8d\\06\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\a0\\8d\\06\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\a0\\8d\\06\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\80\\06\\10\\08\\41\\80\\06\\28\\02\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\a0\\8d\\06\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\af\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\80\\06\\10\\08\\41\\80\\06\\28\\02\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\a0\\8d\\06\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\c3\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\c2\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\01\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\bb\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\bf\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\be\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\bd\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\bc\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\bb\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\06\\10\\08\\41\\80\\06\\28\\02\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\00\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\9e\\10\\01\\0a\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\03\\01\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\04\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\05\\20\\04\\20\\02\\6b\\21\\06\\20\\05\\20\\03\\6b\\21\\07\\10\\31\\21\\08\\20\\08\\41\\00\\46\\04\\40\\41\\e8\\07\\41\\00\\10\\2c\\1a\\20\\06\\20\\07\\6c\\41\\e8\\07\\6b\\21\\09\\05\\20\\07\\20\\08\\6c\\20\\03\\6e\\20\\06\\20\\08\\6c\\20\\02\\6e\\10\\33\\21\\09\\0b\\20\\09\\41\\00\\4b\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\09\\20\\00\\10\\2c\\1a\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\04\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\05\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\00\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\e4\\10\\01\\0d\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\03\\01\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\04\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\05\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\39\\21\\06\\10\\31\\21\\07\\20\\06\\20\\04\\6c\\20\\07\\6e\\21\\08\\20\\06\\20\\05\\6c\\20\\07\\6e\\21\\09\\20\\08\\41\\00\\4b\\20\\09\\41\\00\\4b\\71\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\06\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\35\\1a\\20\\08\\20\\00\\10\\32\\21\\0a\\20\\0a\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\09\\20\\00\\10\\32\\21\\0b\\20\\0b\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\0c\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\0d\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\0c\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\0d\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\00\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\c5\\10\\01\\0d\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\03\\01\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\04\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\05\\20\\04\\20\\02\\6b\\21\\06\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c3\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\07\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c2\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\08\\01\\20\\00\\20\\07\\47\\20\\00\\20\\08\\47\\71\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\06\\41\\00\\4b\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\02\\41\\00\\4b\\20\\03\\41\\00\\4b\\71\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\06\\41\\e5\\07\\6c\\21\\09\\20\\09\\20\\03\\6c\\21\\0a\\20\\02\\41\\e8\\07\\6c\\20\\09\\6a\\21\\0b\\20\\0a\\20\\0b\\6e\\21\\0c\\20\\0c\\20\\00\\10\\32\\21\\0d\\20\\0d\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\0c\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\01\\0f\\0b\\83\\19\\01\\0f\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\20\\00\\41\\00\\4b\\20\\01\\41\\00\\4b\\72\\21\\03\\20\\03\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\04\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\05\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c3\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c2\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\07\\01\\20\\00\\20\\04\\49\\20\\01\\20\\05\\49\\71\\21\\03\\20\\03\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\02\\20\\06\\47\\20\\02\\20\\07\\47\\71\\21\\03\\20\\03\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\08\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\09\\20\\04\\41\\00\\20\\08\\10\\2e\\21\\0a\\20\\05\\41\\00\\20\\09\\10\\2e\\21\\0b\\20\\0a\\41\\00\\4b\\20\\0b\\41\\00\\4b\\72\\21\\03\\20\\03\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\0a\\20\\08\\20\\00\\6b\\10\\37\\21\\0c\\20\\0b\\20\\09\\20\\01\\6b\\10\\37\\21\\0d\\20\\0c\\20\\0d\\6c\\20\\04\\20\\05\\6c\\41\\e8\\07\\6c\\41\\e8\\07\\6c\\4b\\21\\03\\20\\03\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\00\\41\\00\\4b\\04\\40\\20\\00\\20\\02\\10\\32\\21\\0f\\20\\0f\\21\\0e\\20\\0e\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\00\\21\\0e\\05\\41\\00\\21\\0e\\0b\\20\\01\\41\\00\\4b\\04\\40\\20\\01\\20\\02\\10\\32\\21\\11\\20\\11\\21\\10\\20\\10\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\00\\21\\10\\05\\41\\00\\21\\10\\0b\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\08\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\09\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\00\\21\\03\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\c6\\08\\01\\09\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\03\\01\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\04\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\05\\20\\04\\20\\02\\6b\\21\\06\\20\\05\\20\\03\\6b\\21\\07\\20\\06\\20\\00\\10\\32\\21\\08\\20\\08\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\07\\20\\00\\10\\32\\21\\09\\20\\09\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\00\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\8c\\08\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\01\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\10\\36\\21\\02\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\01\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\02\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\00\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\e9\\07\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\20\\01\\20\\02\\6c\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\9c\\08\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\20\\00\\41\\00\\4b\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\03\\01\\20\\02\\41\\00\\4b\\20\\03\\41\\00\\4b\\71\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\00\\20\\03\\6c\\20\\02\\6e\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\01\\0f\\0b\\b7\\08\\01\\07\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\20\\00\\41\\00\\4b\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\03\\01\\20\\02\\41\\00\\4b\\20\\03\\41\\00\\4b\\71\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\00\\41\\e5\\07\\6c\\21\\04\\20\\04\\20\\03\\6c\\21\\05\\20\\02\\41\\e8\\07\\6c\\20\\04\\6a\\21\\06\\20\\05\\20\\06\\6e\\21\\07\\20\\07\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\01\\0f\\0b\\b6\\08\\01\\06\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\20\\00\\41\\00\\4b\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c1\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\c0\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\03\\01\\20\\02\\41\\00\\4b\\20\\03\\41\\00\\4b\\71\\21\\01\\20\\01\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\03\\20\\00\\6c\\41\\e8\\07\\6c\\21\\04\\20\\02\\20\\00\\6b\\41\\e5\\07\\6c\\21\\05\\20\\04\\20\\05\\6e\\41\\01\\6a\\21\\06\\20\\06\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\01\\0f\\0b\\ac\\17\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\af\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\03\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\af\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\03\\20\\01\\6a\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\04\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\04\\20\\01\\6a\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\00\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\ec\\0b\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\20\\02\\20\\01\\6b\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\20\\00\\0f\\0b\\4d\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\20\\02\\20\\01\\6b\\21\\04\\20\\00\\20\\04\\4b\\04\\40\\20\\00\\20\\04\\6b\\21\\05\\05\\41\\00\\21\\05\\0b\\20\\05\\21\\03\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\03\\0f\\0b\\ae\\1f\\01\\04\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\80\\06\\10\\08\\41\\80\\06\\28\\02\\00\\21\\03\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\03\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\04\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\05\\01\\01\\20\\03\\20\\00\\47\\20\\04\\20\\01\\4f\\71\\21\\02\\20\\02\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\03\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\04\\20\\01\\6b\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\05\\20\\01\\6a\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\01\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\85\\0c\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\ab\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\41\\80\\06\\10\\08\\41\\80\\06\\28\\02\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\01\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\41\\01\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\36\\02\\00\\20\\02\\0f\\0b\\ec\\0b\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\af\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\20\\02\\20\\01\\6b\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\20\\00\\0f\\0b\\ae\\1f\\01\\04\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\80\\06\\10\\08\\41\\80\\06\\28\\02\\00\\21\\03\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\03\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\04\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\05\\01\\01\\20\\03\\20\\00\\47\\20\\04\\20\\01\\4f\\71\\21\\02\\20\\02\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\03\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\04\\20\\01\\6b\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\05\\20\\01\\6a\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\01\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\3f\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\20\\00\\20\\01\\49\\04\\40\\20\\00\\21\\02\\05\\20\\01\\21\\02\\0b\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\85\\0c\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\b5\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\41\\80\\06\\10\\08\\41\\80\\06\\28\\02\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\01\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\41\\01\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\36\\02\\00\\20\\02\\0f\\0b\\ac\\17\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\af\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\03\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\af\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\03\\20\\01\\6b\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\04\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\04\\20\\01\\6b\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\00\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\85\\08\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\01\\20\\02\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\20\\01\\0f\\0b\\3c\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\20\\00\\41\\e8\\07\\6c\\20\\01\\41\\03\\6c\\6b\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\83\\2b\\01\\04\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\04\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\05\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\ab\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\06\\01\\01\\01\\20\\00\\20\\01\\47\\20\\04\\20\\02\\4f\\20\\06\\20\\02\\4f\\71\\71\\21\\03\\20\\03\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\04\\20\\02\\6b\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\05\\20\\02\\6a\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\01\\21\\03\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\36\\02\\00\\20\\03\\0f\\0b\\85\\08\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\01\\20\\02\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\20\\01\\0f\\0b\\83\\2b\\01\\04\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\04\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\05\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\b5\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\06\\01\\01\\01\\20\\00\\20\\01\\47\\20\\04\\20\\02\\4f\\20\\06\\20\\02\\4f\\71\\71\\21\\03\\20\\03\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\04\\20\\02\\6b\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\80\\01\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\41\\e0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\05\\20\\02\\6a\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\01\\21\\03\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\a0\\01\\6b\\36\\02\\00\\20\\03\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const    61644))\n  )\n)"
  },
  {
    "path": "contracts/amm-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param i32) (result i32)))\n  (type (;2;) (func (param i32) (result i32)))\n  (type (;3;) (func (param i32) (result i32)))\n  (type (;4;) (func (param i32 i32 i32) (result i32)))\n  (type (;5;) (func (param i32) (result i32)))\n  (type (;6;) (func (param ) (result i32)))\n  (type (;7;) (func (param ) (result i32)))\n  (type (;8;) (func (param i32) (result i32)))\n  (type (;9;) (func (param i32) (result i32)))\n  (type (;10;) (func (param i32) (result i32)))\n  (type (;11;) (func (param i32 i32) (result i32)))\n  (type (;12;) (func (param ) (result i32)))\n  (type (;13;) (func (param i32 i32 i32) (result i32)))\n  (type (;14;) (func (param i32 i32) (result i32)))\n  (type (;15;) (func (param i32 i32) (result i32)))\n  (type (;16;) (func (param ) (result i32)))\n  (type (;17;) (func (param i32 i32) (result i32)))\n  (type (;18;) (func (param i32 i32) (result i32)))\n  (type (;19;) (func (param i32 i32) (result i32)))\n  (type (;20;) (func (param i32 i32) (result i32)))\n  (type (;21;) (func (param i32) (result i32)))\n  (type (;22;) (func (param i32 i32) (result i32)))\n  (type (;23;) (func (param i32 i32 i32) (result i32)))\n  (type (;24;) (func (param i32) (result i32)))\n  (type (;25;) (func (param i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0x6a627842\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x89afcb44\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 221 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f258)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x882cea3f\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 222 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f259)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x6d9a640a\n    i32.eq\n    if \n      global.get 0\n      i32.const 96\n      i32.eq\n      i32.eqz\n      if \n        i32.const 223 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f260)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xbc25cf77\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 224 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f261)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xfff6cae9\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 225 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f262)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xb4f40c61\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 226 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f263)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xd6936a3c\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 227 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f264)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x67bed64f\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 228 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f265)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x73dbabfd\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 229 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f266)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n      end\n      end\n      end\n      end\n      end\n      end\n      end\n      end\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    (local $l1 i32)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x0186a0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x0186a0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x0186a0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x0186a0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x0186a0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x0186a0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022f\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x0186a0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0243\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0242\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x01\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x023b\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x023f\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x023e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x023d\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x023c\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x023b\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x00\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l1 i32)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    (local $l6 i32)\n    (local $l7 i32)\n    (local $l8 i32)\n    (local $l9 i32)\n    (local $l10 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 3\n    nop\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 4\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 5\n    local.get 4\n    local.get 2\n    i32.sub\n    local.set 6\n    local.get 5\n    local.get 3\n    i32.sub\n    local.set 7\n    call $f272\n    local.set 8\n    local.get 8\n    i32.const 0x00\n    i32.eq\n    if \n      i32.const 0x03e8\n      i32.const 0x00\n      call $f267\n      drop\n      local.get 6\n      local.get 7\n      i32.mul\n      i32.const 0x03e8\n      i32.sub\n      local.set 9\n    else \n      local.get 7\n      local.get 8\n      i32.mul\n      local.get 3\n      i32.div_u\n      local.get 6\n      local.get 8\n      i32.mul\n      local.get 2\n      i32.div_u\n      call $f274\n      local.set 9\n    end\n    local.get 9\n    i32.const 0x00\n    i32.gt_u\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 9\n    local.get 0\n    call $f267\n    drop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 4\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 5\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x00\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f258 (type 2)\n    (local $l1 i32)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    (local $l6 i32)\n    (local $l7 i32)\n    (local $l8 i32)\n    (local $l9 i32)\n    (local $l10 i32)\n    (local $l11 i32)\n    (local $l12 i32)\n    (local $l13 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 3\n    nop\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 4\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 5\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f280\n    local.set 6\n    call $f272\n    local.set 7\n    local.get 6\n    local.get 4\n    i32.mul\n    local.get 7\n    i32.div_u\n    local.set 8\n    local.get 6\n    local.get 5\n    i32.mul\n    local.get 7\n    i32.div_u\n    local.set 9\n    local.get 8\n    i32.const 0x00\n    i32.gt_u\n    local.get 9\n    i32.const 0x00\n    i32.gt_u\n    i32.and\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 6\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f276\n    drop\n    local.get 8\n    local.get 0\n    call $f273\n    local.set 10\n    local.get 10\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 9\n    local.get 0\n    call $f273\n    local.set 11\n    local.get 11\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 12\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 13\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 12\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 13\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x00\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f259 (type 3)\n    (local $l1 i32)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    (local $l6 i32)\n    (local $l7 i32)\n    (local $l8 i32)\n    (local $l9 i32)\n    (local $l10 i32)\n    (local $l11 i32)\n    (local $l12 i32)\n    (local $l13 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 3\n    nop\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 4\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 5\n    local.get 4\n    local.get 2\n    i32.sub\n    local.set 6\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0243\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 7\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0242\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 8\n    nop\n    local.get 0\n    local.get 7\n    i32.ne\n    local.get 0\n    local.get 8\n    i32.ne\n    i32.and\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 6\n    i32.const 0x00\n    i32.gt_u\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 2\n    i32.const 0x00\n    i32.gt_u\n    local.get 3\n    i32.const 0x00\n    i32.gt_u\n    i32.and\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 6\n    i32.const 0x03e5\n    i32.mul\n    local.set 9\n    local.get 9\n    local.get 3\n    i32.mul\n    local.set 10\n    local.get 2\n    i32.const 0x03e8\n    i32.mul\n    local.get 9\n    i32.add\n    local.set 11\n    local.get 10\n    local.get 11\n    i32.div_u\n    local.set 12\n    local.get 12\n    local.get 0\n    call $f273\n    local.set 13\n    local.get 13\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 12\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n  (func $f260 (type 4)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    (local $l6 i32)\n    (local $l7 i32)\n    (local $l8 i32)\n    (local $l9 i32)\n    (local $l10 i32)\n    (local $l11 i32)\n    (local $l12 i32)\n    (local $l13 i32)\n    (local $l14 i32)\n    (local $l15 i32)\n    (local $l16 i32)\n    (local $l17 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    local.get 0\n    i32.const 0x00\n    i32.gt_u\n    local.get 1\n    i32.const 0x00\n    i32.gt_u\n    i32.or\n    local.set 3\n    local.get 3\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 4\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 5\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0243\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 6\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0242\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 7\n    nop\n    local.get 0\n    local.get 4\n    i32.lt_u\n    local.get 1\n    local.get 5\n    i32.lt_u\n    i32.and\n    local.set 3\n    local.get 3\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 2\n    local.get 6\n    i32.ne\n    local.get 2\n    local.get 7\n    i32.ne\n    i32.and\n    local.set 3\n    local.get 3\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 8\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 9\n    local.get 4\n    i32.const 0x00\n    local.get 8\n    call $f269\n    local.set 10\n    local.get 5\n    i32.const 0x00\n    local.get 9\n    call $f269\n    local.set 11\n    local.get 10\n    i32.const 0x00\n    i32.gt_u\n    local.get 11\n    i32.const 0x00\n    i32.gt_u\n    i32.or\n    local.set 3\n    local.get 3\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 10\n    local.get 8\n    local.get 0\n    i32.sub\n    call $f278\n    local.set 12\n    local.get 11\n    local.get 9\n    local.get 1\n    i32.sub\n    call $f278\n    local.set 13\n    local.get 12\n    local.get 13\n    i32.mul\n    local.get 4\n    local.get 5\n    i32.mul\n    i32.const 0x03e8\n    i32.mul\n    i32.const 0x03e8\n    i32.mul\n    i32.gt_u\n    local.set 3\n    local.get 3\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 0\n    i32.const 0x00\n    i32.gt_u\n    if \n      local.get 0\n      local.get 2\n      call $f273\n      local.set 15\n      local.get 15\n      local.set 14\n      local.get 14\n      if \n        nop\n      else \n        i32.const 256\n        i32.const 0\n        call $f28\n      end\n      i32.const 0x00\n      local.set 14\n    else \n      i32.const 0x00\n      local.set 14\n    end\n    local.get 1\n    i32.const 0x00\n    i32.gt_u\n    if \n      local.get 1\n      local.get 2\n      call $f273\n      local.set 17\n      local.get 17\n      local.set 16\n      local.get 16\n      if \n        nop\n      else \n        i32.const 256\n        i32.const 0\n        call $f28\n      end\n      i32.const 0x00\n      local.set 16\n    else \n      i32.const 0x00\n      local.set 16\n    end\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 8\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 9\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x00\n    local.set 3\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f261 (type 5)\n    (local $l1 i32)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    (local $l6 i32)\n    (local $l7 i32)\n    (local $l8 i32)\n    (local $l9 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 3\n    nop\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 4\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 5\n    local.get 4\n    local.get 2\n    i32.sub\n    local.set 6\n    local.get 5\n    local.get 3\n    i32.sub\n    local.set 7\n    local.get 6\n    local.get 0\n    call $f273\n    local.set 8\n    local.get 8\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 7\n    local.get 0\n    call $f273\n    local.set 9\n    local.get 9\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x00\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f262 (type 6)\n    (local $l0 i32)\n    (local $l1 i32)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 1\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    call $f277\n    local.set 2\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 1\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 2\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x00\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f263 (type 7)\n    (local $l0 i32)\n    (local $l1 i32)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    local.get 1\n    local.get 2\n    i32.mul\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f264 (type 8)\n    (local $l1 i32)\n    (local $l2 i32)\n    (local $l3 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    local.get 0\n    i32.const 0x00\n    i32.gt_u\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 3\n    nop\n    local.get 2\n    i32.const 0x00\n    i32.gt_u\n    local.get 3\n    i32.const 0x00\n    i32.gt_u\n    i32.and\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 0\n    local.get 3\n    i32.mul\n    local.get 2\n    i32.div_u\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n  (func $f265 (type 9)\n    (local $l1 i32)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    (local $l6 i32)\n    (local $l7 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    local.get 0\n    i32.const 0x00\n    i32.gt_u\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 3\n    nop\n    local.get 2\n    i32.const 0x00\n    i32.gt_u\n    local.get 3\n    i32.const 0x00\n    i32.gt_u\n    i32.and\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 0\n    i32.const 0x03e5\n    i32.mul\n    local.set 4\n    local.get 4\n    local.get 3\n    i32.mul\n    local.set 5\n    local.get 2\n    i32.const 0x03e8\n    i32.mul\n    local.get 4\n    i32.add\n    local.set 6\n    local.get 5\n    local.get 6\n    i32.div_u\n    local.set 7\n    local.get 7\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n  (func $f266 (type 10)\n    (local $l1 i32)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    (local $l6 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    local.get 0\n    i32.const 0x00\n    i32.gt_u\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0241\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0240\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 3\n    nop\n    local.get 2\n    i32.const 0x00\n    i32.gt_u\n    local.get 3\n    i32.const 0x00\n    i32.gt_u\n    i32.and\n    local.set 1\n    local.get 1\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 3\n    local.get 0\n    i32.mul\n    i32.const 0x03e8\n    i32.mul\n    local.set 4\n    local.get 2\n    local.get 0\n    i32.sub\n    i32.const 0x03e5\n    i32.mul\n    local.set 5\n    local.get 4\n    local.get 5\n    i32.div_u\n    i32.const 0x01\n    i32.add\n    local.set 6\n    local.get 6\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n  (func $f267 (type 11)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022f\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 3\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022f\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 3\n    local.get 1\n    i32.add\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 4\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 4\n    local.get 1\n    i32.add\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x00\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f268 (type 12)\n    (local $l0 i32)\n    (local $l1 i32)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x00\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    local.get 2\n    local.get 1\n    i32.sub\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f269 (type 13)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    local.get 2\n    local.get 1\n    i32.sub\n    local.set 4\n    local.get 0\n    local.get 4\n    i32.gt_u\n    if \n      local.get 0\n      local.get 4\n      i32.sub\n      local.set 5\n    else \n      i32.const 0x00\n      local.set 5\n    end\n    local.get 5\n    local.set 3\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 3\n    return\n  )\n  (func $f270 (type 14)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    local.set 3\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 3\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 4\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 5\n    nop\n    nop\n    local.get 3\n    local.get 0\n    i32.ne\n    local.get 4\n    local.get 1\n    i32.ge_u\n    i32.and\n    local.set 2\n    local.get 2\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 3\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 4\n    local.get 1\n    i32.sub\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 5\n    local.get 1\n    i32.add\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x01\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f271 (type 15)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x022b\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 1\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    i32.const 0x01\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f272 (type 16)\n    (local $l0 i32)\n    (local $l1 i32)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x00\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022f\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    local.get 2\n    local.get 1\n    i32.sub\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f273 (type 17)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    local.set 3\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 3\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 4\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 5\n    nop\n    nop\n    local.get 3\n    local.get 0\n    i32.ne\n    local.get 4\n    local.get 1\n    i32.ge_u\n    i32.and\n    local.set 2\n    local.get 2\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 3\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 4\n    local.get 1\n    i32.sub\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 5\n    local.get 1\n    i32.add\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x01\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f274 (type 18)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    local.get 0\n    local.get 1\n    i32.lt_u\n    if \n      local.get 0\n      local.set 2\n    else \n      local.get 1\n      local.set 2\n    end\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f275 (type 19)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x0235\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 1\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    i32.const 0x01\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f276 (type 20)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022f\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 3\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022f\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 3\n    local.get 1\n    i32.sub\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 4\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 4\n    local.get 1\n    i32.sub\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x00\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f277 (type 21)\n    (local $l1 i32)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    nop\n    local.get 2\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n  (func $f278 (type 22)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    local.get 0\n    i32.const 0x03e8\n    i32.mul\n    local.get 1\n    i32.const 0x03\n    i32.mul\n    i32.sub\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f279 (type 23)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    (local $l6 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 4\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 5\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x022b\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 6\n    nop\n    nop\n    nop\n    local.get 0\n    local.get 1\n    i32.ne\n    local.get 4\n    local.get 2\n    i32.ge_u\n    local.get 6\n    local.get 2\n    i32.ge_u\n    i32.and\n    i32.and\n    local.set 3\n    local.get 3\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 4\n    local.get 2\n    i32.sub\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 5\n    local.get 2\n    i32.add\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x01\n    local.set 3\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.store\n    local.get 3\n    return\n  )\n  (func $f280 (type 24)\n    (local $l1 i32)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    nop\n    local.get 2\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n  (func $f281 (type 25)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    (local $l6 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 4\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 5\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x0235\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 6\n    nop\n    nop\n    nop\n    local.get 0\n    local.get 1\n    i32.ne\n    local.get 4\n    local.get 2\n    i32.ge_u\n    local.get 6\n    local.get 2\n    i32.ge_u\n    i32.and\n    i32.and\n    local.set 3\n    local.get 3\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 4\n    local.get 2\n    i32.sub\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x80\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.const 0x60\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 5\n    local.get 2\n    i32.add\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x01\n    local.set 3\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0xa0\n    i32.sub\n    i32.store\n    local.get 3\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/auction/auction/FunctionalCorrectness.v",
    "content": "Require Import backend.MachineModel.\nRequire Import cclib.Integers.\nRequire Import LayerAUCTION.\nRequire Import backend.Values.\nRequire Import backend.BuiltinSemantics.\nRequire Import DeepSpec.lib.Monad.StateMonadOption.\nRequire Import DataTypeOps.\n\n\n\nObligation Tactic := try eexists; simpl; eauto;  try congruence.\nProgram Definition simple_machine_env\n        (address origin caller callvalue\n         coinbase timestamp number : int256) : machine_env :=\n  {| me_query q :=\n       match q with\n       | Qcall0 Baddress => Vint address\n       | Qcall0 Borigin => Vint origin\n       | Qcall0 Bcaller => Vint caller\n       | Qcall0 Bcallvalue => Vint callvalue\n       | Qcall0 Bcoinbase => Vint coinbase\n       | Qcall0 Btimestamp => Vint timestamp\n       | Qcall0 Bnumber => Vint number\n       | Qcall1 Bsha_1 v => Vunit (* todo. *)\n       | Qcall1 Bbalance v => Vunit (* todo. *)\n       | Qcall1 Bblockhash v => Vunit (* todo. *)\n       | Qcall2 Bsha_2 (Vptr a1p) (Vint a2i) => Vptr (Ihash a1p a2i)\n       | Qcall2 Bsha_2 _ _ => Vunit (* todo. *)\n       end ;\n     me_transfer _ _ _ _ := True;\n     me_callmethod _ _ _ _ _ _ _ := True\n  |}.\n\nDefinition from_option {A:Type} (default:A) (x:option A) :A :=\n  match x with\n  | None => default\n  | Some y => y\n  end.\n\nRequire Import ZArith.\nRequire Import cclib.Maps.\n\nSection WithMem.\n\nImport core.MemoryModel.\n  \nContext {HmemOps: MemoryModelOps mem}.\n\nSection AuctionVerification.\n\n  Parameter owner : int256.\n  Parameter contract_address : int256.\n  Parameter deadline : int256.\n\n  Context (init_coinbase\n           init_timestamp\n           init_number : int256).  \n\n  Transparent OpenAuction_initialize_opt.\n  Transparent  HyperTypeInst.builtin0_caller_impl HyperTypeInst.builtin0_callvalue_impl HyperTypeInst.builtin0_coinbase_impl HyperTypeInst.builtin0_timestamp_impl HyperTypeInst.builtin0_number_impl.\n  \n  Definition OpenAuction_initial :=\n    Eval cbv -[Int256Tree.empty Int256.zero]\n    in\n      from_option init_global_abstract_data\n                  (execStateT (OpenAuction_initialize_opt\n                                 deadline\n                                 (simple_machine_env contract_address owner owner Int256.zero\n                                                     init_coinbase init_timestamp init_number))\n                              init_global_abstract_data).\n\n  "
  },
  {
    "path": "contracts/auction/auction.ds",
    "content": "object signature AuctionInterface = {\n  constructor   : uint -> unit;\n  const getbid      : unit -> uint;\n  const getbidder   : unit -> address;\n  const getchair    : unit -> address;\n  const getdeadline : unit -> uint;\n  bid         : unit -> bool;\n  withdraw    : unit -> bool;\n}\n\nobject OpenAuction : AuctionInterface {\n  (* initial values don't get used *)\n  let _bid        : uint := 0u0\n  let _bidder     : address := address(0)\n  let _chair      : address := address(0)\n  let _deadline   : uint := 0u0\n  let withdrawals : mapping[address] uint := mapping_init\n\n  let constructor deadline =\n    _bid         := 0u0;\n    _bidder      := msg_sender;\n    _chair       := msg_sender;\n    _deadline    := deadline;\n    ()\n\n  (* getter functions *)\n  let getbid      () = _bid\n  let getbidder   () = _bidder\n  let getchair    () = _chair\n  let getdeadline () = _deadline\n\n  (* place bid *)\n  let bid () =\n    let bidder     = _bidder             in\n    let bid        = _bid                in\n    let deadline   = _deadline           in\n    let withdrawal = withdrawals[bidder] in\n\n    assert ((msg_sender   <> bidder ) /\\\n            (msg_value    >  bid    ) /\\\n            (block_number < deadline));\n\t    \n    withdrawals[bidder] := withdrawal + bid;\n    _bidder := msg_sender;\n    _bid    := msg_value;\n    true\n\n  (* losers can withdraw their money *)\n  let withdraw () =\n    let winner = _bidder in\n    assert (msg_sender <> winner);\n    let balance = withdrawals[msg_sender] in\n    withdrawals[msg_sender] := 0u0;\n    transferEth(msg_sender, balance);\n    true\n}\n    \nlayer AUCTION = {\n  auction = OpenAuction\n}\n"
  },
  {
    "path": "contracts/auction/test.js",
    "content": "#!/usr/bin/env node\n\n// TODO: test withdrawals\n\nconst fs     = require('fs');\nconst ethers = require('ethers');\nconst assert = require('assert');\n\nconst bn =  (ethers.utils.bigNumberify) ? ethers.utils.bigNumberify : ethers.BigNumber.from;\nconst pe = ethers.utils.parseEther;\n\nif (process.argv.length != 3) {\n    console.log(\"invalid args\");\n    process.exit(1);\n}\n\nconst endpoint = \"http://localhost:8545\";\nconst provider = new ethers.providers.JsonRpcProvider(endpoint);\n\nconst abi = [ {\"type\":\"constructor\",\n   \"name\":\"constructor\",\n   \"inputs\":[],\n   \"outputs\":[],\n   \"payable\":false,\n   \"constant\":false,\n   \"stateMutability\":\"nonpayable\"},\n {\"type\":\"function\",\n   \"name\":\"initialize\",\n   \"inputs\":[{\"name\":\"deadline\", \"type\":\"uint256\"}],\n   \"outputs\":[],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n {\"type\":\"function\",\n   \"name\":\"getbid\",\n   \"inputs\":[],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"getbidder\",\n   \"inputs\":[],\n   \"outputs\":[{\"name\":\"\", \"type\":\"address\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"getchair\",\n   \"inputs\":[],\n   \"outputs\":[{\"name\":\"\", \"type\":\"address\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"getdeadline\",\n   \"inputs\":[],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"bid\",\n   \"inputs\":[],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n  \"stateMutability\":\"payable\"}];\n      \nconst bytecode = fs.readFileSync(process.argv[2]).toString().replace(/\\n|\\t|\\r| /g, \"\");\nconst DEADLINE = 1000;\nconst CREATOR  = provider.getSigner(0);\n\nasync function deploy(deadline) {\n  let factory = new ethers.ContractFactory(abi, bytecode, CREATOR);\n  let auction = await factory.deploy();\n  await auction.deployed();\n  let tx = await auction.initialize(deadline);\n  await tx.wait();\n  return auction.address;\n}\n\nasync function read(auction) {\n  let bid      = await auction.getbid      ();\n  let bidder   = await auction.getbidder   ();\n  let chair    = await auction.getchair    ();\n  let deadline = await auction.getdeadline ();\n  return [bid, bidder, chair, deadline];\n}\n\nasync function show(auction) {\n  let bid, bidder, chair, deadline;\n  [bid, bidder, chair, deadline] = await read(auction);\n  console.log(\"bid      : \" + bid     );\n  console.log(\"bidder   : \" + bidder  );\n  console.log(\"chair    : \" + chair   );\n  console.log(\"deadline : \" + deadline);\n}\n\nasync function testConstructor() {\n  let addr    = await deploy(DEADLINE);\n  let signer  = provider.getSigner(1);\n  let auction = new ethers.Contract(addr, abi, signer);\n  let bid, bidder, chair, deadline;\n\n  [bid, bidder, chair, deadline] = await read(auction);\n  assert(bid.eq(bn(0)));             // bid == 0\n  assert(deadline.eq(bn(DEADLINE))); // deadline == DEADLINE\n  assert.strictEqual(bidder, await CREATOR.getAddress());\n  assert.strictEqual(chair , await CREATOR.getAddress());\n  console.log(\"constructor: passing\");\n}\n\nasync function testBids () {\n  let alice = provider.getSigner(1);\n  let bob   = provider.getSigner(2);\n  let bid, bidder, chair, deadline;\n  let addr, auction, tx, overrides;\n  const BID0 = pe('0.1');\n  const BID1 = pe('0.2');\n\n  // deploy\n  addr  = await deploy(DEADLINE);\n  auction = new ethers.Contract(addr, abi, alice);\n\n  // valid bid\n  tx = await auction.bid({ value: BID0 });\n  [bid, bidder, chair, deadline] = await read(auction);\n  assert(bid.eq(BID0));\n  assert(deadline.eq(bn (DEADLINE)));\n  assert.strictEqual(bidder, await alice.getAddress()  );\n  assert.strictEqual(chair , await CREATOR.getAddress());\n  console.log(\"valid bid: passing\");\n\n  // invalid bid (same bidder)\n  tx = await auction.bid({ value: BID1 }).then((result) => {\n\tconsole.log(\"fail! Expected a revert, but didn't see one.\")\n  }, (error) => {\n      //  do nothing.\n  });\n  [bid, bidder, chair, deadline] = await read(auction);\n  assert(bid.eq(BID0));\n  assert(deadline.eq(bn(DEADLINE)));\n  assert.strictEqual(bidder, await alice.getAddress()  );\n  assert.strictEqual(chair , await CREATOR.getAddress());\n  console.log(\"invalid bid (bidder): passing\");\n\n  // invalid bid (insufficient value)\n  auction  = new ethers.Contract (addr, abi, bob);\n  await auction.bid({ value: pe ('0.0') }).then((result) => {\n\tconsole.log(\"fail! Expected a revert, but didn't see one.\")\n  }, (error) => {\n      //  do nothing.\n  });\n  [bid, bidder, chair, deadline] = await read(auction);\n  assert(bid.eq(BID0));\n  assert(deadline.eq(bn(DEADLINE)));\n  assert.strictEqual(bidder, await alice.getAddress()  );\n  assert.strictEqual(chair , await CREATOR.getAddress());\n  console.log(\"invalid bid (value): passing\");\n\n  // invalid bid (deadline)\n  addr = await deploy(0);\n  auction = new ethers.Contract(addr, abi, alice);\n  tx = await auction.bid({ value: BID0 }).then((result) => {\n\tconsole.log(\"fail! Expected a revert, but didn't see one.\")\n  }, (error) => {\n      //  do nothing.\n  });\n  [bid, bidder, chair, deadline] = await read(auction);\n  assert(bid.eq(pe('0.0')));\n  assert(deadline.eq(bn(0)));\n  assert.strictEqual(bidder, await CREATOR.getAddress());\n  assert.strictEqual(chair , await CREATOR.getAddress());\n  console.log(\"invalid bid (deadline): passing\");\n}\n\nasync function main() {\n  await testConstructor();\n  await testBids();\n}\n\nmain();\n"
  },
  {
    "path": "contracts/defi/amm_dsmodel.ucl",
    "content": "/* file automatically generated by DeepSEA */\n\nmodule dsmodel {\n\n  type address = integer;\n\n  input me_caller : address;\n  input hackaux : address;\n  input victim : address;\n\n  const FixedSupplyToken_address : address = 65587;\n  const FixedSupplyToken1_address : address = 65586;\n  const LiquidityToken_address : address = 65585;\n  const AutomatedMarketMaker_address : address = 65584;\n  var AutomatedMarketMaker__token0 : address;\n  var AutomatedMarketMaker__token1 : address;\n  var AutomatedMarketMaker__owner : address;\n  var AutomatedMarketMaker__reserve0 : integer;\n  var AutomatedMarketMaker__reserve1 : integer;\n  var AutomatedMarketMaker_blockTimestampLast : integer;\n  var AutomatedMarketMaker_price0CumulativeLast : integer;\n  var AutomatedMarketMaker_price1CumulativeLast : integer;\n  var AutomatedMarketMaker_kLast : integer;\n  var FixedSupplyToken__totalSupply : integer;\n  var FixedSupplyToken_balances : [address] integer;\n  var FixedSupplyToken_allowances : [address] [address] integer;\n  var FixedSupplyToken1__totalSupply : integer;\n  var FixedSupplyToken1_balances : [address] integer;\n  var FixedSupplyToken1_allowances : [address] [address] integer;\n  var LiquidityToken__totalSupply : integer;\n  var LiquidityToken_balances : [address] integer;\n  var LiquidityToken_allowances : [address] [address] integer;\n  var dummy : integer;\n\n  procedure FixedSupplyToken_constructor (msg_caller : address)\n    modifies FixedSupplyToken__totalSupply, FixedSupplyToken_balances, dummy;\n  {\n    FixedSupplyToken__totalSupply = 100000;\n    FixedSupplyToken__totalSupply = 100000;\n    FixedSupplyToken_balances[msg_caller] = 100000;\n  }\n\n  procedure FixedSupplyToken_totalSupply (msg_caller : address)\n    returns (r : integer)\n  {\n    var bal0 : integer;\n    var resultU : integer;\n    var totalSupply : integer;\n    bal0 = FixedSupplyToken_balances[0];\n    totalSupply = FixedSupplyToken__totalSupply;\n    resultU = (totalSupply - bal0);\n    r = resultU;\n  }\n\n  procedure FixedSupplyToken_balanceOf (tokenOwner : address, msg_caller : address)\n    returns (r : integer)\n  {\n    var bal : integer;\n    var resultU : integer;\n    bal = FixedSupplyToken_balances[tokenOwner];\n    resultU = bal;\n    r = resultU;\n  }\n\n  procedure FixedSupplyToken_transfer (toA : address, tokens : integer, msg_caller : address)\n    returns (r : boolean)\n    modifies FixedSupplyToken_balances, dummy;\n  {\n    var fromA : address;\n    var from_bal : integer;\n    var resultU : boolean;\n    var to_bal : integer;\n    fromA = msg_caller;\n    from_bal = FixedSupplyToken_balances[fromA];\n    to_bal = FixedSupplyToken_balances[toA];\n    assume (((fromA != toA) && (from_bal >= tokens)));\n    FixedSupplyToken_balances[fromA] = (from_bal - tokens);\n    FixedSupplyToken_balances[toA] = (to_bal + tokens);\n    resultU = true;\n    r = resultU;\n  }\n\n  procedure FixedSupplyToken_approve (spender : address, tokens : integer, msg_caller : address)\n    returns (r : boolean)\n    modifies FixedSupplyToken_allowances, dummy;\n  {\n    var resultU : boolean;\n    // FixedSupplyToken_allowances[msg_caller][spender] = tokens;\n    FixedSupplyToken_allowances[msg_caller] = FixedSupplyToken_allowances[msg_caller][spender -> tokens];\n    resultU = true;\n    r = resultU;\n  }\n\n  procedure FixedSupplyToken_transferFrom (fromA : address, toA : address, tokens : integer, msg_caller : address)\n    returns (r : boolean)\n    modifies FixedSupplyToken_balances, dummy;\n  {\n    var allowed : integer;\n    var from_bal : integer;\n    var resultU : boolean;\n    var to_bal : integer;\n    from_bal = FixedSupplyToken_balances[fromA];\n    to_bal = FixedSupplyToken_balances[toA];\n    allowed = FixedSupplyToken_allowances[fromA][toA];\n    assume (((fromA != toA) && ((from_bal >= tokens) && (allowed >= tokens))));\n    FixedSupplyToken_balances[fromA] = (from_bal - tokens);\n    FixedSupplyToken_balances[toA] = (to_bal + tokens);\n    resultU = true;\n    r = resultU;\n  }\n\n  procedure FixedSupplyToken1_constructor (msg_caller : address)\n    modifies FixedSupplyToken1__totalSupply, FixedSupplyToken1_balances, dummy;\n  {\n    FixedSupplyToken1__totalSupply = 100000;\n    FixedSupplyToken1__totalSupply = 100000;\n    FixedSupplyToken1_balances[msg_caller] = 100000;\n\n  }\n\n  procedure FixedSupplyToken1_totalSupply (msg_caller : address)\n    returns (r : integer)\n  {\n    var bal0 : integer;\n    var resultU : integer;\n    var totalSupply : integer;\n    bal0 = FixedSupplyToken1_balances[0];\n    totalSupply = FixedSupplyToken1__totalSupply;\n    resultU = (totalSupply - bal0);\n    r = resultU;\n  }\n\n  procedure FixedSupplyToken1_balanceOf (tokenOwner : address, msg_caller : address)\n    returns (r : integer)\n  {\n    var bal : integer;\n    var resultU : integer;\n    bal = FixedSupplyToken1_balances[tokenOwner];\n    resultU = bal;\n    r = resultU;\n  }\n\n  procedure FixedSupplyToken1_transfer (toA : address, tokens : integer, msg_caller : address)\n    returns (r : boolean)\n    modifies FixedSupplyToken1_balances, dummy;\n  {\n    var fromA : address;\n    var from_bal : integer;\n    var resultU : boolean;\n    var to_bal : integer;\n    fromA = msg_caller;\n    from_bal = FixedSupplyToken1_balances[fromA];\n    to_bal = FixedSupplyToken1_balances[toA];\n    assume (((fromA != toA) && (from_bal >= tokens)));\n    FixedSupplyToken1_balances[fromA] = (from_bal - tokens);\n    FixedSupplyToken1_balances[toA] = (to_bal + tokens);\n    resultU = true;\n    r = resultU;\n  }\n\n  procedure FixedSupplyToken1_approve (spender : address, tokens : integer, msg_caller : address)\n    returns (r : boolean)\n    modifies FixedSupplyToken1_allowances, dummy;\n  {\n    var resultU : boolean;\n    FixedSupplyToken1_allowances[msg_caller] = FixedSupplyToken1_allowances[msg_caller][spender -> tokens];\n    resultU = true;\n    r = resultU;\n  }\n\n  procedure FixedSupplyToken1_transferFrom (fromA : address, toA : address, tokens : integer, msg_caller : address)\n    returns (r : boolean)\n    modifies FixedSupplyToken1_balances, dummy;\n  {\n    var allowed : integer;\n    var from_bal : integer;\n    var resultU : boolean;\n    var to_bal : integer;\n    from_bal = FixedSupplyToken1_balances[fromA];\n    to_bal = FixedSupplyToken1_balances[toA];\n    allowed = FixedSupplyToken1_allowances[fromA][toA];\n    assume (((fromA != toA) && ((from_bal >= tokens) && (allowed >= tokens))));\n    FixedSupplyToken1_balances[fromA] = (from_bal - tokens);\n    FixedSupplyToken1_balances[toA] = (to_bal + tokens);\n    resultU = true;\n    r = resultU;\n  }\n\n  procedure LiquidityToken_constructor (msg_caller : address)\n    modifies LiquidityToken__totalSupply, LiquidityToken_balances, dummy;\n  {\n    LiquidityToken__totalSupply = 0;\n    LiquidityToken_balances[msg_caller] = 100000;\n\n  }\n\n  procedure LiquidityToken_mint (toA : address, value : integer, msg_caller : address)\n    modifies LiquidityToken__totalSupply, LiquidityToken_balances, dummy;\n  {\n    var to_bal : integer;\n    var totalSupply : integer;\n    totalSupply = LiquidityToken__totalSupply;\n    LiquidityToken__totalSupply = (totalSupply + value);\n    to_bal = LiquidityToken_balances[toA];\n    LiquidityToken_balances[toA] = (to_bal + value);\n\n  }\n\n  procedure LiquidityToken_burn (fromA : address, value : integer, msg_caller : address)\n    modifies LiquidityToken__totalSupply, LiquidityToken_balances, dummy;\n  {\n    var from_bal : integer;\n    var totalSupply : integer;\n    totalSupply = LiquidityToken__totalSupply;\n    LiquidityToken__totalSupply = (totalSupply - value);\n    from_bal = LiquidityToken_balances[fromA];\n    LiquidityToken_balances[fromA] = (from_bal - value);\n\n  }\n\n  procedure LiquidityToken_totalSupply (msg_caller : address)\n    returns (r : integer)\n  {\n    var bal0 : integer;\n    var resultU : integer;\n    var totalSupply : integer;\n    bal0 = LiquidityToken_balances[0];\n    totalSupply = LiquidityToken__totalSupply;\n    resultU = (totalSupply - bal0);\n    r = resultU;\n  }\n\n  procedure LiquidityToken_balanceOf (tokenOwner : address, msg_caller : address)\n    returns (r : integer)\n  {\n    var bal : integer;\n    var resultU : integer;\n    bal = LiquidityToken_balances[tokenOwner];\n    resultU = bal;\n    r = resultU;\n  }\n\n  procedure LiquidityToken_transfer (toA : address, tokens : integer, msg_caller : address)\n    returns (r : boolean)\n    modifies LiquidityToken_balances, dummy;\n  {\n    var fromA : address;\n    var from_bal : integer;\n    var resultU : boolean;\n    var to_bal : integer;\n    fromA = msg_caller;\n    from_bal = LiquidityToken_balances[fromA];\n    to_bal = LiquidityToken_balances[toA];\n    assume (((fromA != toA) && (from_bal >= tokens)));\n    LiquidityToken_balances[fromA] = (from_bal - tokens);\n    LiquidityToken_balances[toA] = (to_bal + tokens);\n    resultU = true;\n    r = resultU;\n  }\n\n  procedure LiquidityToken_approve (spender : address, tokens : integer, msg_caller : address)\n    returns (r : boolean)\n    modifies LiquidityToken_allowances, dummy;\n  {\n    var resultU : boolean;\n    LiquidityToken_allowances[msg_caller] = LiquidityToken_allowances[msg_caller][spender -> tokens];\n    resultU = true;\n    r = resultU;\n  }\n\n  procedure LiquidityToken_transferFrom (fromA : address, toA : address, tokens : integer, msg_caller : address)\n    returns (r : boolean)\n    modifies LiquidityToken_balances, dummy;\n  {\n    var allowed : integer;\n    var from_bal : integer;\n    var resultU : boolean;\n    var to_bal : integer;\n    from_bal = LiquidityToken_balances[fromA];\n    to_bal = LiquidityToken_balances[toA];\n    allowed = LiquidityToken_allowances[fromA][toA];\n    assume (((fromA != toA) && ((from_bal >= tokens) && (allowed >= tokens))));\n    LiquidityToken_balances[fromA] = (from_bal - tokens);\n    LiquidityToken_balances[toA] = (to_bal + tokens);\n    resultU = true;\n    r = resultU;\n  }\n\n  procedure AutomatedMarketMakerLib_constructor (msg_caller : address)\n  {\n\n  }\n\n  procedure AutomatedMarketMakerLib_getAmountIn (balance : integer, amountOut : integer, reserve : integer, msg_caller : address)\n    returns (r : integer)\n  {\n    var amountIn : integer;\n    var netLended : integer;\n    var resultU : integer;\n    netLended = (reserve - amountOut);\n    if ((balance > netLended))\n    {\n      resultU = (balance - netLended);\n    }\n    else\n    {\n      resultU = 0;\n    }\n    resultU = amountIn;\n    r = resultU;\n  }\n\n  procedure AutomatedMarketMakerLib_getBalanceAdjusted (balance : integer, amountIn : integer, msg_caller : address)\n    returns (r : integer)\n  {\n    var resultU : integer;\n    resultU = ((balance * 1000) - (amountIn * 3));\n    r = resultU;\n  }\n\n  procedure AutomatedMarketMakerLib_min (x : integer, y : integer, msg_caller : address)\n    returns (r : integer)\n  {\n    var resultU : integer;\n    if ((x < y))\n    {\n      resultU = x;\n    }\n    else\n    {\n      resultU = y;\n    }\n    r = resultU;\n  }\n\n  procedure AutomatedMarketMaker_constructor (msg_caller : address)\n    modifies AutomatedMarketMaker__owner, AutomatedMarketMaker__reserve0, AutomatedMarketMaker__reserve1, AutomatedMarketMaker__token0, AutomatedMarketMaker__token1, AutomatedMarketMaker_blockTimestampLast, AutomatedMarketMaker_kLast, AutomatedMarketMaker_price0CumulativeLast, AutomatedMarketMaker_price1CumulativeLast, dummy;\n  {\n    AutomatedMarketMaker__token0 = 1248875146012964071876423320777688075155124985543;\n    AutomatedMarketMaker__token1 = 611382286831621467233887798921843936019654057231;\n    AutomatedMarketMaker__owner = 0;\n    AutomatedMarketMaker__reserve0 = 0;\n    AutomatedMarketMaker__reserve1 = 0;\n    AutomatedMarketMaker_blockTimestampLast = 0;\n    AutomatedMarketMaker_price0CumulativeLast = 0;\n    AutomatedMarketMaker_price1CumulativeLast = 0;\n    AutomatedMarketMaker_kLast = 0;\n    AutomatedMarketMaker__owner = msg_caller;\n\n  }\n\n  procedure div (x : integer, y : integer) \n        returns (r : integer)\n    {\n        assume(y == r * x);\n    }\n\n  procedure AutomatedMarketMaker_mint (toA : address, msg_caller : address)\n    modifies AutomatedMarketMaker__reserve0, AutomatedMarketMaker__reserve1, LiquidityToken__totalSupply, LiquidityToken_balances, dummy;\n  {\n    var amount0 : integer;\n    var amount1 : integer;\n    var balance0 : integer;\n    var balance1 : integer;\n    var liquidity : integer;\n    var reserve0 : integer;\n    var reserve1 : integer;\n    var totalSupply : integer;\n    var xx : integer;\n    var xxx : integer;\n    reserve0 = AutomatedMarketMaker__reserve0;\n    reserve1 = AutomatedMarketMaker__reserve1;\n    call (balance0) = FixedSupplyToken_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (balance1) = FixedSupplyToken1_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    amount0 = (balance0 - reserve0);\n    amount1 = (balance1 - reserve1);\n    call (totalSupply) = LiquidityToken_totalSupply (AutomatedMarketMaker_address);\n    \n    if ((totalSupply == 0))\n    {\n      call () = LiquidityToken_mint (0, 1000, AutomatedMarketMaker_address);\n      liquidity = ((amount0 * amount1) - 1000);\n    }\n    else\n    {\n      call (xx) = div ((amount0 * totalSupply), reserve0);\n      call (xxx) = div ((amount1 * totalSupply), reserve1);\n      call (liquidity) = AutomatedMarketMakerLib_min (xx, xxx, AutomatedMarketMaker_address);\n    }\n    assume ((liquidity > 0));\n    call () = LiquidityToken_mint (toA, liquidity, AutomatedMarketMaker_address);\n    AutomatedMarketMaker__reserve0 = balance0;\n    AutomatedMarketMaker__reserve1 = balance1;\n\n  }\n\n  procedure AutomatedMarketMaker_burn (toA : address, msg_caller : address)\n    modifies AutomatedMarketMaker__reserve0, AutomatedMarketMaker__reserve1, FixedSupplyToken1_balances, FixedSupplyToken_balances, LiquidityToken__totalSupply, LiquidityToken_balances, dummy;\n  {\n    var amount0 : integer;\n    var amount1 : integer;\n    var balance0 : integer;\n    var balance1 : integer;\n    var liquidity : integer;\n    var reserve0 : integer;\n    var reserve1 : integer;\n    var success : boolean;\n    var totalSupply : integer;\n    reserve0 = AutomatedMarketMaker__reserve0;\n    reserve1 = AutomatedMarketMaker__reserve1;\n    call (balance0) = FixedSupplyToken_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (balance1) = FixedSupplyToken1_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (liquidity) = LiquidityToken_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (totalSupply) = LiquidityToken_totalSupply (AutomatedMarketMaker_address);\n    call (amount0) = div ((liquidity * balance0), totalSupply);\n    call (amount1) = div ((liquidity * balance1), totalSupply);\n    assume (((amount0 > 0) && (amount1 > 0)));\n    call () = LiquidityToken_burn (AutomatedMarketMaker_address, liquidity, AutomatedMarketMaker_address);\n    call (success) = FixedSupplyToken_transfer (toA, amount0, AutomatedMarketMaker_address);\n    assume (success);\n    call (success) = FixedSupplyToken1_transfer (toA, amount1, AutomatedMarketMaker_address);\n    assume (success);\n    call (balance0) = FixedSupplyToken_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (balance1) = FixedSupplyToken1_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    AutomatedMarketMaker__reserve0 = balance0;\n    AutomatedMarketMaker__reserve1 = balance1;\n\n  }\n\n  procedure AutomatedMarketMaker_simpleSwap0 (toA : address, msg_caller : address)\n    returns (r : integer)\n    modifies AutomatedMarketMaker__reserve0, AutomatedMarketMaker__reserve1, FixedSupplyToken1_balances, dummy;\n  {\n    var amount0In : integer;\n    var amountInWithFee : integer;\n    var balance0 : integer;\n    var balance1 : integer;\n    var denominator : integer;\n    var numerator : integer;\n    var reserve0 : integer;\n    var reserve1 : integer;\n    var result : integer;\n    var resultU : integer;\n    var success : boolean;\n    var token0 : address;\n    var token1 : address;\n    reserve0 = AutomatedMarketMaker__reserve0;\n    reserve1 = AutomatedMarketMaker__reserve1;\n    call (balance0) = FixedSupplyToken_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (balance1) = FixedSupplyToken1_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    amount0In = (balance0 - reserve0);\n    token0 = AutomatedMarketMaker__token0;\n    token1 = AutomatedMarketMaker__token1;\n    assume (((toA != token0) && (toA != token1)));\n    assume ((amount0In > 0));\n    assume (((reserve0 > 0) && (reserve1 > 0)));\n    amountInWithFee = (amount0In * 997);\n    numerator = (amountInWithFee * reserve1);\n    denominator = ((reserve0 * 1000) + amountInWithFee);\n    call (result) = div (numerator, denominator);\n    call (success) = FixedSupplyToken1_transfer (toA, result, AutomatedMarketMaker_address);\n    assume (success);\n    call (balance0) = FixedSupplyToken_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (balance1) = FixedSupplyToken1_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    AutomatedMarketMaker__reserve0 = balance0;\n    AutomatedMarketMaker__reserve1 = balance1;\n    resultU = result;\n    r = resultU;\n  }\n\n  procedure AutomatedMarketMaker_swap (amount0Out : integer, amount1Out : integer, toA : address, msg_caller : address)\n    modifies AutomatedMarketMaker__reserve0, AutomatedMarketMaker__reserve1, FixedSupplyToken1_balances, FixedSupplyToken_balances, dummy;\n  {\n    var amount0In : integer;\n    var amount1In : integer;\n    var balance0 : integer;\n    var balance0Adjusted : integer;\n    var balance1 : integer;\n    var balance1Adjusted : integer;\n    var reserve0 : integer;\n    var reserve1 : integer;\n    var success : boolean;\n    var token0 : address;\n    var token1 : address;\n    assume (((amount0Out > 0) || (amount1Out > 0)));\n    reserve0 = AutomatedMarketMaker__reserve0;\n    reserve1 = AutomatedMarketMaker__reserve1;\n    token0 = AutomatedMarketMaker__token0;\n    token1 = AutomatedMarketMaker__token1;\n    assume (((amount0Out < reserve0) && (amount1Out < reserve1)));\n    assume (((toA != token0) && (toA != token1)));\n    call (balance0) = FixedSupplyToken_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (balance1) = FixedSupplyToken1_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (amount0In) = AutomatedMarketMakerLib_getAmountIn (balance0, 0, reserve0, AutomatedMarketMaker_address);\n    call (amount1In) = AutomatedMarketMakerLib_getAmountIn (balance1, 0, reserve1, AutomatedMarketMaker_address);\n    assume (((amount0In > 0) || (amount1In > 0)));\n    call (balance0Adjusted) = AutomatedMarketMakerLib_getBalanceAdjusted ((balance0 - amount0Out), amount0In, AutomatedMarketMaker_address);\n    call (balance1Adjusted) = AutomatedMarketMakerLib_getBalanceAdjusted ((balance1 - amount1Out), amount1In, AutomatedMarketMaker_address);\n    assume (((balance0Adjusted * balance1Adjusted) > (((reserve0 * reserve1) * 1000) * 1000)));\n    if ((amount0Out > 0))\n    {\n      call (success) = FixedSupplyToken_transfer (toA, amount0Out, AutomatedMarketMaker_address);\n      assume (success);\n    }\n    else\n    {\n    \n    }\n    if ((amount1Out > 0))\n    {\n          call (success) = FixedSupplyToken1_transfer (toA, amount1Out, AutomatedMarketMaker_address);\n      assume (success);\n    }\n    else\n    {\n\n    }\n    AutomatedMarketMaker__reserve0 = balance0;\n    AutomatedMarketMaker__reserve1 = balance1;\n\n  }\n\n  procedure AutomatedMarketMaker_skim (toA : address, msg_caller : address)\n    modifies FixedSupplyToken1_balances, FixedSupplyToken_balances, dummy;\n  {\n    var balance0 : integer;\n    var balance1 : integer;\n    var reserve0 : integer;\n    var reserve1 : integer;\n    var skim0 : integer;\n    var skim1 : integer;\n    var success : boolean;\n    reserve0 = AutomatedMarketMaker__reserve0;\n    reserve1 = AutomatedMarketMaker__reserve1;\n    call (balance0) = FixedSupplyToken_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (balance1) = FixedSupplyToken1_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    skim0 = (balance0 - reserve0);\n    skim1 = (balance1 - reserve1);\n    call (success) = FixedSupplyToken_transfer (toA, skim0, AutomatedMarketMaker_address);\n    assume (success);\n    call (success) = FixedSupplyToken1_transfer (toA, skim1, AutomatedMarketMaker_address);\n    assume (success);\n\n  }\n\n  procedure AutomatedMarketMaker_sync (msg_caller : address)\n    modifies AutomatedMarketMaker__reserve0, AutomatedMarketMaker__reserve1, dummy;\n  {\n    var balance0 : integer;\n    var balance1 : integer;\n    call (balance0) = FixedSupplyToken_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    call (balance1) = FixedSupplyToken1_balanceOf (AutomatedMarketMaker_address, AutomatedMarketMaker_address);\n    AutomatedMarketMaker__reserve0 = balance0;\n    AutomatedMarketMaker__reserve1 = balance1;\n\n  }\n\n  procedure AutomatedMarketMaker_k (msg_caller : address)\n    returns (r : integer)\n  {\n    var reserve0 : integer;\n    var reserve1 : integer;\n    var resultU : integer;\n    reserve0 = AutomatedMarketMaker__reserve0;\n    reserve1 = AutomatedMarketMaker__reserve1;\n    resultU = (reserve0 * reserve1);\n    r = resultU;\n  }\n\n  procedure AutomatedMarketMaker_quote0 (amount0 : integer, msg_caller : address)\n    returns (r : integer)\n  {\n    var reserve0 : integer;\n    var reserve1 : integer;\n    var resultU : integer;\n    assume ((amount0 > 0));\n    reserve0 = AutomatedMarketMaker__reserve0;\n    reserve1 = AutomatedMarketMaker__reserve1;\n    assume (((reserve0 > 0) && (reserve1 > 0)));\n    call (resultU) = div ((amount0 * reserve1), reserve0);\n    r = resultU;\n  }\n\n  procedure AutomatedMarketMaker_getAmountOut0 (amount0In : integer, msg_caller : address)\n    returns (r : integer)\n  {\n    var amountInWithFee : integer;\n    var denominator : integer;\n    var numerator : integer;\n    var reserve0 : integer;\n    var reserve1 : integer;\n    var resultU : integer;\n    assume ((amount0In > 0));\n    reserve0 = AutomatedMarketMaker__reserve0;\n    reserve1 = AutomatedMarketMaker__reserve1;\n    assume (((reserve0 > 0) && (reserve1 > 0)));\n    amountInWithFee = (amount0In * 997);\n    numerator = (amountInWithFee * reserve1);\n    denominator = ((reserve0 * 1000) + amountInWithFee);\n    call (resultU) = div (numerator, denominator);\n    r = resultU;\n  }\n\n  procedure AutomatedMarketMaker_getAmountIn0 (amount0Out : integer, msg_caller : address)\n    returns (r : integer)\n  {\n    var denominator : integer;\n    var xx : integer;\n    var numerator : integer;\n    var reserve0 : integer;\n    var reserve1 : integer;\n    var resultU : integer;\n    assume ((amount0Out > 0));\n    reserve0 = AutomatedMarketMaker__reserve0;\n    reserve1 = AutomatedMarketMaker__reserve1;\n    assume (((reserve0 > 0) && (reserve1 > 0)));\n    numerator = ((reserve1 * amount0Out) * 1000);\n    denominator = ((reserve0 - amount0Out) * 997);\n    call (xx) = div (numerator, denominator);\n    resultU = (xx + 1);\n    r = resultU;\n  }\n\n  init {\n    AutomatedMarketMaker__token0 = 1248875146012964071876423320777688075155124985543;\n    AutomatedMarketMaker__token1 = 611382286831621467233887798921843936019654057231;\n    AutomatedMarketMaker__owner = 0;\n    AutomatedMarketMaker__reserve0 = 0;\n    AutomatedMarketMaker__reserve1 = 0;\n    AutomatedMarketMaker_blockTimestampLast = 0;\n    AutomatedMarketMaker_price0CumulativeLast = 0;\n    AutomatedMarketMaker_price1CumulativeLast = 0;\n    AutomatedMarketMaker_kLast = 0;\n    FixedSupplyToken__totalSupply = 100000;\n    assume (forall (i : address) :: FixedSupplyToken_balances[i] == 0);\n    // assume (forall (i j : address) :: FixedSupplyToken_allowances[i][j] == 0);\n    FixedSupplyToken1__totalSupply = 100000;\n    assume (forall (i : address) :: FixedSupplyToken1_balances[i] == 0);\n    // assume (forall (i : address) :: FixedSupplyToken1_allowances[i] == 0);\n    LiquidityToken__totalSupply = 0;\n    assume (forall (i : address) :: LiquidityToken_balances[i] == 0);\n    // assume (forall (i : address) :: LiquidityToken_allowances[i] == 0);\n  }\n\n  next {\n    var i : integer;\n    assume (i >= 1 && i <= 5);\n\n    case \n    (i == 1) : {\n      call () = AutomatedMarketMaker_sync(me_caller);\n    }\n    (i == 2) : {\n      var toA : address;\n      // assume can be deleted !!!\n      assume ((toA == AutomatedMarketMaker_address) || (toA == LiquidityToken_address) || (toA == FixedSupplyToken1_address) || (toA == FixedSupplyToken_address) || (toA == hackaux));\n      call () = AutomatedMarketMaker_skim (toA, me_caller);\n    }\n    (i == 3) : {\n      var r : integer;\n      var toA : address;\n      assume ((toA == AutomatedMarketMaker_address) || (toA == LiquidityToken_address) || (toA == FixedSupplyToken1_address) || (toA == FixedSupplyToken_address) || (toA == hackaux));\n      call (r) = AutomatedMarketMaker_simpleSwap0 (toA, me_caller);\n    }\n    (i == 4) : {\n      var toA : address;\n      assume ((toA == AutomatedMarketMaker_address) || (toA == LiquidityToken_address) || (toA == FixedSupplyToken1_address) || (toA == FixedSupplyToken_address) || (toA == hackaux));\n      call () = AutomatedMarketMaker_burn (toA, me_caller);\n    }\n    (i == 5) : {\n      var toA : address;\n      assume ((toA == AutomatedMarketMaker_address) || (toA == LiquidityToken_address) || (toA == FixedSupplyToken1_address) || (toA == FixedSupplyToken_address) || (toA == hackaux));\n      call () = AutomatedMarketMaker_mint (toA, me_caller);\n    }\n    esac\n  } \n\n}\n\nmodule main {\n \n  type address = integer;\n\n  // MANUAL : set the actual hacker address\n  const me_caller : address = 1;\n  const hackaux : address = 2;\n  const victim : address = 3;\n\n  instance m : dsmodel (me_caller : (me_caller), hackaux : (hackaux), victim : (victim));\n\n  init {\n    // give initial values\n    // init (m);\n\n    // MANUAL :  set initial capital, need manual input\n    assume (m.FixedSupplyToken_balances[me_caller] == 1000);\n    assume (m.FixedSupplyToken1_balances[me_caller] == 1000);\n  }\n\n  next {\n    next (m);\n  }\n\n  // does not exist a state where after that state the hacker's money is more than before\n  // this models a flashloan attack, where everything happens in one single moment\n  // we should also add an axiom saying that no simple arbitrage exists, that CEX price is same as DEX\n  // CANNOT 10x in 5 steps\n  // invariant no_arb : m.FixedSupplyToken_balances[me_caller] < (1000 * 10);\n  property[LTL] no_arbitrage : !F(m.FixedSupplyToken_balances[me_caller] > (1000 * 10)); // G is F's dual\n\n  control {\n    v = bmc(6); // bmc have LTL\n    // bmc(n) is the complexity of the hack\n    unroll (5); // hyper-property --> invariant only ---> symbolically check\n    induction;\n    // bmc and havoc\n    // havoc a ---> every time a is used it is a new value\n\n    check;\n    print_results;\n  }\n\n}\n"
  },
  {
    "path": "contracts/defi/defi.ds",
    "content": "(* ---> refer to concepts in Google Docs\n  * price oracle\n  * AMM (3 variants)\n  * Lending\n  * BZXDEX\n  * SNXDEX\n\n  keyword:\n  * refined\n  * asset\n*)\n\nobject signature ERC20Interface = {\n  constructor : unit -> unit;\n  mint : address * int -> unit;\n  burn : address * int -> unit;\n  totalSupply : unit -> int;\n  balanceOf : address -> int;\n  transfer : address * int -> bool;\n  approve : address * int -> bool;\n  transferFrom : address * address * int -> bool;\n}\n\nobject LiquidityToken : ERC20Interface {\n  let _totalSupply : int := 0\n  let balances : mapping[address] int := mapping_init\n  let allowances : mapping[address] mapping[address] int := mapping_init\n\n  let constructor () =\n    balances[msg_sender] := 100000\n\n  let mint (toA, value) = \n    let totalSupply = _totalSupply in\n    _totalSupply := totalSupply + value;\n    let to_bal = balances[toA] in\n    balances[toA] := to_bal + value\n\n  let burn (fromA, value) = \n    let totalSupply = _totalSupply in\n    _totalSupply := totalSupply - value;\n    let from_bal = balances[fromA] in\n    balances[fromA] := from_bal - value\n\n  let totalSupply () =\n    let bal0 = balances[address(0x0)] in\n    let totalSupply = _totalSupply in\n    let resultU = totalSupply - bal0 in\n    resultU\n\n  let balanceOf tokenOwner =\n    let bal = balances[tokenOwner] in\n    let resultU = bal in\n    resultU\n     \n  let transfer(toA, tokens) =\n    let fromA = msg_sender in\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n\n  let approve (spender, tokens) =\n    allowances[msg_sender][spender] := tokens;\n    let resultU = true in\n    resultU\n\n  let transferFrom (fromA, toA, tokens) =\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    let allowed = allowances[fromA][toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens /\\ allowed >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n}\n\nobject signature FixedERC20Interface = {\n  constructor : unit -> unit;\n  const totalSupply : unit -> int;\n  balanceOf : address -> int;\n  transfer : address * int -> bool;\n  approve : address * int -> bool;\n  transferFrom : address * address * int -> bool\n}\n\nobject FixedSupplyToken : FixedERC20Interface {\n  let _totalSupply : int := 100000\n  let balances : mapping[address] int := mapping_init\n  let allowances : mapping[address] mapping[address] int := mapping_init\n\n  let constructor () =\n    _totalSupply := 100000;\n    balances[msg_sender] := 100000\n\n  let totalSupply () =\n    let bal0 = balances[address(0x0)] in\n    let totalSupply = _totalSupply in\n    let resultU = totalSupply - bal0 in\n    resultU\n\n  let balanceOf tokenOwner =\n    let bal = balances[tokenOwner] in\n    let resultU = bal in\n    resultU\n     \n  let transfer(toA, tokens) =\n    let fromA = msg_sender in\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n\n  let approve (spender, tokens) =\n    allowances[msg_sender][spender] := tokens;\n    let resultU = true in\n    resultU\n\n  let transferFrom (fromA, toA, tokens) =\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    let allowed = allowances[fromA][toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens /\\ allowed >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n}\n\n(* this AMM supports ERC20 tokens, ETH can be incorporated as WETH for trading *)\nobject signature ConstantProductAMMInterface = {\n  constructor : unit -> unit;\n\n  coarsed simpleSwap0 : address -> int; (* transfer token0 to amm, results number of token1 swapped *)\n\n  (* router *)\n  (* swapTokensForExactTokens\n  swapExactTokensForTokens\n  addLiquidity (* why restrain the liquidity to not depreciating an asset too much? *)\n  removeLiquidity *)\n\n  (* fund management functions *)\n  coarsed mint : address -> unit; (* provide liquidity to this pair *)\n  coarsed burn : address -> unit; (* remove liquidity from this pair *)\n  \n  coarsed skim : address -> unit; (* arbitrage to force balances to match reserves *)\n  coarsed sync : unit -> unit; (* force reserves to match balances *)\n  k : unit -> int; (* get the constant product *)\n\n  (* oracles *)\n  (* we do not provide Uniswap V2 version of smoothed oracles at this moment *)\n  quote0 : int -> int; (* given some amount of an asset and pair reserves, returns an equivalent amount of the other asset *)\n  quote1 : int -> int;\n  getAmountOut0 : int -> int; (* given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset *)\n  getAmountIn0 : int -> int; (* given an output amount of an asset and pair reserves, returns a required input amount of the other asset *)\n}\n\n(* assuming 0.3% txn fee, excluding the 0.05% additional fee in Uniswap V2 design *)\n(* we do not support liquidity tokens at the moment *)\nobject ConstantProductAMM \n  ( liquidityToken: ERC20Interface, \n    erc20Token0: FixedERC20Interface, \n    erc20Token1: FixedERC20Interface) : AMMInterface {\n\n  let _token0 : address := address(0xdac17f958d2ee523a2206206994597c13d831ec7) (* USDT *)\n  let _token1 : address := address(0x6b175474e89094c44da98b954eedeac495271d0f) (* DAI *)\n  let _owner : address := address(0x0)\n  let _reserve0 : int := 0\n  let _reserve1 : int := 0\n  let blockTimestampLast : int := 0 (* new oracle *)\n  let price0CumulativeLast : int := 0 (* new oracle *)\n  let price1CumulativeLast : int := 0 (* new oracle *)\n  let kLast : int := 0 (* reserve0 * reserve1, as of immediately after the most recent liquidity event *)\n\n  let constructor () =\n    _owner := msg_sender\n\n  (* transfer token0 and token1 to this contract, then mint liquidity tokens *)\n  let mint (toA) = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let amount0 = balance0 - reserve0 in\n    let amount1 = balance1 - reserve1 in\n    (* update reserve 0 and reserve 1 *)\n    let totalSupply = liquidityToken.totalSupply() in\n    let liquidity = if totalSupply = 0 \n      then \n        begin\n          liquidityToken.mint(address(0x0), 1000); (* lock the first liquidity tokens*)\n          amount0 * amount1 - 1000 (* in Uniswap this should be square-rooted *)\n        end\n      else\n        let l0 = amount0 * totalSupply / reserve0 in\n        let l1 = amount1 * totalSupply / reserve1 in\n        if l0 > l1 then l1 else l0\n    in\n    assert (liquidity > 0);\n    liquidityToken.mint(toA, liquidity);\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  (* need toA first transfer liquidity tokens to this contract, then operate *)\n  (* it does not use ERC20 style allowances, just direct transfer *)\n  let burn (toA) = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let liquidity = liquidityToken.balanceOf(this_address) in\n    let totalSupply = liquidityToken.totalSupply() in\n    let amount0 = liquidity * balance0 / totalSupply in\n    let amount1 = liquidity * balance1 / totalSupply in\n    assert (amount0 > 0 /\\ amount1 > 0);\n    liquidityToken.burn(this_address, liquidity);\n    let success = erc20Token0.transfer(toA, amount0) in\n    assert (success);\n    let success = erc20Token1.transfer(toA, amount1) in\n    assert (success);\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  (* adhere to the stanford paper formalization, targeted for vanilla proof *)\n  let simpleSwap0 (toA) = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let amount0In = balance0 - reserve0 in\n    let token0 = _token0 in\n    let token1 = _token1 in\n    assert (toA <> token0 /\\ toA <> token1);\n    assert (amount0In > 0);\n    assert (reserve0 > 0 /\\ reserve1 > 0);\n    let amountInWithFee = amount0In * 997 in\n    let numerator = amountInWithFee * reserve1 in\n    let denominator = reserve0 * 1000 + amountInWithFee in\n    let result = numerator / denominator in\n    let success = erc20Token1.transfer(toA, result) in\n    assert (success);\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    _reserve0 := balance0;\n    _reserve1 := balance1;\n    let resultU = result in\n    resultU\n\n  let skim (toA) = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let skim0 = balance0 - reserve0 in\n    let skim1 = balance1 - reserve1 in\n    let success = erc20Token0.transfer(toA, skim0) in\n    assert (success);\n    let success = erc20Token1.transfer(toA, skim1) in\n    assert (success)\n\n  let sync () = \n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  let k () = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let resultU = reserve0 * reserve1 in\n    resultU\n\n  (* Uniswap did not use Q112 library to do this computation *)\n\n  (* given amount0 of token0, the equivalent value in token1 *)\n  let quote0 (amount0) = \n    assert (amount0 > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    assert (reserve0 > 0 /\\ reserve1 > 0); (* prove that this can be dropped? *)\n    let resultU = amount0 * reserve1 / reserve0 in\n    resultU\n\n  let quote1 (amount1) = \n    assert (amount1 > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    assert (reserve0 > 0 /\\ reserve1 > 0); (* prove that this can be dropped? *)\n    let resultU = amount1 * reserve0 / reserve1 in\n    resultU\n\n  let getAmountOut0 (amount0In) = \n    assert (amount0In > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    assert (reserve0 > 0 /\\ reserve1 > 0);\n    let amountInWithFee = amount0In * 997 in\n    let numerator = amountInWithFee * reserve1 in\n    let denominator = reserve0 * 1000 + amountInWithFee in\n    let resultU = numerator / denominator in\n    resultU\n\n  let getAmountIn0 (amount0Out) =\n    assert (amount0Out > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    assert (reserve0 > 0 /\\ reserve1 > 0);\n    let numerator = reserve1 * amount0Out * 1000 in\n    let denominator = (reserve0 - amount0Out) * 997 in\n    let resultU = (numerator / denominator) + 1 in\n    resultU\n}\n(*\n(* AMM Variant: Balancer *)\nobject signature ValueFunctionAMMInterface = {\n  constructor : unit -> unit;\n}\n\n(* AMM Variant: Mooniswap *)\nobject signature VirtualBalanceAMMInterface = {\n  constructor : unit -> unit;\n}\n*)\n(* Oracle Contract *)\nobject signature OracleInterface = {\n  (* call amm's quote0 *)\n  getSpotPriceAccurate0 : int -> int;\n\n  getPrice0 : int;\n\n  (* Uniswap V2 type of oracle, time weighted *)\n  (* getUniswapAggregatedPrice : int -> int;\n\n  getRealPrice : int; *)\n}\n\nobject Oracle (cpamm : ConstantProductAMMInterface) : OracleInterface {\n\n  let getSpotPriceAccurate0 (amount0) = \n    let resultU = cpamm.quote0 (amount0) in\n    resultU\n\n  let getPrice0 () = \n    let resultU = cpamm.quote0 (1) in\n      resultU\n\n}\n\n(* refers to compound, bzx, and aave, this includes liquidity mining for lending protocols *)\nobject signature LendingInterface = {\n  constructor : unit -> unit;\n}\n\nobject Lending (lliquidityToken: ERC20Interface, \n    erc20Token0: FixedERC20Interface, \n    erc20Token1: FixedERC20Interface,\n    cpamm : ConstantProductAMMInterface) : OracleInterface {\n\n  let _token0 : address := address(0xdac17f958d2ee523a2206206994597c13d831ec7) (* USDT *)\n  let _token1 : address := address(0x6b175474e89094c44da98b954eedeac495271d0f) (* DAI *)\n  let _reserve0 : int := 0 (* used to help track the balances that the user actually depositted *)\n  let _reserve1 : int := 0\n\n  let mint (toA) = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let amount0 = balance0 - reserve0 in\n    let amount1 = balance1 - reserve1 in\n    (* update reserve 0 and reserve 1 *)\n    let totalSupply = liquidityToken.totalSupply() in\n    let l0 = amount0 * totalSupply / reserve0 in\n    let l1 = amount1 * totalSupply / reserve1 in\n    let liquidity = if l0 > l1 then l1 else l0 in\n    assert (liquidity > 0);\n    liquidityToken.mint(toA, liquidity);\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  (* assumes liquidity tokens transferred here *)\n  let burn (toA) = \n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let liquidity = liquidityToken.balanceOf(this_address) in\n    let totalSupply = liquidityToken.totalSupply() in\n    let amount0 = liquidity * balance0 / totalSupply in\n    let amount1 = liquidity * balance1 / totalSupply in\n    assert (amount0 > 0 /\\ amount1 > 0);\n    liquidityToken.burn(this_address, liquidity);\n    let success = erc20Token0.transfer(toA, amount0) in\n    assert (success);\n    let success = erc20Token1.transfer(toA, amount1) in\n    assert (success);\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  let clearWaitlist () =\n\n  let checkLiquidation () = \n\n  let \n(*\n  // WEI_PRECISION: multiply everything to increase precision\n\n\t// function mint (address receiver, uint256 depositAmount) -> \n\t//  give you interest bearing tokens (deposit 100 USDT, you get 100 iUSDT which will represent you share of the pool), \n\t//\tneed approval from sender first so can transfer user USDT to contract pool\n\n\t// function burn (address receiver, uint256 burnAmount) -> \n\t//  burn your iTokens, gives you balance[iUSDT] / getTotalSupply(iUSDT) amount of the USDT liquidity pool, \n\t//  if the does not have enough liquidity (unborrowed loans), put on a waitlist\n\n\t// function clearWaitlist () private -> automatically paid back as liquidity becomes freed from borrowers, \n\t//  when borrowers close their positions or a position gets liquidated.\n\n\t// function checkLiquidation (address loanToken, address collateralToken, uint256 loanAmount, uint256 collateralAmount) private ->\n\t// \tcheck if the current margin is larger than the maintainance margin\n\t//  e.g., USDC collateral to borrow USDT, then \n\t//  currentMargin = BorrowedUSDTAmount * (1 + interestRate[USDT]) / USDCCollateralAmount * oracleRate(USDC, USDT, USDCCollateralAmount)\n\t//  maintainanceMargin = collaterizationRatio[USDC, USDT]\n\t//  currentMargin <= maintainanceMargin\n\n\t// function borrow (address receiver, address collateralToken, address loanToken, uint256 loanAmount) -> \n\t// \tsimplify by using non-compounding interest rates and long loan periods\n\t//  need aproval from sender first, check the fixed interest rates, check the oracle\n\t//  transfer user USDC to contract pool, then give receiver USDCAmount * oracleRate(USDC, USDT, USDCAmount) / (1 + interestRate[USDT])\n\t//  = USDTAmount of USDT\n\n\t// function borrowTrusted () private -> this is for loans created by trusted parties, like DEX, tehy are given higher leverages and \n\n\t// function closeBorrow (address receiver, address collateralToken, address loanToken, uint256 loanAmount) ->\n\t//  need approval from sender first, then transfer the borrowed USDT from receiver to platform, => calls clearWaitlist\n\t// \tgives back USDC, that USDCAmount = USDCCollateralAmount -  USDTAmount * (1 + interestRate[USDT]) * oracleRate(USDT, USDC, USDTAmount)\n\t//  so after this, the amount of USDC in pool should be larger (this is an invariant to prove)\n\n\t// function liquidatePosition (uint256 loanId) private -> \n\t//  if checkLiquidation is true, then we sell the loan to repay the lending pool liquidity providers => calls clearWaitlist\n\t//  e.g., USDC -> USDT loan should be liquidated, call any AMM's swap function to swap all the collaterized USDC to USDT, \n\t//  and transfer the swapped USDT to the pool\n*)\n}\n\n(* refers to bzx and other popular dex *)\nobject signature MarginDEXInterface = {\n  constructor : unit -> unit;\n(*\n  // actual margin trading, use lending and amm\n\n\t// function openShort (address trader, address positionToken, uint256 leverage)\n\t// can only open position on token the same type as collateral token\n\t// we are essentially lending ETH to user (which is another liability, and limits the liquidity) \n\t// if we do not change the liquidation and borrwoing interface in `Lending`, so need to change borrow function\n\t//  For short positions, such as 2x short ETH, the pToken borrows from the iETH token, then swaps that ETH for a stable asset (DAI) on KyberSwap. \n\t//  need approval from sender first, send the specified collateral token amount to this contract, e.g. ETH, then if he wants to short ETH 2x, \n\t//  we calculate the amountInETH = oraclePrice(DAI, ETH) * amountInDAI, then we borrow levarage * amountInETH, swap those ETH to DAI, then move the\n\t//  swapped DAI to this contract. \n\n\n\t// Required Margin = Trade Size / Leverage * Account Currency Exchange Rate\n\t// use DAI as collateral to margin trade ETH: amountDAIIn * leverage * oracleRate(DAI, ETH, amountDAIIn) = amountETHToTrade\n\t// borrows asset by using the assets you already have as collateral\n\t// 1 ETH = 100 DAI, 2x short, if use 1 ETH as collateral, then swap 1 ETH to 100 DAI, then use 100 DAI as collateral to borrow 1 ETH, then \n\t//  swap this new 1 ETH to 100 DAI. So now you have 100 DAI in the account\n\t//  1. if 1 ETH = 50 DAI, then upon close buy 2 ETH, then repay the borrowed 1 ETH, then you get another 100 DAI (original collateral), then \n\t//   buy another 2 ETH, so now you have 3 ETH in account\n\t//     if 1 ETH = 1 DAI, then upon close buy 100 ETH, repay 1 ETH loan, then you get another 100 DAI (original collateral), then buy\n\t//     another 100 ETH, so now you have 199 ETH in account\n\t//  2. if 1 ETH >= 200 DAI, then buy 0.5 ETH, --> \n\n\t// 1 ETH, 2x short\n\t// 100 DAI\n\t// 1 ETH, 100 DAI locked for 1 ETH (liquidate when ETH > 100 DAI)\n\t// 100 DAI, 100 DAI locked for 1 ETH\n\n\t// 1/5 leverage, have 0 ETH when ETH >= 500 DAI\n\t// 0.2 ETH, 100 DAI locked for (100/100/5=0.2) ETH (liquidate when ETH > 500 DAI)\n\t// 4 DAI, 20 DAI locked for (20/100/5=0.04) ETH + 100 DAI locked for (100/100/5=0.2) ETH (liquidate when ETH > 500 DAI)\n\t// if 1/2 price (ETH = 50 DAI), then 4/50 + 20/50 + 100/50 - 0.04 - 0.2 = 124/50 - 0.24 = 2.24 ETH, take limit, get 2.25 ETH\n\t// taken limit, if price = p, then 125 - 0.25 * p = profitInDAI, so if p = 100, we have 1 ETH, unchanged, p = 200, we have 0.375 ETH left, \n\t//  p = 500, we have 0 ETH left\n\n\t// 1/2 leverage, have 0 ETH when ETH >= 200 DAI\n\t// lock 100 DAI for 0.5 ETH (loan price = liquidateion price)\n\t// taken limit, if price = p, then 200/p - 1 = profit\n\n\t// \tPi = initial price, l = leverage, Pl = liquidation price = Pi + Pi/l, P = realTimePrice\n\t//  Pi + Pi * \\Sigma_{i=1 to infinity}{(1/(1+l))^i} - P * \\Sigma_{i=1 to infinity}{(1/(1+l))^i} = return * Pi\n\t// \tPi + \\Sigma_{i=1 to infinity}{(1/(1+l))^i} * (Pi - P) = return * Pi\n\t//  if l > 0, then:\n\t//  Pi + (Pi - P) / l = return * Pi\n\n\t// taking an over-collaterized loan is adding 1/x leverage\n\n\t// endDAI / p - endETH = profit\n\n\t// endDAI / 150 - endETH - 0\n\n\t// 5 leverage, have 0 ETH when ETH >= 120 DAI\n\t// lock 100 DAI for 100/120 ETH\n\t// sell 100/120 ETH for 100*100/120 DAI, then lock 100*100/120 DAI for (100/120)^2 ETH, \n\t// sell (100/120)^2 ETH for 100*(100/120)^2 DAI, then lock 100*(100/120)^2 DAI for (100/120)^3 ETH\n\t// so in the end have position of: \n\t//  100 + 100*100/120 + 100*(100/120)^2 + .... - ((100/120) + (100/120)^2 + ...) * p = profitInDAI\n\t//  test: 100 + 100*100/120 - 120 * ((100/120) + (100/120)^2) = 0\n\n\t//  100 + (100 - P) * 2 = return * 100\n\n\t// 100 DAI, short ETH, 100x leverage, liquidation price is 101\n\t//  equivalent to use 100 DAI as collateral to borrow 100 ETH, sell for 10000 DAI, then if ETH = 50 DAI, \n\t//  get 200 ETH, repay borrowed 100 ETH, get 100 ETH remaining, which is 5000 DAI profit\n\t//  the maximum price he can stand is ETH = 101 DAI, by which time he can use 10000 DAI + collateral to buy 100 ETH to repay loan\n\t//   ----> so essentially this is taking an under-collaterized loan, which require priviledged actions to `Lending`, which we did not implement\n\t//   ----> bZx also implement this with specialized loan functions\n\n\t// Pi / Pl = 1/(1+l)\n\n\t// 2 leverage, have 0 ETH when ETH >= 150 DAI\n\n    // infinite leverage, have 0 ETH when ETH >= 100 DAI\n\t\n\t// 0.5 ETH, 100 DAI locked for 0.5 ETH\n\t// 50 DAI, 100 DAI locked for 0.5 ETH (liquidate when ETH > 200 DAI)\n\t// 0.25 ETH, 50 DAI locked for 0.25 ETH + 100 DAI locked for 0.5 ETH (liquidate when ETH > 200 DAI)\n\t// 25 DAI, 150 DAI locked for 0.75 ETH (liquidate when ETH > 200 DAI)\n\t//  ---> you can force liquidate your loan positions, and have your 25 DAI, \n\t//       if ETH = 150 DAI, then you get 25 / 150 + 50 / 150 + 100 / 150 - 0.25 - 0.5 = 175/150 - 75/100 ~~ 0.416 ETH\n\t//       take limit, you get 200/150 - 1 ~~ 0.33 ETH\n\n\t// 12.5 DAI, 175 DAI locked for 0.875 ETH (liquidate when ETH > 200 DAI)\n\t// 100/16 DAI, 200-(100/8) DAI locked for 1-(1/16) ETH (liquidate when ETH > 200 DAI)\n\t// take limit: 100/1024 DAI, 200 - (100/512) DAI locked for 1-(1/1024) ETH (liquidate when ETH > 200 DAI)\n\n\t// with 2 loans: 1/2 price, have 2.75 (3 - 1/2^2), 2 price, have 0.125 (1/2^(1+2))\n\t// with n loans: 1/2 price, have (3 - 1/2^n), 2 price, have (1/2^(1+n))\n\t// take limit, 1/2 price, have ~~ 3 ETH, 2 price, have ~~ 0 ETH\n\t// when ETH = 50 DAI, then 25 DAI buy 0.5 ETH, repay 0.25 ETH loan, get back 50 DAI, buy 1 ETH, \n\t// now have 1.25 ETH, repay 0.5 ETH loan, get back 100 DAI, swap for 2 ETH, now have 2.75 ETH with no unpaid loans\n\n\t// when ETH = 200 DAI, then all loans are liquidated, with 25 DAI left, which is 0.125 ETH with no unpaid loans\n\n\t// if with DAI as collateral, then 200 DAI in total\n\t//  1. if 1 ETH = 50 DAI, then upon close, buy \n\n\t// oraclePrice is the mark price\n\t//  1. If we see oraclePrice(DAI, ETH) * amountPositionDAI / oraclePrice(DAI, ETH) * amountInDAI >= leverage, we need to\n\t//  liquidate the whole position (that is, to swap DAI back to ETH and repay the borrowed ETH, so need to consider closeBorrow & swap txn fees)\n\t//  2. If we see oraclePrice(DAI, ETH) * amountPositionDAI / oraclePrice(USDC, ETH) * amountInUSDC < leverage and user closed position,\n\t//  we liquidate the whole position (swap DAI to ETH, repay ETH loan, and then swap ETH to USDC, send this remaining USDC to user)\n\n\t// function openLong ()\n\t//  For long positions, such as 2x long ETH, the pToken borrows from a stable asset, iDAI, and swaps that for ETH on KyberSwap.\n\n\t// function closeLong ()\n\n\t// function closeShort ()\n\n\t// fucntion liquidationPrice () private -> \n\n  // function liquidatePosition () private -> \n  *)\n}\n\n(*\n(* refers to Synthetix and bucketshop-ish dex *)\nobject signature GambleDEXInterface = {\n  constructor : unit -> unit;\n}\n\n(* refers to harvest.finance & YFI *)\nobject signature AggregatorInterface = {\n  constructor : unit -> unit;\n\n  totalAsset : address -> int; (* calculate the hacker's total liquidatable asset *)\n}\n*)\n\nlayer signature AMMLibSig = {\n  erc20Token0 : FixedERC20Interface;\n  erc20Token1 : FixedERC20Interface;\n  liquidityToken : ERC20Interface;\n  helper : AMMLibInterface;\n}\n\nlayer AMMLIB : [{}] AMMLibSig = {\n  erc20Token0 = address(0x10033) <: FixedSupplyToken;\n  erc20Token1 = address(0x10032) <: (clone FixedSupplyToken); (* cloned an object *)\n  liquidityToken = address(0x10031) <: LiquidityToken;\n  helper = AutomatedMarketMakerLib; (* does not update me sem if no addr linked *)\n}\n\nlayer signature AMMSig = {\n  amm : AMMInterface\n}\n\nlayer AMM : [AMMLibSig] AMMSig = {\n  amm = address(0x10030) <: AutomatedMarketMaker\n}\n\nlayer COMPLETE = AMM @ AMMLIB\n"
  },
  {
    "path": "contracts/fpblind/build.sh",
    "content": " ../../_build/Edsger/edsger.byte fpblind.ds coq\ncd fpblind\n coq_makefile -f _CoqProject -o Makefile\nmake\n"
  },
  {
    "path": "contracts/fpblind/fpblind/CertiKOS.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.CertiKOS for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import fpblind.EdsgerIdents.\nRequire Import fpblind.DataTypes.\nRequire Import fpblind.DataTypeOps.\nRequire Import fpblind.DataTypeProofs.\n\nSection EdsgerGen.\n\n\nRequire Import compcert.lib.Coqlib.\nRequire Import liblayers.lib.Decision.\nRequire Import liblayers.compcertx.ErrorMonad.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import compcertx.common.MemimplX.\nRequire Import liblayers.compcertx.MakeProgramImpl.\nRequire Import liblayers.compat.CompatLayers.\nRequire Import mcertikos.layerlib.LAsmModuleSemDef.\nRequire Import mcertikos.layerlib.CompCertiKOS.\n\nLocal Instance mwd_ops: MemWithData.UseMemWithData Memimpl.mem.\n\nRequire Import fpblind.LayerEVMOPCODE.\nRequire Import fpblind.LayerBLINDAUCTION.\n\nDefinition EVMOpcode_transfer_core := (@EVMOpcode_transfer Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition EVMOpcode_transfer_func := (synth_func_func EVMOpcode_transfer_core).\n\nDefinition EVMOPCODE_impl : res LAsm.module := \n  ret (∅).\n\nDefinition BlindAuction_initialize_core := (@BlindAuction_initialize Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_initialize_func := (synth_func_func BlindAuction_initialize_core).\n\nDefinition BlindAuction_reveal_core := (@BlindAuction_reveal Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_reveal_func := (synth_func_func BlindAuction_reveal_core).\n\nDefinition BlindAuction_bid_core := (@BlindAuction_bid Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_bid_func := (synth_func_func BlindAuction_bid_core).\n\nDefinition BlindAuction_withdraw_core := (@BlindAuction_withdraw Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_withdraw_func := (synth_func_func BlindAuction_withdraw_core).\n\nDefinition BlindAuction_auctionEnd_core := (@BlindAuction_auctionEnd Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_auctionEnd_func := (synth_func_func BlindAuction_auctionEnd_core).\n\nDefinition BLINDAUCTION_impl : res LAsm.module := \n  M_BlindAuction_initialize <- CompCertiKOS.transf_module (ident_BlindAuction_initialize ↦ BlindAuction_initialize_func);\n  M_BlindAuction_reveal <- CompCertiKOS.transf_module (ident_BlindAuction_reveal ↦ BlindAuction_reveal_func);\n  M_BlindAuction_bid <- CompCertiKOS.transf_module (ident_BlindAuction_bid ↦ BlindAuction_bid_func);\n  M_BlindAuction_withdraw <- CompCertiKOS.transf_module (ident_BlindAuction_withdraw ↦ BlindAuction_withdraw_func);\n  M_BlindAuction_auctionEnd <- CompCertiKOS.transf_module (ident_BlindAuction_auctionEnd ↦ BlindAuction_auctionEnd_func);\n  ret (var_BlindAuction__beneficiary_ident ↦ BlindAuction__beneficiary_globvar ⊕ var_BlindAuction__biddingEnd_ident ↦ BlindAuction__biddingEnd_globvar ⊕ var_BlindAuction__revealEnd_ident ↦ BlindAuction__revealEnd_globvar ⊕ var_BlindAuction__ended_ident ↦ BlindAuction__ended_globvar ⊕ var_BlindAuction__bids_ident ↦ BlindAuction__bids_globvar ⊕ var_BlindAuction__highestBidder_ident ↦ BlindAuction__highestBidder_globvar ⊕ var_BlindAuction__highestBid_ident ↦ BlindAuction__highestBid_globvar ⊕ var_BlindAuction__pendingReturns_ident ↦ BlindAuction__pendingReturns_globvar ⊕ var_BlindAuction__trueBids_ident ↦ BlindAuction__trueBids_globvar ⊕ var_BlindAuction__secrets_ident ↦ BlindAuction__secrets_globvar ⊕   M_BlindAuction_initialize  ⊕   M_BlindAuction_reveal  ⊕   M_BlindAuction_bid  ⊕   M_BlindAuction_withdraw  ⊕   M_BlindAuction_auctionEnd  ⊕ ∅).\n\nDefinition certikos := \n  MEVMOPCODE <- EVMOPCODE_impl;\n  MBLINDAUCTION <- BLINDAUCTION_impl;\n  ret ( MEVMOPCODE ⊕ MBLINDAUCTION ⊕ ∅).\n\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/DataTypeOps.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.DataTypeOps for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import fpblind.EdsgerIdents.\nRequire Import fpblind.DataTypes.\n\nSection EdsgerGen.\n\nDefinition tint_U := (Tpair addr tint).\nGlobal Instance tint_U_hyper_type_impl : HyperTypeImpl tint_U := {\n  ht_cval f := (@ht_cval tint_U _ f);\n  ht_ft_cond f := (@ht_ft_cond tint_U _ f);\n  ht_default := (@ht_default tint_U _);\n  ht_valid_ft_cond f := @ht_valid_ft_cond tint_U _ f;\n  ht_valid_ft_ocond := (@ht_valid_ft_ocond tint_U _);\n  ht_inject j a b := a = b\n}.\nDefinition int_U_pair := mk_hyper_type_pair tint_U.\nGlobal Instance tint_U_hyper_type : HyperType tint_U := _.\nGlobal Instance tint_U_hyper_binary_impl_eq : HyperBinaryImpl Oeq tint_U tint_U tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := (* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) false\n}.\nDefinition tBid_Bid := (Tpair Bid (Tstruct Bid_struct_ident\n  (Fcons Bid_struct__blindedBid_ident tint\n  (Fcons Bid_struct__deposit_ident tint\n   Fnil)))).\nGlobal Instance tBid_Bid_hyper_type_impl : HyperTypeImpl tBid_Bid := {\n  ht_cval f := \n    (CVstruct (CSmap\n      (PTree.set  Bid_struct__blindedBid_ident  (@ht_cval tint_hashvalue _ (_blindedBid f))\n      (PTree.set  Bid_struct__deposit_ident  (@ht_cval tint_U _ (_deposit f))\n      (@PTree.empty cval)))));\n  ht_ft_cond f := (@ht_ft_cond tint_hashvalue _ (_blindedBid f))\n    /\\ (@ht_ft_cond tint_U _ (_deposit f));\n  ht_default := {| _blindedBid := (@ht_default tint_hashvalue _);\n       _deposit := (@ht_default tint_U _)\n    |};\n  ht_valid_ft_cond f := @ht_valid_ft_cond tint_hashvalue _ (_blindedBid f)\n    /\\ @ht_valid_ft_cond tint_U _ (_deposit f);\n  ht_valid_ft_ocond := (\n    (@ht_valid_ft_ocond tint_hashvalue _) m{ _blindedBid }\n    /\\ (@ht_valid_ft_ocond tint_U _) m{ _deposit })%oprop1;\n  ht_inject j a b := a = b\n}.\nDefinition Bid_Bid_pair := mk_hyper_type_pair tBid_Bid.\nGlobal Instance tBid_Bid_hyper_type : HyperType tBid_Bid.\nProof. solve_algebraic_record_data_type_hyper_type tBid_Bid_hyper_type_impl. Qed.\nGlobal Instance tBid_Bid__blindedBid_field_impl : HyperFieldImpl tBid_Bid tint_hashvalue Bid_struct__blindedBid_ident := {\n  Hfield_offset := 0;\n  Hfield_get s := _blindedBid s;\n  Hfield_set v s := Build_Bid v (_deposit s)\n}.\nGlobal Instance tBid_Bid__blindedBid_field : HyperField tBid_Bid tint_hashvalue Bid_struct__blindedBid_ident.\nProof. solve_record_type_hyper_field. Qed.\nGlobal Instance tBid_Bid__deposit_field_impl : HyperFieldImpl tBid_Bid tint_U Bid_struct__deposit_ident := {\n  Hfield_offset := 1;\n  Hfield_get s := _deposit s;\n  Hfield_set v s := Build_Bid (_blindedBid s) v\n}.\nGlobal Instance tBid_Bid__deposit_field : HyperField tBid_Bid tint_U Bid_struct__deposit_ident.\nProof. solve_record_type_hyper_field. Qed.\nDefinition tTransfer_Transfer := (Tpair Transfer (Tstruct Transfer_struct_ident\n  (Fcons Transfer_struct__amount_ident tint\n  (Fcons Transfer_struct__to_ident tint\n   Fnil)))).\nGlobal Instance tTransfer_Transfer_hyper_type_impl : HyperTypeImpl tTransfer_Transfer := {\n  ht_cval f := \n    (CVstruct (CSmap\n      (PTree.set  Transfer_struct__amount_ident  (@ht_cval tint_U _ (_amount f))\n      (PTree.set  Transfer_struct__to_ident  (@ht_cval tint_U _ (_to f))\n      (@PTree.empty cval)))));\n  ht_ft_cond f := (@ht_ft_cond tint_U _ (_amount f))\n    /\\ (@ht_ft_cond tint_U _ (_to f));\n  ht_default := {| _amount := (@ht_default tint_U _);\n       _to := (@ht_default tint_U _)\n    |};\n  ht_valid_ft_cond f := @ht_valid_ft_cond tint_U _ (_amount f)\n    /\\ @ht_valid_ft_cond tint_U _ (_to f);\n  ht_valid_ft_ocond := (\n    (@ht_valid_ft_ocond tint_U _) m{ _amount }\n    /\\ (@ht_valid_ft_ocond tint_U _) m{ _to })%oprop1;\n  ht_inject j a b := a = b\n}.\nDefinition Transfer_Transfer_pair := mk_hyper_type_pair tTransfer_Transfer.\nGlobal Instance tTransfer_Transfer_hyper_type : HyperType tTransfer_Transfer.\nProof. solve_algebraic_record_data_type_hyper_type tTransfer_Transfer_hyper_type_impl. Qed.\nGlobal Instance tTransfer_Transfer__amount_field_impl : HyperFieldImpl tTransfer_Transfer tint_U Transfer_struct__amount_ident := {\n  Hfield_offset := 0;\n  Hfield_get s := _amount s;\n  Hfield_set v s := Build_Transfer v (_to s)\n}.\nGlobal Instance tTransfer_Transfer__amount_field : HyperField tTransfer_Transfer tint_U Transfer_struct__amount_ident.\nProof. solve_record_type_hyper_field. Qed.\nGlobal Instance tTransfer_Transfer__to_field_impl : HyperFieldImpl tTransfer_Transfer tint_U Transfer_struct__to_ident := {\n  Hfield_offset := 1;\n  Hfield_get s := _to s;\n  Hfield_set v s := Build_Transfer (_amount s) v\n}.\nGlobal Instance tTransfer_Transfer__to_field : HyperField tTransfer_Transfer tint_U Transfer_struct__to_ident.\nProof. solve_record_type_hyper_field. Qed.\nDefinition tint_list_Transfer := (Tpair list_Transfer tint).\nGlobal Instance tint_list_Transfer_hyper_type_impl : HyperTypeImpl tint_list_Transfer := {\n  ht_cval := fun _ => CVany;\n  ht_ft_cond := fun _ => True;\n  ht_default := nil;\n  ht_valid_ft_cond := fun _ => True;\n  ht_valid_ft_ocond := otrue1;\n  ht_inject j a b := a = b\n}.\nDefinition int_list_Transfer_pair := mk_hyper_type_pair tint_list_Transfer.\nGlobal Instance tint_list_Transfer_hyper_binary_impl_eq : HyperBinaryImpl Oeq tint_list_Transfer tint_list_Transfer tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := (* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) false\n}.\nDefinition thash_Bid_HASH_Z_Bid := (Tpair HASH_Z_Bid (Thashmap tint (Tstruct Bid_struct_ident\n  (Fcons Bid_struct__blindedBid_ident tint\n  (Fcons Bid_struct__deposit_ident tint\n   Fnil))))).\nGlobal Instance thash_Bid_HASH_Z_Bid_hyper_type_impl : HyperTypeImpl thash_Bid_HASH_Z_Bid :=\n   Int256Tree_inject_equal_hashmap_hyper_type_impl tBid_Bid.\nDefinition hash_Bid_HASH_Z_Bid_pair := mk_hyper_type_pair thash_Bid_HASH_Z_Bid.\nGlobal Instance thash_Bid_HASH_Z_Bid_hyper_type : HyperType thash_Bid_HASH_Z_Bid :=\n  Int256Tree_inject_equal_hashmap_hyper_type tBid_Bid.\nGlobal Instance thash_Bid_HASH_Z_Bid_index_impl : HyperIntHashImpl thash_Bid_HASH_Z_Bid tBid_Bid :=\n  Int256Tree_inject_equal_hashmap_hash_impl tBid_Bid.\nGlobal Instance thash_Bid_HASH_Z_Bid_hash : HyperIntHash thash_Bid_HASH_Z_Bid tBid_Bid :=\n  Int256Tree_inject_equal_hashmap_hash tBid_Bid.\nDefinition thash_int_HASH_Z_Z := (Tpair HASH_Z_Z (Thashmap tint tint)).\nGlobal Instance thash_int_HASH_Z_Z_hyper_type_impl : HyperTypeImpl thash_int_HASH_Z_Z :=\n   Int256Tree_inject_equal_hashmap_hyper_type_impl tint_U.\nDefinition hash_int_HASH_Z_Z_pair := mk_hyper_type_pair thash_int_HASH_Z_Z.\nGlobal Instance thash_int_HASH_Z_Z_hyper_type : HyperType thash_int_HASH_Z_Z :=\n  Int256Tree_inject_equal_hashmap_hyper_type tint_U.\nGlobal Instance thash_int_HASH_Z_Z_index_impl : HyperIntHashImpl thash_int_HASH_Z_Z tint_U :=\n  Int256Tree_inject_equal_hashmap_hash_impl tint_U.\nGlobal Instance thash_int_HASH_Z_Z_hash : HyperIntHash thash_int_HASH_Z_Z tint_U :=\n  Int256Tree_inject_equal_hashmap_hash tint_U.\nDefinition thash_int_HASH_Z_hashvalue := (Tpair HASH_Z_hashvalue (Thashmap tint tint)).\nGlobal Instance thash_int_HASH_Z_hashvalue_hyper_type_impl : HyperTypeImpl thash_int_HASH_Z_hashvalue :=\n   Int256Tree_inject_equal_hashmap_hyper_type_impl tint_hashvalue.\nDefinition hash_int_HASH_Z_hashvalue_pair := mk_hyper_type_pair thash_int_HASH_Z_hashvalue.\nGlobal Instance thash_int_HASH_Z_hashvalue_hyper_type : HyperType thash_int_HASH_Z_hashvalue :=\n  Int256Tree_inject_equal_hashmap_hyper_type tint_hashvalue.\nGlobal Instance thash_int_HASH_Z_hashvalue_index_impl : HyperIntHashImpl thash_int_HASH_Z_hashvalue tint_hashvalue :=\n  Int256Tree_inject_equal_hashmap_hash_impl tint_hashvalue.\nGlobal Instance thash_int_HASH_Z_hashvalue_hash : HyperIntHash thash_int_HASH_Z_hashvalue tint_hashvalue :=\n  Int256Tree_inject_equal_hashmap_hash tint_hashvalue.\nRecord global_abstract_data_type : Type := {\n  _beneficiary : int256;\n  _biddingEnd : int256;\n  _revealEnd : int256;\n  _ended : bool;\n  _bids : (Int256Tree.t Bid);\n  _highestBidder : int256;\n  _highestBid : int256;\n  _pendingReturns : (Int256Tree.t int256);\n  _trueBids : (Int256Tree.t int256);\n  _secrets : (Int256Tree.t hashvalue);\n  _events : (list Transfer)\n}.\nDefinition update__beneficiary glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type glabs_b (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_pendingReturns glabs_a) (_trueBids glabs_a) (_secrets glabs_a) (_events glabs_a) .\nDefinition update__biddingEnd glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) glabs_b (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_pendingReturns glabs_a) (_trueBids glabs_a) (_secrets glabs_a) (_events glabs_a) .\nDefinition update__revealEnd glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) glabs_b (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_pendingReturns glabs_a) (_trueBids glabs_a) (_secrets glabs_a) (_events glabs_a) .\nDefinition update__ended glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) glabs_b (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_pendingReturns glabs_a) (_trueBids glabs_a) (_secrets glabs_a) (_events glabs_a) .\nDefinition update__bids glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) glabs_b (_highestBidder glabs_a) (_highestBid glabs_a) (_pendingReturns glabs_a) (_trueBids glabs_a) (_secrets glabs_a) (_events glabs_a) .\nDefinition update__highestBidder glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) glabs_b (_highestBid glabs_a) (_pendingReturns glabs_a) (_trueBids glabs_a) (_secrets glabs_a) (_events glabs_a) .\nDefinition update__highestBid glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) glabs_b (_pendingReturns glabs_a) (_trueBids glabs_a) (_secrets glabs_a) (_events glabs_a) .\nDefinition update__pendingReturns glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) glabs_b (_trueBids glabs_a) (_secrets glabs_a) (_events glabs_a) .\nDefinition update__trueBids glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_pendingReturns glabs_a) glabs_b (_secrets glabs_a) (_events glabs_a) .\nDefinition update__secrets glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_pendingReturns glabs_a) (_trueBids glabs_a) glabs_b (_events glabs_a) .\nDefinition update__events glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_pendingReturns glabs_a) (_trueBids glabs_a) (_secrets glabs_a) glabs_b .\n\nDefinition init_global_abstract_data : global_abstract_data_type := {|\n  _beneficiary := (Int256.repr 0);\n  _biddingEnd := (Int256.repr 0);\n  _revealEnd := (Int256.repr 0);\n  _ended := false;\n  _bids := (Int256Tree.empty Bid);\n  _highestBidder := (Int256.repr 0);\n  _highestBid := (Int256.repr 0);\n  _pendingReturns := (Int256Tree.empty int256);\n  _trueBids := (Int256Tree.empty int256);\n  _secrets := (Int256Tree.empty hashvalue);\n  _events := nil\n|}.\n\nDefinition block := positive.\nDefinition global_low_level_invariant (n : block)(abd : global_abstract_data_type) := True.\nEnd EdsgerGen.\n\nLemma _beneficiary_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__beneficiary _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__beneficiary : updates.\n\nLemma _beneficiary_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__biddingEnd _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__biddingEnd : updates.\n\nLemma _beneficiary_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__revealEnd _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__revealEnd : updates.\n\nLemma _beneficiary_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__ended _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__ended : updates.\n\nLemma _beneficiary_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__bids _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__bids : updates.\n\nLemma _beneficiary_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__highestBidder _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__highestBidder : updates.\n\nLemma _beneficiary_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__highestBid _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__highestBid : updates.\n\nLemma _beneficiary_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__pendingReturns _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__pendingReturns : updates.\n\nLemma _beneficiary_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__trueBids _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__trueBids : updates.\n\nLemma _beneficiary_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__secrets _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__secrets : updates.\n\nLemma _beneficiary_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__events _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__events : updates.\n\n\nLemma _biddingEnd_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__beneficiary _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__beneficiary : updates.\n\nLemma _biddingEnd_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__biddingEnd _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__biddingEnd : updates.\n\nLemma _biddingEnd_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__revealEnd _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__revealEnd : updates.\n\nLemma _biddingEnd_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__ended _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__ended : updates.\n\nLemma _biddingEnd_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__bids _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__bids : updates.\n\nLemma _biddingEnd_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__highestBidder _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__highestBidder : updates.\n\nLemma _biddingEnd_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__highestBid _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__highestBid : updates.\n\nLemma _biddingEnd_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__pendingReturns _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__pendingReturns : updates.\n\nLemma _biddingEnd_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__trueBids _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__trueBids : updates.\n\nLemma _biddingEnd_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__secrets _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__secrets : updates.\n\nLemma _biddingEnd_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__events _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__events : updates.\n\n\nLemma _revealEnd_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__beneficiary _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__beneficiary : updates.\n\nLemma _revealEnd_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__biddingEnd _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__biddingEnd : updates.\n\nLemma _revealEnd_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__revealEnd _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__revealEnd : updates.\n\nLemma _revealEnd_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__ended _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__ended : updates.\n\nLemma _revealEnd_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__bids _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__bids : updates.\n\nLemma _revealEnd_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__highestBidder _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__highestBidder : updates.\n\nLemma _revealEnd_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__highestBid _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__highestBid : updates.\n\nLemma _revealEnd_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__pendingReturns _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__pendingReturns : updates.\n\nLemma _revealEnd_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__trueBids _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__trueBids : updates.\n\nLemma _revealEnd_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__secrets _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__secrets : updates.\n\nLemma _revealEnd_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__events _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__events : updates.\n\n\nLemma _ended_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__beneficiary _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__beneficiary : updates.\n\nLemma _ended_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__biddingEnd _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__biddingEnd : updates.\n\nLemma _ended_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__revealEnd _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__revealEnd : updates.\n\nLemma _ended_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__ended _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__ended : updates.\n\nLemma _ended_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__bids _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__bids : updates.\n\nLemma _ended_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__highestBidder _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__highestBidder : updates.\n\nLemma _ended_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__highestBid _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__highestBid : updates.\n\nLemma _ended_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__pendingReturns _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__pendingReturns : updates.\n\nLemma _ended_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__trueBids _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__trueBids : updates.\n\nLemma _ended_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__secrets _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__secrets : updates.\n\nLemma _ended_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__events _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__events : updates.\n\n\nLemma _bids_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__beneficiary _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__beneficiary : updates.\n\nLemma _bids_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__biddingEnd _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__biddingEnd : updates.\n\nLemma _bids_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__revealEnd _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__revealEnd : updates.\n\nLemma _bids_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__ended _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__ended : updates.\n\nLemma _bids_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__bids _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__bids : updates.\n\nLemma _bids_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__highestBidder _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__highestBidder : updates.\n\nLemma _bids_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__highestBid _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__highestBid : updates.\n\nLemma _bids_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__pendingReturns _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__pendingReturns : updates.\n\nLemma _bids_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__trueBids _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__trueBids : updates.\n\nLemma _bids_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__secrets _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__secrets : updates.\n\nLemma _bids_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__events _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__events : updates.\n\n\nLemma _highestBidder_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__beneficiary _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__beneficiary : updates.\n\nLemma _highestBidder_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__biddingEnd _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__biddingEnd : updates.\n\nLemma _highestBidder_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__revealEnd _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__revealEnd : updates.\n\nLemma _highestBidder_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__ended _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__ended : updates.\n\nLemma _highestBidder_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__bids _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__bids : updates.\n\nLemma _highestBidder_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__highestBidder _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__highestBidder : updates.\n\nLemma _highestBidder_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__highestBid _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__highestBid : updates.\n\nLemma _highestBidder_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__pendingReturns _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__pendingReturns : updates.\n\nLemma _highestBidder_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__trueBids _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__trueBids : updates.\n\nLemma _highestBidder_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__secrets _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__secrets : updates.\n\nLemma _highestBidder_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__events _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__events : updates.\n\n\nLemma _highestBid_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__beneficiary _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__beneficiary : updates.\n\nLemma _highestBid_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__biddingEnd _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__biddingEnd : updates.\n\nLemma _highestBid_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__revealEnd _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__revealEnd : updates.\n\nLemma _highestBid_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__ended _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__ended : updates.\n\nLemma _highestBid_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__bids _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__bids : updates.\n\nLemma _highestBid_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__highestBidder _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__highestBidder : updates.\n\nLemma _highestBid_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__highestBid _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__highestBid : updates.\n\nLemma _highestBid_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__pendingReturns _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__pendingReturns : updates.\n\nLemma _highestBid_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__trueBids _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__trueBids : updates.\n\nLemma _highestBid_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__secrets _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__secrets : updates.\n\nLemma _highestBid_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__events _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__events : updates.\n\n\nLemma _pendingReturns_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__beneficiary _x glabs_a) = _pendingReturns glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__beneficiary : updates.\n\nLemma _pendingReturns_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__biddingEnd _x glabs_a) = _pendingReturns glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__biddingEnd : updates.\n\nLemma _pendingReturns_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__revealEnd _x glabs_a) = _pendingReturns glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__revealEnd : updates.\n\nLemma _pendingReturns_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__ended _x glabs_a) = _pendingReturns glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__ended : updates.\n\nLemma _pendingReturns_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__bids _x glabs_a) = _pendingReturns glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__bids : updates.\n\nLemma _pendingReturns_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__highestBidder _x glabs_a) = _pendingReturns glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__highestBidder : updates.\n\nLemma _pendingReturns_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__highestBid _x glabs_a) = _pendingReturns glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__highestBid : updates.\n\nLemma _pendingReturns_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__pendingReturns _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__pendingReturns : updates.\n\nLemma _pendingReturns_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__trueBids _x glabs_a) = _pendingReturns glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__trueBids : updates.\n\nLemma _pendingReturns_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__secrets _x glabs_a) = _pendingReturns glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__secrets : updates.\n\nLemma _pendingReturns_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _pendingReturns (update__events _x glabs_a) = _pendingReturns glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _pendingReturns_of_update__events : updates.\n\n\nLemma _trueBids_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__beneficiary _x glabs_a) = _trueBids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__beneficiary : updates.\n\nLemma _trueBids_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__biddingEnd _x glabs_a) = _trueBids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__biddingEnd : updates.\n\nLemma _trueBids_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__revealEnd _x glabs_a) = _trueBids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__revealEnd : updates.\n\nLemma _trueBids_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__ended _x glabs_a) = _trueBids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__ended : updates.\n\nLemma _trueBids_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__bids _x glabs_a) = _trueBids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__bids : updates.\n\nLemma _trueBids_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__highestBidder _x glabs_a) = _trueBids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__highestBidder : updates.\n\nLemma _trueBids_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__highestBid _x glabs_a) = _trueBids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__highestBid : updates.\n\nLemma _trueBids_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__pendingReturns _x glabs_a) = _trueBids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__pendingReturns : updates.\n\nLemma _trueBids_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__trueBids _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__trueBids : updates.\n\nLemma _trueBids_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__secrets _x glabs_a) = _trueBids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__secrets : updates.\n\nLemma _trueBids_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _trueBids (update__events _x glabs_a) = _trueBids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _trueBids_of_update__events : updates.\n\n\nLemma _secrets_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__beneficiary _x glabs_a) = _secrets glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__beneficiary : updates.\n\nLemma _secrets_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__biddingEnd _x glabs_a) = _secrets glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__biddingEnd : updates.\n\nLemma _secrets_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__revealEnd _x glabs_a) = _secrets glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__revealEnd : updates.\n\nLemma _secrets_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__ended _x glabs_a) = _secrets glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__ended : updates.\n\nLemma _secrets_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__bids _x glabs_a) = _secrets glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__bids : updates.\n\nLemma _secrets_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__highestBidder _x glabs_a) = _secrets glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__highestBidder : updates.\n\nLemma _secrets_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__highestBid _x glabs_a) = _secrets glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__highestBid : updates.\n\nLemma _secrets_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__pendingReturns _x glabs_a) = _secrets glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__pendingReturns : updates.\n\nLemma _secrets_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__trueBids _x glabs_a) = _secrets glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__trueBids : updates.\n\nLemma _secrets_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__secrets _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__secrets : updates.\n\nLemma _secrets_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _secrets (update__events _x glabs_a) = _secrets glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secrets_of_update__events : updates.\n\n\nLemma _events_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__beneficiary _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__beneficiary : updates.\n\nLemma _events_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__biddingEnd _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__biddingEnd : updates.\n\nLemma _events_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__revealEnd _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__revealEnd : updates.\n\nLemma _events_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__ended _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__ended : updates.\n\nLemma _events_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__bids _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__bids : updates.\n\nLemma _events_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__highestBidder _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__highestBidder : updates.\n\nLemma _events_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__highestBid _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__highestBid : updates.\n\nLemma _events_of_update__pendingReturns : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__pendingReturns _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__pendingReturns : updates.\n\nLemma _events_of_update__trueBids : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__trueBids _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__trueBids : updates.\n\nLemma _events_of_update__secrets : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__secrets _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__secrets : updates.\n\nLemma _events_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__events _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__events : updates.\n\nOpaque _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events.\n\n"
  },
  {
    "path": "contracts/fpblind/fpblind/DataTypes.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.DataTypes for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import fpblind.EdsgerIdents.\n\nSection EdsgerGen.\n\n\nDefinition addr := int256.\n\nRecord Bid := {\n  _blindedBid : hashvalue;\n  _deposit : int256\n}.\n\nRecord Transfer := {\n  _amount : int256;\n  _to : int256\n}.\n\nDefinition list_Transfer := (list Transfer).\n\nDefinition HASH_Z_Bid := (Int256Tree.t Bid).\n\nDefinition HASH_Z_Z := (Int256Tree.t int256).\n\nDefinition HASH_Z_hashvalue := (Int256Tree.t hashvalue).\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/EdsgerIdents.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.EdsgerIdents for fpblind.ds *)\nRequire Import BinPos.  (* positive_scope *)\nRequire Import backend.AST. (* for ident *)\n\nDefinition Bid_struct__blindedBid_ident : ident  := 550%positive.\nDefinition Bid_struct__deposit_ident : ident  := 551%positive.\nDefinition Bid_struct_ident : ident  := 552%positive.\nDefinition Transfer_struct__amount_ident : ident  := 553%positive.\nDefinition Transfer_struct__to_ident : ident  := 554%positive.\nDefinition Transfer_struct_ident : ident  := 555%positive.\n\nDefinition ident_BlindAuction_auctionEnd : ident  := 556%positive.\nDefinition ident_BlindAuction_bid : ident  := 557%positive.\nDefinition ident_BlindAuction_initialize : ident  := 558%positive.\nDefinition ident_BlindAuction_reveal : ident  := 559%positive.\nDefinition ident_BlindAuction_withdraw : ident  := 560%positive.\nDefinition ident_EVMOpcode_transfer : ident  := 561%positive.\nDefinition var_BlindAuction__beneficiary_ident : ident  := 562%positive.\nDefinition var_BlindAuction__biddingEnd_ident : ident  := 563%positive.\nDefinition var_BlindAuction__bids_ident : ident  := 564%positive.\nDefinition var_BlindAuction__ended_ident : ident  := 565%positive.\nDefinition var_BlindAuction__highestBid_ident : ident  := 566%positive.\nDefinition var_BlindAuction__highestBidder_ident : ident  := 567%positive.\nDefinition var_BlindAuction__pendingReturns_ident : ident  := 568%positive.\nDefinition var_BlindAuction__revealEnd_ident : ident  := 569%positive.\nDefinition var_BlindAuction__secrets_ident : ident  := 570%positive.\nDefinition var_BlindAuction__trueBids_ident : ident  := 571%positive.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/LSrcBLINDAUCTION.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.LSrcBLINDAUCTION for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import fpblind.EdsgerIdents.\nRequire Import fpblind.DataTypes.\nRequire Import fpblind.DataTypeOps.\nRequire Import fpblind.DataTypeProofs.\n\n\nRequire Import fpblind.LayerBLINDAUCTION.\n\nRequire Import cclib.Integers.\nRequire Import cclib.Coqlib.\nRequire Import cclib.Maps.\n\nRequire Import backend.Options.\nRequire Import backend.AST.\nRequire Import backend.phase.Clike.Language.\nRequire Import backend.phase.MiniC.Language.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.Compiled.\nRequire Import backend.Compiled.\nRequire Import backend.Globalenvs.\nRequire Import backend.Glue.\n\n\nSection EdsgerGen.\n\nDefinition BlindAuction_initialize_done : function := \n\tmkfunction\n\tBlindAuction_initialize_cfun.(fn_return)\n\tBlindAuction_initialize_cfun.(fn_params)\n\tBlindAuction_initialize_cfun.(fn_temps)\n\tBlindAuction_initialize_cfun.(fn_body).\n\nDefinition BlindAuction_reveal_done : function := \n\tmkfunction\n\tBlindAuction_reveal_cfun.(fn_return)\n\tBlindAuction_reveal_cfun.(fn_params)\n\tBlindAuction_reveal_cfun.(fn_temps)\n\tBlindAuction_reveal_cfun.(fn_body).\n\nDefinition BlindAuction_bid_done : function := \n\tmkfunction\n\tBlindAuction_bid_cfun.(fn_return)\n\tBlindAuction_bid_cfun.(fn_params)\n\tBlindAuction_bid_cfun.(fn_temps)\n\tBlindAuction_bid_cfun.(fn_body).\n\nDefinition BlindAuction_withdraw_done : function := \n\tmkfunction\n\tBlindAuction_withdraw_cfun.(fn_return)\n\tBlindAuction_withdraw_cfun.(fn_params)\n\tBlindAuction_withdraw_cfun.(fn_temps)\n\tBlindAuction_withdraw_cfun.(fn_body).\n\nDefinition BlindAuction_auctionEnd_done : function := \n\tmkfunction\n\tBlindAuction_auctionEnd_cfun.(fn_return)\n\tBlindAuction_auctionEnd_cfun.(fn_params)\n\tBlindAuction_auctionEnd_cfun.(fn_temps)\n\tBlindAuction_auctionEnd_cfun.(fn_body).\n\nDefinition ge : genv := new_genv (\n\t(var_BlindAuction__beneficiary_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__biddingEnd_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__revealEnd_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__ended_ident, unpair_ty tint_bool)::\n\t(var_BlindAuction__bids_ident, unpair_ty thash_Bid_HASH_Z_Bid)::\n\t(var_BlindAuction__highestBidder_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__highestBid_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__pendingReturns_ident, unpair_ty thash_int_HASH_Z_Z)::\n\t(var_BlindAuction__trueBids_ident, unpair_ty thash_int_HASH_Z_Z)::\n\t(var_BlindAuction__secrets_ident, unpair_ty thash_int_HASH_Z_hashvalue)::nil)\n\tnil\n\t(\n\t(Int.repr 3835887894, BlindAuction_initialize_done):: (* 0xe4a30116 = \"initialize(uint256,uint256)\" *)\n\n\t(Int.repr 2471022327, BlindAuction_reveal_done):: (* 0x9348cef7 = \"reveal(uint256,uint256)\" *)\n\n\t(Int.repr 1162488499, BlindAuction_bid_done):: (* 0x454a2ab3 = \"bid(uint256)\" *)\n\n\t(Int.repr 1020253707, BlindAuction_withdraw_done):: (* 0x3ccfd60b = \"withdraw()\" *)\n\n\t(Int.repr 707064940, BlindAuction_auctionEnd_done):: (* 0x2a24f46c = \"auctionEnd()\" *)\nnil)\n\tNone.\n\n\nEnd EdsgerGen.\n\n(*change into extract directory*)\nCd \"/Users/sxysun/Desktop/CertiK/DeepSEA/contracts/fpblind/fpblind/extraction\".\n\n(* Avoid name clashes *)\nExtraction Blacklist List String Int.\n\nSeparate Extraction\n    positive global_abstract_data_type  (* This line forces Coq to generate some files even if they are not used, to make the makefile work correctly. *)\n    Glue.full_compile_genv\n    ge.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/LSrcEVMOPCODE.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.LSrcEVMOPCODE for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import fpblind.EdsgerIdents.\nRequire Import fpblind.DataTypes.\nRequire Import fpblind.DataTypeOps.\nRequire Import fpblind.DataTypeProofs.\n\n\nRequire Import fpblind.LayerEVMOPCODE.\n\nRequire Import cclib.Integers.\nRequire Import cclib.Coqlib.\nRequire Import cclib.Maps.\n\nRequire Import backend.Options.\nRequire Import backend.AST.\nRequire Import backend.phase.Clike.Language.\nRequire Import backend.phase.MiniC.Language.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.Compiled.\nRequire Import backend.Compiled.\nRequire Import backend.Globalenvs.\nRequire Import backend.Glue.\n\n\nSection EdsgerGen.\n\nDefinition ge : genv := new_genv (nil)\n\tnil\n\t(nil)\n\tNone.\n\n\nEnd EdsgerGen.\n\n(*change into extract directory*)\nCd \"/Users/sxysun/Desktop/CertiK/DeepSEA/contracts/fpblind/fpblind/extraction\".\n\n(* Avoid name clashes *)\nExtraction Blacklist List String Int.\n\nSeparate Extraction\n    positive global_abstract_data_type  (* This line forces Coq to generate some files even if they are not used, to make the makefile work correctly. *)\n    Glue.full_compile_genv\n    ge.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/LayerBLINDAUCTION.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.LayerBLINDAUCTION for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import fpblind.EdsgerIdents.\nRequire Import fpblind.DataTypes.\nRequire Import fpblind.DataTypeOps.\nRequire Import fpblind.DataTypeProofs.\n(*Require Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.*)\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.StateMonad.\nRequire Import DeepSpec.lib.Monad.OptionMonad.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.core.SynthesisStmt.\nRequire Import backend.MachineModel.\nExisting Instance MonadState_DS.\nExisting Instance MonadZero_DS.\nRequire Export fpblind.LayerEVMOPCODE.\n\nSection EdsgerGen.\n\n\n\nContext {memModelOps : MemoryModelOps mem}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  memModelOps := memModelOps;                                            \n  GetHighData := global_abstract_data_type \n}.\n\n\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nDefinition BLINDAUCTION_kernel_mode (abd : global_abstract_data_type) := True.\nGlobal Arguments BLINDAUCTION_kernel_mode / abd.\n\nClass Layer_BLINDAUCTION_Context_prf  := {\n  (* ensuring global empty data matches those in the object definitions *)\n  BLINDAUCTION_init__beneficiary_eq : _beneficiary init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__biddingEnd_eq : _biddingEnd init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__revealEnd_eq : _revealEnd init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__ended_eq : _ended init_global_abstract_data = false;\n  BLINDAUCTION_init__bids_eq : _bids init_global_abstract_data = (Int256Tree.empty Bid);\n  BLINDAUCTION_init__highestBidder_eq : _highestBidder init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__highestBid_eq : _highestBid init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__pendingReturns_eq : _pendingReturns init_global_abstract_data = (Int256Tree.empty int256);\n  BLINDAUCTION_init__trueBids_eq : _trueBids init_global_abstract_data = (Int256Tree.empty int256);\n  BLINDAUCTION_init__secrets_eq : _secrets init_global_abstract_data = (Int256Tree.empty hashvalue);\n  BLINDAUCTION_init__events_eq : _events init_global_abstract_data = nil\n}.\nContext`{CTXT_prf : !Layer_BLINDAUCTION_Context_prf}.\n\nInstance BLINDAUCTION_data_ops : CompatDataOps global_abstract_data_type := {\n  empty_data := init_global_abstract_data;\n  high_level_invariant d := True;\n  (* low_level_invariant := global_low_level_invariant; *) (* Omitted in Ethereum backend. \n  kernel_mode d := BLINDAUCTION_kernel_mode d *)\n}.\n\nInstance BLINDAUCTION_data : CompatData global_abstract_data_type := {\n  (* low_level_invariant_incr := AbData_low_level_invariant_incr;\n  empty_data_low_level_invariant := AbData_empty_data_low_level_invariant; *) (* Omitted in Ethereum backend. *)\n  empty_data_high_level_invariant := I\n}.\n\nInstance BLINDAUCTION_overlay_spec : OverlaySpecClass := {\n  (*cdataOpsHigh := BLINDAUCTION_data_ops;\n  cdataHigh := BLINDAUCTION_data *)\n}.\n\n\n\n(* (* TODO: add this back in for the Ethereum backend. *)\nGlobal Instance Layer_BLINDAUCTION'EVMOPCODE_Context_prf : Layer_EVMOPCODE_Context_prf.\nProof. esplit; apply CTXT_prf.\n  (*\n  - intros; simpl.\n    rewrite BLINDAUCTION_AbData_get_set.\n    destruct abd; reflexivity.\n  - intros; simpl.\n    rewrite BLINDAUCTION_AbData_get_set, BLINDAUCTION_AbData_set_set.\n    reflexivity.\n  - simpl.\n    rewrite BLINDAUCTION_AbData_get_empty_data.\n    reflexivity.\n  - admit.\n  *)\nQed.\nContext`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\n*)\n\nInstance BLINDAUCTION_underlay_spec : UnderlaySpecClass := {\n  cdataOpsLow := EVMOPCODE_data_ops;\n  cdataLow := EVMOPCODE_data;\n  (*GetLowLayer := EVMOPCODE_Layer *)\n}.\n\n\nSection OBJECT_BlindAuction_DEFINITION.\n  Context`{HM : !HyperMem}.\n\n  (* Object variables *)\n  Definition BlindAuction__beneficiary_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__beneficiary_ident;\n    ltype_ghost := false;\n\n    ltype_get := _beneficiary;\n    ltype_set := update__beneficiary;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__beneficiary_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__biddingEnd_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__biddingEnd_ident;\n    ltype_ghost := false;\n\n    ltype_get := _biddingEnd;\n    ltype_set := update__biddingEnd;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__biddingEnd_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__revealEnd_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__revealEnd_ident;\n    ltype_ghost := false;\n\n    ltype_get := _revealEnd;\n    ltype_set := update__revealEnd;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__revealEnd_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__ended_var := {|\n    ltype_tp_marker := tint_bool;\n\n    ltype_ident := Values.Iident var_BlindAuction__ended_ident;\n    ltype_ghost := false;\n\n    ltype_get := _ended;\n    ltype_set := update__ended;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__ended_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_bool in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__bids_var := {|\n    ltype_tp_marker := thash_Bid_HASH_Z_Bid;\n\n    ltype_ident := Values.Iident var_BlindAuction__bids_ident;\n    ltype_ghost := false;\n\n    ltype_get := _bids;\n    ltype_set := update__bids;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__bids_globvar : AST.globvar type :=\n    let ty := unpair_ty thash_Bid_HASH_Z_Bid in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__highestBidder_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__highestBidder_ident;\n    ltype_ghost := false;\n\n    ltype_get := _highestBidder;\n    ltype_set := update__highestBidder;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__highestBidder_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__highestBid_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__highestBid_ident;\n    ltype_ghost := false;\n\n    ltype_get := _highestBid;\n    ltype_set := update__highestBid;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__highestBid_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__pendingReturns_var := {|\n    ltype_tp_marker := thash_int_HASH_Z_Z;\n\n    ltype_ident := Values.Iident var_BlindAuction__pendingReturns_ident;\n    ltype_ghost := false;\n\n    ltype_get := _pendingReturns;\n    ltype_set := update__pendingReturns;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__pendingReturns_globvar : AST.globvar type :=\n    let ty := unpair_ty thash_int_HASH_Z_Z in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__trueBids_var := {|\n    ltype_tp_marker := thash_int_HASH_Z_Z;\n\n    ltype_ident := Values.Iident var_BlindAuction__trueBids_ident;\n    ltype_ghost := false;\n\n    ltype_get := _trueBids;\n    ltype_set := update__trueBids;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__trueBids_globvar : AST.globvar type :=\n    let ty := unpair_ty thash_int_HASH_Z_Z in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__secrets_var := {|\n    ltype_tp_marker := thash_int_HASH_Z_hashvalue;\n\n    ltype_ident := Values.Iident var_BlindAuction__secrets_ident;\n    ltype_ghost := false;\n\n    ltype_get := _secrets;\n    ltype_set := update__secrets;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__secrets_globvar : AST.globvar type :=\n    let ty := unpair_ty thash_int_HASH_Z_hashvalue in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n\n  Definition BlindAuction_initialize := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* biddingTime : *) int_U_pair (cons (* revealTime : *) int_U_pair nil));\n    FC_returns := void_unit_pair;\n    FC_body := (CCsequence\n      (CCstore\n        (LCvar BlindAuction__beneficiary_var)\n        (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n      (CCsequence\n        (CCstore\n          (LCvar BlindAuction__biddingEnd_var)\n          (ECbinop tint_U Oadd\n            (@ECbuiltin0 _ _  _ builtin0_number_impl)\n            (ECtempvar tint_U 11%positive (* biddingTime *))))\n        (CCsequence\n          (CCstore\n            (LCvar BlindAuction__revealEnd_var)\n            (ECbinop tint_U Oadd\n              (ECbinop tint_U Oadd\n                (@ECbuiltin0 _ _  _ builtin0_number_impl)\n                (ECtempvar tint_U 11%positive (* biddingTime *)))\n              (ECtempvar tint_U 12%positive (* revealTime *))))\n          (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))\n  |}.\n  Lemma BlindAuction_initialize_wf\n      : synth_func_wellformed BlindAuction_initialize.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_initialize_opt :int256 -> int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n  in synth_func_spec_opt BlindAuction_initialize BlindAuction_initialize_wf.\n  Definition BlindAuction_initialize_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_initialize.(FC_params) _\n                      (BlindAuction_initialize_opt) args.\n  Definition BlindAuction_initialize_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_initialize BlindAuction_initialize_wf.\n\n  Definition BlindAuction_initialize_prim := {|\n    PRIMident := ident_BlindAuction_initialize;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_initialize.(FC_params);\n    PRIMret_marker := BlindAuction_initialize.(FC_returns);\n    PRIMcond := BlindAuction_initialize_spec_cond;\n    (* PRIMsem := BlindAuction_initialize_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_initialize_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_initialize_spec_hlist_opt_eq :\n    BlindAuction_initialize_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_initialize BlindAuction_initialize_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_initialize_cfun :=\n  Eval cbv in synth_func_func BlindAuction_initialize.\n\n  Definition BlindAuction_initialize_cond  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_initialize BlindAuction_initialize_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma BlindAuction_initialize_cond_eq : forall  a0 a1 me d, \n    BlindAuction_initialize_cond  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_initialize BlindAuction_initialize_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_initialize_obligation  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_initialize BlindAuction_initialize_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma BlindAuction_initialize_obligation_eq : forall  a0 a1 me d, \n    BlindAuction_initialize_obligation  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_initialize BlindAuction_initialize_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_initialize_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_initialize_opt] in\n    fun  a0 a1 me => execStateT (BlindAuction_initialize_opt a0 a1 me).\n  Lemma BlindAuction_initialize_spec_eq :\n    BlindAuction_initialize_spec =\n    fun  a0 a1 me => execStateT (synth_func_spec_opt BlindAuction_initialize BlindAuction_initialize_wf a0 a1 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_initialize_opt.\n\n  Definition BlindAuction_reveal := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* value : *) int_U_pair (cons (* secret : *) int_hashvalue_pair nil));\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* biddingEnd := *) 13%positive\n      (CCload (LCvar BlindAuction__biddingEnd_var))\n      (CClet (* revealEnd := *) 14%positive\n        (CCload (LCvar BlindAuction__revealEnd_var))\n        (CCsequence\n          (CCassert (CCyield (ECbinop tint_bool Ogt\n            (@ECbuiltin0 _ _  _ builtin0_number_impl)\n            (ECtempvar tint_U 13%positive (* biddingEnd *)))))\n          (CCsequence\n            (CCassert (CCyield (ECbinop tint_bool Olt\n              (@ECbuiltin0 _ _  _ builtin0_number_impl)\n              (ECtempvar tint_U 14%positive (* revealEnd *)))))\n            (CClet (* hashed := *) 17%positive\n              (CCyield (ECbinop tint_hashvalue Osha_2\n                (ECtempvar tint_U 11%positive (* value *))\n                (ECtempvar tint_hashvalue 12%positive (* secret *))))\n              (CClet (* blindedBid := *) 18%positive\n                (CCload (LCfield tint_hashvalue Bid_struct__blindedBid_ident\n                  (LChash tBid_Bid\n                    (LCvar BlindAuction__bids_var)\n                    (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n                (CClet (* deposit := *) 19%positive\n                  (CCload (LCfield tint_U Bid_struct__deposit_ident\n                    (LChash tBid_Bid\n                      (LCvar BlindAuction__bids_var)\n                      (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n                  (CCsequence\n                    (CCstore\n                      (LChash tint_U\n                        (LCvar BlindAuction__trueBids_var)\n                        (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n                      (ECtempvar tint_U 11%positive (* value *)))\n                    (CCsequence\n                      (CCstore\n                        (LChash tint_hashvalue\n                          (LCvar BlindAuction__secrets_var)\n                          (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n                        (ECtempvar tint_hashvalue 12%positive (* secret *)))\n                      (CClet (* refund := *) 20%positive\n                        (CCifthenelse (ECbinop tint_bool Oeq\n                            (ECtempvar tint_hashvalue 17%positive (* hashed *))\n                            (ECtempvar tint_hashvalue 18%positive (* blindedBid *)))\n                          (CClet (* loc_refund := *) 21%positive\n                            (CCifthenelse (ECbinop tint_bool Oge\n                                (ECtempvar tint_U 19%positive (* deposit *))\n                                (ECtempvar tint_U 11%positive (* value *)))\n                              (CClet (* highestBid := *) 22%positive\n                                (CCload (LCvar BlindAuction__highestBid_var))\n                                (CClet (* highestBidder := *) 23%positive\n                                  (CCload (LCvar BlindAuction__highestBidder_var))\n                                  (CCifthenelse (ECbinop tint_bool Ole\n                                      (ECtempvar tint_U 11%positive (* value *))\n                                      (ECtempvar tint_U 22%positive (* highestBid *)))\n                                    (CCyield (ECtempvar tint_U 19%positive (* deposit *)))\n                                    (CClet (* _ := *) 24%positive\n                                      (CCifthenelse (ECbinop tint_bool Ogt\n                                          (ECtempvar tint_U 22%positive (* highestBid *))\n                                          (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0)))\n                                        (CCsequence\n                                          (CCstore\n                                            (LChash tint_U\n                                              (LCvar BlindAuction__pendingReturns_var)\n                                              (ECtempvar tint_U 23%positive (* highestBidder *)))\n                                            (ECtempvar tint_U 22%positive (* highestBid *)))\n                                          (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))\n                                        (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))\n                                      (CCsequence\n                                        (CCstore\n                                          (LCvar BlindAuction__highestBid_var)\n                                          (ECtempvar tint_U 11%positive (* value *)))\n                                        (CCsequence\n                                          (CCstore\n                                            (LCvar BlindAuction__highestBidder_var)\n                                            (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n                                          (CCyield (ECbinop tint_U Osub\n                                            (ECtempvar tint_U 19%positive (* deposit *))\n                                            (ECtempvar tint_U 11%positive (* value *))))))))))\n                              (CCyield (ECtempvar tint_U 19%positive (* deposit *))))\n                            (CCsequence\n                              (CCstore\n                                (LCfield tint_hashvalue Bid_struct__blindedBid_ident\n                                  (LChash tBid_Bid\n                                    (LCvar BlindAuction__bids_var)\n                                    (@ECbuiltin0 _ _  _ builtin0_caller_impl)))\n                                (ECunop tint_hashvalue Osha_1 (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0))))\n                              (CCyield (ECtempvar tint_U 21%positive (* loc_refund *)))))\n                          (CCyield (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0))))\n                        (CCsequence\n                          (CCcall EVMOpcode_transfer_prim\n                            (HCons int_U_pair _\n                              (@ECbuiltin0 _ _  _ builtin0_caller_impl)\n                              (HCons int_U_pair _\n                                (ECtempvar tint_U 20%positive (* refund *))\n                                HNil)))\n                          (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))))))))))\n  |}.\n  Lemma BlindAuction_reveal_wf\n      : synth_func_wellformed BlindAuction_reveal.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_reveal_opt :int256 -> hashvalue ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n  in synth_func_spec_opt BlindAuction_reveal BlindAuction_reveal_wf.\n  Definition BlindAuction_reveal_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_reveal.(FC_params) _\n                      (BlindAuction_reveal_opt) args.\n  Definition BlindAuction_reveal_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_reveal BlindAuction_reveal_wf.\n\n  Definition BlindAuction_reveal_prim := {|\n    PRIMident := ident_BlindAuction_reveal;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_reveal.(FC_params);\n    PRIMret_marker := BlindAuction_reveal.(FC_returns);\n    PRIMcond := BlindAuction_reveal_spec_cond;\n    (* PRIMsem := BlindAuction_reveal_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_reveal_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_reveal_spec_hlist_opt_eq :\n    BlindAuction_reveal_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_reveal BlindAuction_reveal_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_reveal_cfun :=\n  Eval cbv in synth_func_func BlindAuction_reveal.\n\n  Definition BlindAuction_reveal_cond  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_reveal BlindAuction_reveal_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma BlindAuction_reveal_cond_eq : forall  a0 a1 me d, \n    BlindAuction_reveal_cond  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_reveal BlindAuction_reveal_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_reveal_obligation  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_reveal BlindAuction_reveal_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma BlindAuction_reveal_obligation_eq : forall  a0 a1 me d, \n    BlindAuction_reveal_obligation  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_reveal BlindAuction_reveal_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_reveal_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_reveal_opt] in\n    fun  a0 a1 me => execStateT (BlindAuction_reveal_opt a0 a1 me).\n  Lemma BlindAuction_reveal_spec_eq :\n    BlindAuction_reveal_spec =\n    fun  a0 a1 me => execStateT (synth_func_spec_opt BlindAuction_reveal BlindAuction_reveal_wf a0 a1 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_reveal_opt.\n\n  Definition BlindAuction_bid := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* blindedBid : *) int_hashvalue_pair nil);\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* biddingEnd := *) 12%positive\n      (CCload (LCvar BlindAuction__biddingEnd_var))\n      (CCsequence\n        (CCassert (CCyield (ECbinop tint_bool Olt\n          (@ECbuiltin0 _ _  _ builtin0_number_impl)\n          (ECtempvar tint_U 12%positive (* biddingEnd *)))))\n        (CClet (* old_deposit := *) 14%positive\n          (CCload (LCfield tint_U Bid_struct__deposit_ident\n            (LChash tBid_Bid\n              (LCvar BlindAuction__bids_var)\n              (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n          (CCsequence\n            (CCifthenelse (ECbinop tint_bool One\n                (ECtempvar tint_U 14%positive (* old_deposit *))\n                (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0)))\n              (CCsequence\n                (CCstore\n                  (LCfield tint_hashvalue Bid_struct__blindedBid_ident\n                    (LChash tBid_Bid\n                      (LCvar BlindAuction__bids_var)\n                      (@ECbuiltin0 _ _  _ builtin0_caller_impl)))\n                  (ECtempvar tint_hashvalue 11%positive (* blindedBid *)))\n                (CCsequence\n                  (CCstore\n                    (LCfield tint_U Bid_struct__deposit_ident\n                      (LChash tBid_Bid\n                        (LCvar BlindAuction__bids_var)\n                        (@ECbuiltin0 _ _  _ builtin0_caller_impl)))\n                    (@ECbuiltin0 _ _  _ builtin0_callvalue_impl))\n                  (CCsequence\n                    (CCcall EVMOpcode_transfer_prim\n                      (HCons int_U_pair _\n                        (@ECbuiltin0 _ _  _ builtin0_caller_impl)\n                        (HCons int_U_pair _\n                          (ECtempvar tint_U 14%positive (* old_deposit *))\n                          HNil)))\n                    (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))\n              (CCconstr\n                (cons Bid_struct__blindedBid_ident (cons Bid_struct__deposit_ident nil))\n                (cons (* _blindedBid : *) int_hashvalue_pair (cons (* _deposit : *) int_U_pair nil))\n                (LChash tBid_Bid\n                  (LCvar BlindAuction__bids_var)\n                  (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n                (HCons int_hashvalue_pair _\n                  (ECtempvar tint_hashvalue 11%positive (* blindedBid *))\n                  (HCons int_U_pair _\n                    (@ECbuiltin0 _ _  _ builtin0_callvalue_impl)\n                    HNil))\n                Build_Bid))\n            (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))\n  |}.\n  Lemma BlindAuction_bid_wf\n      : synth_func_wellformed BlindAuction_bid.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_bid_opt :hashvalue ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n  in synth_func_spec_opt BlindAuction_bid BlindAuction_bid_wf.\n  Definition BlindAuction_bid_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_bid.(FC_params) _\n                      (BlindAuction_bid_opt) args.\n  Definition BlindAuction_bid_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_bid BlindAuction_bid_wf.\n\n  Definition BlindAuction_bid_prim := {|\n    PRIMident := ident_BlindAuction_bid;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_bid.(FC_params);\n    PRIMret_marker := BlindAuction_bid.(FC_returns);\n    PRIMcond := BlindAuction_bid_spec_cond;\n    (* PRIMsem := BlindAuction_bid_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_bid_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_bid_spec_hlist_opt_eq :\n    BlindAuction_bid_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_bid BlindAuction_bid_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_bid_cfun :=\n  Eval cbv in synth_func_func BlindAuction_bid.\n\n  Definition BlindAuction_bid_cond  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_bid BlindAuction_bid_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma BlindAuction_bid_cond_eq : forall  a0 me d, \n    BlindAuction_bid_cond  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_bid BlindAuction_bid_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_bid_obligation  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_bid BlindAuction_bid_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma BlindAuction_bid_obligation_eq : forall  a0 me d, \n    BlindAuction_bid_obligation  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_bid BlindAuction_bid_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_bid_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_bid_opt] in\n    fun  a0 me => execStateT (BlindAuction_bid_opt a0 me).\n  Lemma BlindAuction_bid_spec_eq :\n    BlindAuction_bid_spec =\n    fun  a0 me => execStateT (synth_func_spec_opt BlindAuction_bid BlindAuction_bid_wf a0 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_bid_opt.\n\n  Definition BlindAuction_withdraw := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := nil;\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* amount := *) 12%positive\n      (CCload (LChash tint_U\n        (LCvar BlindAuction__pendingReturns_var)\n        (@ECbuiltin0 _ _  _ builtin0_caller_impl)))\n      (CCifthenelse (ECbinop tint_bool Ogt\n          (ECtempvar tint_U 12%positive (* amount *))\n          (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0)))\n        (CCsequence\n          (CCstore\n            (LChash tint_U\n              (LCvar BlindAuction__pendingReturns_var)\n              (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n            (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0)))\n          (CCsequence\n            (CCcall EVMOpcode_transfer_prim\n              (HCons int_U_pair _\n                (@ECbuiltin0 _ _  _ builtin0_caller_impl)\n                (HCons int_U_pair _\n                  (ECtempvar tint_U 12%positive (* amount *))\n                  HNil)))\n            (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))\n        (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))\n  |}.\n  Lemma BlindAuction_withdraw_wf\n      : synth_func_wellformed BlindAuction_withdraw.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_withdraw_opt : machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n  in synth_func_spec_opt BlindAuction_withdraw BlindAuction_withdraw_wf.\n  Definition BlindAuction_withdraw_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_withdraw.(FC_params) _\n                      (BlindAuction_withdraw_opt) args.\n  Definition BlindAuction_withdraw_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_withdraw BlindAuction_withdraw_wf.\n\n  Definition BlindAuction_withdraw_prim := {|\n    PRIMident := ident_BlindAuction_withdraw;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_withdraw.(FC_params);\n    PRIMret_marker := BlindAuction_withdraw.(FC_returns);\n    PRIMcond := BlindAuction_withdraw_spec_cond;\n    (* PRIMsem := BlindAuction_withdraw_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_withdraw_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_withdraw_spec_hlist_opt_eq :\n    BlindAuction_withdraw_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_withdraw BlindAuction_withdraw_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_withdraw_cfun :=\n  Eval cbv in synth_func_func BlindAuction_withdraw.\n\n  Definition BlindAuction_withdraw_cond  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_withdraw BlindAuction_withdraw_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma BlindAuction_withdraw_cond_eq : forall  me d, \n    BlindAuction_withdraw_cond  me d ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_withdraw BlindAuction_withdraw_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_withdraw_obligation  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_withdraw BlindAuction_withdraw_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma BlindAuction_withdraw_obligation_eq : forall  me d, \n    BlindAuction_withdraw_obligation  me d ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_withdraw BlindAuction_withdraw_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_withdraw_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_withdraw_opt] in\n    fun  me => execStateT (BlindAuction_withdraw_opt me).\n  Lemma BlindAuction_withdraw_spec_eq :\n    BlindAuction_withdraw_spec =\n    fun  me => execStateT (synth_func_spec_opt BlindAuction_withdraw BlindAuction_withdraw_wf me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_withdraw_opt.\n\n  Definition BlindAuction_auctionEnd := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := nil;\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* revealEnd := *) 12%positive\n      (CCload (LCvar BlindAuction__revealEnd_var))\n      (CClet (* ended := *) 13%positive\n        (CCload (LCvar BlindAuction__ended_var))\n        (CCsequence\n          (CCassert (CCyield (ECbinop tint_bool Ogt\n            (@ECbuiltin0 _ _  _ builtin0_number_impl)\n            (ECtempvar tint_U 12%positive (* revealEnd *)))))\n          (CCsequence\n            (CCassert (CCyield (ECunop tint_bool Onotbool (ECtempvar tint_bool 13%positive (* ended *)))))\n            (CCsequence\n              (CCstore\n                (LCvar BlindAuction__ended_var)\n                (ECconst_int256 tint_bool true Int256.one))\n              (CClet (* beneficiary := *) 16%positive\n                (CCload (LCvar BlindAuction__beneficiary_var))\n                (CClet (* highestBid := *) 17%positive\n                  (CCload (LCvar BlindAuction__highestBid_var))\n                  (CCsequence\n                    (CCcall EVMOpcode_transfer_prim\n                      (HCons int_U_pair _\n                        (ECtempvar tint_U 16%positive (* beneficiary *))\n                        (HCons int_U_pair _\n                          (ECtempvar tint_U 17%positive (* highestBid *))\n                          HNil)))\n                    (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))))))\n  |}.\n  Lemma BlindAuction_auctionEnd_wf\n      : synth_func_wellformed BlindAuction_auctionEnd.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_auctionEnd_opt : machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n  in synth_func_spec_opt BlindAuction_auctionEnd BlindAuction_auctionEnd_wf.\n  Definition BlindAuction_auctionEnd_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_auctionEnd.(FC_params) _\n                      (BlindAuction_auctionEnd_opt) args.\n  Definition BlindAuction_auctionEnd_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_auctionEnd BlindAuction_auctionEnd_wf.\n\n  Definition BlindAuction_auctionEnd_prim := {|\n    PRIMident := ident_BlindAuction_auctionEnd;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_auctionEnd.(FC_params);\n    PRIMret_marker := BlindAuction_auctionEnd.(FC_returns);\n    PRIMcond := BlindAuction_auctionEnd_spec_cond;\n    (* PRIMsem := BlindAuction_auctionEnd_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_auctionEnd_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_auctionEnd_spec_hlist_opt_eq :\n    BlindAuction_auctionEnd_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_auctionEnd BlindAuction_auctionEnd_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_auctionEnd_cfun :=\n  Eval cbv in synth_func_func BlindAuction_auctionEnd.\n\n  Definition BlindAuction_auctionEnd_cond  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_auctionEnd BlindAuction_auctionEnd_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma BlindAuction_auctionEnd_cond_eq : forall  me d, \n    BlindAuction_auctionEnd_cond  me d ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_auctionEnd BlindAuction_auctionEnd_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_auctionEnd_obligation  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_auctionEnd BlindAuction_auctionEnd_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma BlindAuction_auctionEnd_obligation_eq : forall  me d, \n    BlindAuction_auctionEnd_obligation  me d ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_auctionEnd BlindAuction_auctionEnd_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_auctionEnd_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_auctionEnd_opt] in\n    fun  me => execStateT (BlindAuction_auctionEnd_opt me).\n  Lemma BlindAuction_auctionEnd_spec_eq :\n    BlindAuction_auctionEnd_spec =\n    fun  me => execStateT (synth_func_spec_opt BlindAuction_auctionEnd BlindAuction_auctionEnd_wf me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _pendingReturns update__pendingReturns _trueBids update__trueBids _secrets update__secrets _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_auctionEnd_opt.\nEnd OBJECT_BlindAuction_DEFINITION.\n(* (*Temporarily omitted in the Ethereum version.*)\n\nSection LAYER_BLINDAUCTION_DEFINITION.\n  Definition BLINDAUCTION_blindauction_initialize_prim := BlindAuction_initialize_prim.\n  Definition BLINDAUCTION_blindauction_reveal_prim := BlindAuction_reveal_prim.\n  Definition BLINDAUCTION_blindauction_bid_prim := BlindAuction_bid_prim.\n  Definition BLINDAUCTION_blindauction_withdraw_prim := BlindAuction_withdraw_prim.\n  Definition BLINDAUCTION_blindauction_auctionEnd_prim := BlindAuction_auctionEnd_prim.\n\n  Class BLINDAUCTION_preserves_invariants := {\n    BLINDAUCTION_BlindAuction_initialize_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_initialize_spec;\n    BLINDAUCTION_BlindAuction_reveal_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_reveal_spec;\n    BLINDAUCTION_BlindAuction_bid_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_bid_spec;\n    BLINDAUCTION_BlindAuction_withdraw_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_withdraw_spec;\n    BLINDAUCTION_BlindAuction_auctionEnd_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_auctionEnd_spec\n  }.\n  Context`{BLINDAUCTION_pres_inv : !BLINDAUCTION_preserves_invariants}.\n\n  Definition BLINDAUCTION_Layer : CompatLayerDef.compatlayer GetHighDataX :=\n    initialize ↦ CompatGenSem.gensem BlindAuction_initialize_spec\n      ⊕ reveal ↦ CompatGenSem.gensem BlindAuction_reveal_spec\n      ⊕ bid ↦ CompatGenSem.gensem BlindAuction_bid_spec\n      ⊕ withdraw ↦ CompatGenSem.gensem BlindAuction_withdraw_spec\n      ⊕ auctionEnd ↦ CompatGenSem.gensem BlindAuction_auctionEnd_spec.\nEnd LAYER_BLINDAUCTION_DEFINITION.\n*)\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/LayerEVMOPCODE.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.LayerEVMOPCODE for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import fpblind.EdsgerIdents.\nRequire Import fpblind.DataTypes.\nRequire Import fpblind.DataTypeOps.\nRequire Import fpblind.DataTypeProofs.\n(*Require Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.*)\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.StateMonad.\nRequire Import DeepSpec.lib.Monad.OptionMonad.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.core.SynthesisStmt.\nRequire Import backend.MachineModel.\nExisting Instance MonadState_DS.\nExisting Instance MonadZero_DS.\n\nSection EdsgerGen.\n\n\n\nContext {memModelOps : MemoryModelOps mem}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  memModelOps := memModelOps;                                            \n  GetHighData := global_abstract_data_type \n}.\n\n\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nDefinition EVMOPCODE_kernel_mode (abd : global_abstract_data_type) := True.\nGlobal Arguments EVMOPCODE_kernel_mode / abd.\n\nClass Layer_EVMOPCODE_Context_prf  := {\n  (* ensuring global empty data matches those in the object definitions *)\n  EVMOPCODE_init__events_eq : _events init_global_abstract_data = nil\n}.\nContext`{CTXT_prf : !Layer_EVMOPCODE_Context_prf}.\n\nInstance EVMOPCODE_data_ops : CompatDataOps global_abstract_data_type := {\n  empty_data := init_global_abstract_data;\n  high_level_invariant d := True;\n  (* low_level_invariant := global_low_level_invariant; *) (* Omitted in Ethereum backend. \n  kernel_mode d := EVMOPCODE_kernel_mode d *)\n}.\n\nInstance EVMOPCODE_data : CompatData global_abstract_data_type := {\n  (* low_level_invariant_incr := AbData_low_level_invariant_incr;\n  empty_data_low_level_invariant := AbData_empty_data_low_level_invariant; *) (* Omitted in Ethereum backend. *)\n  empty_data_high_level_invariant := I\n}.\n\nInstance EVMOPCODE_overlay_spec : OverlaySpecClass := {\n  (*cdataOpsHigh := EVMOPCODE_data_ops;\n  cdataHigh := EVMOPCODE_data *)\n}.\n\n\n\nInstance EVMOPCODE_underlay_spec : UnderlaySpecClass := {\n  cdataOpsLow := @BuiltinBase_data_ops GlobalLayerSpec init_global_abstract_data;\n  cdataLow := BuiltinBase_data;\n  (*GetLowLayer := BuiltinBase_Layer *)\n}.\n\n\nSection OBJECT_EVMOpcode_DEFINITION.\n  Context`{HM : !HyperMem}.\n\n  (* Object variables *)\n  Definition EVMOpcode__events_var := {|\n    ltype_tp_marker := tint_list_Transfer;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _events;\n    ltype_set := update__events;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n\n  Definition EVMOpcode_transfer := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* toaddr : *) int_U_pair (cons (* much : *) int_U_pair nil));\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* e := *) 13%positive\n      (CCload (LCvar EVMOpcode__events_var))\n      (CCsequence\n        (CCrespec_opt\n          (AList.set 13%positive int_list_Transfer_pair (AList.set 12%positive int_U_pair (AList.set 11%positive int_U_pair (@AList.empty hyper_type_pair))))\n          (CCpanic tvoid_unit)\n          (fun se => @bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>\n          let a := (fun toaddr much e => {| _amount := much; _to := toaddr|} :: e)\n               (SpecTree.get 12%positive (* much *) se)\n               (SpecTree.get 11%positive (* toaddr *) se)\n               (SpecTree.get 13%positive (* e *) se) in\nput (EVMOpcode__events_var.(ltype_set) a d)\n           )))\n        (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))\n  |}.\n  Lemma EVMOpcode_transfer_wf\n      : synth_func_wellformed EVMOpcode_transfer.\n  Proof. solve_wellformed. Defined.\n  Definition EVMOpcode_transfer_opt :int256 -> int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _events update__events]\n  in synth_func_spec_opt EVMOpcode_transfer EVMOpcode_transfer_wf.\n  Definition EVMOpcode_transfer_spec_hlist_opt args :=\n    @apply_param_func EVMOpcode_transfer.(FC_params) _\n                      (EVMOpcode_transfer_opt) args.\n  Definition EVMOpcode_transfer_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _events update__events]\n  in *)\n  synth_func_spec_cond EVMOpcode_transfer EVMOpcode_transfer_wf.\n\n  Definition EVMOpcode_transfer_prim := {|\n    PRIMident := ident_EVMOpcode_transfer;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := EVMOpcode_transfer.(FC_params);\n    PRIMret_marker := EVMOpcode_transfer.(FC_returns);\n    PRIMcond := EVMOpcode_transfer_spec_cond;\n    (* PRIMsem := EVMOpcode_transfer_spec_hlist; *)\n    PRIMsem_opt := EVMOpcode_transfer_spec_hlist_opt\n  |}.\n\n  Lemma EVMOpcode_transfer_spec_hlist_opt_eq :\n    EVMOpcode_transfer_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt EVMOpcode_transfer EVMOpcode_transfer_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition EVMOpcode_transfer_cfun :=\n  Eval cbv in synth_func_func EVMOpcode_transfer.\n\n  Definition EVMOpcode_transfer_cond  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond EVMOpcode_transfer EVMOpcode_transfer_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma EVMOpcode_transfer_cond_eq : forall  a0 a1 me d, \n    EVMOpcode_transfer_cond  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond EVMOpcode_transfer EVMOpcode_transfer_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition EVMOpcode_transfer_obligation  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation EVMOpcode_transfer EVMOpcode_transfer_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma EVMOpcode_transfer_obligation_eq : forall  a0 a1 me d, \n    EVMOpcode_transfer_obligation  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation EVMOpcode_transfer EVMOpcode_transfer_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition EVMOpcode_transfer_spec :=\n  Eval cbv [sf_mem sf_return fst snd EVMOpcode_transfer_opt] in\n    fun  a0 a1 me => execStateT (EVMOpcode_transfer_opt a0 a1 me).\n  Lemma EVMOpcode_transfer_spec_eq :\n    EVMOpcode_transfer_spec =\n    fun  a0 a1 me => execStateT (synth_func_spec_opt EVMOpcode_transfer EVMOpcode_transfer_wf a0 a1 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque EVMOpcode_transfer_opt.\nEnd OBJECT_EVMOpcode_DEFINITION.\n(* (*Temporarily omitted in the Ethereum version.*)\n\nSection LAYER_EVMOPCODE_DEFINITION.\n  Definition EVMOPCODE_evm_transfer_prim := EVMOpcode_transfer_prim.\n\n  Class EVMOPCODE_preserves_invariants := {\n    EVMOPCODE_EVMOpcode_transfer_preserves_invariants :>\n      CompatGenSem.PreservesInvariants EVMOpcode_transfer_spec\n  }.\n  Context`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\n\n  Definition EVMOPCODE_Layer : CompatLayerDef.compatlayer GetHighDataX :=\n    transfer ↦ CompatGenSem.gensem EVMOpcode_transfer_spec.\nEnd LAYER_EVMOPCODE_DEFINITION.\n*)\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/Makefile.conf",
    "content": "# This configuration file was generated by running:\n# coq_makefile -f _CoqProject -o Makefile\n\n\n###############################################################################\n#                                                                             #\n# Project files.                                                              #\n#                                                                             #\n###############################################################################\n\nCOQMF_VFILES = EdsgerIdents.v DataTypeOps.v DataTypeProofs.v DataTypes.v LayerBLINDAUCTION.v LayerEVMOPCODE.v RefineBLINDAUCTION.v ObjBlindAuctionCodeProofs.v\nCOQMF_MLIFILES = \nCOQMF_MLFILES = \nCOQMF_ML4FILES = \nCOQMF_MLPACKFILES = \nCOQMF_MLLIBFILES = \nCOQMF_CMDLINE_VFILES = \n\n###############################################################################\n#                                                                             #\n# Path directives (-I, -R, -Q).                                               #\n#                                                                             #\n###############################################################################\n\nCOQMF_OCAMLLIBS = \nCOQMF_SRC_SUBDIRS = \nCOQMF_COQLIBS =   -R ../../.. DeepSpec\nCOQMF_COQLIBS_NOML =  -R ../../.. DeepSpec\nCOQMF_CMDLINE_COQLIBS =   \n\n###############################################################################\n#                                                                             #\n# Coq configuration.                                                          #\n#                                                                             #\n###############################################################################\n\nCOQMF_LOCAL=0\nCOQMF_COQLIB=/Users/xs/.opam/4.09.0/lib/coq/\nCOQMF_DOCDIR=/Users/xs/.opam/4.09.0/doc/\nCOQMF_OCAMLFIND=/Users/xs/.opam/4.09.0/bin/ocamlfind\nCOQMF_CAMLP5O=/Users/xs/.opam/4.09.0/bin/camlp5o\nCOQMF_CAMLP5BIN=/Users/xs/.opam/4.09.0/bin/\nCOQMF_CAMLP5LIB=/Users/xs/.opam/4.09.0/lib/camlp5\nCOQMF_CAMLP5OPTIONS=-loc loc\nCOQMF_CAMLFLAGS=-thread -rectypes -w +a-4-9-27-41-42-44-45-48-50-58-59   -safe-string -strict-sequence\nCOQMF_HASNATDYNLINK=true\nCOQMF_COQ_SRC_SUBDIRS=config dev lib clib kernel library engine pretyping interp parsing proofs tactics toplevel printing grammar ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/micromega plugins/nsatz plugins/omega plugins/quote plugins/romega plugins/rtauto plugins/setoid_ring plugins/ssr plugins/ssrmatching plugins/syntax plugins/xml\nCOQMF_WINDRIVE=\n\n###############################################################################\n#                                                                             #\n# Extra variables.                                                            #\n#                                                                             #\n###############################################################################\n\nCOQMF_OTHERFLAGS = \nCOQMF_INSTALLCOQDOCROOT = DeepSpec\n"
  },
  {
    "path": "contracts/fpblind/fpblind/ObjBlindAuctionCode.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.ObjBlindAuctionCode for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import DeepSpec.Linking.\nRequire Import fpblind.EdsgerIdents.\nRequire Import fpblind.DataTypes.\nRequire Import fpblind.DataTypeOps.\nRequire Import fpblind.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\nRequire Import layerlib.LinkSourceTemplate.\n\nRequire Import fpblind.LayerBLINDAUCTION.\nRequire Import fpblind.RefineBLINDAUCTION.\nRequire Import fpblind.ObjBlindAuctionCodeProofs.\n\nSection EdsgerGen.\n\n\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nContext`{CTXT_prf : !Layer_BLINDAUCTION_Context_prf}.\nContext`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\nExisting Instances BLINDAUCTION_overlay_spec BLINDAUCTION_underlay_spec\n                   BLINDAUCTION_hypermem.\n\nLemma relate_AbData_translates_kernel_mode j d1 d2 :\n    relate_AbData j d1 d2 -> kernel_mode d1 -> kernel_mode d2.\nProof.\n  simpl; intros rel d1_kern.\n  (* rewrite <- (ikern_re _ _ _ rel), <- (ihost_re _ _ _ rel). *)\n  exact d1_kern.\nQed.\n\nInstance EVMOPCODE_evm_transfer_prim_prf :\n    primitive_prf EVMOPCODE_evm_transfer_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem EVMOpcode_transfer_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance BlindAuction__beneficiary_var_prf :\n    HyperLType BlindAuction__beneficiary_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__beneficiary_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__biddingEnd_var_prf :\n    HyperLType BlindAuction__biddingEnd_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__biddingEnd_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__revealEnd_var_prf :\n    HyperLType BlindAuction__revealEnd_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__revealEnd_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__ended_var_prf :\n    HyperLType BlindAuction__ended_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__ended_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__bids_var_prf :\n    HyperLType BlindAuction__bids_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__bids_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__highestBidder_var_prf :\n    HyperLType BlindAuction__highestBidder_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__highestBidder_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__highestBid_var_prf :\n    HyperLType BlindAuction__highestBid_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__highestBid_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__pendingReturns_var_prf :\n    HyperLType BlindAuction__pendingReturns_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__pendingReturns_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__trueBids_var_prf :\n    HyperLType BlindAuction__trueBids_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__trueBids_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__secrets_var_prf :\n    HyperLType BlindAuction__secrets_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__secrets_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\n(* Do not assume this context until now to avoid above proofs using the wrong one *)\nContext`{BLINDAUCTION_pres_inv : !BLINDAUCTION_preserves_invariants}.\n\nLemma BlindAuction_initialize_prf : function_constr_prf BlindAuction_initialize.\nProof. solve_function_constr_prf @BlindAuction_initialize. Qed.\n\nTheorem BlindAuction_initialize_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_initialize ↦ CompatGenSem.gensem BlindAuction_initialize_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_initialize BlindAuction_initialize_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_initialize_spec_eq.\n    change BlindAuction_initialize_cfun\n      with (synth_func_func BlindAuction_initialize).\n    apply synth_correct_2_void.\n    + exact BlindAuction_initialize_prf.\n    + exact BlindAuction_initialize_vc.\n    + exact BlindAuction_initialize_oblg.\n(*  - apply semof_prim_kernel_mode_2_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_initialize_spec_requires_kernel_mode. *)\nQed.\n\nLemma BlindAuction_reveal_prf : function_constr_prf BlindAuction_reveal.\nProof. solve_function_constr_prf @BlindAuction_reveal. Qed.\n\nTheorem BlindAuction_reveal_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_reveal ↦ CompatGenSem.gensem BlindAuction_reveal_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_reveal BlindAuction_reveal_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_reveal_spec_eq.\n    change BlindAuction_reveal_cfun\n      with (synth_func_func BlindAuction_reveal).\n    apply synth_correct_2_void.\n    + exact BlindAuction_reveal_prf.\n    + exact BlindAuction_reveal_vc.\n    + exact BlindAuction_reveal_oblg.\n(*  - apply semof_prim_kernel_mode_2_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_reveal_spec_requires_kernel_mode. *)\nQed.\n\nLemma BlindAuction_bid_prf : function_constr_prf BlindAuction_bid.\nProof. solve_function_constr_prf @BlindAuction_bid. Qed.\n\nTheorem BlindAuction_bid_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_bid ↦ CompatGenSem.gensem BlindAuction_bid_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_bid BlindAuction_bid_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_bid_spec_eq.\n    change BlindAuction_bid_cfun\n      with (synth_func_func BlindAuction_bid).\n    apply synth_correct_1_void.\n    + exact BlindAuction_bid_prf.\n    + exact BlindAuction_bid_vc.\n    + exact BlindAuction_bid_oblg.\n(*  - apply semof_prim_kernel_mode_1_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_bid_spec_requires_kernel_mode. *)\nQed.\n\nLemma BlindAuction_withdraw_prf : function_constr_prf BlindAuction_withdraw.\nProof. solve_function_constr_prf @BlindAuction_withdraw. Qed.\n\nTheorem BlindAuction_withdraw_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_withdraw ↦ CompatGenSem.gensem BlindAuction_withdraw_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_withdraw BlindAuction_withdraw_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_withdraw_spec_eq.\n    change BlindAuction_withdraw_cfun\n      with (synth_func_func BlindAuction_withdraw).\n    apply synth_correct_0_void.\n    + exact BlindAuction_withdraw_prf.\n    + exact BlindAuction_withdraw_vc.\n    + exact BlindAuction_withdraw_oblg.\n(*  - apply semof_prim_kernel_mode_0_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_withdraw_spec_requires_kernel_mode. *)\nQed.\n\nLemma BlindAuction_auctionEnd_prf : function_constr_prf BlindAuction_auctionEnd.\nProof. solve_function_constr_prf @BlindAuction_auctionEnd. Qed.\n\nTheorem BlindAuction_auctionEnd_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_auctionEnd ↦ CompatGenSem.gensem BlindAuction_auctionEnd_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_auctionEnd BlindAuction_auctionEnd_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_auctionEnd_spec_eq.\n    change BlindAuction_auctionEnd_cfun\n      with (synth_func_func BlindAuction_auctionEnd).\n    apply synth_correct_0_void.\n    + exact BlindAuction_auctionEnd_prf.\n    + exact BlindAuction_auctionEnd_vc.\n    + exact BlindAuction_auctionEnd_oblg.\n(*  - apply semof_prim_kernel_mode_0_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_auctionEnd_spec_requires_kernel_mode. *)\nQed.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/ObjSimBlindAuction.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.ObjSimBlindAuction for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import fpblind.EdsgerIdents.\nRequire Import fpblind.DataTypes.\nRequire Import fpblind.DataTypeOps.\nRequire Import fpblind.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\nRequire Import layerlib.RefinementTactic.\nRequire Import layerlib.RefinementTacticAux.\n\nRequire Import fpblind.LayerBLINDAUCTION.\nRequire Import fpblind.LSimEVMOPCODE.\n\nSection EdsgerGen.\n\n\nContext {Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{HM : HyperMem (LayerSpec := GlobalLayerSpec)}.\n\n  Context {EVMOpcode__events_var_pt_prf : variable_passthrough_prf EVMOpcode__events_var}.\n  Context {BlindAuction__beneficiary_var_pt_prf : variable_passthrough_prf BlindAuction__beneficiary_var}.\n  Context {BlindAuction__biddingEnd_var_pt_prf : variable_passthrough_prf BlindAuction__biddingEnd_var}.\n  Context {BlindAuction__revealEnd_var_pt_prf : variable_passthrough_prf BlindAuction__revealEnd_var}.\n  Context {BlindAuction__ended_var_pt_prf : variable_passthrough_prf BlindAuction__ended_var}.\n  Context {BlindAuction__bids_var_pt_prf : variable_passthrough_prf BlindAuction__bids_var}.\n  Context {BlindAuction__highestBidder_var_pt_prf : variable_passthrough_prf BlindAuction__highestBidder_var}.\n  Context {BlindAuction__highestBid_var_pt_prf : variable_passthrough_prf BlindAuction__highestBid_var}.\n  Context {BlindAuction__pendingReturns_var_pt_prf : variable_passthrough_prf BlindAuction__pendingReturns_var}.\n  Context {BlindAuction__trueBids_var_pt_prf : variable_passthrough_prf BlindAuction__trueBids_var}.\n  Context {BlindAuction__secrets_var_pt_prf : variable_passthrough_prf BlindAuction__secrets_var}.\n\n  Lemma BlindAuction_initialize_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_initialize.\n  Proof. solve_passthrough_prf @BlindAuction_initialize. Qed.\n  Lemma BlindAuction_initialize_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_initialize BlindAuction_initialize_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_initialize_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_initialize_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_initialize_prim.\n      rewrite BlindAuction_initialize_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_initialize_passthrough_prf\n              BlindAuction_initialize_wf\n              BlindAuction_initialize_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_initialize_prim.\n      rewrite BlindAuction_initialize_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_initialize_passthrough_prf\n              BlindAuction_initialize_wf\n              BlindAuction_initialize_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_initialize_prim.\n      rewrite BlindAuction_initialize_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_initialize_passthrough_prf\n              BlindAuction_initialize_wf\n              BlindAuction_initialize_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_initialize_prim.\n      rewrite BlindAuction_initialize_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_initialize_passthrough_prf\n              BlindAuction_initialize_wf\n              BlindAuction_initialize_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_initialize_exists :\n    forall j a0 a1 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_initialize_spec a0 a1 d1 = Some d1' ->\n      exists d2',\n        BlindAuction_initialize_spec a0 a1 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_initialize_spec_eq.\n    exact (synth_func_relate_2_void\n            BlindAuction_initialize_passthrough_prf\n            BlindAuction_initialize_wf\n            BlindAuction_initialize_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma BlindAuction_initialize_match :\n    forall j d d' m a0 a1,\n      match_AbData d m j ->\n      BlindAuction_initialize_spec a0 a1 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_initialize_spec_eq.\n    exact (synth_func_match_2_void\n            BlindAuction_initialize_passthrough_prf\n            BlindAuction_initialize_wf\n            BlindAuction_initialize_passthrough_cond).\n  Qed.\n\n  Section initialize.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_initialize_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_initialize_spec}.\n\n    Lemma BlindAuction_initialize_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_initialize_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_initialize_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_initialize_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_initialize_match; eauto.\n    Qed.\n  End initialize.\n\n  Lemma BlindAuction_reveal_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_reveal.\n  Proof. solve_passthrough_prf @BlindAuction_reveal. Qed.\n  Lemma BlindAuction_reveal_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_reveal BlindAuction_reveal_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_reveal_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_reveal_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_reveal_prim.\n      rewrite BlindAuction_reveal_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_reveal_passthrough_prf\n              BlindAuction_reveal_wf\n              BlindAuction_reveal_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_reveal_prim.\n      rewrite BlindAuction_reveal_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_reveal_passthrough_prf\n              BlindAuction_reveal_wf\n              BlindAuction_reveal_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_reveal_prim.\n      rewrite BlindAuction_reveal_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_reveal_passthrough_prf\n              BlindAuction_reveal_wf\n              BlindAuction_reveal_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_reveal_prim.\n      rewrite BlindAuction_reveal_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_reveal_passthrough_prf\n              BlindAuction_reveal_wf\n              BlindAuction_reveal_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_reveal_exists :\n    forall j a0 a1 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_reveal_spec a0 a1 d1 = Some d1' ->\n      exists d2',\n        BlindAuction_reveal_spec a0 a1 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_reveal_spec_eq.\n    exact (synth_func_relate_2_void\n            BlindAuction_reveal_passthrough_prf\n            BlindAuction_reveal_wf\n            BlindAuction_reveal_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma BlindAuction_reveal_match :\n    forall j d d' m a0 a1,\n      match_AbData d m j ->\n      BlindAuction_reveal_spec a0 a1 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_reveal_spec_eq.\n    exact (synth_func_match_2_void\n            BlindAuction_reveal_passthrough_prf\n            BlindAuction_reveal_wf\n            BlindAuction_reveal_passthrough_cond).\n  Qed.\n\n  Section reveal.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_reveal_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_reveal_spec}.\n\n    Lemma BlindAuction_reveal_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_reveal_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_reveal_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_reveal_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_reveal_match; eauto.\n    Qed.\n  End reveal.\n\n  Lemma BlindAuction_bid_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_bid.\n  Proof. solve_passthrough_prf @BlindAuction_bid. Qed.\n  Lemma BlindAuction_bid_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_bid BlindAuction_bid_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_bid_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_bid_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_bid_prim.\n      rewrite BlindAuction_bid_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_bid_passthrough_prf\n              BlindAuction_bid_wf\n              BlindAuction_bid_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_bid_prim.\n      rewrite BlindAuction_bid_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_bid_passthrough_prf\n              BlindAuction_bid_wf\n              BlindAuction_bid_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_bid_prim.\n      rewrite BlindAuction_bid_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_bid_passthrough_prf\n              BlindAuction_bid_wf\n              BlindAuction_bid_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_bid_prim.\n      rewrite BlindAuction_bid_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_bid_passthrough_prf\n              BlindAuction_bid_wf\n              BlindAuction_bid_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_bid_exists :\n    forall j a0 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_bid_spec a0 d1 = Some d1' ->\n      exists d2',\n        BlindAuction_bid_spec a0 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_bid_spec_eq.\n    exact (synth_func_relate_1_void\n            BlindAuction_bid_passthrough_prf\n            BlindAuction_bid_wf\n            BlindAuction_bid_passthrough_cond\n            j (fun _ _ x => x)).\n  Qed.\n\n  Lemma BlindAuction_bid_match :\n    forall j d d' m a0,\n      match_AbData d m j ->\n      BlindAuction_bid_spec a0 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_bid_spec_eq.\n    exact (synth_func_match_1_void\n            BlindAuction_bid_passthrough_prf\n            BlindAuction_bid_wf\n            BlindAuction_bid_passthrough_cond).\n  Qed.\n\n  Section bid.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_bid_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_bid_spec}.\n\n    Lemma BlindAuction_bid_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_bid_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_bid_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_bid_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_bid_match; eauto.\n    Qed.\n  End bid.\n\n  Lemma BlindAuction_withdraw_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_withdraw.\n  Proof. solve_passthrough_prf @BlindAuction_withdraw. Qed.\n  Lemma BlindAuction_withdraw_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_withdraw BlindAuction_withdraw_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_withdraw_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_withdraw_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_withdraw_prim.\n      rewrite BlindAuction_withdraw_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_withdraw_passthrough_prf\n              BlindAuction_withdraw_wf\n              BlindAuction_withdraw_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_withdraw_prim.\n      rewrite BlindAuction_withdraw_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_withdraw_passthrough_prf\n              BlindAuction_withdraw_wf\n              BlindAuction_withdraw_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_withdraw_prim.\n      rewrite BlindAuction_withdraw_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_withdraw_passthrough_prf\n              BlindAuction_withdraw_wf\n              BlindAuction_withdraw_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_withdraw_prim.\n      rewrite BlindAuction_withdraw_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_withdraw_passthrough_prf\n              BlindAuction_withdraw_wf\n              BlindAuction_withdraw_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_withdraw_exists :\n    forall j d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_withdraw_spec d1 = Some d1' ->\n      exists d2',\n        BlindAuction_withdraw_spec d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_withdraw_spec_eq.\n    exact (synth_func_relate_0_void\n            BlindAuction_withdraw_passthrough_prf\n            BlindAuction_withdraw_wf\n            BlindAuction_withdraw_passthrough_cond\n            j).\n  Qed.\n\n  Lemma BlindAuction_withdraw_match :\n    forall j d d' m,\n      match_AbData d m j ->\n      BlindAuction_withdraw_spec d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_withdraw_spec_eq.\n    exact (synth_func_match_0_void\n            BlindAuction_withdraw_passthrough_prf\n            BlindAuction_withdraw_wf\n            BlindAuction_withdraw_passthrough_cond).\n  Qed.\n\n  Section withdraw.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_withdraw_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_withdraw_spec}.\n\n    Lemma BlindAuction_withdraw_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_withdraw_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_withdraw_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_withdraw_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_withdraw_match; eauto.\n    Qed.\n  End withdraw.\n\n  Lemma BlindAuction_auctionEnd_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_auctionEnd.\n  Proof. solve_passthrough_prf @BlindAuction_auctionEnd. Qed.\n  Lemma BlindAuction_auctionEnd_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_auctionEnd BlindAuction_auctionEnd_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_auctionEnd_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_auctionEnd_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_auctionEnd_prim.\n      rewrite BlindAuction_auctionEnd_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_auctionEnd_passthrough_prf\n              BlindAuction_auctionEnd_wf\n              BlindAuction_auctionEnd_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_auctionEnd_prim.\n      rewrite BlindAuction_auctionEnd_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_auctionEnd_passthrough_prf\n              BlindAuction_auctionEnd_wf\n              BlindAuction_auctionEnd_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_auctionEnd_prim.\n      rewrite BlindAuction_auctionEnd_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_auctionEnd_passthrough_prf\n              BlindAuction_auctionEnd_wf\n              BlindAuction_auctionEnd_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_auctionEnd_prim.\n      rewrite BlindAuction_auctionEnd_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_auctionEnd_passthrough_prf\n              BlindAuction_auctionEnd_wf\n              BlindAuction_auctionEnd_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_auctionEnd_exists :\n    forall j d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_auctionEnd_spec d1 = Some d1' ->\n      exists d2',\n        BlindAuction_auctionEnd_spec d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_auctionEnd_spec_eq.\n    exact (synth_func_relate_0_void\n            BlindAuction_auctionEnd_passthrough_prf\n            BlindAuction_auctionEnd_wf\n            BlindAuction_auctionEnd_passthrough_cond\n            j).\n  Qed.\n\n  Lemma BlindAuction_auctionEnd_match :\n    forall j d d' m,\n      match_AbData d m j ->\n      BlindAuction_auctionEnd_spec d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_auctionEnd_spec_eq.\n    exact (synth_func_match_0_void\n            BlindAuction_auctionEnd_passthrough_prf\n            BlindAuction_auctionEnd_wf\n            BlindAuction_auctionEnd_passthrough_cond).\n  Qed.\n\n  Section auctionEnd.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_auctionEnd_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_auctionEnd_spec}.\n\n    Lemma BlindAuction_auctionEnd_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_auctionEnd_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_auctionEnd_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_auctionEnd_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_auctionEnd_match; eauto.\n    Qed.\n  End auctionEnd.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/RefineBLINDAUCTION.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.RefineBLINDAUCTION for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import DeepSpec.Linking.\nRequire Import fpblind.EdsgerIdents.\nRequire Import fpblind.DataTypes.\nRequire Import fpblind.DataTypeOps.\nRequire Import fpblind.DataTypeProofs.\nRequire Import layerlib.LayerCalculusLemma.\nRequire Import layerlib.RefinementTactic.\nRequire Import layerlib.RefinementTacticAux.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\n\nRequire Import fpblind.LayerBLINDAUCTION.\nRequire Import fpblind.LSimEVMOPCODE.\n\nSection EdsgerGen.\n\n\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nContext`{CTXT_prf : !Layer_BLINDAUCTION_Context_prf}.\nContext`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\nContext`{BLINDAUCTION_pres_inv : !BLINDAUCTION_preserves_invariants}.\n\nExisting Instances BLINDAUCTION_overlay_spec BLINDAUCTION_underlay_spec.\n\nRecord relate_RData (j : meminj) (habd : GetHighData) (labd : GetLowData) : Prop\n    := mkrelate_RData {\n  (* EVMOpcode *)\n  _events_re : (_events habd) = (_events labd)\n}.\n\nRecord match_RData (habd : GetHighData) (m : mem) (j : meminj) : Prop\n    := MATCH_RDATA {\n  _beneficiary_ma : variable_match BlindAuction__beneficiary_var habd m;\n  _biddingEnd_ma : variable_match BlindAuction__biddingEnd_var habd m;\n  _revealEnd_ma : variable_match BlindAuction__revealEnd_var habd m;\n  _ended_ma : variable_match BlindAuction__ended_var habd m;\n  _bids_ma : variable_match BlindAuction__bids_var habd m;\n  _highestBidder_ma : variable_match BlindAuction__highestBidder_var habd m;\n  _highestBid_ma : variable_match BlindAuction__highestBid_var habd m;\n  _pendingReturns_ma : variable_match BlindAuction__pendingReturns_var habd m;\n  _trueBids_ma : variable_match BlindAuction__trueBids_var habd m;\n  _secrets_ma : variable_match BlindAuction__secrets_var habd m\n}.\n\nLocal Hint Resolve MATCH_RDATA.\n\nGlobal Instance rel_ops: CompatRelOps GetHighDataX GetLowDataX :=\n{\n  relate_AbData f d1 d2 := relate_RData f d1 d2;\n  match_AbData d1 m f := match_RData d1 m f;\n  new_glbl := var_BlindAuction__beneficiary_ident :: var_BlindAuction__biddingEnd_ident :: var_BlindAuction__revealEnd_ident :: var_BlindAuction__ended_ident :: var_BlindAuction__bids_ident :: var_BlindAuction__highestBidder_ident :: var_BlindAuction__highestBid_ident :: var_BlindAuction__pendingReturns_ident :: var_BlindAuction__trueBids_ident :: var_BlindAuction__secrets_ident :: nil\n}.\n\nGlobal Instance BlindAuction__beneficiary_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__beneficiary_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__beneficiary_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__biddingEnd_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__biddingEnd_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__biddingEnd_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__revealEnd_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__revealEnd_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__revealEnd_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__ended_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__ended_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__ended_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__bids_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__bids_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__bids_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__highestBidder_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__highestBidder_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__highestBidder_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__highestBid_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__highestBid_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__highestBid_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__pendingReturns_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__pendingReturns_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__pendingReturns_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__trueBids_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__trueBids_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__trueBids_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__secrets_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__secrets_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__secrets_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nLemma relate_incr:\n  forall abd abd' f f',\n    relate_RData f abd abd' ->\n    inject_incr f f' ->\n    relate_RData f' abd abd'.\nProof.\n  inversion 1; subst; intros; simpl in *.\n  repeat match goal with\n  | H : _ /\\ _ |- _ => destruct H\n  end.\n  repeat (constructor; simpl; eauto).\nQed.\nGlobal Instance rel_prf: CompatRel GetHighDataX GetLowDataX.\nProof.\n  constructor; [ destruct 1 .. |]; intros.\n  - constructor; eapply inject_match_correct; eauto with typeclass_instances.\n  - constructor; eapply store_match_correct; eauto with typeclass_instances.\n  - constructor; eapply alloc_match_correct; eauto with typeclass_instances.\n  - constructor; eapply free_match_correct; eauto with typeclass_instances.\n  - constructor; eapply storebytes_match_correct; eauto with typeclass_instances.\n  - eapply relate_incr; eauto.\nQed.\n\n(*\nLocal Instance: ExternalCallsOps (mwd GetLowDataX) := CompatExternalCalls.compatlayer_extcall_ops EVMOPCODE_Layer.\nLocal Instance: CompilerConfigOps _ := CompatExternalCalls.compatlayer_compiler_config_ops EVMOPCODE_Layer.\n*)\n\nInstance BLINDAUCTION_hypermem : MemoryModel.HyperMem\n  := { Hcompatrel := {| crel_prf := rel_prf |} }.\n\nClass BLINDAUCTION_Underlay_preserves_invariants := {\n  BLINDAUCTION_Underlay_EVMOpcode_transfer_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) EVMOpcode_transfer_spec | 5\n}.\nInstance BLINDAUCTION'EVMOPCODE_preserves_invariants : BLINDAUCTION_Underlay_preserves_invariants.\nProof. esplit; apply EVMOPCODE_pres_inv. Defined.\n\n(*\nLemma passthrough_correct:\n  sim (crel (CompatRel0 := rel_prf) _ _) BLINDAUCTION_Layer_passthrough EVMOPCODE_Layer.\nProof.\n  Local Opaque simRR mapsto layer_mapsto_primitive.\n  unfold GlobalLayerSpec, MemoryModel.GetHighDataX.\n  simpl.\n\n  sim_oplus; simpl.\n\n  Local Transparent simRR mapsto layer_mapsto_primitive.\nQed.*)\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/Symbols.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module fpblind.Symbols for fpblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import fpblind.EdsgerIdents.\nRequire Import String.\nRequire Import List.\nRequire Import compcert.common.AST.\nSection EdsgerGen.\n\n\nOpen Scope string_scope.\n\nDefinition symbols: list (ident * string) :=\n  (ident_EVMOpcode_transfer, \"EVMOpcode_transfer\")::\n  (ident_BlindAuction_initialize, \"BlindAuction_initialize\")::\n  (ident_BlindAuction_reveal, \"BlindAuction_reveal\")::\n  (ident_BlindAuction_bid, \"BlindAuction_bid\")::\n  (ident_BlindAuction_withdraw, \"BlindAuction_withdraw\")::\n  (ident_BlindAuction_auctionEnd, \"BlindAuction_auctionEnd\")::\n  (var_BlindAuction__beneficiary_ident, \"BlindAuction__beneficiary\")::\n  (var_BlindAuction__biddingEnd_ident, \"BlindAuction__biddingEnd\")::\n  (var_BlindAuction__revealEnd_ident, \"BlindAuction__revealEnd\")::\n  (var_BlindAuction__ended_ident, \"BlindAuction__ended\")::\n  (var_BlindAuction__bids_ident, \"BlindAuction__bids\")::\n  (var_BlindAuction__highestBidder_ident, \"BlindAuction__highestBidder\")::\n  (var_BlindAuction__highestBid_ident, \"BlindAuction__highestBid\")::\n  (var_BlindAuction__pendingReturns_ident, \"BlindAuction__pendingReturns\")::\n  (var_BlindAuction__trueBids_ident, \"BlindAuction__trueBids\")::\n  (var_BlindAuction__secrets_ident, \"BlindAuction__secrets\")::\n  nil.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/fpblind/_CoqProject",
    "content": "-R ../../.. DeepSpec\n\nEdsgerIdents.v\nDataTypeOps.v\nDataTypeProofs.v\nDataTypes.v\nLayerBLINDAUCTION.v\nLayerEVMOPCODE.v\nRefineBLINDAUCTION.v\nObjBlindAuctionCodeProofs.v\n"
  },
  {
    "path": "contracts/fpblind/fpblind.ds",
    "content": "(* first-price sealed-blind auction *)\n\n(* Hacks\n   - function arguments are tuples, no currying, I think this should be made explicit, I know manual mentioned no higher order functions, but when I wrote function types I always forgot\n   - should implement dynamic array library, but since no polymorphism this is not very easy (no support for user-defined named records, Vilhelm suggested to do this as pre-processing meta-programming\n   - explicit distinction of RValue and LValue\n   - since there is a distinction between RValue and LValue, we cannot access the field of a record in a mapping that is wrapped in a record. no hack is possible. Moreover, writing let-bindings for LValues is tedious\n   - side effect is currently done with let _ = ... in\n   - I (Xinyuan) personally think parentheses () are better than begin ... end, they are clearer, and not much burden adding them\n   - local call by reference variable would be convinient\n   - strust cannot be let-binded\n*)\n\ntype addr := uint\n\ntype Bid = {\n    _blindedBid : hashvalue;\n    _deposit : uint;\n}\n\ntype Transfer = {\n    _amount : uint;\n    _to : uint;\n}\n\n(* external, linking with Coq? *)\nexternal let transfer_nil [[unfold always]] : list Transfer = \"nil\"\nexternal let transfer_cons [[unfold always]] : Transfer * (list Transfer) -> (list Transfer) = \"(fun a b => (cons a b))\"\nexternal let transfer_length [[unfold always]] : (list Transfer) -> int = \"(fun l => Z_of_nat (length l))\"\n\n(* external implementation of transfer since struct cannot be let-binded *)\nexternal let transfer_cons_unzip [[unfold always]] : uint * uint * (list Transfer) -> (list Transfer) = \"(fun toaddr much e => {| _amount := much; _to := toaddr|} :: e)\"\n\n(* event AuctionEnded (winner : addr indexed) (highestBid : uint) *)\n\nobject signature EVMOpcodeInterface = {\n    transfer : addr * uint -> unit;\n}\n\nobject signature BlindAuctionInterface = {\n    initialize : uint * uint -> unit;\n    bid : hashvalue -> unit;\n    reveal : uint * hashvalue -> unit;\n    withdraw : unit -> unit;\n    auctionEnd : unit -> unit;\n}\n\n(*  make it have an actual list variable (this would be a coq list, since we are not generating code), and what the function would do would be to cons one more item to the list, recording that a transfer happened. *)\n\ntrusted object EVMOpcode : EVMOpcodeInterface {\n    let _events : list Transfer := transfer_nil\n\n    let transfer (toaddr, much) =\n        let e = _events in\n        _events := transfer_cons_unzip (much, toaddr, e);\n        ()\n}\n\nobject BlindAuction (evm: EVMOpcodeInterface) : BlindAuctionInterface {\n    (* initial values *)\n    let _beneficiary : addr := 0u0\n    let _biddingEnd : uint := 0u0\n    let _revealEnd : uint := 0u0\n    let _ended : bool := false\n    let _bids : mapping[addr] Bid := mapping_init\n    let _highestBidder : addr := 0u0\n    let _highestBid : uint := 0u0\n    let _pendingReturns : mapping[addr] uint := mapping_init\n    (* for proof assumptions, or else has to assume inverse hash function existence *)\n    let _trueBids : mapping[addr] uint := mapping_init\n    let _secrets : mapping[addr] hashvalue := mapping_init\n\n    (* placeholder for constructor *)\n    let initialize (biddingTime, revealTime) =\n        _beneficiary := msg_sender;\n        _biddingEnd := block_number + biddingTime;\n        _revealEnd := block_number + biddingTime + revealTime;\n        ()\n\n    (* Reveal your blinded bids. You will get a refund for all\n       correctly blinded invalid bids and for all bids except for\n       the totally highest.\n     *)\n    let reveal (value, secret) =\n        let biddingEnd = _biddingEnd in\n        let revealEnd = _revealEnd in\n        assert (block_number > biddingEnd);\n        assert (block_number < revealEnd);\n\n        let hashed = keccak256 (value, secret) in\n        let blindedBid = _bids[msg_sender]._blindedBid in\n        let deposit = _bids[msg_sender]._deposit in\n        _trueBids[msg_sender] := value;\n        _secrets[msg_sender] := secret;\n        let refund = \n            if hashed = blindedBid\n            then \n                let loc_refund = \n                    if deposit >= value \n                    then \n                        let highestBid = _highestBid in\n                        let highestBidder = _highestBidder in\n                        if value <= highestBid \n                        then\n                            deposit\n                        else\n                            begin\n                                let _ = \n                                    if highestBid > 0u0 \n                                    then\n                                        begin\n                                            (* refund previous highest bidder *)\n                                            _pendingReturns[highestBidder] := highestBid; \n                                            ()\n                                        end\n                                    else \n                                        ()\n                                in\n                                (* bid successful, only refund excess deposit *)\n                                _highestBid := value;\n                                _highestBidder := msg_sender;\n                                deposit - value\n                            end\n                    else\n                        deposit\n                in\n                (* Make it impossible for the sender to re-claim the same deposit*)\n                _bids[msg_sender]._blindedBid := keccak256(0u0);\n                loc_refund\n            else\n                0u0\n        in\n        evm.transfer (msg_sender, refund); ()\n\n    (* Place a blinded bid with `blindedBid` = keccak256(value, secret).\n       Each person transfer their capital proof (an amount of ether larger\n       than the price of the auction object), they can transfer more ether or \n       many times to hide their true bid. \n     *)\n    let bid blindedBid = \n        let biddingEnd = _biddingEnd in\n        assert (block_number < biddingEnd);\n        let old_deposit = _bids[msg_sender]._deposit in\n        if old_deposit <> 0u0 \n        then\n            begin\n                _bids[msg_sender]._blindedBid := blindedBid;\n                _bids[msg_sender]._deposit := msg_value;\n                evm.transfer (msg_sender, old_deposit); \n                ()\n            end\n        else\n            _bids[msg_sender] := {_blindedBid = blindedBid; _deposit = msg_value}; \n            ()\n\n    (* Withdraw a bid that was overbid. *)\n    let withdraw () = \n        let amount = _pendingReturns[msg_sender] in\n        if amount > 0u0 then\n            begin\n                (* re-entrency attack *)\n                _pendingReturns[msg_sender] := 0u0;\n                evm.transfer (msg_sender, amount); ()\n            end\n        else \n        ()\n\n    (* End the auction and send the highest bid to the beneficiary. *)\n    let auctionEnd () = \n        let revealEnd = _revealEnd in\n        let ended = _ended in\n        assert (block_number > revealEnd);\n        assert (! ended);\n        (* emit AuctionEnded(_highestBidder, _highestBid); *)\n        _ended := true;\n        let beneficiary = _beneficiary in\n        let highestBid = _highestBid in\n        evm.transfer (beneficiary, highestBid); ()    \n}\n\nlayer signature BLINDAUCTIONSig = {\n    blindauction : BlindAuctionInterface\n}\n\nlayer signature EVMOPCODESig = {\n    evm : EVMOpcodeInterface\n}\n\nlayer EVMOPCODE : [{}] EVMOPCODESig = {\n    evm = EVMOpcode\n}\n\nlayer BLINDAUCTION : [EVMOPCODESig] BLINDAUCTIONSig = {\n  blindauction = BlindAuction\n}\n\nlayer COMPLETE = BLINDAUCTION @ EVMOPCODE\n"
  },
  {
    "path": "contracts/fpblind/fpblind.sol",
    "content": "pragma solidity >0.4.23 <0.5.0;\n\ncontract BlindAuction {\n    struct Bid {\n        bytes32 blindedBid;\n        uint deposit;\n    }\n\n    address public beneficiary;\n    uint public biddingEnd;\n    uint public revealEnd;\n    bool public ended;\n\n    mapping(address => Bid[]) public bids;\n\n    address public highestBidder;\n    uint public highestBid;\n\n    // Allowed withdrawals of previous bids\n    mapping(address => uint) pendingReturns;\n\n    event AuctionEnded(address winner, uint highestBid);\n\n    /// Modifiers are a convenient way to validate inputs to\n    /// functions. `onlyBefore` is applied to `bid` below:\n    /// The new function body is the modifier's body where\n    /// `_` is replaced by the old function body.\n    modifier onlyBefore(uint _time) { require(now < _time); _; }\n    modifier onlyAfter(uint _time) { require(now > _time); _; }\n\n    constructor(\n        uint _biddingTime,\n        uint _revealTime,\n        address _beneficiary\n    ) public {\n        beneficiary = _beneficiary;\n        biddingEnd = now + _biddingTime;\n        revealEnd = biddingEnd + _revealTime;\n    }\n\n    /// Place a blinded bid with `_blindedBid` = keccak256(value,\n    /// fake, secret).\n    /// The sent ether is only refunded if the bid is correctly\n    /// revealed in the revealing phase. The bid is valid if the\n    /// ether sent together with the bid is at least \"value\" and\n    /// \"fake\" is not true. Setting \"fake\" to true and sending\n    /// not the exact amount are ways to hide the real bid but\n    /// still make the required deposit. The same address can\n    /// place multiple bids.\n    function bid(bytes32 _blindedBid)\n        public\n        payable\n        onlyBefore(biddingEnd)\n    {\n        bids[msg.sender].push(Bid({\n            blindedBid: _blindedBid,\n            deposit: msg.value\n        }));\n    }\n\n    /// Reveal your blinded bids. You will get a refund for all\n    /// correctly blinded invalid bids and for all bids except for\n    /// the totally highest.\n    function reveal(\n        uint[] _values,\n        bool[] _fake,\n        bytes32[] _secret\n    )\n        public\n        onlyAfter(biddingEnd)\n        onlyBefore(revealEnd)\n    {\n        uint length = bids[msg.sender].length;\n        require(_values.length == length);\n        require(_fake.length == length);\n        require(_secret.length == length);\n\n        uint refund;\n        for (uint i = 0; i < length; i++) {\n            Bid storage bid = bids[msg.sender][i];\n            (uint value, bool fake, bytes32 secret) =\n                    (_values[i], _fake[i], _secret[i]);\n            if (bid.blindedBid != keccak256(value, fake, secret)) {\n                // Bid was not actually revealed.\n                // Do not refund deposit.\n                continue;\n            }\n            refund += bid.deposit;\n            if (!fake && bid.deposit >= value) {\n                if (placeBid(msg.sender, value))\n                    refund -= value;\n            }\n            // Make it impossible for the sender to re-claim\n            // the same deposit.\n            bid.blindedBid = bytes32(0);\n        }\n        msg.sender.transfer(refund);\n    }\n\n    // This is an \"internal\" function which means that it\n    // can only be called from the contract itself (or from\n    // derived contracts).\n    function placeBid(address bidder, uint value) internal\n            returns (bool success)\n    {\n        if (value <= highestBid) {\n            return false;\n        }\n        if (highestBidder != 0) {\n            // Refund the previously highest bidder.\n            pendingReturns[highestBidder] += highestBid;\n        }\n        highestBid = value;\n        highestBidder = bidder;\n        return true;\n    }\n\n    /// Withdraw a bid that was overbid.\n    function withdraw() public {\n        uint amount = pendingReturns[msg.sender];\n        if (amount > 0) {\n            // It is important to set this to zero because the recipient\n            // can call this function again as part of the receiving call\n            // before `transfer` returns (see the remark above about\n            // conditions -> effects -> interaction).\n            pendingReturns[msg.sender] = 0;\n\n            msg.sender.transfer(amount);\n        }\n    }\n\n    /// End the auction and send the highest bid\n    /// to the beneficiary.\n    function auctionEnd()\n        public\n        onlyAfter(revealEnd)\n    {\n        require(!ended);\n        emit AuctionEnded(highestBidder, highestBid);\n        ended = true;\n        beneficiary.transfer(highestBid);\n    }\n}"
  },
  {
    "path": "contracts/fpblind/prf.v",
    "content": "(*Add Rec LoadPath \"../../cclib\" as DeepSpec.cclib.\nAdd Rec LoadPath \"../../lib\" as DeepSpec.lib.\nAdd Rec LoadPath \"../../core\" as DeepSpec.core.\nAdd Rec LoadPath \"../../backend\" as DeepSpec.backend.*)\n\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.LayerBLINDAUCTION.\nRequire Import lib.Monad.StateMonadOption.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import ZArith.\nRequire Import core.HyperTypeInst. \n(* for `hashvalue`, maybe should move that to some different file. *)\nRequire Import backend.MachineModel.\n\n\nSection WithMem. (* This seems ugly, \n        it would be better to structure the compiler so we didn't \n        need a MemoryModelOps here? *)\nImport core.MemoryModel.\n(* Context {HmemOps: MemoryModelOps mem}.*)\n\nExisting Instance GlobalLayerSpec.\n\nDefinition player_addr := int256.\nDefinition wei := Z.          (* for payments and balances. *)\nDefinition blocknumber := int256.\n\nRecord state : Type := {\n contract_state : global_abstract_data_type;\n player_transfers : list (player_addr * wei); (* others' transfer to contract *)\n}.\n\n(* For a given block, we know what the state of the contract was in the previous block,\n   and we can call methods on the contract (in some state which we don't know exactly.\n   It's possible to make a transaction of several calls that operate atomicall (this can\n   be done by uploading a temporary contract.\n   One thing that's currently not modelled is how to deal with multiple addresses under\n   the control of a single principal, we should probably modify this to have a \n   \"controlled by\" relation. *)\nDefinition strategy : Type :=\n  forall (prev_block: state)\n         (n : blocknumber)\n         (A:Type)\n         (bid : wei -> hashvalue -> osT A unit)\n         (reveal : wei -> int256 -> hashvalue -> osT A unit)\n         (withdraw : wei -> osT A unit)\n         (auctionEnd : wei -> osT A unit),\n   osT A unit.\n\n(* The entire proof is done with respect to a fixed finite set of players, who each\n   have a private opinion about how much the item is worth. \n   We also give each player a nonce and an amount of capital to use when interacting\n   with the contract; the exact values of these will not affect the correctness. *)\nContext (players : list player_addr).\nRecord player : Type := mk_Player \n  { valuation: int256; secret: hashvalue; capital_proof: wei}.\nContext (player_info : player_addr -> player).\n\n(* The strategy of all players; in practice we will only call it on addresses in `players`. *)\nDefinition strategy_tuple := player_addr -> strategy.\n\nInstance MosT_osT_state : Monad (osT state) := MosT state.\nInstance MonadState_osT_state :MonadState state (osT state) := MonadState_osT state.\nInstance MonadZero_osT_state : MonadZero (osT state) := MonadZero_osT state.\n\nSection step.\n  (* These are the parameters which are constant for the entire \n     execution. *)\n  Context (strategies : strategy_tuple)\n          (initial_balances : player_addr -> Z)\n          (contract_address : int256).\n  \n\n  (* The amount that is transferred from the auction contract\n     to the player p. *)\n  Definition outgoing_transfers (p : player_addr)\n                                (ts: list Transfer) :=\n    List.fold_left (fun z t =>\n                      if Int256.eq (_to t) p\n                      then (Int256.intval (_amount t) + z)%Z\n                      else z)\n                   ts 0%Z.\n\n  (* The amount that is transferred from player p to the auction contract. *)\n  Definition incoming_transfers (p : player_addr)\n                                (ts: list (player_addr * wei)) :=\n    List.fold_left (fun z t =>\n                      if Int256.eq (fst t) p\n                      then ((snd t) + z)%Z\n                      else z)\n                   ts 0%Z.\n\n  Definition current_balances (incoming : list (player_addr * wei))\n                              (outgoing : list Transfer)\n                              (p : player_addr) : int256 :=\n    Int256.repr (initial_balances p\n                 - incoming_transfers p incoming\n                 + outgoing_transfers p outgoing).\n\n  Section mstep.\n  (* These are the parameters which are constant within a given block. *)\n  Context (coinbase : int256)\n          (timestamp : int256)\n          (number : blocknumber)\n          (blockhash : int256 -> int256)\n          (prev_contract_state : state).\n\n  Definition make_machine_env (addr : int256)\n                              (callvalue : wei)\n                              (incoming : list (player_addr * wei))\n                              (outgoing : list Transfer)\n       : machine_env GetHighData                             \n    := {| me_address := contract_address;\n          me_origin := addr;\n          me_caller := addr;\n          me_callvalue := Int256.repr (callvalue);\n          me_coinbase := coinbase;\n          me_timestamp := timestamp;\n          me_number := number;\n          me_balance := current_balances incoming outgoing;\n          me_blockhash := blockhash;\n          me_transfer _ _ _ _ _ := False;\n          me_callmethod _ _ _ _ _ _ _ _ _ _ := False;\n          me_log _ _ d := d\n       |}.\n\n  Print machine_env.\n\n  (* \"lifting\" the semantics of a method to act on the the entire \n     world state. \n     Perhaps this could be better done by using some monad combinators.\n   *)\n\n  Require Import lib.Monad.RunStateTInv.\n  Import lib.Monad.Monad.MonadNotation.\n  \n  Require Import List.\n\n  Definition lif {A:Type}\n                 (addr : player_addr)\n                 (callvalue : wei) \n                 (cmd : machine_env GetHighData -> osT global_abstract_data_type A)\n    : osT state A :=\n    st  <- get;;\n    let incoming' := (addr, callvalue) :: (player_transfers st) in\n    let me := make_machine_env addr callvalue incoming' (_events (contract_state st)) in \n    match runStateT (cmd me) (contract_state st) with\n    | None => mzero\n    | Some (v, st') => put (Build_state st' incoming');; ret v\n    end.\n\n  Definition lifted_init :=\n    fun (p_addr: player_addr) (w: wei) (bt rt: int256) => lif p_addr w \n      (BlindAuction_initialize_opt bt rt).\n\n  Lemma lif_inv : forall A addr callvalue (cmd : machine_env GetHighData -> osT global_abstract_data_type A)\n                                             st v st',\n      runStateT (lif addr callvalue cmd) st = Some (v, st') ->\n      exists cst',\n       let incoming' := (addr, callvalue) :: (player_transfers st) in\n       let me := make_machine_env addr callvalue incoming' (_events (contract_state st)) in\n       runStateT (cmd me) (contract_state st) = Some (v, cst')\n       /\\ st' = (Build_state cst' incoming').\n  Proof.\n    unfold lif.\n    intros.\n    inv_runStateT; subst.\n    destruct (runStateT\n             (cmd\n                (make_machine_env addr callvalue\n                   ((addr, callvalue) :: player_transfers m)\n                   (_events (contract_state m)))) (contract_state m));\n      [ | simpl in *; congruence].\n    destruct p.\n    inv_runStateT.\n    subst.\n    eexists; split; reflexivity.\n  Qed.\n  \n  (* How the state of the system changes in a single method call made by player p. *)\n  Definition mstep p (st st' : state) : Prop := \n    exists retval,\n      runStateT ((strategies p prev_contract_state number state\n                             (fun w hv => lif p w (BlindAuction_bid_opt hv))\n                             (fun w v hv => lif p w (BlindAuction_reveal_opt v hv))\n                             (fun w => lif p w BlindAuction_withdraw_opt)\n                             (fun w => lif p w BlindAuction_auctionEnd_opt))\n                         : osT state unit) st\n      = Some (retval, st').\n\n  (* We can compute a new block by letting the players call the contract \n     in some arbitrary order. *)\n  Inductive multi_mstep : state -> state -> Prop := \n  | multi_mstep_reflexive : forall (st : state), multi_mstep st st\n  | multi_mstep_transitive : forall (st st' st'' : state) p,\n      In p players ->\n      multi_mstep st st' -> mstep p st' st'' -> multi_mstep st st''.\n\n\n  (* A block is sufficiently synchronous if every player got a chance to submit a \n     transaction to to. *)\n  (* TODO, I think this definition is fine for now, but it seems little too clever,\n     should probably re-state this using some straightforward tracking of the states\n     we pass through. *)\n  Definition multi_mstep_synchronous st1 st2 :=\n    forall p, In p players ->\n              exists st st',\n                multi_mstep st1 st /\\ mstep p st st' /\\ multi_mstep st' st2.\n\n  (* Here are a bunch of induction principles inspired by linear temporal logic. *)\n\n  (* Prove that some property P holds \"globally\", i.e. for each state along a \n     path.\n     You can also specify a property Pprev which is known to hold for the\n     prev_contract_state. If not needed, it can just be True.\n *)\n  Lemma multi_mstep_Global_ind : forall (Pprev P : state -> Prop),\n      (forall p st st', Pprev prev_contract_state -> P st -> In p players -> mstep p st st' -> P st') ->\n       Pprev prev_contract_state -> forall st st', P st -> multi_mstep st st' -> P st'.\n  Proof.\n    induction 4; eauto.\n  Qed.\n\n  (*\n  (* Prove that P holds \"until\" Q  along a path. \n     \"Until\" is a liveness assertion, so we need the synchronicity assumption. *)\n  Lemma multi_mstep_Until_ind : forall (Pprev P Q : state -> Prop),\n      (forall p st st', Pprev prev_contract_state -> P st -> In p players\n                        -> mstep p st st' -> (P st' \\/ Q st')) ->\n                        Pprev prev_contract_state ->\n                        forall st,\n                          P st -> exists st',  multi_mstep st st' -> (P st' \\/ Q st').\n  Proof.\n    induction 4; eauto *)\n\n  End mstep.\n\n  \n  Definition Int256_incr x := Int256.add x Int256.one.\n  \n  Inductive bstep (n : blocknumber) : state -> state -> Prop :=\n  | bstep_step : forall coinbase timestamp blockhash st st',\n      multi_mstep coinbase timestamp n blockhash st st st' ->\n      bstep n st st'.\n\n  Inductive multi_bstep : blocknumber -> state -> blocknumber -> state -> Prop := \n  | multi_bstep_reflexive : forall n (st : state), multi_bstep n st n st\n  | multi_bstep_transitive : forall n n'  (st st' st'' : state),\n    multi_bstep n st n' st' -> bstep (Int256_incr n') st' st'' -> multi_bstep n st (Int256_incr n') st''.\n  \n  (* multi_bstep is the step relation without any synchronicity assumption.\n     This is sufficient to prove some safety properties, but for most interesting \n     theorems we instead need to use this synchronous version: *)\n\n  Inductive bstep_synch (n : blocknumber) : state -> state -> Prop :=\n  | bstep_synch_step : forall coinbase timestamp blockhash st st',\n      multi_mstep_synchronous coinbase timestamp n blockhash st st st' ->\n      bstep_synch n st st'.\n\n  Inductive multi_bstep_synch : blocknumber -> state -> blocknumber -> state -> Prop := \n  | multi_bstep_synch_reflexive : forall n (st : state), multi_bstep_synch n st n st\n  | multi_bstep_synch_transitive : forall n n'  (st st' st'' : state),\n    multi_bstep_synch n st n' st' -> bstep_synch (Int256_incr n') st' st'' -> multi_bstep_synch n st (Int256_incr n') st''.\n\n  Lemma multi_bstep_Global_ind : forall (P : state -> Prop),\n      (forall coinbase timestamp number blockhash prev_block p st st',\n          P prev_block\n          -> P st\n          -> In p players\n          -> mstep coinbase timestamp number blockhash prev_block p st st'\n          -> P st')\n      -> forall n st n' st',\n        P st -> multi_bstep n st n' st' -> P st'.\n  Proof.\n    induction 3.\n    - auto.\n    - inversion H2; subst.\n      eapply multi_mstep_Global_ind with (st:=st') (prev_contract_state := st').\n      + intros.\n        refine (H _ _ _ _ _ _ _ _ _ _ _ H7); auto.\n      + apply IHmulti_bstep; assumption.\n      + apply IHmulti_bstep; assumption.\n      + exact H3.\n  Qed.\nEnd step.\n\nSection Transactions.\n  Context (p: player_addr) (st: state).\n\n  Definition player_outgoing : Z :=\n    outgoing_transfers p (_events (contract_state st)).\n\n  Definition player_incoming : Z :=\n    incoming_transfers p (player_transfers st).\n\n  (* negative if player payed others, positive if received more *)\n  Definition net_gain : int256 := \n    Int256.repr (\n      player_outgoing - \n      player_incoming).\nEnd Transactions.\n\nDefinition is_where_player_won (p: player_addr) (o: state) : bool :=\n  Int256.eq p (_highestBidder (contract_state o)).\n\nDefinition outcome_spec (p : player_addr) (st : state) : Prop :=\n  (is_where_player_won p st = true -> \n    (Int256.intval (valuation (player_info p)) + Int256.intval (net_gain p st) = 0)%Z)\n  /\\\n  (is_where_player_won p st = false -> \n    (Int256.intval (net_gain p st) = 0)%Z).\n\n(* what we wish to show is to first provide the mechanics of the game, then prove the \n   following `main lemma`:\n   \"if the user follows that strategy (this specification of his behavior)\n   , then he either wins and pays at most that value,\n   or he gets money back\".\n   Then we define a comparison function for states, saying which states the user\n   prefers, i.e., defining the utility function for each player, thus proving that\n   the strategy we chose lead to the set of outcomes that is weakly dominating.\n*)\n\nDefinition gt := fun (a : int256) (b : int256) => \n                  match (Int256.ltu a b) with\n                  | true => false\n                  | false => true\n                  end.\n\nDefinition keccak : hashvalue -> hashvalue -> hashvalue := hashval_hash2.\n\n(* The phases of the contract *)\nDefinition is_bidding_phase (n : blocknumber) (b: state) :=\n  Int256.lt n (_biddingEnd b.(contract_state)).\n\nDefinition already_bidded (p: player_addr) (b: state) := \n  match Int256Tree.get p (_bids b.(contract_state)) \n  with\n  | None => false\n  | Some _ => true\n  end.\n\nDefinition is_reveal_phase (n:blocknumber) (b: state) :=\n  andb\n    (Int256.lt n (_revealEnd b.(contract_state)))\n    (gt n (_biddingEnd b.(contract_state))).\n\nDefinition is_auction_finished_phase (n : blocknumber) (b: state) :=\n  (gt n (_revealEnd b.(contract_state))).\n\n(* prove the safety of this contract, i.e. prove that the benificiary always get payed *)\n(* we need an assumption that `capital_proof > p.(valuation)` *)\nDefinition bid_own_valuation (p : player_addr) : strategy := \n  (fun (prev_block : state)\n       (n : blocknumber)\n       (A : Type)\n       (bid : wei -> hashvalue -> osT A unit)\n       (reveal : wei -> int256 -> hashvalue -> osT A unit)\n       (withdraw : wei -> osT A unit)\n       (auctionEnd : wei -> osT A unit) =>  \n  if andb (is_bidding_phase n prev_block) (negb (already_bidded p prev_block))\n  then\n    bid (player_info p).(capital_proof)\n        (keccak (hashval_int256 (player_info p).(valuation)) (player_info p).(secret))\n  else if is_reveal_phase n prev_block\n  then\n    reveal 0%Z (player_info p).(valuation) (player_info p).(secret)\n  else if is_auction_finished_phase n prev_block\n  then\n    withdraw 0%Z\n  else\n    ret tt).\n\n(* The equilibrium strategy tuple. We will prove that this is a Nash equilibrium. *)\nDefinition ess : strategy_tuple :=\n  fun p => bid_own_valuation p.\n\nDefinition sufficient_capital_proof (p: player) : Prop := \n  eq_true (gt (Int256.repr p.(capital_proof)) p.(valuation)).\n\nDefinition bounded_valuation (p: player) : Prop := \n  Z.lt 0%Z (Int256.intval p.(valuation)) /\\ \n  Z.lt (Int256.intval p.(valuation)) Int256.max_signed.\n\n\n(* The idea is to say for any player, if the contract starts at the initial state,\n   then operate according to the `multi-bstep` relation, then in the final state, \n   which is when the auction is over, the list generated by the `transfer` must give\n   an outcome that satisfy a predicate \"player wins and pay at most value, or get \n   money back\" \n*)\n\nTransparent BlindAuction_initialize_opt\n            BlindAuction_transferb_opt\n            BlindAuction_reveal_opt\n            BlindAuction_bid_opt\n            BlindAuction_withdraw_opt\n            BlindAuction_auctionEnd_opt\n\n            builtin0_address_impl builtin0_origin_impl builtin0_caller_impl builtin0_callvalue_impl builtin0_coinbase_impl builtin0_timestamp_impl builtin0_number_impl builtin1_balance_impl  builtin1_blockhash_impl.\n\n\n\nSection outcome_proof.\n  Context (* (strategies : strategy_tuple) *)\n          (initial_balances : player_addr -> Z)\n          (contract_address : int256).\n\n  Context (init_bt init_rt : int256)\n          (init_coinbase : int256)\n          (init_timestamp : int256)\n          (init_number : int256)\n          (init_blockhash : int256 -> int256)\n          (pre_init_state init_state : state).\n \n\n  Definition contract_owner_addr : player_addr := Int256.zero.\n  Definition contract_init_price : wei := 0%Z.\n  Definition outcome := state.\n  \n  Definition initial_state :=\n     {|\n    contract_state := {|\n                      _beneficiary := contract_owner_addr;\n                      _biddingEnd := Int256.add init_number init_bt;\n                      _revealEnd := Int256.add (Int256.add init_number init_bt)\n                                      init_rt;\n                      _ended := false;\n                      _bids := Maps.Int256Tree.empty Bid;\n                      _highestBidder := contract_owner_addr;\n                      _highestBid := Int256.repr 0;\n                      _secondBid := Int256.repr 0;\n                      _revealed := Maps.Int256Tree.set contract_owner_addr true\n                                     (Maps.Int256Tree.empty bool);\n                      _amountOf := Maps.Int256Tree.empty int256;\n                      _events := nil |};\n    player_transfers := (contract_owner_addr, 0%Z) :: nil |}.\n\n  (* We note that the above is indeed the state produced by the contract constructor. *)\n  Remark inital_state_correct :\n    runStateT (lifted_init \n                 initial_balances \n                 contract_address \n                 init_coinbase init_timestamp init_number init_blockhash \n                 contract_owner_addr contract_init_price init_bt init_rt)\n              (Build_state init_global_abstract_data nil)\n    = Some (tt, initial_state).\n  Proof.\n    reflexivity.\n  Qed.  \n\n  Require Import lib.Monad.RunStateTInv.\n  Import lib.Monad.Monad.MonadNotation.\n  \n  Ltac inv_ess :=\n    repeat match goal with\n           | [H : runStateT (if ?b then _ else _) _ = Some _ |- _] => destruct b eqn:?\n           | [H : runStateT (lif _ _ _ _ _ _ _ _ ?cmd) _ = Some (_, _) |- _] =>\n             apply lif_inv in H; destruct H as [? [? ?]]\n           end.\n\n  Require Import MonadState.\n\n  \n  (* We reason entirely in terms of monad lemmas. *)\n  Opaque bind ret get gets put modify guard mzero.\n  Transparent  BlindAuction_bid_opt BlindAuction_reveal_opt EVMOpcode_transfer_opt BlindAuction_withdraw_opt.\n  \n  (* Functional correctness proofs. *)\n  Definition No_extra_bids (st : state) : Prop :=\n    forall p, ~ In p players ->\n              Int256Tree.get p st.(contract_state).(_bids) = None.\n\n  Lemma no_extra_bids : forall n o, \n      multi_bstep ess initial_balances contract_address init_number initial_state n o ->\n      No_extra_bids o.\n  Proof.\n    assert (No_extra_bid_initial : No_extra_bids initial_state).\n    {\n      unfold No_extra_bids, initial_state; simpl.\n      intros; rewrite Int256Tree.gempty; reflexivity.\n    }\n    intros; eapply multi_bstep_Global_ind with (strategies:=ess).\n    - intros coinbase timestamp number blockhash prev_bloc p st st' IHprev IHst Hin Hmstep.\n      inversion Hmstep as [retval Hrun]; clear Hmstep.\n      unfold No_extra_bids.\n      intros p' Hnot_in.\n      destruct (Int256.eq_dec p p') as [Heq | Hneq]; [subst; contradiction |].      \n      unfold ess, bid_own_valuation in Hrun.\n      inv_ess.\n      + (* bid method. *)\n        unfold BlindAuction_bid_opt, EVMOpcode_transfer_opt in *.\n        simpl in H0.\n        inv_runStateT_branching.\n        {\n          subst. simpl.\n          rewrite Int256Tree.gso by congruence.\n          rewrite Int256Tree.gso by congruence.\n          apply IHst.\n          auto.\n        }\n        {\n          subst. simpl.\n          rewrite Int256Tree.gso by congruence.            \n          apply IHst.\n          auto.\n        }\n      + (* reveal method *)\n        unfold BlindAuction_reveal_opt in H0.\n        simpl in H0.\n        inv_runStateT_branching.\n        {\n          subst. simpl.\n          apply IHst; auto.\n        }\n        { subst. simpl.\n          apply IHst; auto. }\n        { subst. simpl.\n          apply IHst; auto. } \n        { subst. simpl.\n          apply IHst; auto. }\n        { subst. simpl.\n          apply IHst; auto. }\n     +  unfold BlindAuction_withdraw_opt, EVMOpcode_transfer_opt in H0.\n        simpl in H0.\n        inv_runStateT_branching.\n        subst. simpl.\n        apply IHst; auto.\n     + (*  some left-over thing from the the inv_ess... *)\n       inv_runStateT.\n       subst.\n       apply IHst; auto.\n    - exact No_extra_bid_initial.\n    - eassumption.\n  Qed.\n  \n  Definition has_placed_bid (p : player_addr) (st : state) : Prop :=\n    Int256Tree.get p st.(contract_state).(_bids)\n    = Some {| _blindedBid := (keccak (hashval_int256 (valuation (player_info p)))\n                                     (secret (player_info p)));\n              _deposit := Int256.repr (capital_proof (player_info p)) |}.\n\n          Require Import lib.ArithInv.\n  \n  Lemma has_placed_bid_preserved : forall p n_i i n_o o,\n      has_placed_bid p i ->\n      multi_bstep ess initial_balances contract_address n_i i n_o o ->\n      has_placed_bid p o.\n  Proof.     \n    intros; eapply multi_bstep_Global_ind with (strategies:=ess).\n    - intros coinbase timestamp number blockhash prev_bloc p0 st st' IHprev IHst Hin Hmstep.\n      inversion Hmstep as [retval Hrun]; clear Hmstep.\n      unfold ess, bid_own_valuation in Hrun.\n      inv_ess.\n      + (* bid method. *)\n        destruct (Int256.eq_dec p p0).\n        * (* a method call by player p. *)\n          unfold BlindAuction_bid_opt, EVMOpcode_transfer_opt in *.\n          simpl in H1.\n          inv_runStateT_branching.\n          {\n            (* The case where we place a bid. *)\n            subst. simpl.\n            unfold has_placed_bid.\n            simpl.\n            (* p is placing a bid, so _bids[p] has the right value. *)\n            subst.\n            rewrite Int256Tree.gss.\n            rewrite Int256Tree_Properties.get_default_ss.\n            reflexivity.\n          }\n          {\n            (* The already_bidded test was false, which contradicts our IH. *)\n            subst. simpl.\n            inv_arith.\n            contradict H2.\n            unfold already_bidded.\n            rewrite IHprev.\n            discriminate.\n          }\n        * (* a method call by some other player p0. *)\n          unfold BlindAuction_bid_opt, EVMOpcode_transfer_opt in *.\n          simpl in H1.\n          inv_runStateT_branching;\n            subst;\n            unfold has_placed_bid; simpl;\n            rewrite !Int256Tree.gso by congruence;\n            apply IHst.\n      + (* reveal method *)\n        unfold BlindAuction_reveal_opt in H1.\n        simpl in H1.\n        inv_runStateT_branching;\n          subst; simpl; apply IHst.\n      + (* withdraw method. *)\n        unfold BlindAuction_withdraw_opt, EVMOpcode_transfer_opt in H1.\n        simpl in H1.\n        inv_runStateT_branching;\n          subst; simpl; apply IHst.\n      + (*  some left-over thing from the the inv_ess... *)\n        inv_runStateT.\n        subst.\n        apply IHst; auto.\n    - eassumption.\n    - eassumption.\n  Qed. \n\n\n(***********************************************************************\n  Work in progress, the rest of the file does not compile from here on.\n ***********************************************************************)  \n\n  Lemma has_placed_bid_phase1 :\n   multi_mstep_synchronous ess inital_balances constract_address \n    \n  \nLemma has_placed_bid_preserved : forall p n_i i n_o o,\n      has_placed_bid p i ->\n      multi_bstep ess initial_balances contract_address n_i i n_o o ->\n      has_placed_bid p o.\n  \n  \n(* Proof of Nash equilibrium *)\n\n  \n  Definition outcome_from_strategies (o: outcome) (stg: strategy_tuple)\n    :=\n      exists n, \n      multi_bstep stg initial_balances contract_address init_number initial_state n o\n      /\\ is_true (is_auction_finished_phase n o).\n    \n  Definition use_stg (p: player) (s: player -> strategy) \n    (ss: strategy_tuple): Prop :=\n      ss p.(addr) = s p.\n\n  Definition sound_player (p: player): Prop :=\n    sufficient_capital_proof p /\\ bounded_valuation p.\n\n  (* say which state the player prefers, ordinal *)\n  Definition selfish_greedy_utility (p : player) (o: outcome) : Z := \n    (* if outcome is p get object, then payoff is p.(valuation) - final_price *)\n    if Int256.eq (addr p) (_highestBidder (contract_state o)) then\n      Int256.intval p.(valuation) + Int256.intval (net_gain p o)\n    (* if outcome is p not getting object, then payoff is zero *)\n    else\n      (* since we already prove refund_failed_bidders, no \n         need for additional substraction of net_gain *)\n      0%Z.\n\n  (* lemma refund_failed_bidders: saying that failed people get their money back *)\n  (* fold both incoming and outcoming lists, assert both directions p have \n      same amount transferred *)\n\n  Require Import DeepSpec.lib.Monad.RunStateTInv.\n\n  (* prove this for bid_own_valuation only *)\n  (* mstep with the runStateT, say that the state when we call bid, P st, then mstep st st;\n      P2 st', and st' satisfy p2 for runStateT *)\n  Lemma refund_failed_bidders : forall p o ss,\n      sound_player p -> \n      use_stg p bid_own_valuation ss ->\n      outcome_from_strategies o ss -> \n      is_where_player_won p o = false -> \n      player_outgoing p o = player_incoming p o.\n  Proof.\n    intros.\n    Print is_where_player_won.\n    Print outcome_from_strategies.\n    unfold outcome_from_strategies in  H1.\n    Print inv_runStateT.\n    (************************************************************************************************)\n    (* decompose the functions to individual prepost by runStateT, specialize for theorems to prove *)\n    (************************************************************************************************)\n    Admitted.\n\n  (* lemma consume_succ_bidders: saying that succed people never get refunded *)\n  (* fold on outcoming_list of transactions, assert there is none to p *)\n  Lemma consume_succ_bidder_money : forall p o ss,\n      sound_player p -> \n      outcome_from_strategies o ss -> \n      is_where_player_won p o = true -> \n      player_outgoing p o = 0%Z.\n  Proof.\n    intros.\n    Admitted.\n\n    Lemma bid_own_valuation_win_case:\n      forall (o: outcome) (p: player) (ss: strategy_tuple),\n      use_stg p bid_own_valuation ss ->\n      outcome_from_strategies o ss ->\n      is_true (is_where_player_won p o) -> \n      (Int256.intval (_highestBid o.(contract_state))) = Int256.intval (valuation p).\n    Proof.\n      intros.\n      Admitted.\n\n  (* destruct outcome_spec *)\n    (* p fails: refund_failed_bidders, unfold net_gain definition, \n        net_gain = 0 *)\n    (* p succ: consume_succ_bidder_money, with bid_own_valuation, \n        he wins, and get no money back, net_gain = -valuation *)\n  Lemma bid_own_valuation_outcome (p: player) (o : outcome) (ss: strategy_tuple): \n      sound_player p -> \n      use_stg p bid_own_valuation ss ->\n      outcome_from_strategies o ss -> \n      outcome_spec p o.\n  Proof.\n  intros.\n  unfold use_stg in H0.\n  unfold outcome_spec.\n  split;\n  intros;\n  unfold net_gain.\n  (* p wins *)\n  + pose (OZ:=consume_succ_bidder_money p o ss H H1 H2); clearbody OZ.\n    rewrite -> OZ.\n    simpl.\n    (* prove that with H0, o will only have player_incoming being valuation of p *)\n    admit.\n  (* p does not win *)\n  + pose (OZ:=refund_failed_bidders p o ss H H0 H1 H2); clearbody OZ.\n    rewrite -> OZ.\n    assert (ZL:forall f, Z.eq (f - f) 0%Z).\n    - intros. exact (Z.sub_diag f).\n    - pose (Z:=ZL (player_incoming p o)); clearbody Z.\n      rewrite -> Z. constructor.\n  Admitted.\n  \n  (* just apply selfish_utility to bid_own_valuation_outcome *)\n  (* lemma never_overpays: following stg, p's utility = 0 *)\n    (* p fails: utility = 0 *)\n    (* p succ: consume_succ_bidder_money, with bid_own_valuation, then \n        utility = valuation + net_gain = 0 *)\n  Lemma bid_own_valuation_never_overpays: forall p o ss,\n      sound_player p -> \n      use_stg p bid_own_valuation ss ->\n      (* strategies p.(addr) = bid_own_valuation p ->  *)\n      outcome_from_strategies o ss -> \n      (0 = (selfish_greedy_utility p o))%Z.\n  Proof.\n    intros.\n    unfold selfish_greedy_utility.\n    pose (OT:=bid_own_valuation_outcome p o ss H H0 H1); clearbody OT.\n    unfold outcome_spec in OT.\n    destruct OT.\n    destruct (is_where_player_won p o) eqn:?;\n    unfold is_where_player_won in Heqb;\n    rewrite -> Heqb. \n    + pose (H4:=H2 eq_refl); clearbody H4.\n      rewrite -> H4.\n      constructor.\n    + compute.\n      constructor.\n  Qed.\n\n  Section equilibrium_proof.\n\n    Print outcome_from_strategies.\n    (* non-determinism of states, included in bstep, assumed miner fairness *)\n    (* Lemma: all non-deterministic outcomes by bstep have same payoff *)\n\n    Definition weakly_dominant (stg: player -> strategy) (p: player)\n                               (utility_func: player -> outcome -> Z) :=\n      forall (o o': outcome) (ss ss': strategy_tuple) (p': player),\n        p' <> p ->\n        ss p'.(addr) = ss' p'.(addr) -> \n        use_stg p stg ss' -> \n        outcome_from_strategies o ss -> \n        outcome_from_strategies o' ss' ->\n        ((utility_func p o) <= (utility_func p o'))%Z.\n\n    Check fun o => (_bids (contract_state o)).\n\n    (* since the bid amounts are hashed, we essentially cannot tell how much\n        other people bidded easily *)\n\n    Definition gmapv {A} (p: player) (b: state) \n      (fd: global_abstract_data_type -> Maps.Int256Tree.t A) := \n      Maps.Int256Tree.get p.(addr) (fd b.(contract_state)).\n\n    (* Print keccak.\n\n    (* Define the reverse hash function, just to make expressing bid\n        values easier *)\n    Definition keccak_i := (fun a b : hashvalue => hashval_hash2 a b) :\n      hashvalue -> hashvalue -> hashvalue.\n\n    Axiom inverse_func_keccak : forall a b, keccak_i (keccak a b)\n\n    Definition keccak_r (bid_hashed p o).(_blindedBid) secret\n\n    Definition  keccak value secret = (bid_hashed p o).(_blindedBid). *)\n\n    (* prove that at one point inside o',\n              some other player put a bid, then we use the syncronicity assumption \n              on the assumption of o plus the assumption about bids being blind to \n              show that the same player also put a bid in the execution leading to o, \n              and then we have some \"lemma\" saying that with that bid being there, \n              that player will either win or we will pay to much.\n              prove that the only way to win in this scenario is overpay!\n              - \"if a player places a bid such that ... then the outcome will be \n              ...\" (a bid_outcome lemma, no strategies involved) *)\n\n    (* bid is blind, so that your new bid will not affect other player's bids \n        for every player playing according to a certain strategy, even if \n        everybody else's strategy changed, he will always perform the same\n        kind of action (function calls), his call to bid_function will be same *)\n    Definition blind_bids (p p': player) (o o': outcome) (ss ss': strategy_tuple)\n        (s s': player -> strategy)\n      :=\n      p <> p' ->\n      ss p'.(addr) = ss' p'.(addr) -> \n      use_stg p s' ss' -> \n      use_stg p s ss -> \n      outcome_from_strategies o ss -> \n      outcome_from_strategies o' ss' ->\n      gmapv p' o _trueBids = gmapv p' o' _trueBids /\\\n      gmapv p' o _secrets = gmapv p' o' _secrets /\\ \n      gmapv p' o _bids = gmapv p' o' _bids.\n\n    Definition bid_amount := fun p o => match gmapv p o _trueBids with \n      | Some (v) => v\n      | None => Int256.zero\n      end.\n\n    (* given an outcome where player p wins, we extract the winning bid *)\n    (* a bid function call b' on state, defined using mstep *)\n    (* Definition exists_winning_bid: is_where_player_won p o ->  . *)\n    (* predicate on state *)\n\n\n    (* If you won, it would be because you paid more than others *)\n    Lemma bidding_pv_functional_win:\n      forall (o: outcome) (p p': player) (ss: strategy_tuple),\n      p <> p' ->\n      use_stg p bid_own_valuation ss ->\n      outcome_from_strategies o ss ->\n      is_true (is_where_player_won p o) -> \n      Z.ge\n        (Int256.intval (bid_amount p o))\n        (Int256.intval (bid_amount p' o)).\n    Proof.\n      intros.\n    Admitted.\n\n    Lemma bidding_pv_functional_lose:\n      forall (o: outcome) (p: player) (ss: strategy_tuple),\n      use_stg p bid_own_valuation ss ->\n      outcome_from_strategies o ss ->\n      not (is_true (is_where_player_won p o)) -> \n      exists (p': player),\n      p <> p' ->\n      Z.ge\n      (Int256.intval (bid_amount p' o))\n      (Int256.intval (bid_amount p o)).\n    Proof.\n      intros.\n    Admitted.\n\n    (* prove that if given exists_winning_bid b' p', the only way to win the \n        auction for player p <> p' is to place bid b >= b' *)\n    Lemma winning_bid_monotonicity: \n      forall \n        (o o': outcome) \n        (p p': player) \n        (ss ss': strategy_tuple)\n        (s': player -> strategy), \n      p <> p' ->\n      ss p'.(addr) = ss' p'.(addr) -> \n      use_stg p s' ss' -> \n      use_stg p bid_own_valuation ss -> \n      outcome_from_strategies o ss -> \n      outcome_from_strategies o' ss' ->\n      bid_amount p' o = bid_amount p' o' ->\n      is_true (is_where_player_won p o) -> \n      is_true (is_where_player_won p o') -> \n      blind_bids p p' o o' ss ss' bid_own_valuation s' ->\n      Z.ge\n      (Int256.intval (_highestBid o'.(contract_state)))\n      (Int256.intval (_highestBid o.(contract_state))).\n    Proof.\n      intros.\n      unfold is_where_player_won in H.\n      pose (HB:=(bid_own_valuation_win_case o p ss H2 H3 H6)); clearbody HB.\n      rewrite -> HB.\n      unfold blind_bids in H8.\n      pose (HBD:=(H8 H H0 H1 H2 H3 H4)); clearbody HBD.\n      clear H8.\n      (* need runStateT and bidding_pv_functional and HBD, HBD is for o and o' cases, and the \n        bidding_pv_functional is for one case *)\n      (* bidding_pv_functional that in o' you bid higher than everybody *)\n      (* bidding_pv_functional that in o you bid higher than everybody *)\n      (* HBD that everybody bidded the same value *)\n      Admitted.\n\n    (* assuming player is sound, then *)\n    Theorem second_price_auction_equilibrium: forall (p: player), \n      sound_player p -> \n      weakly_dominant bid_own_valuation p selfish_greedy_utility.\n    Proof.\n      intros.\n      unfold weakly_dominant.\n      (* given another player's strategy, the corresponding outcome \n         from bid_own_valuation is better than outcome from other \n         strategies. *)\n      intros.\n      destruct (is_where_player_won p o') eqn:?;\n      unfold is_where_player_won in Heqb;\n      unfold selfish_greedy_utility;\n      rewrite -> Heqb;\n      destruct (is_where_player_won p o) eqn:?;\n      unfold is_where_player_won in Heqb0;\n      rewrite -> Heqb0.\n      (* case analysis on (o'-o) *)\n      - (* \"succ-succ\":\n          if o is success, then \n          we prove that o overpays (restrict other player's\n          behavior so we get corresponding outcomes), \n          direct apply lemma overpaied_win_given_bid *)\n        (* if p win in o and p win in o', then as p plays according to\n            bid_own_valuation, exists winning_bid p o' = p.(valuation).fa\n            and there also exists winning_bid p o, then we assert that\n            for every player p' <> p, he will have same action in o as in o',\n            \"actually this part is false, there exists strategies that \n              are better than bid_own_valuation, while also wins\"\n            so we assume blind_bids (ss p), then ??? *)\n\n        (* need winning_bid_monotonicity lemma, but that lemma cannot be proven! *)\n        admit.\n      - (* \"succ-fail\":\n          apply the outcome lemma that following stg give =0 utility,\n            then it is trivially true *)\n        pose (UZ:=bid_own_valuation_never_overpays p o' ss' H H2 H4).\n        clearbody UZ.\n        unfold selfish_greedy_utility in UZ.\n        rewrite -> Heqb in UZ.\n        left.\n        exact UZ.\n      (* we prove that for whatever\n        other strategy we could have used, we would still either lose or \n        overpay (use utility function to formulate this). *)\n      - (* \"fail-succ\":\n            we prove that the succ case will overpay, thus have negative utility.\n            apply lemma overpaied_win_given_bid\n        *)\n        (* apply overpaied_win_given_bid. *)\n        (* if p did not win in o', we must have (assume)\n            since p played according to bid_own_valuation and failed,\n            the winning_bid by pw must >= p.(valuation), and\n            exists_winning_bid pw o' o\n            for player pw <> p who won the auction in o', he had same action in o,\n            given those assumptions, if p wants to win\n            in o, he must bid more (by monotonicity lemma)\n            than pw's bid in o, which is the same \n            as pw's bid in o', which is larger than p.(valuation), which \n            causes overpay *)\n        (* since by definition in o' we have a bid pw > p.(valuation), and since \n            there is also this pw bid in o, then winning bid in o > pw, then according to\n            selfish_greedy_utility, the utility is negative, omega *)\n\n        (*  *)\n\n        admit.\n      - (* \"fail-fail\":\n          trivial, 0 leq 0 *)\n        omega.\n    Admitted.\n    \n  End equilibrium_proof.\n\nEnd outcome_proof.\n"
  },
  {
    "path": "contracts/fpblind/prf.v.crashcoqide",
    "content": "Require Import fpblind.DataTypes.\nRequire Import fpblind.DataTypeOps.\nRequire Import fpblind.LayerBLINDAUCTION.\nRequire Import lib.Monad.StateMonadOption.\nRequire Import cclib.Integers.\nRequire Import ZArith.\nRequire Import core.HyperTypeInst. \n(* for `hashvalue`, maybe should move that to some different file. *)\nRequire Import backend.MachineModel.\n\n\nSection WithMem. (* This seems ugly, \n        it would be better to structure the compiler so we didn't \n        need a MemoryModelOps here? *)\nImport core.MemoryModel.\nContext {HmemOps: MemoryModelOps mem}.\n\nDefinition player_addr := int256.\nDefinition wei := Z.          (* for payments and balances. *)\n\nRecord state : Type := {\n contract_state : global_abstract_data_type;\n player_transfers : list (player_addr * wei); (* others' transfer to contract *)\n blocknumber : int256;\n}.\n\n(* For a given block, we know what the state of the contract was in the previous block,\n   and we can call methods on the contract (in some state which we don't know exactly.\n   It's possible to make a transaction of several calls that operate atomicall (this can\n   be done by uploading a temporary contract.\n   One thing that's currently not modelled is how to deal with multiple addresses under\n   the control of a single principal, we should probably modify this to have a \n   \"controlled by\" relation. *)\nDefinition strategy : Type :=\nforall (prev_block: state)\n         (A:Type)\n         (refined_prev_block : A)\n         (bid : wei -> hashvalue -> osT A unit)\n         (reveal : wei -> int256 -> hashvalue -> osT A unit)\n         (withdraw : wei -> osT A unit)\n         (auctionEnd : wei -> osT A unit),\n   osT A unit.\n\nRecord player : Type := mk_Player \n{ addr: player_addr; valuation: int256; secret: hashvalue; capital_proof: wei}.\n\n(* The strategy of all players; in practice all but a finite number of \n   them will be the \"no nothing\" strategy `ret tt`.    \n *)\nDefinition strategy_tuple := player_addr -> strategy.\n\n\nInstance MosT_osT_state : Monad (osT state) := MosT state.\nInstance MonadState_osT_state :MonadState state (osT state) := MonadState_osT state.\nInstance MonadZero_osT_state : MonadZero (osT state) := MonadZero_osT state.\n\n\nSection step.\n  (* These are the parameters which are constant for the entire \n     execution. *)\n  Context (strategies : strategy_tuple)\n          (initial_balances : player_addr -> Z)\n          (contract_address : int256).\n  \n\n  (* The amount that is transferred from the auction contract\n     to the player p. *)\n  Definition outgoing_transfers (p : player_addr)\n                                (ts: list Transfer) :=\n    List.fold_left (fun z t =>\n                      if Int256.eq (_to t) p\n                      then (Int256.intval (_amount t) + z)%Z\n                      else z)\n                   ts 0%Z.\n\n  (* The amount that is transferred from player p to the auction contract. *)\n  Definition incoming_transfers (p : player_addr)\n                                (ts: list (player_addr * wei)) :=\n    List.fold_left (fun z t =>\n                      if Int256.eq (fst t) p\n                      then ((snd t) + z)%Z\n                      else z)\n                   ts 0%Z.\n\n  Definition current_balances (incoming : list (player_addr * wei))\n                              (outgoing : list Transfer)\n                              (p : player_addr) : int256 :=\n    Int256.repr (initial_balances p\n                 - incoming_transfers p incoming\n                 + outgoing_transfers p outgoing).\n\n  Section mstep.\n  (* These are the parameters which are constant within a given block. *)\n  Context (coinbase : int256)\n          (timestamp : int256)\n          (number : int256)\n          (blockhash : int256 -> int256)\n          (prev_contract_state : state).\n\n  Definition make_machine_env (addr : int256)\n                              (callvalue : wei)\n                              (incoming : list (player_addr * wei))\n                              (outgoing : list Transfer)\n    := {| me_address := contract_address;\n          me_origin := addr;\n          me_caller := addr;\n          me_callvalue := Int256.repr (callvalue);\n          me_coinbase := coinbase;\n          me_timestamp := timestamp;\n          me_number := number;\n          me_balance := current_balances incoming outgoing;\n          me_blockhash := blockhash;\n          me_transfer _ _ _ _ := False;\n          me_callmethod _ _ _ _ _ _ _ := False\n       |}.\n\n  Print machine_env.\n\n  (* \"lifting\" the semantics of a method to act on the the entire \n     world state. \n     Perhaps this could be better done by using some monad combinators.\n   *)\n\n  Import MonadNotation.\n  Require Import List.\n\n  Print runStateT.\n  \n  Definition lif {A:Type}\n                 (addr : player_addr)\n                 (callvalue : wei) \n                 (cmd : machine_env -> osT global_abstract_data_type A)\n    : osT state A :=\n    st  <- get;;\n    let incoming' := (addr, callvalue) :: (player_transfers st) in\n    let me := make_machine_env addr callvalue incoming' (_events (contract_state st)) in \n    match runStateT (cmd me) (contract_state st) with\n    | None => mzero\n    | Some (v, st') => put (Build_state st' incoming' (blocknumber st));; ret v\n    end.\n\n  Definition lifted_init :=\n    fun (p_addr: player_addr) (w: wei) (bt rt: int256) => lif p_addr w \n      (BlindAuction_initialize_opt bt rt).\n\n  (* How the state of the system changes in a single method call. *)\n  Inductive mstep : state -> state -> Prop :=\n  | mstep_call : forall p st retval st' rst,\n      runStateT ((strategies p prev_contract_state state rst\n                             (fun w hv => lif p w (BlindAuction_bid_opt hv))\n                             (fun w v hv => lif p w (BlindAuction_reveal_opt v hv))\n                             (fun w => lif  p w BlindAuction_withdraw_opt)\n                             (fun w => lif p w BlindAuction_auctionEnd_opt))\n                         : osT state unit) st\n      = Some (retval, st') ->\n      mstep st st'.\n\n  Print strategy.\n\n  Inductive multi_mstep : state -> state -> Prop := \n  | multi_mstep_reflexive : forall (st : state), multi_mstep st st\n  | multi_mstep_transitive : forall (st st' st'' : state), \n    mstep st st' -> multi_mstep st' st'' -> multi_mstep st st''.\n  (* | multi_mstep_synchronicity : forall (stg : strategy) (s s' a a': state),\n    multi_mstep s a /\\ mstep a a' /\\ multi_mstep a' s'. *)\n\n  End mstep.\n\n  Definition construct_incremented_state := \n  fun st => \n  (Build_state (contract_state st) (player_transfers st) \n    (Int256.add (blocknumber st) Int256.one)).\n\n  Check mstep.\n\n  Inductive bstep : state -> state -> Prop :=\n  | step_blocknumber : forall coinbase timstamp number blockhash p st st',\n      construct_incremented_state st = st' -> \n      multi_mstep coinbase timstamp number blockhash p st st' -> \n      bstep st st'.\n\n  Inductive multi_bstep : state -> state -> Prop := \n  | multi_bstep_reflexive : forall (st : state), multi_bstep st st\n  | multi_bstep_transitive : forall (st st' st'' : state), \n    bstep st st' -> multi_bstep st' st'' -> multi_bstep st st''.\n\n  Example prop1 : Prop := forall coinbase timstamp number blockhash p (st : state), \n  mstep coinbase timstamp number blockhash p st st.\n\nEnd step.\n\nSection Transactions.\n  Context (p: player) (st: state).\n\n  Definition player_outgoing : Z :=\n    outgoing_transfers p.(addr) (_events (contract_state st)).\n\n  Definition player_incoming : Z :=\n    incoming_transfers p.(addr) (player_transfers st).\n\n  (* negative if player payed others, positive if received more *)\n  Definition net_gain : int256 := \n    Int256.repr (\n      player_outgoing - \n      player_incoming).\nEnd Transactions.\n\nDefinition is_where_player_won (p: player) (o: state) : bool :=\n  Int256.eq (addr p) (_highestBidder (contract_state o)).\n\nDefinition outcome_spec (p : player) (st : state) : Prop :=\n  (is_where_player_won p st = true -> \n    (Int256.intval (valuation p) + Int256.intval (net_gain p st) = 0)%Z)\n  /\\\n  (is_where_player_won p st = false -> \n    (Int256.intval (net_gain p st) = 0)%Z).\n\n(* what we wish to show is to first provide the mechanics of the game, then prove the \n   following `main lemma`:\n   \"if the user follows that strategy (this specification of his behavior)\n   , then he either wins and pays at most that value,\n   or he gets money back\".\n   Then we define a comparison function for states, saying which states the user\n   prefers, i.e., defining the utility function for each player, thus proving that\n   the strategy we chose lead to the set of outcomes that is weakly dominating.\n*)\n\nDefinition gt := fun (a : int256) (b : int256) => \n                  match (Int256.ltu a b) with\n                  | true => false\n                  | false => true\n                  end.\n\nDefinition keccak : hashvalue -> hashvalue -> hashvalue := \n  fun (a : hashvalue) (b : hashvalue) => hashval_hash2 a b.\n\nPrint stateT. (* combine state monad (with t being return value) with \n  another monad m, in osT case m is option, and \n  t is unit, S is the type of the state, and here is an arbitrary A *)\n\n(* Temporal Predicates *)\nDefinition is_pre_initialization_phase (b: state) := \n  Int256.eq (_biddingEnd b.(contract_state)) Int256.zero.\n\nDefinition is_bidding_phase (b: state) :=\n  Int256.lt (blocknumber b) (_biddingEnd b.(contract_state)).\n\nDefinition already_bidded (p: player) (b: state) := \n  match Maps.Int256Tree.get p.(addr) (_bids b.(contract_state)) \n  with\n  | None => false\n  | Some _ => true\n  end.\n\nDefinition is_reveal_phase (b: state) :=\n  andb\n    (Int256.lt \n    (blocknumber b) \n    (_revealEnd b.(contract_state)))\n\n    (gt \n    (blocknumber b) \n    (_biddingEnd b.(contract_state))).\n\nDefinition is_auction_finished_phase (b: state) :=\n  (gt \n    (blocknumber b) \n    (_revealEnd b.(contract_state))).\n\nDefinition mtt {A: Type} (m: option (unit * A)): osT A unit := \n  match m with\n    | None => ret tt\n    | Some (v, st) => put st\n  end.\n\n(* prove the safety of this contract, i.e. prove that the benificiary always get payed *)\n(* we need an assumption that `capital_proof > p.(valuation)` *)\nDefinition bid_own_valuation (p : player) : strategy := \n(fun (prev_block : state)\n     (A : Type)\n     (refined_prev_block : A)\n     (bid : wei -> hashvalue -> osT A unit)\n     (reveal : wei -> int256 -> hashvalue -> osT A unit)\n     (withdraw : wei -> osT A unit)\n     (auctionEnd : wei -> osT A unit) =>  \n  (* pre-initialized *)\n  if is_pre_initialization_phase prev_block\n  then \n    put refined_prev_block\n  else \n  if andb \n    (is_bidding_phase prev_block)\n    (negb (already_bidded p prev_block))\n  then\n    (* runStateT (bid p.(capital_proof) \n      (keccak (hashval_int256 p.(valuation)) p.(secret))) refined_prev_block *)\n    mtt (runStateT (bid p.(capital_proof) \n      (keccak (hashval_int256 p.(valuation)) p.(secret))) refined_prev_block)\n  else\n  if \n    is_reveal_phase prev_block\n  then\n    mtt (runStateT (reveal 0%Z p.(valuation) p.(secret)) refined_prev_block)\n  else\n  if is_auction_finished_phase prev_block\n  then\n    mtt (runStateT (withdraw 0%Z) refined_prev_block)\n  else\n    put refined_prev_block\n).\n\nDefinition sufficient_capital_proof (p: player) : Prop := \n  eq_true (gt (Int256.repr p.(capital_proof)) p.(valuation)).\n\nDefinition bounded_valuation (p: player) : Prop := \n  Z.lt 0%Z (Int256.intval p.(valuation)) /\\ \n  Z.lt (Int256.intval p.(valuation)) Int256.max_signed.\n\n(* paramcoq plugin seems only work for older version? *)\n(* Require Parametricity.\nParametricity bid_own_valuation arity 1. *)\n(* if each method preserves an invariant of states, \n    then the strategy will also preserve the invariants \n*)\nAxiom parametricity_arity1 : \n  forall (st st' st'': state) (stg : strategy) (inv : state -> Prop) \n    (method: state -> state) m1 m2 m3 m4, \n    inv st -> method st = st' -> inv st' -> \n    runStateT (stg st state st m1 m2 m3 m4) st = Some (tt, st'') -> inv st''.\n\n(* The idea is to say for any player, if the contract starts at the initial state,\n   then operate according to the `multi-bstep` relation, then in the final state, \n   which is when the auction is over, the list generated by the `transfer` must give\n   an outcome that satisfy a predicate \"player wins and pay at most value, or get \n   money back\" \n*)\n\nSection outcome_proof.\n  Context (* (strategies : strategy_tuple) *)\n          (initial_balances : player_addr -> Z)\n          (contract_address : int256).\n\n  Context (init_bt init_rt : int256)\n          (init_coinbase : int256)\n          (init_timestamp : int256)\n          (init_number : int256)\n          (init_blockhash : int256 -> int256)\n          (pre_init_state init_state : state).\n\n  Definition contract_ownder_addr : player_addr := Int256.zero.\n  Definition contract_init_price : wei := 0%Z.\n  Definition outcome := state.\n\n  Definition filled_init\n  := \n    (lifted_init \n    initial_balances \n    contract_address \n    init_coinbase init_timestamp init_number init_blockhash \n    contract_ownder_addr contract_init_price).\n\n  Definition state_from_initialization\n  :=\n    (* auction has not started yet *)\n    is_true (is_pre_initialization_phase pre_init_state) -> \n    init_global_abstract_data = pre_init_state.(contract_state) -> \n    (* contract state is given by running initialize_opt *)\n    runStateT (filled_init init_bt init_rt) pre_init_state = Some (tt, init_state) ->\n    (* log of transfers is empty *)\n    init_state.(player_transfers) = nil ->\n    (_events init_state.(contract_state)) = nil.\n\n  Definition outcome_from_strategies (o: outcome) (stg: strategy_tuple)\n      :=\n    (* auction has not started yet *)\n    is_true (is_pre_initialization_phase pre_init_state) -> \n    init_global_abstract_data = pre_init_state.(contract_state) -> \n    (* contract state is given by running initialize_opt *)\n    runStateT (filled_init init_bt init_rt) pre_init_state = Some (tt, init_state) ->\n    (* log of transfers is empty *)\n    init_state.(player_transfers) = nil ->\n    (_events init_state.(contract_state)) = nil -> (* state_from_initialization *)\n    is_true (is_auction_finished_phase o) -> \n    multi_bstep stg initial_balances contract_address init_state o.\n\n  Definition use_stg (p: player) (s: player -> strategy) \n    (ss: strategy_tuple): Prop :=\n      ss p.(addr) = s p.\n\n  Definition sound_player (p: player): Prop :=\n    sufficient_capital_proof p /\\ bounded_valuation p.\n\n  (* say which state the player prefers, ordinal *)\n  Definition selfish_greedy_utility (p : player) (o: outcome) : Z := \n    (* if outcome is p get object, then payoff is p.(valuation) - final_price *)\n    if Int256.eq (addr p) (_highestBidder (contract_state o)) then\n      Int256.intval p.(valuation) + Int256.intval (net_gain p o)\n    (* if outcome is p not getting object, then payoff is zero *)\n    else\n      (* since we already prove refund_failed_bidders, no \n         need for additional substraction of net_gain *)\n      0%Z.\n\n  (* lemma refund_failed_bidders: saying that failed people get their money back *)\n  (* fold both incoming and outcoming lists, assert both directions p have \n      same amount transferred *)\n\n  (* prove this for bid_own_valuation only *)\n  (* mstep with the runStateT, say that the state when we call bid, P st, then mstep st st;\n      P2 st', and st' satisfy p2 for runStateT *)\n  Lemma refund_failed_bidders : forall p o ss,\n      sound_player p -> \n      use_stg p bid_own_valuation ss ->\n      outcome_from_strategies o ss -> \n      is_where_player_won p o = false -> \n      player_outgoing p o = player_incoming p o.\n  Proof.\n    intros.\n    Print is_where_player_won.\n    Print outcome_from_strategies.\n    unfold outcome_from_strategies in  H1.\n    \n    Admitted.\n\n  (* lemma consume_succ_bidders: saying that succed people never get refunded *)\n  (* fold on outcoming_list of transactions, assert there is none to p *)\n  Lemma consume_succ_bidder_money : forall p o ss,\n      sound_player p -> \n      outcome_from_strategies o ss -> \n      is_where_player_won p o = true -> \n      player_outgoing p o = 0%Z.\n  Proof.\n    intros.\n    Admitted.\n\n    Lemma bid_own_valuation_win_case:\n      forall (o: outcome) (p: player) (ss: strategy_tuple),\n      use_stg p bid_own_valuation ss ->\n      outcome_from_strategies o ss ->\n      is_true (is_where_player_won p o) -> \n      (Int256.intval (_highestBid o.(contract_state))) = Int256.intval (valuation p).\n    Proof.\n      intros.\n      Admitted.\n\n  (* destruct outcome_spec *)\n    (* p fails: refund_failed_bidders, unfold net_gain definition, \n        net_gain = 0 *)\n    (* p succ: consume_succ_bidder_money, with bid_own_valuation, \n        he wins, and get no money back, net_gain = -valuation *)\n  Lemma bid_own_valuation_outcome (p: player) (o : outcome) (ss: strategy_tuple): \n      sound_player p -> \n      use_stg p bid_own_valuation ss ->\n      outcome_from_strategies o ss -> \n      outcome_spec p o.\n  Proof.\n  intros.\n  unfold use_stg in H0.\n  unfold outcome_spec.\n  split;\n  intros;\n  unfold net_gain.\n  (* p wins *)\n  + pose (OZ:=consume_succ_bidder_money p o ss H H1 H2); clearbody OZ.\n    rewrite -> OZ.\n    simpl.\n    (* prove that with H0, o will only have player_incoming being valuation of p *)\n    admit.\n  (* p does not win *)\n  + pose (OZ:=refund_failed_bidders p o ss H H0 H1 H2); clearbody OZ.\n    rewrite -> OZ.\n    assert (ZL:forall f, Z.eq (f - f) 0%Z).\n    - intros. exact (Z.sub_diag f).\n    - pose (Z:=ZL (player_incoming p o)); clearbody Z.\n      rewrite -> Z. constructor.\n  Admitted.\n  \n  (* just apply selfish_utility to bid_own_valuation_outcome *)\n  (* lemma never_overpays: following stg, p's utility = 0 *)\n    (* p fails: utility = 0 *)\n    (* p succ: consume_succ_bidder_money, with bid_own_valuation, then \n        utility = valuation + net_gain = 0 *)\n  Lemma bid_own_valuation_never_overpays: forall p o ss,\n      sound_player p -> \n      use_stg p bid_own_valuation ss ->\n      (* strategies p.(addr) = bid_own_valuation p ->  *)\n      outcome_from_strategies o ss -> \n      (0 = (selfish_greedy_utility p o))%Z.\n  Proof.\n    intros.\n    unfold selfish_greedy_utility.\n    pose (OT:=bid_own_valuation_outcome p o ss H H0 H1); clearbody OT.\n    unfold outcome_spec in OT.\n    destruct OT.\n    destruct (is_where_player_won p o) eqn:?;\n    unfold is_where_player_won in Heqb;\n    rewrite -> Heqb. \n    + pose (H4:=H2 eq_refl); clearbody H4.\n      rewrite -> H4.\n      constructor.\n    + compute.\n      constructor.\n  Qed.\n\n  Section equilibrium_proof.\n\n    Print outcome_from_strategies.\n    (* non-determinism of states, included in bstep, assumed miner fairness *)\n    (* Lemma: all non-deterministic outcomes by bstep have same payoff *)\n\n    Definition weakly_dominant (stg: player -> strategy) (p: player)\n                               (utility_func: player -> outcome -> Z) :=\n      forall (o o': outcome) (ss ss': strategy_tuple) (p': player),\n        p' <> p ->\n        ss p'.(addr) = ss' p'.(addr) -> \n        use_stg p stg ss' -> \n        outcome_from_strategies o ss -> \n        outcome_from_strategies o' ss' ->\n        ((utility_func p o) = (utility_func p o'))%Z \\/ \n        ((utility_func p o) < (utility_func p o'))%Z.\n\n    Check fun o => (_bids (contract_state o)).\n\n    (* since the bid amounts are hashed, we essentially cannot tell how much\n        other people bidded easily *)\n\n    Definition gmapv {A} (p: player) (b: state) \n      (fd: global_abstract_data_type -> Maps.Int256Tree.t A) := \n      Maps.Int256Tree.get p.(addr) (fd b.(contract_state)).\n\n    (* Print keccak.\n\n    (* Define the reverse hash function, just to make expressing bid\n        values easier *)\n    Definition keccak_i := (fun a b : hashvalue => hashval_hash2 a b) :\n      hashvalue -> hashvalue -> hashvalue.\n\n    Axiom inverse_func_keccak : forall a b, keccak_i (keccak a b)\n\n    Definition keccak_r (bid_hashed p o).(_blindedBid) secret\n\n    Definition  keccak value secret = (bid_hashed p o).(_blindedBid). *)\n\n    (* prove that at one point inside o',\n              some other player put a bid, then we use the syncronicity assumption \n              on the assumption of o plus the assumption about bids being blind to \n              show that the same player also put a bid in the execution leading to o, \n              and then we have some \"lemma\" saying that with that bid being there, \n              that player will either win or we will pay to much.\n              prove that the only way to win in this scenario is overpay!\n              - \"if a player places a bid such that ... then the outcome will be \n              ...\" (a bid_outcome lemma, no strategies involved) *)\n\n    (* bid is blind, so that your new bid will not affect other player's bids \n        for every player playing according to a certain strategy, even if \n        everybody else's strategy changed, he will always perform the same\n        kind of action (function calls), his call to bid_function will be same *)\n    Definition blind_bids (p p': player) (o o': outcome) (ss ss': strategy_tuple)\n        (s s': player -> strategy)\n      :=\n      p <> p' ->\n      ss p'.(addr) = ss' p'.(addr) -> \n      use_stg p s' ss' -> \n      use_stg p s ss -> \n      outcome_from_strategies o ss -> \n      outcome_from_strategies o' ss' ->\n      gmapv p' o _trueBids = gmapv p' o' _trueBids /\\\n      gmapv p' o _secrets = gmapv p' o' _secrets /\\ \n      gmapv p' o _bids = gmapv p' o' _bids.\n\n    Definition bid_amount := fun p o => match gmapv p o _trueBids with \n      | Some (v) => v\n      | None => Int256.zero\n      end.\n\n    (* given an outcome where player p wins, we extract the winning bid *)\n    (* a bid function call b' on state, defined using mstep *)\n    (* Definition exists_winning_bid: is_where_player_won p o ->  . *)\n    (* predicate on state *)\n\n    Search (Z -> Z -> Prop).\n\n    (* If you won, it would be because you paid more than others *)\n    Lemma bidding_pv_functional_win:\n      forall (o: outcome) (p p': player) (ss: strategy_tuple),\n      p <> p' ->\n      use_stg p bid_own_valuation ss ->\n      outcome_from_strategies o ss ->\n      is_true (is_where_player_won p o) -> \n      Z.ge\n      (Int256.intval (bid_amount p o))\n      (Int256.intval (bid_amount p' o)).\n    Proof.\n      intros.\n    Admitted.\n\n    Lemma bidding_pv_functional_lose:\n      forall (o: outcome) (p: player) (ss: strategy_tuple),\n      use_stg p bid_own_valuation ss ->\n      outcome_from_strategies o ss ->\n      not (is_true (is_where_player_won p o)) -> \n      exists (p': player),\n      p <> p' ->\n      Z.ge\n      (Int256.intval (bid_amount p' o))\n      (Int256.intval (bid_amount p o)).\n    Proof.\n      intros.\n    Admitted.\n\n    (* prove that if given exists_winning_bid b' p', the only way to win the \n        auction for player p <> p' is to place bid b >= b' *)\n    Lemma winning_bid_monotonicity: \n      forall \n        (o o': outcome) \n        (p p': player) \n        (ss ss': strategy_tuple)\n        (s': player -> strategy), \n      p <> p' ->\n      ss p'.(addr) = ss' p'.(addr) -> \n      use_stg p s' ss' -> \n      use_stg p bid_own_valuation ss -> \n      outcome_from_strategies o ss -> \n      outcome_from_strategies o' ss' ->\n      bid_amount p' o = bid_amount p' o' ->\n      is_true (is_where_player_won p o) -> \n      is_true (is_where_player_won p o') -> \n      blind_bids p p' o o' ss ss' bid_own_valuation s' ->\n      Z.ge\n      (Int256.intval (_highestBid o'.(contract_state)))\n      (Int256.intval (_highestBid o.(contract_state))).\n    Proof.\n      intros.\n      unfold is_where_player_won in H.\n      pose (HB:=(bid_own_valuation_win_case o p ss H2 H3 H6)); clearbody HB.\n      rewrite -> HB.\n      unfold blind_bids in H8.\n      pose (HBD:=(H8 H H0 H1 H2 H3 H4)); clearbody HBD.\n      clear H8.\n      (* need runStateT and bidding_pv_functional and HBD, HBD is for o and o' cases, and the \n        bidding_pv_functional is for one case *)\n      (* bidding_pv_functional that in o' you bid higher than everybody *)\n      (* bidding_pv_functional that in o you bid higher than everybody *)\n      (* HBD that everybody bidded the same value *)\n      Admitted.\n\n    (* assuming player is sound, then *)\n    Theorem second_price_auction_equilibrium: forall (p: player), \n      sound_player p -> \n      weakly_dominant bid_own_valuation p selfish_greedy_utility.\n    Proof.\n      intros.\n      unfold weakly_dominant.\n      (* given another player's strategy, the corresponding outcome \n         from bid_own_valuation is better than outcome from other \n         strategies. *)\n      intros.\n      destruct (is_where_player_won p o') eqn:?;\n      unfold is_where_player_won in Heqb;\n      unfold selfish_greedy_utility;\n      rewrite -> Heqb;\n      destruct (is_where_player_won p o) eqn:?;\n      unfold is_where_player_won in Heqb0;\n      rewrite -> Heqb0.\n      (* case analysis on (o'-o) *)\n      - (* \"succ-succ\":\n          if o is success, then \n          we prove that o overpays (restrict other player's\n          behavior so we get corresponding outcomes), \n          direct apply lemma overpaied_win_given_bid *)\n        (* if p win in o and p win in o', then as p plays according to\n            bid_own_valuation, exists winning_bid p o' = p.(valuation).\n            and there also exists winning_bid p o, then we assert that\n            for every player p' <> p, he will have same action in o as in o',\n            \"actually this part is false, there exists strategies that \n              are better than bid_own_valuation, while also wins\"\n            so we assume blind_bids (ss p), then ??? *)\n\n        (* need winning_bid_monotonicity lemma, but that lemma cannot be proven! *)\n        admit.\n      - (* \"succ-fail\":\n          apply the outcome lemma that following stg give =0 utility,\n            then it is trivially true *)\n        pose (UZ:=bid_own_valuation_never_overpays p o' ss' H H2 H4).\n        clearbody UZ.\n        unfold selfish_greedy_utility in UZ.\n        rewrite -> Heqb in UZ.\n        left.\n        exact UZ.\n      (* we prove that for whatever\n        other strategy we could have used, we would still either lose or \n        overpay (use utility function to formulate this). *)\n      - (* \"fail-succ\":\n            we prove that the succ case will overpay, thus have negative utility.\n            apply lemma overpaied_win_given_bid\n        *)\n        (* apply overpaied_win_given_bid. *)\n        (* if p did not win in o', we must have (assume)\n            since p played according to bid_own_valuation and failed,\n            the winning_bid by pw must >= p.(valuation), and\n            exists_winning_bid pw o' o\n            for player pw <> p who won the auction in o', he had same action in o,\n            given those assumptions, if p wants to win\n            in o, he must bid more (by monotonicity lemma)\n            than pw's bid in o, which is the same \n            as pw's bid in o', which is larger than p.(valuation), which \n            causes overpay *)\n        (* since by definition in o' we have a bid pw > p.(valuation), and since \n            there is also this pw bid in o, then winning bid in o > pw, then according to\n            selfish_greedy_utility, the utility is negative, omega *)\n\n        (*  *)\n        \n        admit.\n      - (* \"fail-fail\":\n          trivial, 0 leq 0 *)\n        omega.\n    Admitted.\n    \n  End equilibrium_proof.\n\nEnd outcome_proof.\n"
  },
  {
    "path": "contracts/fpblind/spblind/CertiKOS.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.CertiKOS for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.DataTypeProofs.\n\nSection EdsgerGen.\n\n\nRequire Import compcert.lib.Coqlib.\nRequire Import liblayers.lib.Decision.\nRequire Import liblayers.compcertx.ErrorMonad.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import compcertx.common.MemimplX.\nRequire Import liblayers.compcertx.MakeProgramImpl.\nRequire Import liblayers.compat.CompatLayers.\nRequire Import mcertikos.layerlib.LAsmModuleSemDef.\nRequire Import mcertikos.layerlib.CompCertiKOS.\n\nLocal Instance mwd_ops: MemWithData.UseMemWithData Memimpl.mem.\n\nRequire Import spblind.LayerEVMOPCODE.\nRequire Import spblind.LayerBLINDAUCTION.\n\nDefinition EVMOpcode_transfer_core := (@EVMOpcode_transfer Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition EVMOpcode_transfer_func := (synth_func_func EVMOpcode_transfer_core).\n\nDefinition EVMOPCODE_impl : res LAsm.module := \n  ret (∅).\n\nDefinition BlindAuction_initialize_core := (@BlindAuction_initialize Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_initialize_func := (synth_func_func BlindAuction_initialize_core).\n\nDefinition BlindAuction_transferb_core := (@BlindAuction_transferb Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_transferb_func := (synth_func_func BlindAuction_transferb_core).\n\nDefinition BlindAuction_reveal_core := (@BlindAuction_reveal Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_reveal_func := (synth_func_func BlindAuction_reveal_core).\n\nDefinition BlindAuction_bid_core := (@BlindAuction_bid Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_bid_func := (synth_func_func BlindAuction_bid_core).\n\nDefinition BlindAuction_withdraw_core := (@BlindAuction_withdraw Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_withdraw_func := (synth_func_func BlindAuction_withdraw_core).\n\nDefinition BlindAuction_auctionEnd_core := (@BlindAuction_auctionEnd Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition BlindAuction_auctionEnd_func := (synth_func_func BlindAuction_auctionEnd_core).\n\nDefinition BLINDAUCTION_impl : res LAsm.module := \n  M_BlindAuction_initialize <- CompCertiKOS.transf_module (ident_BlindAuction_initialize ↦ BlindAuction_initialize_func);\n  M_BlindAuction_transferb <- CompCertiKOS.transf_module (ident_BlindAuction_transferb ↦ BlindAuction_transferb_func);\n  M_BlindAuction_reveal <- CompCertiKOS.transf_module (ident_BlindAuction_reveal ↦ BlindAuction_reveal_func);\n  M_BlindAuction_bid <- CompCertiKOS.transf_module (ident_BlindAuction_bid ↦ BlindAuction_bid_func);\n  M_BlindAuction_withdraw <- CompCertiKOS.transf_module (ident_BlindAuction_withdraw ↦ BlindAuction_withdraw_func);\n  M_BlindAuction_auctionEnd <- CompCertiKOS.transf_module (ident_BlindAuction_auctionEnd ↦ BlindAuction_auctionEnd_func);\n  ret (var_BlindAuction__beneficiary_ident ↦ BlindAuction__beneficiary_globvar ⊕ var_BlindAuction__biddingEnd_ident ↦ BlindAuction__biddingEnd_globvar ⊕ var_BlindAuction__revealEnd_ident ↦ BlindAuction__revealEnd_globvar ⊕ var_BlindAuction__ended_ident ↦ BlindAuction__ended_globvar ⊕ var_BlindAuction__bids_ident ↦ BlindAuction__bids_globvar ⊕ var_BlindAuction__highestBidder_ident ↦ BlindAuction__highestBidder_globvar ⊕ var_BlindAuction__highestBid_ident ↦ BlindAuction__highestBid_globvar ⊕ var_BlindAuction__secondBid_ident ↦ BlindAuction__secondBid_globvar ⊕ var_BlindAuction__revealed_ident ↦ BlindAuction__revealed_globvar ⊕ var_BlindAuction__amountOf_ident ↦ BlindAuction__amountOf_globvar ⊕   M_BlindAuction_initialize  ⊕   M_BlindAuction_transferb  ⊕   M_BlindAuction_reveal  ⊕   M_BlindAuction_bid  ⊕   M_BlindAuction_withdraw  ⊕   M_BlindAuction_auctionEnd  ⊕ ∅).\n\nDefinition certikos := \n  MEVMOPCODE <- EVMOPCODE_impl;\n  MBLINDAUCTION <- BLINDAUCTION_impl;\n  ret ( MEVMOPCODE ⊕ MBLINDAUCTION ⊕ ∅).\n\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/DataTypeOps.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.DataTypeOps for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\n\nSection EdsgerGen.\n\nDefinition tint_U := (Tpair addr tint).\nGlobal Instance tint_U_hyper_type_impl : HyperTypeImpl tint_U := {\n  ht_cval f := (@ht_cval tint_U _ f);\n  ht_ft_cond f := (@ht_ft_cond tint_U _ f);\n  ht_default := (@ht_default tint_U _);\n  ht_valid_ft_cond f := @ht_valid_ft_cond tint_U _ f;\n  ht_valid_ft_ocond := (@ht_valid_ft_ocond tint_U _);\n  ht_inject j a b := a = b\n}.\nDefinition int_U_pair := mk_hyper_type_pair tint_U.\nGlobal Instance tint_U_hyper_type : HyperType tint_U := _.\nGlobal Instance tint_U_hyper_binary_impl_eq : HyperBinaryImpl Oeq tint_U tint_U tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := (* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) false\n}.\nDefinition tBid_Bid := (Tpair Bid (Tstruct Bid_struct_ident\n  (Fcons Bid_struct__blindedBid_ident tint\n  (Fcons Bid_struct__deposit_ident tint\n   Fnil)))).\nGlobal Instance tBid_Bid_hyper_type_impl : HyperTypeImpl tBid_Bid := {\n  ht_cval f := \n    (CVstruct (CSmap\n      (PTree.set  Bid_struct__blindedBid_ident  (@ht_cval tint_hashvalue _ (_blindedBid f))\n      (PTree.set  Bid_struct__deposit_ident  (@ht_cval tint_U _ (_deposit f))\n      (@PTree.empty cval)))));\n  ht_ft_cond f := (@ht_ft_cond tint_hashvalue _ (_blindedBid f))\n    /\\ (@ht_ft_cond tint_U _ (_deposit f));\n  ht_default := {| _blindedBid := (@ht_default tint_hashvalue _);\n       _deposit := (@ht_default tint_U _)\n    |};\n  ht_valid_ft_cond f := @ht_valid_ft_cond tint_hashvalue _ (_blindedBid f)\n    /\\ @ht_valid_ft_cond tint_U _ (_deposit f);\n  ht_valid_ft_ocond := (\n    (@ht_valid_ft_ocond tint_hashvalue _) m{ _blindedBid }\n    /\\ (@ht_valid_ft_ocond tint_U _) m{ _deposit })%oprop1;\n  ht_inject j a b := a = b\n}.\nDefinition Bid_Bid_pair := mk_hyper_type_pair tBid_Bid.\nGlobal Instance tBid_Bid_hyper_type : HyperType tBid_Bid.\nProof. solve_algebraic_record_data_type_hyper_type tBid_Bid_hyper_type_impl. Qed.\nGlobal Instance tBid_Bid__blindedBid_field_impl : HyperFieldImpl tBid_Bid tint_hashvalue Bid_struct__blindedBid_ident := {\n  Hfield_offset := 0;\n  Hfield_get s := _blindedBid s;\n  Hfield_set v s := Build_Bid v (_deposit s)\n}.\nGlobal Instance tBid_Bid__blindedBid_field : HyperField tBid_Bid tint_hashvalue Bid_struct__blindedBid_ident.\nProof. solve_record_type_hyper_field. Qed.\nGlobal Instance tBid_Bid__deposit_field_impl : HyperFieldImpl tBid_Bid tint_U Bid_struct__deposit_ident := {\n  Hfield_offset := 1;\n  Hfield_get s := _deposit s;\n  Hfield_set v s := Build_Bid (_blindedBid s) v\n}.\nGlobal Instance tBid_Bid__deposit_field : HyperField tBid_Bid tint_U Bid_struct__deposit_ident.\nProof. solve_record_type_hyper_field. Qed.\nDefinition tTransfer_Transfer := (Tpair Transfer (Tstruct Transfer_struct_ident\n  (Fcons Transfer_struct__amount_ident tint\n  (Fcons Transfer_struct__to_ident tint\n   Fnil)))).\nGlobal Instance tTransfer_Transfer_hyper_type_impl : HyperTypeImpl tTransfer_Transfer := {\n  ht_cval f := \n    (CVstruct (CSmap\n      (PTree.set  Transfer_struct__amount_ident  (@ht_cval tint_U _ (_amount f))\n      (PTree.set  Transfer_struct__to_ident  (@ht_cval tint_U _ (_to f))\n      (@PTree.empty cval)))));\n  ht_ft_cond f := (@ht_ft_cond tint_U _ (_amount f))\n    /\\ (@ht_ft_cond tint_U _ (_to f));\n  ht_default := {| _amount := (@ht_default tint_U _);\n       _to := (@ht_default tint_U _)\n    |};\n  ht_valid_ft_cond f := @ht_valid_ft_cond tint_U _ (_amount f)\n    /\\ @ht_valid_ft_cond tint_U _ (_to f);\n  ht_valid_ft_ocond := (\n    (@ht_valid_ft_ocond tint_U _) m{ _amount }\n    /\\ (@ht_valid_ft_ocond tint_U _) m{ _to })%oprop1;\n  ht_inject j a b := a = b\n}.\nDefinition Transfer_Transfer_pair := mk_hyper_type_pair tTransfer_Transfer.\nGlobal Instance tTransfer_Transfer_hyper_type : HyperType tTransfer_Transfer.\nProof. solve_algebraic_record_data_type_hyper_type tTransfer_Transfer_hyper_type_impl. Qed.\nGlobal Instance tTransfer_Transfer__amount_field_impl : HyperFieldImpl tTransfer_Transfer tint_U Transfer_struct__amount_ident := {\n  Hfield_offset := 0;\n  Hfield_get s := _amount s;\n  Hfield_set v s := Build_Transfer v (_to s)\n}.\nGlobal Instance tTransfer_Transfer__amount_field : HyperField tTransfer_Transfer tint_U Transfer_struct__amount_ident.\nProof. solve_record_type_hyper_field. Qed.\nGlobal Instance tTransfer_Transfer__to_field_impl : HyperFieldImpl tTransfer_Transfer tint_U Transfer_struct__to_ident := {\n  Hfield_offset := 1;\n  Hfield_get s := _to s;\n  Hfield_set v s := Build_Transfer (_amount s) v\n}.\nGlobal Instance tTransfer_Transfer__to_field : HyperField tTransfer_Transfer tint_U Transfer_struct__to_ident.\nProof. solve_record_type_hyper_field. Qed.\nDefinition tint_list_Transfer := (Tpair list_Transfer tint).\nGlobal Instance tint_list_Transfer_hyper_type_impl : HyperTypeImpl tint_list_Transfer := {\n  ht_cval := fun _ => CVany;\n  ht_ft_cond := fun _ => True;\n  ht_default := nil;\n  ht_valid_ft_cond := fun _ => True;\n  ht_valid_ft_ocond := otrue1;\n  ht_inject j a b := a = b\n}.\nDefinition int_list_Transfer_pair := mk_hyper_type_pair tint_list_Transfer.\nGlobal Instance tint_list_Transfer_hyper_binary_impl_eq : HyperBinaryImpl Oeq tint_list_Transfer tint_list_Transfer tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := (* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) false\n}.\nDefinition thash_Bid_HASH_Z_Bid := (Tpair HASH_Z_Bid (Thashmap tint (Tstruct Bid_struct_ident\n  (Fcons Bid_struct__blindedBid_ident tint\n  (Fcons Bid_struct__deposit_ident tint\n   Fnil))))).\nGlobal Instance thash_Bid_HASH_Z_Bid_hyper_type_impl : HyperTypeImpl thash_Bid_HASH_Z_Bid :=\n   Int256Tree_inject_equal_hashmap_hyper_type_impl tBid_Bid.\nDefinition hash_Bid_HASH_Z_Bid_pair := mk_hyper_type_pair thash_Bid_HASH_Z_Bid.\nGlobal Instance thash_Bid_HASH_Z_Bid_hyper_type : HyperType thash_Bid_HASH_Z_Bid :=\n  Int256Tree_inject_equal_hashmap_hyper_type tBid_Bid.\nGlobal Instance thash_Bid_HASH_Z_Bid_index_impl : HyperIntHashImpl thash_Bid_HASH_Z_Bid tBid_Bid :=\n  Int256Tree_inject_equal_hashmap_hash_impl tBid_Bid.\nGlobal Instance thash_Bid_HASH_Z_Bid_hash : HyperIntHash thash_Bid_HASH_Z_Bid tBid_Bid :=\n  Int256Tree_inject_equal_hashmap_hash tBid_Bid.\nDefinition thash_int_HASH_Z_bool := (Tpair HASH_Z_bool (Thashmap tint tint)).\nGlobal Instance thash_int_HASH_Z_bool_hyper_type_impl : HyperTypeImpl thash_int_HASH_Z_bool :=\n   Int256Tree_inject_equal_hashmap_hyper_type_impl tint_bool.\nDefinition hash_int_HASH_Z_bool_pair := mk_hyper_type_pair thash_int_HASH_Z_bool.\nGlobal Instance thash_int_HASH_Z_bool_hyper_type : HyperType thash_int_HASH_Z_bool :=\n  Int256Tree_inject_equal_hashmap_hyper_type tint_bool.\nGlobal Instance thash_int_HASH_Z_bool_index_impl : HyperIntHashImpl thash_int_HASH_Z_bool tint_bool :=\n  Int256Tree_inject_equal_hashmap_hash_impl tint_bool.\nGlobal Instance thash_int_HASH_Z_bool_hash : HyperIntHash thash_int_HASH_Z_bool tint_bool :=\n  Int256Tree_inject_equal_hashmap_hash tint_bool.\nDefinition thash_int_HASH_Z_Z := (Tpair HASH_Z_Z (Thashmap tint tint)).\nGlobal Instance thash_int_HASH_Z_Z_hyper_type_impl : HyperTypeImpl thash_int_HASH_Z_Z :=\n   Int256Tree_inject_equal_hashmap_hyper_type_impl tint_U.\nDefinition hash_int_HASH_Z_Z_pair := mk_hyper_type_pair thash_int_HASH_Z_Z.\nGlobal Instance thash_int_HASH_Z_Z_hyper_type : HyperType thash_int_HASH_Z_Z :=\n  Int256Tree_inject_equal_hashmap_hyper_type tint_U.\nGlobal Instance thash_int_HASH_Z_Z_index_impl : HyperIntHashImpl thash_int_HASH_Z_Z tint_U :=\n  Int256Tree_inject_equal_hashmap_hash_impl tint_U.\nGlobal Instance thash_int_HASH_Z_Z_hash : HyperIntHash thash_int_HASH_Z_Z tint_U :=\n  Int256Tree_inject_equal_hashmap_hash tint_U.\nRecord global_abstract_data_type : Type := {\n  _beneficiary : int256;\n  _biddingEnd : int256;\n  _revealEnd : int256;\n  _ended : bool;\n  _bids : (Int256Tree.t Bid);\n  _highestBidder : int256;\n  _highestBid : int256;\n  _secondBid : int256;\n  _revealed : (Int256Tree.t bool);\n  _amountOf : (Int256Tree.t int256);\n  _events : (list Transfer)\n}.\nDefinition update__beneficiary glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type glabs_b (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_secondBid glabs_a) (_revealed glabs_a) (_amountOf glabs_a) (_events glabs_a) .\nDefinition update__biddingEnd glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) glabs_b (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_secondBid glabs_a) (_revealed glabs_a) (_amountOf glabs_a) (_events glabs_a) .\nDefinition update__revealEnd glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) glabs_b (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_secondBid glabs_a) (_revealed glabs_a) (_amountOf glabs_a) (_events glabs_a) .\nDefinition update__ended glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) glabs_b (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_secondBid glabs_a) (_revealed glabs_a) (_amountOf glabs_a) (_events glabs_a) .\nDefinition update__bids glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) glabs_b (_highestBidder glabs_a) (_highestBid glabs_a) (_secondBid glabs_a) (_revealed glabs_a) (_amountOf glabs_a) (_events glabs_a) .\nDefinition update__highestBidder glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) glabs_b (_highestBid glabs_a) (_secondBid glabs_a) (_revealed glabs_a) (_amountOf glabs_a) (_events glabs_a) .\nDefinition update__highestBid glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) glabs_b (_secondBid glabs_a) (_revealed glabs_a) (_amountOf glabs_a) (_events glabs_a) .\nDefinition update__secondBid glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) glabs_b (_revealed glabs_a) (_amountOf glabs_a) (_events glabs_a) .\nDefinition update__revealed glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_secondBid glabs_a) glabs_b (_amountOf glabs_a) (_events glabs_a) .\nDefinition update__amountOf glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_secondBid glabs_a) (_revealed glabs_a) glabs_b (_events glabs_a) .\nDefinition update__events glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_beneficiary glabs_a) (_biddingEnd glabs_a) (_revealEnd glabs_a) (_ended glabs_a) (_bids glabs_a) (_highestBidder glabs_a) (_highestBid glabs_a) (_secondBid glabs_a) (_revealed glabs_a) (_amountOf glabs_a) glabs_b .\n\nDefinition init_global_abstract_data : global_abstract_data_type := {|\n  _beneficiary := (Int256.repr 0);\n  _biddingEnd := (Int256.repr 0);\n  _revealEnd := (Int256.repr 0);\n  _ended := false;\n  _bids := (Int256Tree.empty Bid);\n  _highestBidder := (Int256.repr 0);\n  _highestBid := (Int256.repr 0);\n  _secondBid := (Int256.repr 0);\n  _revealed := (Int256Tree.empty bool);\n  _amountOf := (Int256Tree.empty int256);\n  _events := nil\n|}.\n\nDefinition block := positive.\nDefinition global_low_level_invariant (n : block)(abd : global_abstract_data_type) := True.\nEnd EdsgerGen.\n\nLemma _beneficiary_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__beneficiary _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__beneficiary : updates.\n\nLemma _beneficiary_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__biddingEnd _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__biddingEnd : updates.\n\nLemma _beneficiary_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__revealEnd _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__revealEnd : updates.\n\nLemma _beneficiary_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__ended _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__ended : updates.\n\nLemma _beneficiary_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__bids _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__bids : updates.\n\nLemma _beneficiary_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__highestBidder _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__highestBidder : updates.\n\nLemma _beneficiary_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__highestBid _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__highestBid : updates.\n\nLemma _beneficiary_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__secondBid _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__secondBid : updates.\n\nLemma _beneficiary_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__revealed _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__revealed : updates.\n\nLemma _beneficiary_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__amountOf _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__amountOf : updates.\n\nLemma _beneficiary_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _beneficiary (update__events _x glabs_a) = _beneficiary glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _beneficiary_of_update__events : updates.\n\n\nLemma _biddingEnd_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__beneficiary _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__beneficiary : updates.\n\nLemma _biddingEnd_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__biddingEnd _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__biddingEnd : updates.\n\nLemma _biddingEnd_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__revealEnd _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__revealEnd : updates.\n\nLemma _biddingEnd_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__ended _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__ended : updates.\n\nLemma _biddingEnd_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__bids _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__bids : updates.\n\nLemma _biddingEnd_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__highestBidder _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__highestBidder : updates.\n\nLemma _biddingEnd_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__highestBid _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__highestBid : updates.\n\nLemma _biddingEnd_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__secondBid _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__secondBid : updates.\n\nLemma _biddingEnd_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__revealed _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__revealed : updates.\n\nLemma _biddingEnd_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__amountOf _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__amountOf : updates.\n\nLemma _biddingEnd_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _biddingEnd (update__events _x glabs_a) = _biddingEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _biddingEnd_of_update__events : updates.\n\n\nLemma _revealEnd_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__beneficiary _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__beneficiary : updates.\n\nLemma _revealEnd_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__biddingEnd _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__biddingEnd : updates.\n\nLemma _revealEnd_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__revealEnd _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__revealEnd : updates.\n\nLemma _revealEnd_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__ended _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__ended : updates.\n\nLemma _revealEnd_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__bids _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__bids : updates.\n\nLemma _revealEnd_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__highestBidder _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__highestBidder : updates.\n\nLemma _revealEnd_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__highestBid _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__highestBid : updates.\n\nLemma _revealEnd_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__secondBid _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__secondBid : updates.\n\nLemma _revealEnd_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__revealed _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__revealed : updates.\n\nLemma _revealEnd_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__amountOf _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__amountOf : updates.\n\nLemma _revealEnd_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _revealEnd (update__events _x glabs_a) = _revealEnd glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealEnd_of_update__events : updates.\n\n\nLemma _ended_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__beneficiary _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__beneficiary : updates.\n\nLemma _ended_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__biddingEnd _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__biddingEnd : updates.\n\nLemma _ended_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__revealEnd _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__revealEnd : updates.\n\nLemma _ended_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__ended _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__ended : updates.\n\nLemma _ended_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__bids _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__bids : updates.\n\nLemma _ended_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__highestBidder _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__highestBidder : updates.\n\nLemma _ended_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__highestBid _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__highestBid : updates.\n\nLemma _ended_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__secondBid _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__secondBid : updates.\n\nLemma _ended_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__revealed _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__revealed : updates.\n\nLemma _ended_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__amountOf _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__amountOf : updates.\n\nLemma _ended_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__events _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__events : updates.\n\n\nLemma _bids_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__beneficiary _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__beneficiary : updates.\n\nLemma _bids_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__biddingEnd _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__biddingEnd : updates.\n\nLemma _bids_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__revealEnd _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__revealEnd : updates.\n\nLemma _bids_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__ended _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__ended : updates.\n\nLemma _bids_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__bids _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__bids : updates.\n\nLemma _bids_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__highestBidder _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__highestBidder : updates.\n\nLemma _bids_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__highestBid _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__highestBid : updates.\n\nLemma _bids_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__secondBid _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__secondBid : updates.\n\nLemma _bids_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__revealed _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__revealed : updates.\n\nLemma _bids_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__amountOf _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__amountOf : updates.\n\nLemma _bids_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _bids (update__events _x glabs_a) = _bids glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _bids_of_update__events : updates.\n\n\nLemma _highestBidder_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__beneficiary _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__beneficiary : updates.\n\nLemma _highestBidder_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__biddingEnd _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__biddingEnd : updates.\n\nLemma _highestBidder_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__revealEnd _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__revealEnd : updates.\n\nLemma _highestBidder_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__ended _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__ended : updates.\n\nLemma _highestBidder_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__bids _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__bids : updates.\n\nLemma _highestBidder_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__highestBidder _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__highestBidder : updates.\n\nLemma _highestBidder_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__highestBid _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__highestBid : updates.\n\nLemma _highestBidder_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__secondBid _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__secondBid : updates.\n\nLemma _highestBidder_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__revealed _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__revealed : updates.\n\nLemma _highestBidder_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__amountOf _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__amountOf : updates.\n\nLemma _highestBidder_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _highestBidder (update__events _x glabs_a) = _highestBidder glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBidder_of_update__events : updates.\n\n\nLemma _highestBid_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__beneficiary _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__beneficiary : updates.\n\nLemma _highestBid_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__biddingEnd _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__biddingEnd : updates.\n\nLemma _highestBid_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__revealEnd _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__revealEnd : updates.\n\nLemma _highestBid_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__ended _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__ended : updates.\n\nLemma _highestBid_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__bids _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__bids : updates.\n\nLemma _highestBid_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__highestBidder _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__highestBidder : updates.\n\nLemma _highestBid_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__highestBid _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__highestBid : updates.\n\nLemma _highestBid_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__secondBid _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__secondBid : updates.\n\nLemma _highestBid_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__revealed _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__revealed : updates.\n\nLemma _highestBid_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__amountOf _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__amountOf : updates.\n\nLemma _highestBid_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _highestBid (update__events _x glabs_a) = _highestBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _highestBid_of_update__events : updates.\n\n\nLemma _secondBid_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__beneficiary _x glabs_a) = _secondBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__beneficiary : updates.\n\nLemma _secondBid_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__biddingEnd _x glabs_a) = _secondBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__biddingEnd : updates.\n\nLemma _secondBid_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__revealEnd _x glabs_a) = _secondBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__revealEnd : updates.\n\nLemma _secondBid_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__ended _x glabs_a) = _secondBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__ended : updates.\n\nLemma _secondBid_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__bids _x glabs_a) = _secondBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__bids : updates.\n\nLemma _secondBid_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__highestBidder _x glabs_a) = _secondBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__highestBidder : updates.\n\nLemma _secondBid_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__highestBid _x glabs_a) = _secondBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__highestBid : updates.\n\nLemma _secondBid_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__secondBid _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__secondBid : updates.\n\nLemma _secondBid_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__revealed _x glabs_a) = _secondBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__revealed : updates.\n\nLemma _secondBid_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__amountOf _x glabs_a) = _secondBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__amountOf : updates.\n\nLemma _secondBid_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _secondBid (update__events _x glabs_a) = _secondBid glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _secondBid_of_update__events : updates.\n\n\nLemma _revealed_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__beneficiary _x glabs_a) = _revealed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__beneficiary : updates.\n\nLemma _revealed_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__biddingEnd _x glabs_a) = _revealed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__biddingEnd : updates.\n\nLemma _revealed_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__revealEnd _x glabs_a) = _revealed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__revealEnd : updates.\n\nLemma _revealed_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__ended _x glabs_a) = _revealed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__ended : updates.\n\nLemma _revealed_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__bids _x glabs_a) = _revealed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__bids : updates.\n\nLemma _revealed_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__highestBidder _x glabs_a) = _revealed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__highestBidder : updates.\n\nLemma _revealed_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__highestBid _x glabs_a) = _revealed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__highestBid : updates.\n\nLemma _revealed_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__secondBid _x glabs_a) = _revealed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__secondBid : updates.\n\nLemma _revealed_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__revealed _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__revealed : updates.\n\nLemma _revealed_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__amountOf _x glabs_a) = _revealed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__amountOf : updates.\n\nLemma _revealed_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _revealed (update__events _x glabs_a) = _revealed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _revealed_of_update__events : updates.\n\n\nLemma _amountOf_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__beneficiary _x glabs_a) = _amountOf glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__beneficiary : updates.\n\nLemma _amountOf_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__biddingEnd _x glabs_a) = _amountOf glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__biddingEnd : updates.\n\nLemma _amountOf_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__revealEnd _x glabs_a) = _amountOf glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__revealEnd : updates.\n\nLemma _amountOf_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__ended _x glabs_a) = _amountOf glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__ended : updates.\n\nLemma _amountOf_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__bids _x glabs_a) = _amountOf glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__bids : updates.\n\nLemma _amountOf_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__highestBidder _x glabs_a) = _amountOf glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__highestBidder : updates.\n\nLemma _amountOf_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__highestBid _x glabs_a) = _amountOf glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__highestBid : updates.\n\nLemma _amountOf_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__secondBid _x glabs_a) = _amountOf glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__secondBid : updates.\n\nLemma _amountOf_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__revealed _x glabs_a) = _amountOf glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__revealed : updates.\n\nLemma _amountOf_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__amountOf _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__amountOf : updates.\n\nLemma _amountOf_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _amountOf (update__events _x glabs_a) = _amountOf glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _amountOf_of_update__events : updates.\n\n\nLemma _events_of_update__beneficiary : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__beneficiary _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__beneficiary : updates.\n\nLemma _events_of_update__biddingEnd : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__biddingEnd _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__biddingEnd : updates.\n\nLemma _events_of_update__revealEnd : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__revealEnd _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__revealEnd : updates.\n\nLemma _events_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__ended _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__ended : updates.\n\nLemma _events_of_update__bids : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__bids _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__bids : updates.\n\nLemma _events_of_update__highestBidder : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__highestBidder _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__highestBidder : updates.\n\nLemma _events_of_update__highestBid : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__highestBid _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__highestBid : updates.\n\nLemma _events_of_update__secondBid : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__secondBid _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__secondBid : updates.\n\nLemma _events_of_update__revealed : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__revealed _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__revealed : updates.\n\nLemma _events_of_update__amountOf : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__amountOf _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__amountOf : updates.\n\nLemma _events_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__events _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__events : updates.\n\nOpaque _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events.\n\n"
  },
  {
    "path": "contracts/fpblind/spblind/DataTypeProofs.v",
    "content": "(* Skeleton by Edgser for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\n\nSection EdsgerGen.\n\n\n(* (* commented out because the Ethereum backend doesn't do any proofs. *)\nGlobal Instance tint_U_hyper_arg_ret : HyperArgRet tint_U.\nProof. esplit.\n  - (* ht_basic *) admit.\n  - (* ht_cast_ident *) admit.\n  - (* ht_injective *) admit.\n  - (* ht_inject_refl *) admit.\n  - (* ht_has_type *) admit.\nQed.\n*)\n\n(* (* commented out because the Ethereum backend doesn't do any proofs. *)\nGlobal Instance tint_hashvalue_hyper_arg_ret : HyperArgRet tint_hashvalue.\nProof. esplit.\n  - (* ht_basic *) admit.\n  - (* ht_cast_ident *) admit.\n  - (* ht_injective *) admit.\n  - (* ht_inject_refl *) admit.\n  - (* ht_has_type *) admit.\nQed.\n*)\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/DataTypes.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.DataTypes for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\n\nSection EdsgerGen.\n\n\nDefinition addr := int256.\n\nRecord Bid := {\n  _blindedBid : hashvalue;\n  _deposit : int256\n}.\n\nRecord Transfer := {\n  _amount : int256;\n  _to : int256\n}.\n\nDefinition list_Transfer := (list Transfer).\n\nDefinition HASH_Z_Bid := (Int256Tree.t Bid).\n\nDefinition HASH_Z_bool := (Int256Tree.t bool).\n\nDefinition HASH_Z_Z := (Int256Tree.t int256).\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/EdsgerIdents.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.EdsgerIdents for spblind.ds *)\nRequire Import BinPos.  (* positive_scope *)\nRequire Import backend.AST. (* for ident *)\n\nDefinition Bid_struct__blindedBid_ident : ident  := 550%positive.\nDefinition Bid_struct__deposit_ident : ident  := 551%positive.\nDefinition Bid_struct_ident : ident  := 552%positive.\nDefinition Transfer_struct__amount_ident : ident  := 553%positive.\nDefinition Transfer_struct__to_ident : ident  := 554%positive.\nDefinition Transfer_struct_ident : ident  := 555%positive.\n\nDefinition ident_BlindAuction_auctionEnd : ident  := 556%positive.\nDefinition ident_BlindAuction_bid : ident  := 557%positive.\nDefinition ident_BlindAuction_initialize : ident  := 558%positive.\nDefinition ident_BlindAuction_reveal : ident  := 559%positive.\nDefinition ident_BlindAuction_transferb : ident  := 560%positive.\nDefinition ident_BlindAuction_withdraw : ident  := 561%positive.\nDefinition ident_EVMOpcode_transfer : ident  := 562%positive.\nDefinition var_BlindAuction__amountOf_ident : ident  := 563%positive.\nDefinition var_BlindAuction__beneficiary_ident : ident  := 564%positive.\nDefinition var_BlindAuction__biddingEnd_ident : ident  := 565%positive.\nDefinition var_BlindAuction__bids_ident : ident  := 566%positive.\nDefinition var_BlindAuction__ended_ident : ident  := 567%positive.\nDefinition var_BlindAuction__highestBid_ident : ident  := 568%positive.\nDefinition var_BlindAuction__highestBidder_ident : ident  := 569%positive.\nDefinition var_BlindAuction__revealEnd_ident : ident  := 570%positive.\nDefinition var_BlindAuction__revealed_ident : ident  := 571%positive.\nDefinition var_BlindAuction__secondBid_ident : ident  := 572%positive.\n"
  },
  {
    "path": "contracts/fpblind/spblind/LSimBLINDAUCTION.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.LSimBLINDAUCTION for spblind.ds *)\nRequire Export spblind.LSimEVMOPCODE.\nRequire Export spblind.ObjSimBlindAuction.\n"
  },
  {
    "path": "contracts/fpblind/spblind/LSimEVMOPCODE.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.LSimEVMOPCODE for spblind.ds *)\nRequire Export spblind.ObjSimEVMOpcode.\n"
  },
  {
    "path": "contracts/fpblind/spblind/LSrcBLINDAUCTION.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.LSrcBLINDAUCTION for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.DataTypeProofs.\n\n\nRequire Import spblind.LayerBLINDAUCTION.\n\nRequire Import cclib.Integers.\nRequire Import cclib.Coqlib.\nRequire Import cclib.Maps.\n\nRequire Import backend.Options.\nRequire Import backend.AST.\nRequire Import backend.phase.Clike.Language.\nRequire Import backend.phase.MiniC.Language.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.Compiled.\nRequire Import backend.Compiled.\nRequire Import backend.Globalenvs.\nRequire Import backend.Glue.\n\n\nSection EdsgerGen.\n\nDefinition BlindAuction_initialize_done : function := \n\tmkfunction\n\tBlindAuction_initialize_cfun.(fn_return)\n\tBlindAuction_initialize_cfun.(fn_params)\n\tBlindAuction_initialize_cfun.(fn_temps)\n\tBlindAuction_initialize_cfun.(fn_body).\n\nDefinition BlindAuction_transferb_done : function := \n\tmkfunction\n\tBlindAuction_transferb_cfun.(fn_return)\n\tBlindAuction_transferb_cfun.(fn_params)\n\tBlindAuction_transferb_cfun.(fn_temps)\n\tBlindAuction_transferb_cfun.(fn_body).\n\nDefinition BlindAuction_reveal_done : function := \n\tmkfunction\n\tBlindAuction_reveal_cfun.(fn_return)\n\tBlindAuction_reveal_cfun.(fn_params)\n\tBlindAuction_reveal_cfun.(fn_temps)\n\tBlindAuction_reveal_cfun.(fn_body).\n\nDefinition BlindAuction_bid_done : function := \n\tmkfunction\n\tBlindAuction_bid_cfun.(fn_return)\n\tBlindAuction_bid_cfun.(fn_params)\n\tBlindAuction_bid_cfun.(fn_temps)\n\tBlindAuction_bid_cfun.(fn_body).\n\nDefinition BlindAuction_withdraw_done : function := \n\tmkfunction\n\tBlindAuction_withdraw_cfun.(fn_return)\n\tBlindAuction_withdraw_cfun.(fn_params)\n\tBlindAuction_withdraw_cfun.(fn_temps)\n\tBlindAuction_withdraw_cfun.(fn_body).\n\nDefinition BlindAuction_auctionEnd_done : function := \n\tmkfunction\n\tBlindAuction_auctionEnd_cfun.(fn_return)\n\tBlindAuction_auctionEnd_cfun.(fn_params)\n\tBlindAuction_auctionEnd_cfun.(fn_temps)\n\tBlindAuction_auctionEnd_cfun.(fn_body).\n\nDefinition ge : genv := new_genv (\n\t(var_BlindAuction__beneficiary_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__biddingEnd_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__revealEnd_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__ended_ident, unpair_ty tint_bool)::\n\t(var_BlindAuction__bids_ident, unpair_ty thash_Bid_HASH_Z_Bid)::\n\t(var_BlindAuction__highestBidder_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__highestBid_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__secondBid_ident, unpair_ty tint_U)::\n\t(var_BlindAuction__revealed_ident, unpair_ty thash_int_HASH_Z_bool)::\n\t(var_BlindAuction__amountOf_ident, unpair_ty thash_int_HASH_Z_Z)::nil)\n\tnil\n\t(\n\t(Int.repr 3835887894, BlindAuction_initialize_done):: (* 0xe4a30116 = \"initialize(uint256,uint256)\" *)\n\n\t(Int.repr 1808565993, BlindAuction_transferb_done):: (* 0x6bcc86e9 = \"transferb(uint256,uint256,uint256)\" *)\n\n\t(Int.repr 2471022327, BlindAuction_reveal_done):: (* 0x9348cef7 = \"reveal(uint256,uint256)\" *)\n\n\t(Int.repr 1162488499, BlindAuction_bid_done):: (* 0x454a2ab3 = \"bid(uint256)\" *)\n\n\t(Int.repr 1020253707, BlindAuction_withdraw_done):: (* 0x3ccfd60b = \"withdraw()\" *)\n\n\t(Int.repr 707064940, BlindAuction_auctionEnd_done):: (* 0x2a24f46c = \"auctionEnd()\" *)\nnil)\n\tNone.\n\n\nEnd EdsgerGen.\n\n(*change into extract directory*)\nCd \"/Users/sxysun/Desktop/CertiK/DeepSEA/contracts/fpblind/spblind/extraction\".\n\n(* Avoid name clashes *)\nExtraction Blacklist List String Int.\n\nSeparate Extraction\n    positive global_abstract_data_type  (* This line forces Coq to generate some files even if they are not used, to make the makefile work correctly. *)\n    Glue.full_compile_genv\n    ge.\n"
  },
  {
    "path": "contracts/fpblind/spblind/LSrcEVMOPCODE.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.LSrcEVMOPCODE for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.DataTypeProofs.\n\n\nRequire Import spblind.LayerEVMOPCODE.\n\nRequire Import cclib.Integers.\nRequire Import cclib.Coqlib.\nRequire Import cclib.Maps.\n\nRequire Import backend.Options.\nRequire Import backend.AST.\nRequire Import backend.phase.Clike.Language.\nRequire Import backend.phase.MiniC.Language.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.Compiled.\nRequire Import backend.Compiled.\nRequire Import backend.Globalenvs.\nRequire Import backend.Glue.\n\n\nSection EdsgerGen.\n\nDefinition ge : genv := new_genv (nil)\n\tnil\n\t(nil)\n\tNone.\n\n\nEnd EdsgerGen.\n\n(*change into extract directory*)\nCd \"/Users/sxysun/Desktop/CertiK/DeepSEA/contracts/fpblind/spblind/extraction\".\n\n(* Avoid name clashes *)\nExtraction Blacklist List String Int.\n\nSeparate Extraction\n    positive global_abstract_data_type  (* This line forces Coq to generate some files even if they are not used, to make the makefile work correctly. *)\n    Glue.full_compile_genv\n    ge.\n"
  },
  {
    "path": "contracts/fpblind/spblind/LayerBLINDAUCTION.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.LayerBLINDAUCTION for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.DataTypeProofs.\n(*Require Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.*)\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.StateMonad.\nRequire Import DeepSpec.lib.Monad.OptionMonad.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.core.SynthesisStmt.\nRequire Import backend.MachineModel.\nExisting Instance MonadState_DS.\nExisting Instance MonadZero_DS.\nRequire Export spblind.LayerEVMOPCODE.\n\nSection EdsgerGen.\n\n\n\nContext {memModelOps : MemoryModelOps mem}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  memModelOps := memModelOps;                                            \n  GetHighData := global_abstract_data_type \n}.\n\n\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nDefinition BLINDAUCTION_kernel_mode (abd : global_abstract_data_type) := True.\nGlobal Arguments BLINDAUCTION_kernel_mode / abd.\n\nClass Layer_BLINDAUCTION_Context_prf  := {\n  (* ensuring global empty data matches those in the object definitions *)\n  BLINDAUCTION_init__beneficiary_eq : _beneficiary init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__biddingEnd_eq : _biddingEnd init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__revealEnd_eq : _revealEnd init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__ended_eq : _ended init_global_abstract_data = false;\n  BLINDAUCTION_init__bids_eq : _bids init_global_abstract_data = (Int256Tree.empty Bid);\n  BLINDAUCTION_init__highestBidder_eq : _highestBidder init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__highestBid_eq : _highestBid init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__secondBid_eq : _secondBid init_global_abstract_data = (Int256.repr 0);\n  BLINDAUCTION_init__revealed_eq : _revealed init_global_abstract_data = (Int256Tree.empty bool);\n  BLINDAUCTION_init__amountOf_eq : _amountOf init_global_abstract_data = (Int256Tree.empty int256);\n  BLINDAUCTION_init__events_eq : _events init_global_abstract_data = nil\n}.\nContext`{CTXT_prf : !Layer_BLINDAUCTION_Context_prf}.\n\nInstance BLINDAUCTION_data_ops : CompatDataOps global_abstract_data_type := {\n  empty_data := init_global_abstract_data;\n  high_level_invariant d := True;\n  (* low_level_invariant := global_low_level_invariant; *) (* Omitted in Ethereum backend. \n  kernel_mode d := BLINDAUCTION_kernel_mode d *)\n}.\n\nInstance BLINDAUCTION_data : CompatData global_abstract_data_type := {\n  (* low_level_invariant_incr := AbData_low_level_invariant_incr;\n  empty_data_low_level_invariant := AbData_empty_data_low_level_invariant; *) (* Omitted in Ethereum backend. *)\n  empty_data_high_level_invariant := I\n}.\n\nInstance BLINDAUCTION_overlay_spec : OverlaySpecClass := {\n  (*cdataOpsHigh := BLINDAUCTION_data_ops;\n  cdataHigh := BLINDAUCTION_data *)\n}.\n\n\n\n(* (* TODO: add this back in for the Ethereum backend. *)\nGlobal Instance Layer_BLINDAUCTION'EVMOPCODE_Context_prf : Layer_EVMOPCODE_Context_prf.\nProof. esplit; apply CTXT_prf.\n  (*\n  - intros; simpl.\n    rewrite BLINDAUCTION_AbData_get_set.\n    destruct abd; reflexivity.\n  - intros; simpl.\n    rewrite BLINDAUCTION_AbData_get_set, BLINDAUCTION_AbData_set_set.\n    reflexivity.\n  - simpl.\n    rewrite BLINDAUCTION_AbData_get_empty_data.\n    reflexivity.\n  - admit.\n  *)\nQed.\nContext`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\n*)\n\nInstance BLINDAUCTION_underlay_spec : UnderlaySpecClass := {\n  cdataOpsLow := EVMOPCODE_data_ops;\n  cdataLow := EVMOPCODE_data;\n  (*GetLowLayer := EVMOPCODE_Layer *)\n}.\n\n\nSection OBJECT_BlindAuction_DEFINITION.\n  Context`{HM : !HyperMem}.\n\n  (* Object variables *)\n  Definition BlindAuction__beneficiary_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__beneficiary_ident;\n    ltype_ghost := false;\n\n    ltype_get := _beneficiary;\n    ltype_set := update__beneficiary;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__beneficiary_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__biddingEnd_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__biddingEnd_ident;\n    ltype_ghost := false;\n\n    ltype_get := _biddingEnd;\n    ltype_set := update__biddingEnd;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__biddingEnd_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__revealEnd_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__revealEnd_ident;\n    ltype_ghost := false;\n\n    ltype_get := _revealEnd;\n    ltype_set := update__revealEnd;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__revealEnd_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__ended_var := {|\n    ltype_tp_marker := tint_bool;\n\n    ltype_ident := Values.Iident var_BlindAuction__ended_ident;\n    ltype_ghost := false;\n\n    ltype_get := _ended;\n    ltype_set := update__ended;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__ended_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_bool in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__bids_var := {|\n    ltype_tp_marker := thash_Bid_HASH_Z_Bid;\n\n    ltype_ident := Values.Iident var_BlindAuction__bids_ident;\n    ltype_ghost := false;\n\n    ltype_get := _bids;\n    ltype_set := update__bids;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__bids_globvar : AST.globvar type :=\n    let ty := unpair_ty thash_Bid_HASH_Z_Bid in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__highestBidder_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__highestBidder_ident;\n    ltype_ghost := false;\n\n    ltype_get := _highestBidder;\n    ltype_set := update__highestBidder;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__highestBidder_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__highestBid_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__highestBid_ident;\n    ltype_ghost := false;\n\n    ltype_get := _highestBid;\n    ltype_set := update__highestBid;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__highestBid_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__secondBid_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_BlindAuction__secondBid_ident;\n    ltype_ghost := false;\n\n    ltype_get := _secondBid;\n    ltype_set := update__secondBid;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__secondBid_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__revealed_var := {|\n    ltype_tp_marker := thash_int_HASH_Z_bool;\n\n    ltype_ident := Values.Iident var_BlindAuction__revealed_ident;\n    ltype_ghost := false;\n\n    ltype_get := _revealed;\n    ltype_set := update__revealed;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__revealed_globvar : AST.globvar type :=\n    let ty := unpair_ty thash_int_HASH_Z_bool in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition BlindAuction__amountOf_var := {|\n    ltype_tp_marker := thash_int_HASH_Z_Z;\n\n    ltype_ident := Values.Iident var_BlindAuction__amountOf_ident;\n    ltype_ghost := false;\n\n    ltype_get := _amountOf;\n    ltype_set := update__amountOf;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition BlindAuction__amountOf_globvar : AST.globvar type :=\n    let ty := unpair_ty thash_int_HASH_Z_Z in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n\n  Definition BlindAuction_initialize := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* biddingTime : *) int_U_pair (cons (* revealTime : *) int_U_pair nil));\n    FC_returns := void_unit_pair;\n    FC_body := (CCsequence\n      (CCstore\n        (LCvar BlindAuction__beneficiary_var)\n        (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n      (CCsequence\n        (CCstore\n          (LCvar BlindAuction__biddingEnd_var)\n          (ECbinop tint_U Oadd\n            (@ECbuiltin0 _ _  _ builtin0_number_impl)\n            (ECtempvar tint_U 11%positive (* biddingTime *))))\n        (CCsequence\n          (CCstore\n            (LCvar BlindAuction__revealEnd_var)\n            (ECbinop tint_U Oadd\n              (ECbinop tint_U Oadd\n                (@ECbuiltin0 _ _  _ builtin0_number_impl)\n                (ECtempvar tint_U 11%positive (* biddingTime *)))\n              (ECtempvar tint_U 12%positive (* revealTime *))))\n          (CClet (* beneficiary := *) 13%positive\n            (CCload (LCvar BlindAuction__beneficiary_var))\n            (CCsequence\n              (CCstore\n                (LCvar BlindAuction__highestBidder_var)\n                (ECtempvar tint_U 13%positive (* beneficiary *)))\n              (CCsequence\n                (CCstore\n                  (LChash tint_bool\n                    (LCvar BlindAuction__revealed_var)\n                    (ECtempvar tint_U 13%positive (* beneficiary *)))\n                  (ECconst_int256 tint_bool true Int256.one))\n                (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))))\n  |}.\n  Lemma BlindAuction_initialize_wf\n      : synth_func_wellformed BlindAuction_initialize.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_initialize_opt :int256 -> int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in synth_func_spec_opt BlindAuction_initialize BlindAuction_initialize_wf.\n  Definition BlindAuction_initialize_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_initialize.(FC_params) _\n                      (BlindAuction_initialize_opt) args.\n  Definition BlindAuction_initialize_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_initialize BlindAuction_initialize_wf.\n\n  Definition BlindAuction_initialize_prim := {|\n    PRIMident := ident_BlindAuction_initialize;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_initialize.(FC_params);\n    PRIMret_marker := BlindAuction_initialize.(FC_returns);\n    PRIMcond := BlindAuction_initialize_spec_cond;\n    (* PRIMsem := BlindAuction_initialize_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_initialize_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_initialize_spec_hlist_opt_eq :\n    BlindAuction_initialize_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_initialize BlindAuction_initialize_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_initialize_cfun :=\n  Eval cbv in synth_func_func BlindAuction_initialize.\n\n  Definition BlindAuction_initialize_cond  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_initialize BlindAuction_initialize_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma BlindAuction_initialize_cond_eq : forall  a0 a1 me d, \n    BlindAuction_initialize_cond  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_initialize BlindAuction_initialize_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_initialize_obligation  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_initialize BlindAuction_initialize_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma BlindAuction_initialize_obligation_eq : forall  a0 a1 me d, \n    BlindAuction_initialize_obligation  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_initialize BlindAuction_initialize_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_initialize_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_initialize_opt] in\n    fun  a0 a1 me => execStateT (BlindAuction_initialize_opt a0 a1 me).\n  Lemma BlindAuction_initialize_spec_eq :\n    BlindAuction_initialize_spec =\n    fun  a0 a1 me => execStateT (synth_func_spec_opt BlindAuction_initialize BlindAuction_initialize_wf a0 a1 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_initialize_opt.\n\n  Definition BlindAuction_transferb := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* fromaddr : *) int_U_pair (cons (* toaddr : *) int_U_pair (cons (* amount : *) int_U_pair nil)));\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* base := *) 14%positive\n      (CCload (LChash tint_U\n        (LCvar BlindAuction__amountOf_var)\n        (ECtempvar tint_U 12%positive (* toaddr *))))\n      (CCsequence\n        (CCstore\n          (LChash tint_U\n            (LCvar BlindAuction__amountOf_var)\n            (ECtempvar tint_U 12%positive (* toaddr *)))\n          (ECbinop tint_U Oadd\n            (ECtempvar tint_U 14%positive (* base *))\n            (ECtempvar tint_U 13%positive (* amount *))))\n        (CClet (* base := *) 15%positive\n          (CCload (LChash tint_U\n            (LCvar BlindAuction__amountOf_var)\n            (ECtempvar tint_U 11%positive (* fromaddr *))))\n          (CCsequence\n            (CCstore\n              (LChash tint_U\n                (LCvar BlindAuction__amountOf_var)\n                (ECtempvar tint_U 11%positive (* fromaddr *)))\n              (ECbinop tint_U Osub\n                (ECtempvar tint_U 15%positive (* base *))\n                (ECtempvar tint_U 13%positive (* amount *))))\n            (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))\n  |}.\n  Lemma BlindAuction_transferb_wf\n      : synth_func_wellformed BlindAuction_transferb.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_transferb_opt :int256 -> int256 -> int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in synth_func_spec_opt BlindAuction_transferb BlindAuction_transferb_wf.\n  Definition BlindAuction_transferb_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_transferb.(FC_params) _\n                      (BlindAuction_transferb_opt) args.\n  Definition BlindAuction_transferb_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_transferb BlindAuction_transferb_wf.\n\n  Definition BlindAuction_transferb_prim := {|\n    PRIMident := ident_BlindAuction_transferb;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_transferb.(FC_params);\n    PRIMret_marker := BlindAuction_transferb.(FC_returns);\n    PRIMcond := BlindAuction_transferb_spec_cond;\n    (* PRIMsem := BlindAuction_transferb_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_transferb_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_transferb_spec_hlist_opt_eq :\n    BlindAuction_transferb_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_transferb BlindAuction_transferb_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_transferb_cfun :=\n  Eval cbv in synth_func_func BlindAuction_transferb.\n\n  Definition BlindAuction_transferb_cond  a0 a1 a2 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_transferb BlindAuction_transferb_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 me d.\n  \n  Lemma BlindAuction_transferb_cond_eq : forall  a0 a1 a2 me d, \n    BlindAuction_transferb_cond  a0 a1 a2 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_transferb BlindAuction_transferb_wf  a0 a1 a2 me d.\n    Proof.\n      intros  a0 a1 a2 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_transferb_obligation  a0 a1 a2 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_transferb BlindAuction_transferb_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 me d.\n  \n  Lemma BlindAuction_transferb_obligation_eq : forall  a0 a1 a2 me d, \n    BlindAuction_transferb_obligation  a0 a1 a2 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_transferb BlindAuction_transferb_wf  a0 a1 a2 me d.\n    Proof.\n      intros  a0 a1 a2 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_transferb_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_transferb_opt] in\n    fun  a0 a1 a2 me => execStateT (BlindAuction_transferb_opt a0 a1 a2 me).\n  Lemma BlindAuction_transferb_spec_eq :\n    BlindAuction_transferb_spec =\n    fun  a0 a1 a2 me => execStateT (synth_func_spec_opt BlindAuction_transferb BlindAuction_transferb_wf a0 a1 a2 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_transferb_opt.\n\n  Definition BlindAuction_reveal := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* value : *) int_U_pair (cons (* secret : *) int_hashvalue_pair nil));\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* biddingEnd := *) 13%positive\n      (CCload (LCvar BlindAuction__biddingEnd_var))\n      (CClet (* revealEnd := *) 14%positive\n        (CCload (LCvar BlindAuction__revealEnd_var))\n        (CCsequence\n          (CCassert (CCyield (ECbinop tint_bool Ogt\n            (@ECbuiltin0 _ _  _ builtin0_number_impl)\n            (ECtempvar tint_U 13%positive (* biddingEnd *)))))\n          (CCsequence\n            (CCassert (CCyield (ECbinop tint_bool Olt\n              (@ECbuiltin0 _ _  _ builtin0_number_impl)\n              (ECtempvar tint_U 14%positive (* revealEnd *)))))\n            (CClet (* hashed := *) 17%positive\n              (CCyield (ECbinop tint_hashvalue Osha_2\n                (ECtempvar tint_U 11%positive (* value *))\n                (ECtempvar tint_hashvalue 12%positive (* secret *))))\n              (CClet (* blindedBid := *) 18%positive\n                (CCload (LCfield tint_hashvalue Bid_struct__blindedBid_ident\n                  (LChash tBid_Bid\n                    (LCvar BlindAuction__bids_var)\n                    (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n                (CClet (* deposit := *) 19%positive\n                  (CCload (LCfield tint_U Bid_struct__deposit_ident\n                    (LChash tBid_Bid\n                      (LCvar BlindAuction__bids_var)\n                      (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n                  (CClet (* revealedp := *) 20%positive\n                    (CCload (LChash tint_bool\n                      (LCvar BlindAuction__revealed_var)\n                      (@ECbuiltin0 _ _  _ builtin0_caller_impl)))\n                    (CCsequence\n                      (CCassert (CCyield (ECtempvar tint_bool 20%positive (* revealedp *))))\n                      (CCsequence\n                        (CCstore\n                          (LChash tint_bool\n                            (LCvar BlindAuction__revealed_var)\n                            (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n                          (ECconst_int256 tint_bool true Int256.one))\n                        (CCifthenelse (ECbinop tint_bool Oeq\n                            (ECtempvar tint_hashvalue 17%positive (* hashed *))\n                            (ECtempvar tint_hashvalue 18%positive (* blindedBid *)))\n                          (CClet (* beneficiary := *) 22%positive\n                            (CCload (LCvar BlindAuction__beneficiary_var))\n                            (CCifthenelse (ECbinop tint_bool Ogt\n                                (ECtempvar tint_U 11%positive (* value *))\n                                (ECtempvar tint_U 19%positive (* deposit *)))\n                              (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))\n                              (CClet (* highestBid := *) 23%positive\n                                (CCload (LCvar BlindAuction__highestBid_var))\n                                (CCifthenelse (ECbinop tint_bool Oge\n                                    (ECtempvar tint_U 11%positive (* value *))\n                                    (ECtempvar tint_U 23%positive (* highestBid *)))\n                                  (CClet (* highestBidder := *) 24%positive\n                                    (CCload (LCvar BlindAuction__highestBidder_var))\n                                    (CClet (* secondBid := *) 25%positive\n                                      (CCload (LCvar BlindAuction__secondBid_var))\n                                      (CClet (* base := *) 26%positive\n                                        (CCload (LChash tint_U\n                                          (LCvar BlindAuction__amountOf_var)\n                                          (ECtempvar tint_U 24%positive (* highestBidder *))))\n                                        (CCsequence\n                                          (CCstore\n                                            (LChash tint_U\n                                              (LCvar BlindAuction__amountOf_var)\n                                              (ECtempvar tint_U 24%positive (* highestBidder *)))\n                                            (ECbinop tint_U Oadd\n                                              (ECtempvar tint_U 26%positive (* base *))\n                                              (ECtempvar tint_U 25%positive (* secondBid *))))\n                                          (CClet (* base := *) 27%positive\n                                            (CCload (LChash tint_U\n                                              (LCvar BlindAuction__amountOf_var)\n                                              (ECtempvar tint_U 22%positive (* beneficiary *))))\n                                            (CCsequence\n                                              (CCstore\n                                                (LChash tint_U\n                                                  (LCvar BlindAuction__amountOf_var)\n                                                  (ECtempvar tint_U 22%positive (* beneficiary *)))\n                                                (ECbinop tint_U Osub\n                                                  (ECtempvar tint_U 27%positive (* base *))\n                                                  (ECtempvar tint_U 25%positive (* secondBid *))))\n                                              (CCsequence\n                                                (CCstore\n                                                  (LCvar BlindAuction__secondBid_var)\n                                                  (ECtempvar tint_U 23%positive (* highestBid *)))\n                                                (CCsequence\n                                                  (CCstore\n                                                    (LCvar BlindAuction__highestBid_var)\n                                                    (ECtempvar tint_U 11%positive (* value *)))\n                                                  (CCsequence\n                                                    (CCstore\n                                                      (LCvar BlindAuction__highestBidder_var)\n                                                      (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n                                                    (CClet (* highestBidder := *) 28%positive\n                                                      (CCload (LCvar BlindAuction__highestBidder_var))\n                                                      (CClet (* secondBid := *) 29%positive\n                                                        (CCload (LCvar BlindAuction__secondBid_var))\n                                                        (CClet (* base := *) 30%positive\n                                                          (CCload (LChash tint_U\n                                                            (LCvar BlindAuction__amountOf_var)\n                                                            (ECtempvar tint_U 22%positive (* beneficiary *))))\n                                                          (CCsequence\n                                                            (CCstore\n                                                              (LChash tint_U\n                                                                (LCvar BlindAuction__amountOf_var)\n                                                                (ECtempvar tint_U 22%positive (* beneficiary *)))\n                                                              (ECbinop tint_U Oadd\n                                                                (ECtempvar tint_U 30%positive (* base *))\n                                                                (ECtempvar tint_U 29%positive (* secondBid *))))\n                                                            (CClet (* base := *) 31%positive\n                                                              (CCload (LChash tint_U\n                                                                (LCvar BlindAuction__amountOf_var)\n                                                                (ECtempvar tint_U 28%positive (* highestBidder *))))\n                                                              (CCsequence\n                                                                (CCstore\n                                                                  (LChash tint_U\n                                                                    (LCvar BlindAuction__amountOf_var)\n                                                                    (ECtempvar tint_U 28%positive (* highestBidder *)))\n                                                                  (ECbinop tint_U Osub\n                                                                    (ECtempvar tint_U 31%positive (* base *))\n                                                                    (ECtempvar tint_U 29%positive (* secondBid *))))\n                                                                (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))))))))))))))\n                                  (CClet (* secondBid := *) 32%positive\n                                    (CCload (LCvar BlindAuction__secondBid_var))\n                                    (CCifthenelse (ECbinop tint_bool Ogt\n                                        (ECtempvar tint_U 11%positive (* value *))\n                                        (ECtempvar tint_U 32%positive (* secondBid *)))\n                                      (CClet (* highestBidder := *) 33%positive\n                                        (CCload (LCvar BlindAuction__highestBidder_var))\n                                        (CClet (* base := *) 34%positive\n                                          (CCload (LChash tint_U\n                                            (LCvar BlindAuction__amountOf_var)\n                                            (ECtempvar tint_U 33%positive (* highestBidder *))))\n                                          (CCsequence\n                                            (CCstore\n                                              (LChash tint_U\n                                                (LCvar BlindAuction__amountOf_var)\n                                                (ECtempvar tint_U 33%positive (* highestBidder *)))\n                                              (ECbinop tint_U Oadd\n                                                (ECtempvar tint_U 34%positive (* base *))\n                                                (ECtempvar tint_U 32%positive (* secondBid *))))\n                                            (CClet (* base := *) 35%positive\n                                              (CCload (LChash tint_U\n                                                (LCvar BlindAuction__amountOf_var)\n                                                (ECtempvar tint_U 22%positive (* beneficiary *))))\n                                              (CCsequence\n                                                (CCstore\n                                                  (LChash tint_U\n                                                    (LCvar BlindAuction__amountOf_var)\n                                                    (ECtempvar tint_U 22%positive (* beneficiary *)))\n                                                  (ECbinop tint_U Osub\n                                                    (ECtempvar tint_U 35%positive (* base *))\n                                                    (ECtempvar tint_U 32%positive (* secondBid *))))\n                                                (CCsequence\n                                                  (CCstore\n                                                    (LCvar BlindAuction__secondBid_var)\n                                                    (ECtempvar tint_U 11%positive (* value *)))\n                                                  (CClet (* secondBid := *) 36%positive\n                                                    (CCload (LCvar BlindAuction__secondBid_var))\n                                                    (CClet (* base := *) 37%positive\n                                                      (CCload (LChash tint_U\n                                                        (LCvar BlindAuction__amountOf_var)\n                                                        (ECtempvar tint_U 22%positive (* beneficiary *))))\n                                                      (CCsequence\n                                                        (CCstore\n                                                          (LChash tint_U\n                                                            (LCvar BlindAuction__amountOf_var)\n                                                            (ECtempvar tint_U 22%positive (* beneficiary *)))\n                                                          (ECbinop tint_U Oadd\n                                                            (ECtempvar tint_U 37%positive (* base *))\n                                                            (ECtempvar tint_U 36%positive (* secondBid *))))\n                                                        (CClet (* base := *) 38%positive\n                                                          (CCload (LChash tint_U\n                                                            (LCvar BlindAuction__amountOf_var)\n                                                            (ECtempvar tint_U 33%positive (* highestBidder *))))\n                                                          (CCsequence\n                                                            (CCstore\n                                                              (LChash tint_U\n                                                                (LCvar BlindAuction__amountOf_var)\n                                                                (ECtempvar tint_U 33%positive (* highestBidder *)))\n                                                              (ECbinop tint_U Osub\n                                                                (ECtempvar tint_U 38%positive (* base *))\n                                                                (ECtempvar tint_U 36%positive (* secondBid *))))\n                                                            (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))))))))))\n                                      (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))))\n                          (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))))))))))\n  |}.\n  Lemma BlindAuction_reveal_wf\n      : synth_func_wellformed BlindAuction_reveal.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_reveal_opt :int256 -> hashvalue ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in synth_func_spec_opt BlindAuction_reveal BlindAuction_reveal_wf.\n  Definition BlindAuction_reveal_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_reveal.(FC_params) _\n                      (BlindAuction_reveal_opt) args.\n  Definition BlindAuction_reveal_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_reveal BlindAuction_reveal_wf.\n\n  Definition BlindAuction_reveal_prim := {|\n    PRIMident := ident_BlindAuction_reveal;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_reveal.(FC_params);\n    PRIMret_marker := BlindAuction_reveal.(FC_returns);\n    PRIMcond := BlindAuction_reveal_spec_cond;\n    (* PRIMsem := BlindAuction_reveal_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_reveal_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_reveal_spec_hlist_opt_eq :\n    BlindAuction_reveal_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_reveal BlindAuction_reveal_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_reveal_cfun :=\n  Eval cbv in synth_func_func BlindAuction_reveal.\n\n  Definition BlindAuction_reveal_cond  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_reveal BlindAuction_reveal_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma BlindAuction_reveal_cond_eq : forall  a0 a1 me d, \n    BlindAuction_reveal_cond  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_reveal BlindAuction_reveal_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_reveal_obligation  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_reveal BlindAuction_reveal_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma BlindAuction_reveal_obligation_eq : forall  a0 a1 me d, \n    BlindAuction_reveal_obligation  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_reveal BlindAuction_reveal_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_reveal_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_reveal_opt] in\n    fun  a0 a1 me => execStateT (BlindAuction_reveal_opt a0 a1 me).\n  Lemma BlindAuction_reveal_spec_eq :\n    BlindAuction_reveal_spec =\n    fun  a0 a1 me => execStateT (synth_func_spec_opt BlindAuction_reveal BlindAuction_reveal_wf a0 a1 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_reveal_opt.\n\n  Definition BlindAuction_bid := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* blindedBid : *) int_hashvalue_pair nil);\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* biddingEnd := *) 12%positive\n      (CCload (LCvar BlindAuction__biddingEnd_var))\n      (CClet (* beneficiary := *) 13%positive\n        (CCload (LCvar BlindAuction__beneficiary_var))\n        (CCsequence\n          (CCassert (CCyield (ECbinop tint_bool Olt\n            (@ECbuiltin0 _ _  _ builtin0_number_impl)\n            (ECtempvar tint_U 12%positive (* biddingEnd *)))))\n          (CCsequence\n            (CCassert (CCyield (ECbinop tint_bool One\n              (@ECbuiltin0 _ _  _ builtin0_caller_impl)\n              (ECtempvar tint_U 13%positive (* beneficiary *)))))\n            (CClet (* old_deposit := *) 16%positive\n              (CCload (LCfield tint_U Bid_struct__deposit_ident\n                (LChash tBid_Bid\n                  (LCvar BlindAuction__bids_var)\n                  (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n              (CCsequence\n                (CCifthenelse (ECbinop tint_bool One\n                    (ECtempvar tint_U 16%positive (* old_deposit *))\n                    (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0)))\n                  (CCsequence\n                    (CCstore\n                      (LCfield tint_hashvalue Bid_struct__blindedBid_ident\n                        (LChash tBid_Bid\n                          (LCvar BlindAuction__bids_var)\n                          (@ECbuiltin0 _ _  _ builtin0_caller_impl)))\n                      (ECtempvar tint_hashvalue 11%positive (* blindedBid *)))\n                    (CCsequence\n                      (CCstore\n                        (LCfield tint_U Bid_struct__deposit_ident\n                          (LChash tBid_Bid\n                            (LCvar BlindAuction__bids_var)\n                            (@ECbuiltin0 _ _  _ builtin0_caller_impl)))\n                        (@ECbuiltin0 _ _  _ builtin0_callvalue_impl))\n                      (CCsequence\n                        (CCstore\n                          (LChash tint_U\n                            (LCvar BlindAuction__amountOf_var)\n                            (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n                          (@ECbuiltin0 _ _  _ builtin0_callvalue_impl))\n                        (CCsequence\n                          (CCcall EVMOpcode_transfer_prim\n                            (HCons int_U_pair _\n                              (@ECbuiltin0 _ _  _ builtin0_caller_impl)\n                              (HCons int_U_pair _\n                                (ECtempvar tint_U 16%positive (* old_deposit *))\n                                HNil)))\n                          (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))\n                  (CCconstr\n                    (cons Bid_struct__blindedBid_ident (cons Bid_struct__deposit_ident nil))\n                    (cons (* _blindedBid : *) int_hashvalue_pair (cons (* _deposit : *) int_U_pair nil))\n                    (LChash tBid_Bid\n                      (LCvar BlindAuction__bids_var)\n                      (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n                    (HCons int_hashvalue_pair _\n                      (ECtempvar tint_hashvalue 11%positive (* blindedBid *))\n                      (HCons int_U_pair _\n                        (@ECbuiltin0 _ _  _ builtin0_callvalue_impl)\n                        HNil))\n                    Build_Bid))\n                (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))))\n  |}.\n  Lemma BlindAuction_bid_wf\n      : synth_func_wellformed BlindAuction_bid.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_bid_opt :hashvalue ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in synth_func_spec_opt BlindAuction_bid BlindAuction_bid_wf.\n  Definition BlindAuction_bid_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_bid.(FC_params) _\n                      (BlindAuction_bid_opt) args.\n  Definition BlindAuction_bid_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_bid BlindAuction_bid_wf.\n\n  Definition BlindAuction_bid_prim := {|\n    PRIMident := ident_BlindAuction_bid;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_bid.(FC_params);\n    PRIMret_marker := BlindAuction_bid.(FC_returns);\n    PRIMcond := BlindAuction_bid_spec_cond;\n    (* PRIMsem := BlindAuction_bid_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_bid_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_bid_spec_hlist_opt_eq :\n    BlindAuction_bid_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_bid BlindAuction_bid_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_bid_cfun :=\n  Eval cbv in synth_func_func BlindAuction_bid.\n\n  Definition BlindAuction_bid_cond  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_bid BlindAuction_bid_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma BlindAuction_bid_cond_eq : forall  a0 me d, \n    BlindAuction_bid_cond  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_bid BlindAuction_bid_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_bid_obligation  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_bid BlindAuction_bid_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma BlindAuction_bid_obligation_eq : forall  a0 me d, \n    BlindAuction_bid_obligation  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_bid BlindAuction_bid_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_bid_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_bid_opt] in\n    fun  a0 me => execStateT (BlindAuction_bid_opt a0 me).\n  Lemma BlindAuction_bid_spec_eq :\n    BlindAuction_bid_spec =\n    fun  a0 me => execStateT (synth_func_spec_opt BlindAuction_bid BlindAuction_bid_wf a0 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_bid_opt.\n\n  Definition BlindAuction_withdraw := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := nil;\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* revealEnd := *) 12%positive\n      (CCload (LCvar BlindAuction__revealEnd_var))\n      (CClet (* ended := *) 13%positive\n        (CCload (LCvar BlindAuction__ended_var))\n        (CCsequence\n          (CCassert (CCyield (ECbinop tint_bool Ogt\n            (@ECbuiltin0 _ _  _ builtin0_number_impl)\n            (ECtempvar tint_U 12%positive (* revealEnd *)))))\n          (CCsequence\n            (CCassert (CCyield (ECunop tint_bool Onotbool (ECtempvar tint_bool 13%positive (* ended *)))))\n            (CClet (* amount := *) 16%positive\n              (CCload (LChash tint_U\n                (LCvar BlindAuction__amountOf_var)\n                (@ECbuiltin0 _ _  _ builtin0_caller_impl)))\n              (CCsequence\n                (CCstore\n                  (LChash tint_U\n                    (LCvar BlindAuction__amountOf_var)\n                    (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n                  (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0)))\n                (CCsequence\n                  (CCcall EVMOpcode_transfer_prim\n                    (HCons int_U_pair _\n                      (@ECbuiltin0 _ _  _ builtin0_caller_impl)\n                      (HCons int_U_pair _\n                        (ECtempvar tint_U 16%positive (* amount *))\n                        HNil)))\n                  (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))))))\n  |}.\n  Lemma BlindAuction_withdraw_wf\n      : synth_func_wellformed BlindAuction_withdraw.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_withdraw_opt : machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in synth_func_spec_opt BlindAuction_withdraw BlindAuction_withdraw_wf.\n  Definition BlindAuction_withdraw_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_withdraw.(FC_params) _\n                      (BlindAuction_withdraw_opt) args.\n  Definition BlindAuction_withdraw_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_withdraw BlindAuction_withdraw_wf.\n\n  Definition BlindAuction_withdraw_prim := {|\n    PRIMident := ident_BlindAuction_withdraw;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_withdraw.(FC_params);\n    PRIMret_marker := BlindAuction_withdraw.(FC_returns);\n    PRIMcond := BlindAuction_withdraw_spec_cond;\n    (* PRIMsem := BlindAuction_withdraw_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_withdraw_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_withdraw_spec_hlist_opt_eq :\n    BlindAuction_withdraw_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_withdraw BlindAuction_withdraw_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_withdraw_cfun :=\n  Eval cbv in synth_func_func BlindAuction_withdraw.\n\n  Definition BlindAuction_withdraw_cond  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_withdraw BlindAuction_withdraw_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma BlindAuction_withdraw_cond_eq : forall  me d, \n    BlindAuction_withdraw_cond  me d ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_withdraw BlindAuction_withdraw_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_withdraw_obligation  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_withdraw BlindAuction_withdraw_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma BlindAuction_withdraw_obligation_eq : forall  me d, \n    BlindAuction_withdraw_obligation  me d ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_withdraw BlindAuction_withdraw_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_withdraw_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_withdraw_opt] in\n    fun  me => execStateT (BlindAuction_withdraw_opt me).\n  Lemma BlindAuction_withdraw_spec_eq :\n    BlindAuction_withdraw_spec =\n    fun  me => execStateT (synth_func_spec_opt BlindAuction_withdraw BlindAuction_withdraw_wf me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_withdraw_opt.\n\n  Definition BlindAuction_auctionEnd := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := nil;\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* revealEnd := *) 12%positive\n      (CCload (LCvar BlindAuction__revealEnd_var))\n      (CClet (* ended := *) 13%positive\n        (CCload (LCvar BlindAuction__ended_var))\n        (CCsequence\n          (CCassert (CCyield (ECbinop tint_bool Ogt\n            (@ECbuiltin0 _ _  _ builtin0_number_impl)\n            (ECtempvar tint_U 12%positive (* revealEnd *)))))\n          (CCsequence\n            (CCassert (CCyield (ECunop tint_bool Onotbool (ECtempvar tint_bool 13%positive (* ended *)))))\n            (CCsequence\n              (CCstore\n                (LCvar BlindAuction__ended_var)\n                (ECconst_int256 tint_bool true Int256.one))\n              (CClet (* beneficiary := *) 16%positive\n                (CCload (LCvar BlindAuction__beneficiary_var))\n                (CClet (* highestBid := *) 17%positive\n                  (CCload (LCvar BlindAuction__highestBid_var))\n                  (CCsequence\n                    (CCcall EVMOpcode_transfer_prim\n                      (HCons int_U_pair _\n                        (ECtempvar tint_U 16%positive (* beneficiary *))\n                        (HCons int_U_pair _\n                          (ECtempvar tint_U 17%positive (* highestBid *))\n                          HNil)))\n                    (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))))))\n  |}.\n  Lemma BlindAuction_auctionEnd_wf\n      : synth_func_wellformed BlindAuction_auctionEnd.\n  Proof. solve_wellformed. Defined.\n  Definition BlindAuction_auctionEnd_opt : machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in synth_func_spec_opt BlindAuction_auctionEnd BlindAuction_auctionEnd_wf.\n  Definition BlindAuction_auctionEnd_spec_hlist_opt args :=\n    @apply_param_func BlindAuction_auctionEnd.(FC_params) _\n                      (BlindAuction_auctionEnd_opt) args.\n  Definition BlindAuction_auctionEnd_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n  in *)\n  synth_func_spec_cond BlindAuction_auctionEnd BlindAuction_auctionEnd_wf.\n\n  Definition BlindAuction_auctionEnd_prim := {|\n    PRIMident := ident_BlindAuction_auctionEnd;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := BlindAuction_auctionEnd.(FC_params);\n    PRIMret_marker := BlindAuction_auctionEnd.(FC_returns);\n    PRIMcond := BlindAuction_auctionEnd_spec_cond;\n    (* PRIMsem := BlindAuction_auctionEnd_spec_hlist; *)\n    PRIMsem_opt := BlindAuction_auctionEnd_spec_hlist_opt\n  |}.\n\n  Lemma BlindAuction_auctionEnd_spec_hlist_opt_eq :\n    BlindAuction_auctionEnd_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt BlindAuction_auctionEnd BlindAuction_auctionEnd_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition BlindAuction_auctionEnd_cfun :=\n  Eval cbv in synth_func_func BlindAuction_auctionEnd.\n\n  Definition BlindAuction_auctionEnd_cond  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_auctionEnd BlindAuction_auctionEnd_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma BlindAuction_auctionEnd_cond_eq : forall  me d, \n    BlindAuction_auctionEnd_cond  me d ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_auctionEnd BlindAuction_auctionEnd_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_auctionEnd_obligation  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_auctionEnd BlindAuction_auctionEnd_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma BlindAuction_auctionEnd_obligation_eq : forall  me d, \n    BlindAuction_auctionEnd_obligation  me d ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_auctionEnd BlindAuction_auctionEnd_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition BlindAuction_auctionEnd_spec :=\n  Eval cbv [sf_mem sf_return fst snd BlindAuction_auctionEnd_opt] in\n    fun  me => execStateT (BlindAuction_auctionEnd_opt me).\n  Lemma BlindAuction_auctionEnd_spec_eq :\n    BlindAuction_auctionEnd_spec =\n    fun  me => execStateT (synth_func_spec_opt BlindAuction_auctionEnd BlindAuction_auctionEnd_wf me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _beneficiary update__beneficiary _biddingEnd update__biddingEnd _revealEnd update__revealEnd _ended update__ended _bids update__bids _highestBidder update__highestBidder _highestBid update__highestBid _secondBid update__secondBid _revealed update__revealed _amountOf update__amountOf _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque BlindAuction_auctionEnd_opt.\nEnd OBJECT_BlindAuction_DEFINITION.\n(* (*Temporarily omitted in the Ethereum version.*)\n\nSection LAYER_BLINDAUCTION_DEFINITION.\n  Definition BLINDAUCTION_blindauction_initialize_prim := BlindAuction_initialize_prim.\n  Definition BLINDAUCTION_blindauction_transferb_prim := BlindAuction_transferb_prim.\n  Definition BLINDAUCTION_blindauction_reveal_prim := BlindAuction_reveal_prim.\n  Definition BLINDAUCTION_blindauction_bid_prim := BlindAuction_bid_prim.\n  Definition BLINDAUCTION_blindauction_withdraw_prim := BlindAuction_withdraw_prim.\n  Definition BLINDAUCTION_blindauction_auctionEnd_prim := BlindAuction_auctionEnd_prim.\n\n  Class BLINDAUCTION_preserves_invariants := {\n    BLINDAUCTION_BlindAuction_initialize_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_initialize_spec;\n    BLINDAUCTION_BlindAuction_transferb_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_transferb_spec;\n    BLINDAUCTION_BlindAuction_reveal_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_reveal_spec;\n    BLINDAUCTION_BlindAuction_bid_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_bid_spec;\n    BLINDAUCTION_BlindAuction_withdraw_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_withdraw_spec;\n    BLINDAUCTION_BlindAuction_auctionEnd_preserves_invariants :>\n      CompatGenSem.PreservesInvariants BlindAuction_auctionEnd_spec\n  }.\n  Context`{BLINDAUCTION_pres_inv : !BLINDAUCTION_preserves_invariants}.\n\n  Definition BLINDAUCTION_Layer : CompatLayerDef.compatlayer GetHighDataX :=\n    initialize ↦ CompatGenSem.gensem BlindAuction_initialize_spec\n      ⊕ transferb ↦ CompatGenSem.gensem BlindAuction_transferb_spec\n      ⊕ reveal ↦ CompatGenSem.gensem BlindAuction_reveal_spec\n      ⊕ bid ↦ CompatGenSem.gensem BlindAuction_bid_spec\n      ⊕ withdraw ↦ CompatGenSem.gensem BlindAuction_withdraw_spec\n      ⊕ auctionEnd ↦ CompatGenSem.gensem BlindAuction_auctionEnd_spec.\nEnd LAYER_BLINDAUCTION_DEFINITION.\n*)\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/LayerEVMOPCODE.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.LayerEVMOPCODE for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.DataTypeProofs.\n(*Require Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.*)\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.StateMonad.\nRequire Import DeepSpec.lib.Monad.OptionMonad.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.core.SynthesisStmt.\nRequire Import backend.MachineModel.\nExisting Instance MonadState_DS.\nExisting Instance MonadZero_DS.\n\nSection EdsgerGen.\n\n\n\nContext {memModelOps : MemoryModelOps mem}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  memModelOps := memModelOps;                                            \n  GetHighData := global_abstract_data_type \n}.\n\n\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nDefinition EVMOPCODE_kernel_mode (abd : global_abstract_data_type) := True.\nGlobal Arguments EVMOPCODE_kernel_mode / abd.\n\nClass Layer_EVMOPCODE_Context_prf  := {\n  (* ensuring global empty data matches those in the object definitions *)\n  EVMOPCODE_init__events_eq : _events init_global_abstract_data = nil\n}.\nContext`{CTXT_prf : !Layer_EVMOPCODE_Context_prf}.\n\nInstance EVMOPCODE_data_ops : CompatDataOps global_abstract_data_type := {\n  empty_data := init_global_abstract_data;\n  high_level_invariant d := True;\n  (* low_level_invariant := global_low_level_invariant; *) (* Omitted in Ethereum backend. \n  kernel_mode d := EVMOPCODE_kernel_mode d *)\n}.\n\nInstance EVMOPCODE_data : CompatData global_abstract_data_type := {\n  (* low_level_invariant_incr := AbData_low_level_invariant_incr;\n  empty_data_low_level_invariant := AbData_empty_data_low_level_invariant; *) (* Omitted in Ethereum backend. *)\n  empty_data_high_level_invariant := I\n}.\n\nInstance EVMOPCODE_overlay_spec : OverlaySpecClass := {\n  (*cdataOpsHigh := EVMOPCODE_data_ops;\n  cdataHigh := EVMOPCODE_data *)\n}.\n\n\n\nInstance EVMOPCODE_underlay_spec : UnderlaySpecClass := {\n  cdataOpsLow := @BuiltinBase_data_ops GlobalLayerSpec init_global_abstract_data;\n  cdataLow := BuiltinBase_data;\n  (*GetLowLayer := BuiltinBase_Layer *)\n}.\n\n\nSection OBJECT_EVMOpcode_DEFINITION.\n  Context`{HM : !HyperMem}.\n\n  (* Object variables *)\n  Definition EVMOpcode__events_var := {|\n    ltype_tp_marker := tint_list_Transfer;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _events;\n    ltype_set := update__events;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n\n  Definition EVMOpcode_transfer := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* toaddr : *) int_U_pair (cons (* much : *) int_U_pair nil));\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* e := *) 13%positive\n      (CCload (LCvar EVMOpcode__events_var))\n      (CCsequence\n        (CCrespec_opt\n          (AList.set 13%positive int_list_Transfer_pair (AList.set 12%positive int_U_pair (AList.set 11%positive int_U_pair (@AList.empty hyper_type_pair))))\n          (CCpanic tvoid_unit)\n          (fun se => @bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>\n          let a := (fun toaddr much e => {| _amount := much; _to := toaddr|} :: e)\n               (SpecTree.get 12%positive (* much *) se)\n               (SpecTree.get 11%positive (* toaddr *) se)\n               (SpecTree.get 13%positive (* e *) se) in\nput (EVMOpcode__events_var.(ltype_set) a d)\n           )))\n        (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))\n  |}.\n  Lemma EVMOpcode_transfer_wf\n      : synth_func_wellformed EVMOpcode_transfer.\n  Proof. solve_wellformed. Defined.\n  Definition EVMOpcode_transfer_opt :int256 -> int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _events update__events]\n  in synth_func_spec_opt EVMOpcode_transfer EVMOpcode_transfer_wf.\n  Definition EVMOpcode_transfer_spec_hlist_opt args :=\n    @apply_param_func EVMOpcode_transfer.(FC_params) _\n                      (EVMOpcode_transfer_opt) args.\n  Definition EVMOpcode_transfer_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             \n             _events update__events]\n  in *)\n  synth_func_spec_cond EVMOpcode_transfer EVMOpcode_transfer_wf.\n\n  Definition EVMOpcode_transfer_prim := {|\n    PRIMident := ident_EVMOpcode_transfer;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := EVMOpcode_transfer.(FC_params);\n    PRIMret_marker := EVMOpcode_transfer.(FC_returns);\n    PRIMcond := EVMOpcode_transfer_spec_cond;\n    (* PRIMsem := EVMOpcode_transfer_spec_hlist; *)\n    PRIMsem_opt := EVMOpcode_transfer_spec_hlist_opt\n  |}.\n\n  Lemma EVMOpcode_transfer_spec_hlist_opt_eq :\n    EVMOpcode_transfer_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt EVMOpcode_transfer EVMOpcode_transfer_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             \n             _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition EVMOpcode_transfer_cfun :=\n  Eval cbv in synth_func_func EVMOpcode_transfer.\n\n  Definition EVMOpcode_transfer_cond  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond EVMOpcode_transfer EVMOpcode_transfer_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma EVMOpcode_transfer_cond_eq : forall  a0 a1 me d, \n    EVMOpcode_transfer_cond  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond EVMOpcode_transfer EVMOpcode_transfer_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition EVMOpcode_transfer_obligation  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation EVMOpcode_transfer EVMOpcode_transfer_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma EVMOpcode_transfer_obligation_eq : forall  a0 a1 me d, \n    EVMOpcode_transfer_obligation  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation EVMOpcode_transfer EVMOpcode_transfer_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition EVMOpcode_transfer_spec :=\n  Eval cbv [sf_mem sf_return fst snd EVMOpcode_transfer_opt] in\n    fun  a0 a1 me => execStateT (EVMOpcode_transfer_opt a0 a1 me).\n  Lemma EVMOpcode_transfer_spec_eq :\n    EVMOpcode_transfer_spec =\n    fun  a0 a1 me => execStateT (synth_func_spec_opt EVMOpcode_transfer EVMOpcode_transfer_wf a0 a1 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          \n          _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque EVMOpcode_transfer_opt.\nEnd OBJECT_EVMOpcode_DEFINITION.\n(* (*Temporarily omitted in the Ethereum version.*)\n\nSection LAYER_EVMOPCODE_DEFINITION.\n  Definition EVMOPCODE_evm_transfer_prim := EVMOpcode_transfer_prim.\n\n  Class EVMOPCODE_preserves_invariants := {\n    EVMOPCODE_EVMOpcode_transfer_preserves_invariants :>\n      CompatGenSem.PreservesInvariants EVMOpcode_transfer_spec\n  }.\n  Context`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\n\n  Definition EVMOPCODE_Layer : CompatLayerDef.compatlayer GetHighDataX :=\n    transfer ↦ CompatGenSem.gensem EVMOpcode_transfer_spec.\nEnd LAYER_EVMOPCODE_DEFINITION.\n*)\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/Makefile",
    "content": "###############################################################################\n##  v      #                   The Coq Proof Assistant                       ##\n## <O___,, #                INRIA - CNRS - LIX - LRI - PPS                   ##\n##   \\VV/  #                                                                 ##\n##    //   #                                                                 ##\n###############################################################################\n## GNUMakefile for Coq 8.9.0\n\n# For debugging purposes (must stay here, don't move below)\nINITIAL_VARS := $(.VARIABLES)\n# To implement recursion we save the name of the main Makefile\nSELF := $(lastword $(MAKEFILE_LIST))\nPARENT := $(firstword $(MAKEFILE_LIST))\n\n# This file is generated by coq_makefile and contains many variable\n# definitions, like the list of .v files or the path to Coq\ninclude Makefile.conf\n\n# Put in place old names\nVFILES            := $(COQMF_VFILES)\nMLIFILES          := $(COQMF_MLIFILES)\nMLFILES           := $(COQMF_MLFILES)\nML4FILES          := $(COQMF_ML4FILES)\nMLPACKFILES       := $(COQMF_MLPACKFILES)\nMLLIBFILES        := $(COQMF_MLLIBFILES)\nCMDLINE_VFILES    := $(COQMF_CMDLINE_VFILES)\nINSTALLCOQDOCROOT := $(COQMF_INSTALLCOQDOCROOT)\nOTHERFLAGS        := $(COQMF_OTHERFLAGS)\nCOQ_SRC_SUBDIRS   := $(COQMF_COQ_SRC_SUBDIRS)\nOCAMLLIBS         := $(COQMF_OCAMLLIBS)\nSRC_SUBDIRS       := $(COQMF_SRC_SUBDIRS)\nCOQLIBS           := $(COQMF_COQLIBS)\nCOQLIBS_NOML      := $(COQMF_COQLIBS_NOML)\nCMDLINE_COQLIBS   := $(COQMF_CMDLINE_COQLIBS)\nLOCAL             := $(COQMF_LOCAL)\nCOQLIB            := $(COQMF_COQLIB)\nDOCDIR            := $(COQMF_DOCDIR)\nOCAMLFIND         := $(COQMF_OCAMLFIND)\nCAMLP5O           := $(COQMF_CAMLP5O)\nCAMLP5BIN         := $(COQMF_CAMLP5BIN)\nCAMLP5LIB         := $(COQMF_CAMLP5LIB)\nCAMLP5OPTIONS     := $(COQMF_CAMLP5OPTIONS)\nCAMLFLAGS         := $(COQMF_CAMLFLAGS)\nHASNATDYNLINK     := $(COQMF_HASNATDYNLINK)\n\nMakefile.conf: _CoqProject\n\tcoq_makefile -f _CoqProject -o Makefile\n\n# This file can be created by the user to hook into double colon rules or\n# add any other Makefile code he may need\n-include Makefile.local\n\n# Parameters ##################################################################\n#\n# Parameters are make variable assignments.\n# They can be passed to (each call to) make on the command line.\n# They can also be put in Makefile.local once an for all.\n# For retro-compatibility reasons they can be put in the _CoqProject, but this\n# practice is discouraged since _CoqProject better not contain make specific\n# code (be nice to user interfaces).\n\n# Print shell commands (set to non empty)\nVERBOSE ?=\n\n# Time the Coq process (set to non empty), and how (see default value)\nTIMED?=\nTIMECMD?=\n# Use command time on linux, gtime on Mac OS\nTIMEFMT?=\"$* (real: %e, user: %U, sys: %S, mem: %M ko)\"\nifneq (,$(TIMED))\nifeq (0,$(shell command time -f $(TIMEFMT) true >/dev/null 2>/dev/null; echo $$?))\nSTDTIME?=command time -f $(TIMEFMT)\nelse\nifeq (0,$(shell gtime -f $(TIMEFMT) true >/dev/null 2>/dev/null; echo $$?))\nSTDTIME?=gtime -f $(TIMEFMT)\nelse\nSTDTIME?=command time\nendif\nendif\nelse\nSTDTIME?=command time -f $(TIMEFMT)\nendif\n\n# Coq binaries\nCOQC     ?= \"$(COQBIN)coqc\"\nCOQTOP   ?= \"$(COQBIN)coqtop\"\nCOQCHK   ?= \"$(COQBIN)coqchk\"\nCOQDEP   ?= \"$(COQBIN)coqdep\"\nCOQDOC   ?= \"$(COQBIN)coqdoc\"\nCOQMKFILE ?= \"$(COQBIN)coq_makefile\"\n\n# Timing scripts\nCOQMAKE_ONE_TIME_FILE ?= \"$(COQLIB)/tools/make-one-time-file.py\"\nCOQMAKE_BOTH_TIME_FILES ?= \"$(COQLIB)/tools/make-both-time-files.py\"\nCOQMAKE_BOTH_SINGLE_TIMING_FILES ?= \"$(COQLIB)/tools/make-both-single-timing-files.py\"\nBEFORE ?=\nAFTER ?=\n\n# FIXME this should be generated by Coq (modules already linked by Coq)\nCAMLDONTLINK=camlp5.gramlib,unix,str\n\n# OCaml binaries\nCAMLC       ?= \"$(OCAMLFIND)\" ocamlc   -c\nCAMLOPTC    ?= \"$(OCAMLFIND)\" opt      -c\nCAMLLINK    ?= \"$(OCAMLFIND)\" ocamlc   -linkpkg -dontlink $(CAMLDONTLINK)\nCAMLOPTLINK ?= \"$(OCAMLFIND)\" opt      -linkpkg -dontlink $(CAMLDONTLINK)\nCAMLDOC     ?= \"$(OCAMLFIND)\" ocamldoc\nCAMLDEP     ?= \"$(OCAMLFIND)\" ocamldep -slash -ml-synonym .ml4 -ml-synonym .mlpack\n\n# DESTDIR is prepended to all installation paths\nDESTDIR ?=\n\n# Debug builds, typically -g to OCaml, -debug to Coq.\nCAMLDEBUG ?=\nCOQDEBUG ?=\n\n# Extra packages to be linked in (as in findlib -package)\nCAMLPKGS ?=\n\n# Option for making timing files\nTIMING?=\n# Option for changing sorting of timing output file\nTIMING_SORT_BY ?= auto\n# Output file names for timed builds\nTIME_OF_BUILD_FILE               ?= time-of-build.log\nTIME_OF_BUILD_BEFORE_FILE        ?= time-of-build-before.log\nTIME_OF_BUILD_AFTER_FILE         ?= time-of-build-after.log\nTIME_OF_PRETTY_BUILD_FILE        ?= time-of-build-pretty.log\nTIME_OF_PRETTY_BOTH_BUILD_FILE   ?= time-of-build-both.log\nTIME_OF_PRETTY_BUILD_EXTRA_FILES ?= - # also output to the command line\n\n########## End of parameters ##################################################\n# What follows may be relevant to you only if you need to\n# extend this Makefile.  If so, look for 'Extension point' here and\n# put in Makefile.local double colon rules accordingly.\n# E.g. to perform some work after the all target completes you can write\n#\n# post-all::\n# \techo \"All done!\"\n#\n# in Makefile.local\n#\n###############################################################################\n\n\n\n\n# Flags #######################################################################\n#\n# We define a bunch of variables combining the parameters.\n# To add additional flags to coq, coqchk or coqdoc, set the\n# {COQ,COQCHK,COQDOC}EXTRAFLAGS variable to whatever you want to add.\n# To overwrite the default choice and set your own flags entirely, set the\n# {COQ,COQCHK,COQDOC}FLAGS variable.\n\nSHOW := $(if $(VERBOSE),@true \"\",@echo \"\")\nHIDE := $(if $(VERBOSE),,@)\n\nTIMER=$(if $(TIMED), $(STDTIME), $(TIMECMD))\n\nOPT?=\n\n# The DYNOBJ and DYNLIB variables are used by \"coqdep -dyndep var\" in .v.d\nifeq '$(OPT)' '-byte'\nUSEBYTE:=true\nDYNOBJ:=.cma\nDYNLIB:=.cma\nelse\nUSEBYTE:=\nDYNOBJ:=.cmxs\nDYNLIB:=.cmxs\nendif\n\n# these variables are meant to be overriden if you want to add *extra* flags\nCOQEXTRAFLAGS?=\nCOQCHKEXTRAFLAGS?=\nCOQDOCEXTRAFLAGS?=\n\n# these flags do NOT contain the libraries, to make them easier to overwrite\nCOQFLAGS?=-q $(OPT) $(OTHERFLAGS) $(COQEXTRAFLAGS)\nCOQCHKFLAGS?=-silent -o $(COQCHKEXTRAFLAGS)\nCOQDOCFLAGS?=-interpolate -utf8 $(COQDOCEXTRAFLAGS)\n\nCOQDOCLIBS?=$(COQLIBS_NOML)\n\n# The version of Coq being run and the version of coq_makefile that\n# generated this makefile\nCOQ_VERSION:=$(shell $(COQC) --print-version | cut -d \" \" -f 1)\nCOQMAKEFILE_VERSION:=8.9.0\n\nCOQSRCLIBS?= $(foreach d,$(COQ_SRC_SUBDIRS), -I \"$(COQLIB)$(d)\")\n\nCAMLFLAGS+=$(OCAMLLIBS) $(COQSRCLIBS) -I $(CAMLP5LIB)\n\n# ocamldoc fails with unknown argument otherwise\nCAMLDOCFLAGS=$(filter-out -annot, $(filter-out -bin-annot, $(CAMLFLAGS)))\n\n# FIXME This should be generated by Coq\nGRAMMARS:=grammar.cma\nCAMLP5EXTEND=pa_extend.cmo q_MLast.cmo pa_macro.cmo\n\nCAMLLIB:=$(shell \"$(OCAMLFIND)\" printconf stdlib 2> /dev/null)\nifeq (,$(CAMLLIB))\nPP=$(error \"Cannot find the 'ocamlfind' binary used to build Coq ($(OCAMLFIND)). Pre-compiled binary packages of Coq do not support compiling plugins this way. Please download the sources of Coq and run the Windows build script.\")\nelse\nPP:=-pp '$(CAMLP5O) -I $(CAMLLIB) -I \"$(COQLIB)/grammar\" $(CAMLP5EXTEND) $(GRAMMARS) $(CAMLP5OPTIONS) -impl'\nendif\n\nifneq (,$(TIMING))\nTIMING_ARG=-time\nifeq (after,$(TIMING))\nTIMING_EXT=after-timing\nelse\nifeq (before,$(TIMING))\nTIMING_EXT=before-timing\nelse\nTIMING_EXT=timing\nendif\nendif\nelse\nTIMING_ARG=\nendif\n\n# Retro compatibility (DESTDIR is standard on Unix, DSTROOT is not)\nifdef DSTROOT\nDESTDIR := $(DSTROOT)\nendif\n\nconcat_path = $(if $(1),$(1)/$(if $(COQMF_WINDRIVE),$(subst $(COQMF_WINDRIVE),/,$(2)),$(2)),$(2))\n\nCOQLIBINSTALL = $(call concat_path,$(DESTDIR),$(COQLIB)user-contrib)\nCOQDOCINSTALL = $(call concat_path,$(DESTDIR),$(DOCDIR)user-contrib)\nCOQTOPINSTALL = $(call concat_path,$(DESTDIR),$(COQLIB)toploop)\n\n# Files #######################################################################\n#\n# We here define a bunch of variables about the files being part of the\n# Coq project in order to ease the writing of build target and build rules\n\nVDFILE := .coqdeps\n\nALLSRCFILES := \\\n\t$(ML4FILES) \\\n\t$(MLFILES) \\\n\t$(MLPACKFILES) \\\n\t$(MLLIBFILES) \\\n\t$(MLIFILES)\n\n# helpers\nvo_to_obj = $(addsuffix .o,\\\n  $(filter-out Warning: Error:,\\\n  $(shell $(COQTOP) -q -noinit -batch -quiet -print-mod-uid $(1))))\nstrip_dotslash = $(patsubst ./%,%,$(1))\nVO = vo\n\nVOFILES = $(VFILES:.v=.$(VO))\nGLOBFILES = $(VFILES:.v=.glob)\nHTMLFILES = $(VFILES:.v=.html)\nGHTMLFILES = $(VFILES:.v=.g.html)\nBEAUTYFILES = $(addsuffix .beautified,$(VFILES))\nTEXFILES = $(VFILES:.v=.tex)\nGTEXFILES = $(VFILES:.v=.g.tex)\nCMOFILES = \\\n\t$(ML4FILES:.ml4=.cmo) \\\n\t$(MLFILES:.ml=.cmo) \\\n\t$(MLPACKFILES:.mlpack=.cmo)\nCMXFILES = $(CMOFILES:.cmo=.cmx)\nOFILES = $(CMXFILES:.cmx=.o)\nCMAFILES = $(MLLIBFILES:.mllib=.cma) $(MLPACKFILES:.mlpack=.cma)\nCMXAFILES = $(CMAFILES:.cma=.cmxa)\nCMIFILES = \\\n\t$(CMOFILES:.cmo=.cmi) \\\n\t$(MLIFILES:.mli=.cmi)\n# the /if/ is because old _CoqProject did not list a .ml(pack|lib) but just\n# a .ml4 file\nCMXSFILES = \\\n\t$(MLPACKFILES:.mlpack=.cmxs) \\\n\t$(CMXAFILES:.cmxa=.cmxs) \\\n\t$(if $(MLPACKFILES)$(CMXAFILES),,\\\n\t\t$(ML4FILES:.ml4=.cmxs) $(MLFILES:.ml=.cmxs))\n\n# files that are packed into a plugin (no extension)\nPACKEDFILES = \\\n\t$(call strip_dotslash, \\\n\t  $(foreach lib, \\\n            $(call strip_dotslash, \\\n\t       $(MLPACKFILES:.mlpack=_MLPACK_DEPENDENCIES)),$($(lib))))\n# files that are archived into a .cma (mllib)\nLIBEDFILES = \\\n\t$(call strip_dotslash, \\\n\t  $(foreach lib, \\\n            $(call strip_dotslash, \\\n\t       $(MLLIBFILES:.mllib=_MLLIB_DEPENDENCIES)),$($(lib))))\nCMIFILESTOINSTALL = $(filter-out $(addsuffix .cmi,$(PACKEDFILES)),$(CMIFILES))\nCMOFILESTOINSTALL = $(filter-out $(addsuffix .cmo,$(PACKEDFILES)),$(CMOFILES))\nOBJFILES = $(call vo_to_obj,$(VOFILES))\nALLNATIVEFILES = \\\n\t$(OBJFILES:.o=.cmi) \\\n\t$(OBJFILES:.o=.cmx) \\\n\t$(OBJFILES:.o=.cmxs)\n# trick: wildcard filters out non-existing files, so that `install` doesn't show\n# warnings and `clean` doesn't pass to rm a list of files that is too long for\n# the shell.\nNATIVEFILES = $(wildcard $(ALLNATIVEFILES))\nFILESTOINSTALL = \\\n\t$(VOFILES) \\\n\t$(VFILES) \\\n\t$(GLOBFILES) \\\n\t$(NATIVEFILES) \\\n\t$(CMIFILESTOINSTALL)\nBYTEFILESTOINSTALL = \\\n\t$(CMOFILESTOINSTALL) \\\n\t$(CMAFILES)\nifeq '$(HASNATDYNLINK)' 'true'\nDO_NATDYNLINK = yes\nFILESTOINSTALL += $(CMXSFILES) $(CMXAFILES) $(CMOFILESTOINSTALL:.cmo=.cmx)\nelse\nDO_NATDYNLINK =\nendif\n\nALLDFILES = $(addsuffix .d,$(ALLSRCFILES) $(VDFILE))\n\n# Compilation targets #########################################################\n\nall:\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" pre-all\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" real-all\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" post-all\n.PHONY: all\n\nall.timing.diff:\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" pre-all\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" real-all.timing.diff TIME_OF_PRETTY_BUILD_EXTRA_FILES=\"\"\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" post-all\n.PHONY: all.timing.diff\n\nmake-pretty-timed-before:: TIME_OF_BUILD_FILE=$(TIME_OF_BUILD_BEFORE_FILE)\nmake-pretty-timed-after:: TIME_OF_BUILD_FILE=$(TIME_OF_BUILD_AFTER_FILE)\nmake-pretty-timed make-pretty-timed-before make-pretty-timed-after::\n\t$(HIDE)rm -f pretty-timed-success.ok\n\t$(HIDE)($(MAKE) --no-print-directory -f \"$(PARENT)\" $(TGTS) TIMED=1 2>&1 && touch pretty-timed-success.ok) | tee -a $(TIME_OF_BUILD_FILE)\n\t$(HIDE)rm pretty-timed-success.ok # must not be -f; must fail if the touch failed\nprint-pretty-timed::\n\t$(HIDE)$(COQMAKE_ONE_TIME_FILE) $(TIME_OF_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)\nprint-pretty-timed-diff::\n\t$(HIDE)$(COQMAKE_BOTH_TIME_FILES) --sort-by=$(TIMING_SORT_BY) $(TIME_OF_BUILD_AFTER_FILE) $(TIME_OF_BUILD_BEFORE_FILE) $(TIME_OF_PRETTY_BOTH_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)\nifeq (,$(BEFORE))\nprint-pretty-single-time-diff::\n\t@echo 'Error: Usage: $(MAKE) print-pretty-single-time-diff AFTER=path/to/file.v.after-timing BEFORE=path/to/file.v.before-timing'\n\t$(HIDE)false\nelse\nifeq (,$(AFTER))\nprint-pretty-single-time-diff::\n\t@echo 'Error: Usage: $(MAKE) print-pretty-single-time-diff AFTER=path/to/file.v.after-timing BEFORE=path/to/file.v.before-timing'\n\t$(HIDE)false\nelse\nprint-pretty-single-time-diff::\n\t$(HIDE)$(COQMAKE_BOTH_SINGLE_TIMING_FILES) --sort-by=$(TIMING_SORT_BY) $(AFTER) $(BEFORE) $(TIME_OF_PRETTY_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)\nendif\nendif\npretty-timed:\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(PARENT)\" make-pretty-timed\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" print-pretty-timed\n.PHONY: pretty-timed make-pretty-timed make-pretty-timed-before make-pretty-timed-after print-pretty-timed print-pretty-timed-diff print-pretty-single-time-diff\n\n# Extension points for actions to be performed before/after the all target\npre-all::\n\t@# Extension point\n\t$(HIDE)if [ \"$(COQMAKEFILE_VERSION)\" != \"$(COQ_VERSION)\" ]; then\\\n\t  echo \"W: This Makefile was generated by Coq $(COQMAKEFILE_VERSION)\";\\\n\t  echo \"W: while the current Coq version is $(COQ_VERSION)\";\\\n\tfi\n.PHONY: pre-all\n\npost-all::\n\t@# Extension point\n.PHONY: post-all\n\nreal-all: $(VOFILES) $(if $(USEBYTE),bytefiles,optfiles)\n.PHONY: real-all\n\nreal-all.timing.diff: $(VOFILES:.vo=.v.timing.diff)\n.PHONY: real-all.timing.diff\n\nbytefiles: $(CMOFILES) $(CMAFILES)\n.PHONY: bytefiles\n\noptfiles: $(if $(DO_NATDYNLINK),$(CMXSFILES))\n.PHONY: optfiles\n\n# FIXME, see Ralf's bugreport\nquick: $(VOFILES:.vo=.vio)\n.PHONY: quick\n\nvio2vo:\n\t$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) \\\n\t\t-schedule-vio2vo $(J) $(VOFILES:%.vo=%.vio)\n.PHONY: vio2vo\n\nquick2vo:\n\t$(HIDE)make -j $(J) quick\n\t$(HIDE)VIOFILES=$$(for vofile in $(VOFILES); do \\\n\t  viofile=\"$$(echo \"$$vofile\" | sed \"s/\\.vo$$/.vio/\")\"; \\\n\t  if [ \"$$vofile\" -ot \"$$viofile\" -o ! -e \"$$vofile\" ]; then printf \"$$viofile \"; fi; \\\n\tdone); \\\n\techo \"VIO2VO: $$VIOFILES\"; \\\n\tif [ -n \"$$VIOFILES\" ]; then \\\n\t  $(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) -schedule-vio2vo $(J) $$VIOFILES; \\\n\tfi\n.PHONY: quick2vo\n\ncheckproofs:\n\t$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) \\\n\t\t-schedule-vio-checking $(J) $(VOFILES:%.vo=%.vio)\n.PHONY: checkproofs\n\nvalidate: $(VOFILES)\n\t$(TIMER) $(COQCHK) $(COQCHKFLAGS) $(COQLIBS) $^\n.PHONY: validate\n\nonly: $(TGTS)\n.PHONY: only\n\n# Documentation targets #######################################################\n\nhtml: $(GLOBFILES) $(VFILES)\n\t$(SHOW)'COQDOC -d html $(GAL)'\n\t$(HIDE)mkdir -p html\n\t$(HIDE)$(COQDOC) \\\n\t\t-toc $(COQDOCFLAGS) -html $(GAL) $(COQDOCLIBS) -d html $(VFILES)\n\nmlihtml: $(MLIFILES:.mli=.cmi)\n\t$(SHOW)'CAMLDOC -d $@'\n\t$(HIDE)mkdir $@ || rm -rf $@/*\n\t$(HIDE)$(CAMLDOC) -html \\\n\t\t-d $@ -m A $(CAMLDEBUG) $(CAMLDOCFLAGS) $(MLIFILES)\n\nall-mli.tex: $(MLIFILES:.mli=.cmi)\n\t$(SHOW)'CAMLDOC -latex $@'\n\t$(HIDE)$(CAMLDOC) -latex \\\n\t\t-o $@ -m A $(CAMLDEBUG) $(CAMLDOCFLAGS) $(MLIFILES)\n\nall.ps: $(VFILES)\n\t$(SHOW)'COQDOC -ps $(GAL)'\n\t$(HIDE)$(COQDOC) \\\n\t\t-toc $(COQDOCFLAGS) -ps $(GAL) $(COQDOCLIBS) \\\n\t\t-o $@ `$(COQDEP) -sort -suffix .v $(VFILES)`\n\nall.pdf: $(VFILES)\n\t$(SHOW)'COQDOC -pdf $(GAL)'\n\t$(HIDE)$(COQDOC) \\\n\t\t-toc $(COQDOCFLAGS) -pdf $(GAL) $(COQDOCLIBS) \\\n\t\t-o $@ `$(COQDEP) -sort -suffix .v $(VFILES)`\n\n# FIXME: not quite right, since the output name is different\ngallinahtml: GAL=-g\ngallinahtml: html\n\nall-gal.ps: GAL=-g\nall-gal.ps: all.ps\n\nall-gal.pdf: GAL=-g\nall-gal.pdf: all.pdf\n\n# ?\nbeautify: $(BEAUTYFILES)\n\tfor file in $^; do mv $${file%.beautified} $${file%beautified}old && mv $${file} $${file%.beautified}; done\n\t@echo 'Do not do \"make clean\" until you are sure that everything went well!'\n\t@echo 'If there were a problem, execute \"for file in $$(find . -name \\*.v.old -print); do mv $${file} $${file%.old}; done\" in your shell/'\n.PHONY: beautify\n\n# Installation targets ########################################################\n#\n# There rules can be extended in Makefile.local\n# Extensions can't assume when they run.\n\ninstall:\n\t$(HIDE)for f in $(FILESTOINSTALL); do\\\n\t df=\"`$(COQMKFILE) -destination-of \"$$f\" $(COQLIBS)`\";\\\n\t if [ \"$$?\" != \"0\" -o -z \"$$df\" ]; then\\\n\t   echo SKIP \"$$f\" since it has no logical path;\\\n\t else\\\n\t   install -d \"$(COQLIBINSTALL)/$$df\" &&\\\n\t   install -m 0644 \"$$f\" \"$(COQLIBINSTALL)/$$df\" &&\\\n\t   echo INSTALL \"$$f\" \"$(COQLIBINSTALL)/$$df\";\\\n\t fi;\\\n\tdone\n\t$(HIDE)$(MAKE) install-extra -f \"$(SELF)\"\ninstall-extra::\n\t@# Extension point\n.PHONY: install install-extra\n\ninstall-byte:\n\t$(HIDE)for f in $(BYTEFILESTOINSTALL); do\\\n\t df=\"`$(COQMKFILE) -destination-of \"$$f\" $(COQLIBS)`\";\\\n\t if [ \"$$?\" != \"0\" -o -z \"$$df\" ]; then\\\n\t   echo SKIP \"$$f\" since it has no logical path;\\\n\t else\\\n\t   install -d \"$(COQLIBINSTALL)/$$df\" &&\\\n\t   install -m 0644 \"$$f\" \"$(COQLIBINSTALL)/$$df\" &&\\\n\t   echo INSTALL \"$$f\" \"$(COQLIBINSTALL)/$$df\";\\\n\t fi;\\\n\tdone\n\ninstall-doc:: html mlihtml\n\t@# Extension point\n\t$(HIDE)install -d \"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/html\"\n\t$(HIDE)for i in html/*; do \\\n\t dest=\"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/$$i\";\\\n\t install -m 0644 \"$$i\" \"$$dest\";\\\n\t echo INSTALL \"$$i\" \"$$dest\";\\\n\tdone\n\t$(HIDE)install -d \\\n\t\t\"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/mlihtml\"\n\t$(HIDE)for i in mlihtml/*; do \\\n\t dest=\"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/$$i\";\\\n\t install -m 0644 \"$$i\" \"$$dest\";\\\n\t echo INSTALL \"$$i\" \"$$dest\";\\\n\tdone\n.PHONY: install-doc\n\nuninstall::\n\t@# Extension point\n\t$(HIDE)for f in $(FILESTOINSTALL); do \\\n\t df=\"`$(COQMKFILE) -destination-of \"$$f\" $(COQLIBS)`\" &&\\\n\t instf=\"$(COQLIBINSTALL)/$$df/`basename $$f`\" &&\\\n\t rm -f \"$$instf\" &&\\\n\t echo RM \"$$instf\" &&\\\n\t (rmdir \"$(call concat_path,,$(COQLIBINSTALL)/$$df/)\" 2>/dev/null || true); \\\n\tdone\n.PHONY: uninstall\n\nuninstall-doc::\n\t@# Extension point\n\t$(SHOW)'RM $(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/html'\n\t$(HIDE)rm -rf \"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/html\"\n\t$(SHOW)'RM $(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/mlihtml'\n\t$(HIDE)rm -rf \"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/mlihtml\"\n\t$(HIDE) rmdir \"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/\" || true\n.PHONY: uninstall-doc\n\n# Cleaning ####################################################################\n#\n# There rules can be extended in Makefile.local\n# Extensions can't assume when they run.\n\nclean::\n\t@# Extension point\n\t$(SHOW)'CLEAN'\n\t$(HIDE)rm -f $(CMOFILES)\n\t$(HIDE)rm -f $(CMIFILES)\n\t$(HIDE)rm -f $(CMAFILES)\n\t$(HIDE)rm -f $(CMOFILES:.cmo=.cmx)\n\t$(HIDE)rm -f $(CMXAFILES)\n\t$(HIDE)rm -f $(CMXSFILES)\n\t$(HIDE)rm -f $(CMOFILES:.cmo=.o)\n\t$(HIDE)rm -f $(CMXAFILES:.cmxa=.a)\n\t$(HIDE)rm -f $(ALLDFILES)\n\t$(HIDE)rm -f $(NATIVEFILES)\n\t$(HIDE)find . -name .coq-native -type d -empty -delete\n\t$(HIDE)rm -f $(VOFILES)\n\t$(HIDE)rm -f $(VOFILES:.vo=.vio)\n\t$(HIDE)rm -f $(BEAUTYFILES) $(VFILES:=.old)\n\t$(HIDE)rm -f all.ps all-gal.ps all.pdf all-gal.pdf all.glob all-mli.tex\n\t$(HIDE)rm -f $(VFILES:.v=.glob)\n\t$(HIDE)rm -f $(VFILES:.v=.tex)\n\t$(HIDE)rm -f $(VFILES:.v=.g.tex)\n\t$(HIDE)rm -f pretty-timed-success.ok\n\t$(HIDE)rm -rf html mlihtml\n.PHONY: clean\n\ncleanall:: clean\n\t@# Extension point\n\t$(SHOW)'CLEAN *.aux *.timing'\n\t$(HIDE)rm -f $(foreach f,$(VFILES:.v=),$(dir $(f)).$(notdir $(f)).aux)\n\t$(HIDE)rm -f $(TIME_OF_BUILD_FILE) $(TIME_OF_BUILD_BEFORE_FILE) $(TIME_OF_BUILD_AFTER_FILE) $(TIME_OF_PRETTY_BUILD_FILE) $(TIME_OF_PRETTY_BOTH_BUILD_FILE)\n\t$(HIDE)rm -f $(VOFILES:.vo=.v.timing)\n\t$(HIDE)rm -f $(VOFILES:.vo=.v.before-timing)\n\t$(HIDE)rm -f $(VOFILES:.vo=.v.after-timing)\n\t$(HIDE)rm -f $(VOFILES:.vo=.v.timing.diff)\n.PHONY: cleanall\n\narchclean::\n\t@# Extension point\n\t$(SHOW)'CLEAN *.cmx *.o'\n\t$(HIDE)rm -f $(NATIVEFILES)\n\t$(HIDE)rm -f $(CMOFILES:%.cmo=%.cmx)\n.PHONY: archclean\n\n\n# Compilation rules ###########################################################\n\n$(MLIFILES:.mli=.cmi): %.cmi: %.mli\n\t$(SHOW)'CAMLC -c $<'\n\t$(HIDE)$(CAMLC) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) $<\n\n$(ML4FILES:.ml4=.cmo): %.cmo: %.ml4\n\t$(SHOW)'CAMLC -pp -c $<'\n\t$(HIDE)$(CAMLC) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) $(PP) -impl $<\n\n$(ML4FILES:.ml4=.cmx): %.cmx: %.ml4\n\t$(SHOW)'CAMLOPT -pp -c $(FOR_PACK) $<'\n\t$(HIDE)$(CAMLOPTC) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) $(PP) $(FOR_PACK) -impl $<\n\n$(MLFILES:.ml=.cmo): %.cmo: %.ml\n\t$(SHOW)'CAMLC -c $<'\n\t$(HIDE)$(CAMLC) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) $<\n\n$(MLFILES:.ml=.cmx): %.cmx: %.ml\n\t$(SHOW)'CAMLOPT -c $(FOR_PACK) $<'\n\t$(HIDE)$(CAMLOPTC) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) $(FOR_PACK) $<\n\n\n$(MLLIBFILES:.mllib=.cmxs): %.cmxs: %.cmxa\n\t$(SHOW)'CAMLOPT -shared -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) \\\n\t\t-linkall -shared -o $@ $<\n\n$(MLLIBFILES:.mllib=.cma): %.cma: | %.mllib\n\t$(SHOW)'CAMLC -a -o $@'\n\t$(HIDE)$(CAMLLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) -a -o $@ $^\n\n$(MLLIBFILES:.mllib=.cmxa): %.cmxa: | %.mllib\n\t$(SHOW)'CAMLOPT -a -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) -a -o $@ $^\n\n\n$(MLPACKFILES:.mlpack=.cmxs): %.cmxs: %.cmxa\n\t$(SHOW)'CAMLOPT -shared -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) \\\n\t\t-shared -linkall -o $@ $<\n\n$(MLPACKFILES:.mlpack=.cmxa): %.cmxa: %.cmx\n\t$(SHOW)'CAMLOPT -a -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) -a -o $@ $<\n\n$(MLPACKFILES:.mlpack=.cma): %.cma: %.cmo | %.mlpack\n\t$(SHOW)'CAMLC -a -o $@'\n\t$(HIDE)$(CAMLLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) -a -o $@ $^\n\n$(MLPACKFILES:.mlpack=.cmo): %.cmo: | %.mlpack\n\t$(SHOW)'CAMLC -pack -o $@'\n\t$(HIDE)$(CAMLLINK) $(CAMLDEBUG) $(CAMLFLAGS) -pack -o $@ $^\n\n$(MLPACKFILES:.mlpack=.cmx): %.cmx: | %.mlpack\n\t$(SHOW)'CAMLOPT -pack -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) -pack -o $@ $^\n\n# This rule is for _CoqProject with no .mllib nor .mlpack\n$(filter-out $(MLLIBFILES:.mllib=.cmxs) $(MLPACKFILES:.mlpack=.cmxs) $(addsuffix .cmxs,$(PACKEDFILES)) $(addsuffix .cmxs,$(LIBEDFILES)),$(MLFILES:.ml=.cmxs) $(ML4FILES:.ml4=.cmxs)): %.cmxs: %.cmx\n\t$(SHOW)'[deprecated,use-mllib-or-mlpack] CAMLOPT -shared -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) \\\n\t\t-shared -o $@ $<\n\nifneq (,$(TIMING))\nTIMING_EXTRA = > $<.$(TIMING_EXT)\nelse\nTIMING_EXTRA =\nendif\n\n$(VOFILES): %.vo: %.v\n\t$(SHOW)COQC $<\n\t$(HIDE)$(TIMER) $(COQC) $(COQDEBUG) $(TIMING_ARG) $(COQFLAGS) $(COQLIBS) $< $(TIMING_EXTRA)\n\n# FIXME ?merge with .vo / .vio ?\n$(GLOBFILES): %.glob: %.v\n\t$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) $<\n\n$(VFILES:.v=.vio): %.vio: %.v\n\t$(SHOW)COQC -quick $<\n\t$(HIDE)$(TIMER) $(COQC) -quick $(COQDEBUG) $(COQFLAGS) $(COQLIBS) $<\n\n$(addsuffix .timing.diff,$(VFILES)): %.timing.diff : %.before-timing %.after-timing\n\t$(SHOW)PYTHON TIMING-DIFF $<\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" print-pretty-single-time-diff BEFORE=$*.before-timing AFTER=$*.after-timing TIME_OF_PRETTY_BUILD_FILE=\"$@\"\n\n$(BEAUTYFILES): %.v.beautified: %.v\n\t$(SHOW)'BEAUTIFY $<'\n\t$(HIDE)$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) -beautify $<\n\n$(TEXFILES): %.tex: %.v\n\t$(SHOW)'COQDOC -latex $<'\n\t$(HIDE)$(COQDOC) $(COQDOCFLAGS) -latex $< -o $@\n\n$(GTEXFILES): %.g.tex: %.v\n\t$(SHOW)'COQDOC -latex -g $<'\n\t$(HIDE)$(COQDOC) $(COQDOCFLAGS) -latex -g $< -o $@\n\n$(HTMLFILES): %.html: %.v %.glob\n\t$(SHOW)'COQDOC -html $<'\n\t$(HIDE)$(COQDOC) $(COQDOCFLAGS) -html $< -o $@\n\n$(GHTMLFILES): %.g.html: %.v %.glob\n\t$(SHOW)'COQDOC -html -g $<'\n\t$(HIDE)$(COQDOC) $(COQDOCFLAGS)  -html -g $< -o $@\n\n# Dependency files ############################################################\n\nifneq ($(filter-out archclean clean cleanall printenv make-pretty-timed make-pretty-timed-before make-pretty-timed-after print-pretty-timed print-pretty-timed-diff print-pretty-single-time-diff,$(MAKECMDGOALS)),)\n -include $(ALLDFILES)\nelse\n ifeq ($(MAKECMDGOALS),)\n  -include $(ALLDFILES)\n endif\nendif\n\n.SECONDARY: $(ALLDFILES)\n\nredir_if_ok = > \"$@\" || ( RV=$$?; rm -f \"$@\"; exit $$RV )\n\n$(addsuffix .d,$(MLIFILES)): %.mli.d: %.mli\n\t$(SHOW)'CAMLDEP $<'\n\t$(HIDE)$(CAMLDEP) $(OCAMLLIBS) \"$<\" $(redir_if_ok)\n\n$(addsuffix .d,$(ML4FILES)): %.ml4.d: %.ml4\n\t$(SHOW)'CAMLDEP -pp $<'\n\t$(HIDE)$(CAMLDEP) $(OCAMLLIBS) $(PP) -impl \"$<\" $(redir_if_ok)\n\n$(addsuffix .d,$(MLFILES)): %.ml.d: %.ml\n\t$(SHOW)'CAMLDEP $<'\n\t$(HIDE)$(CAMLDEP) $(OCAMLLIBS) \"$<\" $(redir_if_ok)\n\n$(addsuffix .d,$(MLLIBFILES)): %.mllib.d: %.mllib\n\t$(SHOW)'COQDEP $<'\n\t$(HIDE)$(COQDEP) $(OCAMLLIBS) -c \"$<\" $(redir_if_ok)\n\n$(addsuffix .d,$(MLPACKFILES)): %.mlpack.d: %.mlpack\n\t$(SHOW)'COQDEP $<'\n\t$(HIDE)$(COQDEP) $(OCAMLLIBS) -c \"$<\" $(redir_if_ok)\n\n# If this makefile is created using a _CoqProject we have coqdep get\n# options from it. This avoids argument length limits for pathological\n# projects. Note that extra options might be on the command line.\nVDFILE_FLAGS:=$(if _CoqProject,-f _CoqProject,) $(CMDLINE_COQLIBS) $(CMDLINE_VFILES)\n\n$(VDFILE).d: $(VFILES)\n\t$(SHOW)'COQDEP VFILES'\n\t$(HIDE)$(COQDEP) -dyndep var $(VDFILE_FLAGS) $(redir_if_ok)\n\n# Misc ########################################################################\n\nbyte:\n\t$(HIDE)$(MAKE) all \"OPT:=-byte\" -f \"$(SELF)\"\n.PHONY: byte\n\nopt:\n\t$(HIDE)$(MAKE) all \"OPT:=-opt\" -f \"$(SELF)\"\n.PHONY:\topt\n\n# This is deprecated.  To extend this makefile use\n# extension points and Makefile.local\nprintenv::\n\t$(warning printenv is deprecated)\n\t$(warning write extensions in Makefile.local or include Makefile.conf)\n\t@echo 'LOCAL = $(LOCAL)'\n\t@echo 'COQLIB = $(COQLIB)'\n\t@echo 'DOCDIR = $(DOCDIR)'\n\t@echo 'OCAMLFIND = $(OCAMLFIND)'\n\t@echo 'CAMLP5O = $(CAMLP5O)'\n\t@echo 'CAMLP5BIN = $(CAMLP5BIN)'\n\t@echo 'CAMLP5LIB = $(CAMLP5LIB)'\n\t@echo 'CAMLP5OPTIONS = $(CAMLP5OPTIONS)'\n\t@echo 'HASNATDYNLINK = $(HASNATDYNLINK)'\n\t@echo 'SRC_SUBDIRS = $(SRC_SUBDIRS)'\n\t@echo 'COQ_SRC_SUBDIRS = $(COQ_SRC_SUBDIRS)'\n\t@echo 'OCAMLFIND = $(OCAMLFIND)'\n\t@echo 'PP = $(PP)'\n\t@echo 'COQFLAGS = $(COQFLAGS)'\n\t@echo 'COQLIB = $(COQLIBS)'\n\t@echo 'COQLIBINSTALL = $(COQLIBINSTALL)'\n\t@echo 'COQDOCINSTALL = $(COQDOCINSTALL)'\n.PHONY:\tprintenv\n\n# Generate a .merlin file.  If you need to append directives to this\n# file you can extend the merlin-hook target in Makefile.local\n.merlin:\n\t$(SHOW)'FILL .merlin'\n\t$(HIDE)echo 'FLG $(COQMF_CAMLFLAGS)' > .merlin\n\t$(HIDE)echo 'B $(COQLIB)' >> .merlin\n\t$(HIDE)echo 'S $(COQLIB)' >> .merlin\n\t$(HIDE)$(foreach d,$(COQ_SRC_SUBDIRS), \\\n\t\techo 'B $(COQLIB)$(d)' >> .merlin;)\n\t$(HIDE)$(foreach d,$(COQ_SRC_SUBDIRS), \\\n\t\techo 'S $(COQLIB)$(d)' >> .merlin;)\n\t$(HIDE)$(foreach d,$(SRC_SUBDIRS), echo 'B $(d)' >> .merlin;)\n\t$(HIDE)$(foreach d,$(SRC_SUBDIRS), echo 'S $(d)' >> .merlin;)\n\t$(HIDE)$(MAKE) merlin-hook -f \"$(SELF)\"\n.PHONY: merlin\n\nmerlin-hook::\n\t@# Extension point\n.PHONY: merlin-hook\n\n# prints all variables\ndebug:\n\t$(foreach v,\\\n\t\t$(sort $(filter-out $(INITIAL_VARS) INITIAL_VARS,\\\n\t       \t\t$(.VARIABLES))),\\\n\t       \t$(info $(v) = $($(v))))\n.PHONY: debug\n\n.DEFAULT_GOAL := all\n"
  },
  {
    "path": "contracts/fpblind/spblind/Makefile.conf",
    "content": "# This configuration file was generated by running:\n# coq_makefile -f _CoqProject -o Makefile\n\n\n###############################################################################\n#                                                                             #\n# Project files.                                                              #\n#                                                                             #\n###############################################################################\n\nCOQMF_VFILES = EdsgerIdents.v DataTypeOps.v DataTypeProofs.v DataTypes.v LayerBLINDAUCTION.v LayerEVMOPCODE.v RefineBLINDAUCTION.v ObjBlindAuctionCodeProofs.v\nCOQMF_MLIFILES = \nCOQMF_MLFILES = \nCOQMF_ML4FILES = \nCOQMF_MLPACKFILES = \nCOQMF_MLLIBFILES = \nCOQMF_CMDLINE_VFILES = \n\n###############################################################################\n#                                                                             #\n# Path directives (-I, -R, -Q).                                               #\n#                                                                             #\n###############################################################################\n\nCOQMF_OCAMLLIBS = \nCOQMF_SRC_SUBDIRS = \nCOQMF_COQLIBS =   -R ../../.. DeepSpec\nCOQMF_COQLIBS_NOML =  -R ../../.. DeepSpec\nCOQMF_CMDLINE_COQLIBS =   \n\n###############################################################################\n#                                                                             #\n# Coq configuration.                                                          #\n#                                                                             #\n###############################################################################\n\nCOQMF_LOCAL=0\nCOQMF_COQLIB=/Users/sxysun/.opam/4.07.0/lib/coq/\nCOQMF_DOCDIR=/Users/sxysun/.opam/4.07.0/doc/\nCOQMF_OCAMLFIND=/Users/sxysun/.opam/4.07.0/bin/ocamlfind\nCOQMF_CAMLP5O=/Users/sxysun/.opam/4.07.0/bin/camlp5o\nCOQMF_CAMLP5BIN=/Users/sxysun/.opam/4.07.0/bin/\nCOQMF_CAMLP5LIB=/Users/sxysun/.opam/4.07.0/lib/camlp5\nCOQMF_CAMLP5OPTIONS=-loc loc\nCOQMF_CAMLFLAGS=-thread -rectypes -w +a-4-9-27-41-42-44-45-48-50-58-59   -safe-string -strict-sequence\nCOQMF_HASNATDYNLINK=true\nCOQMF_COQ_SRC_SUBDIRS=config dev lib clib kernel library engine pretyping interp parsing proofs tactics toplevel printing grammar ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/micromega plugins/nsatz plugins/omega plugins/quote plugins/romega plugins/rtauto plugins/setoid_ring plugins/ssr plugins/ssrmatching plugins/syntax plugins/xml\nCOQMF_WINDRIVE=\n\n###############################################################################\n#                                                                             #\n# Extra variables.                                                            #\n#                                                                             #\n###############################################################################\n\nCOQMF_OTHERFLAGS = \nCOQMF_INSTALLCOQDOCROOT = DeepSpec\n"
  },
  {
    "path": "contracts/fpblind/spblind/ObjBlindAuctionCode.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.ObjBlindAuctionCode for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import DeepSpec.Linking.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\nRequire Import layerlib.LinkSourceTemplate.\n\nRequire Import spblind.LayerBLINDAUCTION.\nRequire Import spblind.RefineBLINDAUCTION.\nRequire Import spblind.ObjBlindAuctionCodeProofs.\n\nSection EdsgerGen.\n\n\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nContext`{CTXT_prf : !Layer_BLINDAUCTION_Context_prf}.\nContext`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\nExisting Instances BLINDAUCTION_overlay_spec BLINDAUCTION_underlay_spec\n                   BLINDAUCTION_hypermem.\n\nLemma relate_AbData_translates_kernel_mode j d1 d2 :\n    relate_AbData j d1 d2 -> kernel_mode d1 -> kernel_mode d2.\nProof.\n  simpl; intros rel d1_kern.\n  (* rewrite <- (ikern_re _ _ _ rel), <- (ihost_re _ _ _ rel). *)\n  exact d1_kern.\nQed.\n\nInstance EVMOPCODE_evm_transfer_prim_prf :\n    primitive_prf EVMOPCODE_evm_transfer_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem EVMOpcode_transfer_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance BlindAuction__beneficiary_var_prf :\n    HyperLType BlindAuction__beneficiary_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__beneficiary_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__biddingEnd_var_prf :\n    HyperLType BlindAuction__biddingEnd_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__biddingEnd_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__revealEnd_var_prf :\n    HyperLType BlindAuction__revealEnd_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__revealEnd_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__ended_var_prf :\n    HyperLType BlindAuction__ended_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__ended_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__bids_var_prf :\n    HyperLType BlindAuction__bids_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__bids_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__highestBidder_var_prf :\n    HyperLType BlindAuction__highestBidder_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__highestBidder_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__highestBid_var_prf :\n    HyperLType BlindAuction__highestBid_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__highestBid_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__secondBid_var_prf :\n    HyperLType BlindAuction__secondBid_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__secondBid_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__revealed_var_prf :\n    HyperLType BlindAuction__revealed_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__revealed_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance BlindAuction__amountOf_var_prf :\n    HyperLType BlindAuction__amountOf_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get BlindAuction__amountOf_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\n(* Do not assume this context until now to avoid above proofs using the wrong one *)\nContext`{BLINDAUCTION_pres_inv : !BLINDAUCTION_preserves_invariants}.\n\nLemma BlindAuction_initialize_prf : function_constr_prf BlindAuction_initialize.\nProof. solve_function_constr_prf @BlindAuction_initialize. Qed.\n\nTheorem BlindAuction_initialize_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_initialize ↦ CompatGenSem.gensem BlindAuction_initialize_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_initialize BlindAuction_initialize_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_initialize_spec_eq.\n    change BlindAuction_initialize_cfun\n      with (synth_func_func BlindAuction_initialize).\n    apply synth_correct_2_void.\n    + exact BlindAuction_initialize_prf.\n    + exact BlindAuction_initialize_vc.\n    + exact BlindAuction_initialize_oblg.\n(*  - apply semof_prim_kernel_mode_2_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_initialize_spec_requires_kernel_mode. *)\nQed.\n\nLemma BlindAuction_transferb_prf : function_constr_prf BlindAuction_transferb.\nProof. solve_function_constr_prf @BlindAuction_transferb. Qed.\n\nTheorem BlindAuction_transferb_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_transferb ↦ CompatGenSem.gensem BlindAuction_transferb_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_transferb BlindAuction_transferb_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_transferb_spec_eq.\n    change BlindAuction_transferb_cfun\n      with (synth_func_func BlindAuction_transferb).\n    apply synth_correct_3_void.\n    + exact BlindAuction_transferb_prf.\n    + exact BlindAuction_transferb_vc.\n    + exact BlindAuction_transferb_oblg.\n(*  - apply semof_prim_kernel_mode_3_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_transferb_spec_requires_kernel_mode. *)\nQed.\n\nLemma BlindAuction_reveal_prf : function_constr_prf BlindAuction_reveal.\nProof. solve_function_constr_prf @BlindAuction_reveal. Qed.\n\nTheorem BlindAuction_reveal_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_reveal ↦ CompatGenSem.gensem BlindAuction_reveal_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_reveal BlindAuction_reveal_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_reveal_spec_eq.\n    change BlindAuction_reveal_cfun\n      with (synth_func_func BlindAuction_reveal).\n    apply synth_correct_2_void.\n    + exact BlindAuction_reveal_prf.\n    + exact BlindAuction_reveal_vc.\n    + exact BlindAuction_reveal_oblg.\n(*  - apply semof_prim_kernel_mode_2_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_reveal_spec_requires_kernel_mode. *)\nQed.\n\nLemma BlindAuction_bid_prf : function_constr_prf BlindAuction_bid.\nProof. solve_function_constr_prf @BlindAuction_bid. Qed.\n\nTheorem BlindAuction_bid_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_bid ↦ CompatGenSem.gensem BlindAuction_bid_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_bid BlindAuction_bid_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_bid_spec_eq.\n    change BlindAuction_bid_cfun\n      with (synth_func_func BlindAuction_bid).\n    apply synth_correct_1_void.\n    + exact BlindAuction_bid_prf.\n    + exact BlindAuction_bid_vc.\n    + exact BlindAuction_bid_oblg.\n(*  - apply semof_prim_kernel_mode_1_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_bid_spec_requires_kernel_mode. *)\nQed.\n\nLemma BlindAuction_withdraw_prf : function_constr_prf BlindAuction_withdraw.\nProof. solve_function_constr_prf @BlindAuction_withdraw. Qed.\n\nTheorem BlindAuction_withdraw_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_withdraw ↦ CompatGenSem.gensem BlindAuction_withdraw_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_withdraw BlindAuction_withdraw_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_withdraw_spec_eq.\n    change BlindAuction_withdraw_cfun\n      with (synth_func_func BlindAuction_withdraw).\n    apply synth_correct_0_void.\n    + exact BlindAuction_withdraw_prf.\n    + exact BlindAuction_withdraw_vc.\n    + exact BlindAuction_withdraw_oblg.\n(*  - apply semof_prim_kernel_mode_0_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_withdraw_spec_requires_kernel_mode. *)\nQed.\n\nLemma BlindAuction_auctionEnd_prf : function_constr_prf BlindAuction_auctionEnd.\nProof. solve_function_constr_prf @BlindAuction_auctionEnd. Qed.\n\nTheorem BlindAuction_auctionEnd_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_BlindAuction_auctionEnd ↦ CompatGenSem.gensem BlindAuction_auctionEnd_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_BlindAuction_auctionEnd BlindAuction_auctionEnd_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite BlindAuction_auctionEnd_spec_eq.\n    change BlindAuction_auctionEnd_cfun\n      with (synth_func_func BlindAuction_auctionEnd).\n    apply synth_correct_0_void.\n    + exact BlindAuction_auctionEnd_prf.\n    + exact BlindAuction_auctionEnd_vc.\n    + exact BlindAuction_auctionEnd_oblg.\n(*  - apply semof_prim_kernel_mode_0_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact BlindAuction_auctionEnd_spec_requires_kernel_mode. *)\nQed.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/ObjBlindAuctionCodeProofs.v",
    "content": "(* Skeleton by Edgser for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\n\nRequire Import spblind.LayerBLINDAUCTION.\n\nSection EdsgerGen.\n\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nExisting Instances BLINDAUCTION_overlay_spec.\n\nLemma BlindAuction_initialize_spec_requires_kernel_mode a0 a1 d d' :\n    BlindAuction_initialize_spec a0 a1 d = Some d' ->\n    kernel_mode d.\nProof.\n  intros spec.\n  unfold BlindAuction_initialize_spec in spec.\n  simpl.\n  CommonTactic.subdestruct; auto.\nQed.\n\nLemma BlindAuction_initialize_vc a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_initialize BlindAuction_initialize_wf\n                    a0 a1 me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_initialize_oblg a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_initialize BlindAuction_initialize_wf\n                          a0 a1 me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_transferb_spec_requires_kernel_mode a0 a1 a2 d d' :\n    BlindAuction_transferb_spec a0 a1 a2 d = Some d' ->\n    kernel_mode d.\nProof.\n  intros spec.\n  unfold BlindAuction_transferb_spec in spec.\n  simpl.\n  CommonTactic.subdestruct; auto.\nQed.\n\nLemma BlindAuction_transferb_vc a0 a1 a2 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_transferb BlindAuction_transferb_wf\n                    a0 a1 a2 me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_transferb_oblg a0 a1 a2 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_transferb BlindAuction_transferb_wf\n                          a0 a1 a2 me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_reveal_spec_requires_kernel_mode a0 a1 d d' :\n    BlindAuction_reveal_spec a0 a1 d = Some d' ->\n    kernel_mode d.\nProof.\n  intros spec.\n  unfold BlindAuction_reveal_spec in spec.\n  simpl.\n  CommonTactic.subdestruct; auto.\nQed.\n\nLemma BlindAuction_reveal_vc a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_reveal BlindAuction_reveal_wf\n                    a0 a1 me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_reveal_oblg a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_reveal BlindAuction_reveal_wf\n                          a0 a1 me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_bid_spec_requires_kernel_mode a0 d d' :\n    BlindAuction_bid_spec a0 d = Some d' ->\n    kernel_mode d.\nProof.\n  intros spec.\n  unfold BlindAuction_bid_spec in spec.\n  simpl.\n  CommonTactic.subdestruct; auto.\nQed.\n\nLemma BlindAuction_bid_vc a0 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_bid BlindAuction_bid_wf\n                    a0 me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_bid_oblg a0 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_bid BlindAuction_bid_wf\n                          a0 me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_withdraw_spec_requires_kernel_mode d d' :\n    BlindAuction_withdraw_spec d = Some d' ->\n    kernel_mode d.\nProof.\n  intros spec.\n  unfold BlindAuction_withdraw_spec in spec.\n  simpl.\n  CommonTactic.subdestruct; auto.\nQed.\n\nLemma BlindAuction_withdraw_vc me d :\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_withdraw BlindAuction_withdraw_wf\n                    me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_withdraw_oblg me d :\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_withdraw BlindAuction_withdraw_wf\n                          me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_auctionEnd_spec_requires_kernel_mode d d' :\n    BlindAuction_auctionEnd_spec d = Some d' ->\n    kernel_mode d.\nProof.\n  intros spec.\n  unfold BlindAuction_auctionEnd_spec in spec.\n  simpl.\n  CommonTactic.subdestruct; auto.\nQed.\n\nLemma BlindAuction_auctionEnd_vc me d :\n    high_level_invariant d ->\n    synth_func_cond BlindAuction_auctionEnd BlindAuction_auctionEnd_wf\n                    me d.\nProof.\n  admit.\nQed.\n\nLemma BlindAuction_auctionEnd_oblg me d :\n    high_level_invariant d ->\n    synth_func_obligation BlindAuction_auctionEnd BlindAuction_auctionEnd_wf\n                          me d.\nProof.\n  admit.\nQed.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/ObjSimBlindAuction.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.ObjSimBlindAuction for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\nRequire Import layerlib.RefinementTactic.\nRequire Import layerlib.RefinementTacticAux.\n\nRequire Import spblind.LayerBLINDAUCTION.\nRequire Import spblind.LSimEVMOPCODE.\n\nSection EdsgerGen.\n\n\nContext {Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{HM : HyperMem (LayerSpec := GlobalLayerSpec)}.\n\n  Context {EVMOpcode__events_var_pt_prf : variable_passthrough_prf EVMOpcode__events_var}.\n  Context {BlindAuction__beneficiary_var_pt_prf : variable_passthrough_prf BlindAuction__beneficiary_var}.\n  Context {BlindAuction__biddingEnd_var_pt_prf : variable_passthrough_prf BlindAuction__biddingEnd_var}.\n  Context {BlindAuction__revealEnd_var_pt_prf : variable_passthrough_prf BlindAuction__revealEnd_var}.\n  Context {BlindAuction__ended_var_pt_prf : variable_passthrough_prf BlindAuction__ended_var}.\n  Context {BlindAuction__bids_var_pt_prf : variable_passthrough_prf BlindAuction__bids_var}.\n  Context {BlindAuction__highestBidder_var_pt_prf : variable_passthrough_prf BlindAuction__highestBidder_var}.\n  Context {BlindAuction__highestBid_var_pt_prf : variable_passthrough_prf BlindAuction__highestBid_var}.\n  Context {BlindAuction__secondBid_var_pt_prf : variable_passthrough_prf BlindAuction__secondBid_var}.\n  Context {BlindAuction__revealed_var_pt_prf : variable_passthrough_prf BlindAuction__revealed_var}.\n  Context {BlindAuction__amountOf_var_pt_prf : variable_passthrough_prf BlindAuction__amountOf_var}.\n\n  Lemma BlindAuction_initialize_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_initialize.\n  Proof. solve_passthrough_prf @BlindAuction_initialize. Qed.\n  Lemma BlindAuction_initialize_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_initialize BlindAuction_initialize_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_initialize_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_initialize_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_initialize_prim.\n      rewrite BlindAuction_initialize_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_initialize_passthrough_prf\n              BlindAuction_initialize_wf\n              BlindAuction_initialize_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_initialize_prim.\n      rewrite BlindAuction_initialize_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_initialize_passthrough_prf\n              BlindAuction_initialize_wf\n              BlindAuction_initialize_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_initialize_prim.\n      rewrite BlindAuction_initialize_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_initialize_passthrough_prf\n              BlindAuction_initialize_wf\n              BlindAuction_initialize_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_initialize_prim.\n      rewrite BlindAuction_initialize_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_initialize_passthrough_prf\n              BlindAuction_initialize_wf\n              BlindAuction_initialize_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_initialize_exists :\n    forall j a0 a1 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_initialize_spec a0 a1 d1 = Some d1' ->\n      exists d2',\n        BlindAuction_initialize_spec a0 a1 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_initialize_spec_eq.\n    exact (synth_func_relate_2_void\n            BlindAuction_initialize_passthrough_prf\n            BlindAuction_initialize_wf\n            BlindAuction_initialize_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma BlindAuction_initialize_match :\n    forall j d d' m a0 a1,\n      match_AbData d m j ->\n      BlindAuction_initialize_spec a0 a1 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_initialize_spec_eq.\n    exact (synth_func_match_2_void\n            BlindAuction_initialize_passthrough_prf\n            BlindAuction_initialize_wf\n            BlindAuction_initialize_passthrough_cond).\n  Qed.\n\n  Section initialize.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_initialize_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_initialize_spec}.\n\n    Lemma BlindAuction_initialize_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_initialize_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_initialize_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_initialize_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_initialize_match; eauto.\n    Qed.\n  End initialize.\n\n  Lemma BlindAuction_transferb_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_transferb.\n  Proof. solve_passthrough_prf @BlindAuction_transferb. Qed.\n  Lemma BlindAuction_transferb_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_transferb BlindAuction_transferb_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_transferb_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_transferb_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_transferb_prim.\n      rewrite BlindAuction_transferb_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_transferb_passthrough_prf\n              BlindAuction_transferb_wf\n              BlindAuction_transferb_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_transferb_prim.\n      rewrite BlindAuction_transferb_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_transferb_passthrough_prf\n              BlindAuction_transferb_wf\n              BlindAuction_transferb_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_transferb_prim.\n      rewrite BlindAuction_transferb_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_transferb_passthrough_prf\n              BlindAuction_transferb_wf\n              BlindAuction_transferb_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_transferb_prim.\n      rewrite BlindAuction_transferb_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_transferb_passthrough_prf\n              BlindAuction_transferb_wf\n              BlindAuction_transferb_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_transferb_exists :\n    forall j a0 a1 a2 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_transferb_spec a0 a1 a2 d1 = Some d1' ->\n      exists d2',\n        BlindAuction_transferb_spec a0 a1 a2 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_transferb_spec_eq.\n    exact (synth_func_relate_3_void\n            BlindAuction_transferb_passthrough_prf\n            BlindAuction_transferb_wf\n            BlindAuction_transferb_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma BlindAuction_transferb_match :\n    forall j d d' m a0 a1 a2,\n      match_AbData d m j ->\n      BlindAuction_transferb_spec a0 a1 a2 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_transferb_spec_eq.\n    exact (synth_func_match_3_void\n            BlindAuction_transferb_passthrough_prf\n            BlindAuction_transferb_wf\n            BlindAuction_transferb_passthrough_cond).\n  Qed.\n\n  Section transferb.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_transferb_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_transferb_spec}.\n\n    Lemma BlindAuction_transferb_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_transferb_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_transferb_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_transferb_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_transferb_match; eauto.\n    Qed.\n  End transferb.\n\n  Lemma BlindAuction_reveal_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_reveal.\n  Proof. solve_passthrough_prf @BlindAuction_reveal. Qed.\n  Lemma BlindAuction_reveal_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_reveal BlindAuction_reveal_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_reveal_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_reveal_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_reveal_prim.\n      rewrite BlindAuction_reveal_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_reveal_passthrough_prf\n              BlindAuction_reveal_wf\n              BlindAuction_reveal_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_reveal_prim.\n      rewrite BlindAuction_reveal_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_reveal_passthrough_prf\n              BlindAuction_reveal_wf\n              BlindAuction_reveal_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_reveal_prim.\n      rewrite BlindAuction_reveal_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_reveal_passthrough_prf\n              BlindAuction_reveal_wf\n              BlindAuction_reveal_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_reveal_prim.\n      rewrite BlindAuction_reveal_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_reveal_passthrough_prf\n              BlindAuction_reveal_wf\n              BlindAuction_reveal_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_reveal_exists :\n    forall j a0 a1 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_reveal_spec a0 a1 d1 = Some d1' ->\n      exists d2',\n        BlindAuction_reveal_spec a0 a1 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_reveal_spec_eq.\n    exact (synth_func_relate_2_void\n            BlindAuction_reveal_passthrough_prf\n            BlindAuction_reveal_wf\n            BlindAuction_reveal_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma BlindAuction_reveal_match :\n    forall j d d' m a0 a1,\n      match_AbData d m j ->\n      BlindAuction_reveal_spec a0 a1 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_reveal_spec_eq.\n    exact (synth_func_match_2_void\n            BlindAuction_reveal_passthrough_prf\n            BlindAuction_reveal_wf\n            BlindAuction_reveal_passthrough_cond).\n  Qed.\n\n  Section reveal.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_reveal_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_reveal_spec}.\n\n    Lemma BlindAuction_reveal_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_reveal_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_reveal_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_reveal_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_reveal_match; eauto.\n    Qed.\n  End reveal.\n\n  Lemma BlindAuction_bid_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_bid.\n  Proof. solve_passthrough_prf @BlindAuction_bid. Qed.\n  Lemma BlindAuction_bid_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_bid BlindAuction_bid_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_bid_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_bid_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_bid_prim.\n      rewrite BlindAuction_bid_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_bid_passthrough_prf\n              BlindAuction_bid_wf\n              BlindAuction_bid_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_bid_prim.\n      rewrite BlindAuction_bid_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_bid_passthrough_prf\n              BlindAuction_bid_wf\n              BlindAuction_bid_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_bid_prim.\n      rewrite BlindAuction_bid_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_bid_passthrough_prf\n              BlindAuction_bid_wf\n              BlindAuction_bid_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_bid_prim.\n      rewrite BlindAuction_bid_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_bid_passthrough_prf\n              BlindAuction_bid_wf\n              BlindAuction_bid_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_bid_exists :\n    forall j a0 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_bid_spec a0 d1 = Some d1' ->\n      exists d2',\n        BlindAuction_bid_spec a0 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_bid_spec_eq.\n    exact (synth_func_relate_1_void\n            BlindAuction_bid_passthrough_prf\n            BlindAuction_bid_wf\n            BlindAuction_bid_passthrough_cond\n            j (fun _ _ x => x)).\n  Qed.\n\n  Lemma BlindAuction_bid_match :\n    forall j d d' m a0,\n      match_AbData d m j ->\n      BlindAuction_bid_spec a0 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_bid_spec_eq.\n    exact (synth_func_match_1_void\n            BlindAuction_bid_passthrough_prf\n            BlindAuction_bid_wf\n            BlindAuction_bid_passthrough_cond).\n  Qed.\n\n  Section bid.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_bid_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_bid_spec}.\n\n    Lemma BlindAuction_bid_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_bid_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_bid_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_bid_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_bid_match; eauto.\n    Qed.\n  End bid.\n\n  Lemma BlindAuction_withdraw_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_withdraw.\n  Proof. solve_passthrough_prf @BlindAuction_withdraw. Qed.\n  Lemma BlindAuction_withdraw_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_withdraw BlindAuction_withdraw_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_withdraw_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_withdraw_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_withdraw_prim.\n      rewrite BlindAuction_withdraw_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_withdraw_passthrough_prf\n              BlindAuction_withdraw_wf\n              BlindAuction_withdraw_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_withdraw_prim.\n      rewrite BlindAuction_withdraw_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_withdraw_passthrough_prf\n              BlindAuction_withdraw_wf\n              BlindAuction_withdraw_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_withdraw_prim.\n      rewrite BlindAuction_withdraw_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_withdraw_passthrough_prf\n              BlindAuction_withdraw_wf\n              BlindAuction_withdraw_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_withdraw_prim.\n      rewrite BlindAuction_withdraw_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_withdraw_passthrough_prf\n              BlindAuction_withdraw_wf\n              BlindAuction_withdraw_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_withdraw_exists :\n    forall j d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_withdraw_spec d1 = Some d1' ->\n      exists d2',\n        BlindAuction_withdraw_spec d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_withdraw_spec_eq.\n    exact (synth_func_relate_0_void\n            BlindAuction_withdraw_passthrough_prf\n            BlindAuction_withdraw_wf\n            BlindAuction_withdraw_passthrough_cond\n            j).\n  Qed.\n\n  Lemma BlindAuction_withdraw_match :\n    forall j d d' m,\n      match_AbData d m j ->\n      BlindAuction_withdraw_spec d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_withdraw_spec_eq.\n    exact (synth_func_match_0_void\n            BlindAuction_withdraw_passthrough_prf\n            BlindAuction_withdraw_wf\n            BlindAuction_withdraw_passthrough_cond).\n  Qed.\n\n  Section withdraw.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_withdraw_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_withdraw_spec}.\n\n    Lemma BlindAuction_withdraw_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_withdraw_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_withdraw_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_withdraw_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_withdraw_match; eauto.\n    Qed.\n  End withdraw.\n\n  Lemma BlindAuction_auctionEnd_passthrough_prf :\n      function_constr_passthrough_prf BlindAuction_auctionEnd.\n  Proof. solve_passthrough_prf @BlindAuction_auctionEnd. Qed.\n  Lemma BlindAuction_auctionEnd_passthrough_cond :\n      synth_func_passthrough_cond BlindAuction_auctionEnd BlindAuction_auctionEnd_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance BlindAuction_auctionEnd_prim_passthrough\n      : primitive_passthrough_prf BlindAuction_auctionEnd_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, BlindAuction_auctionEnd_prim.\n      rewrite BlindAuction_auctionEnd_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              BlindAuction_auctionEnd_passthrough_prf\n              BlindAuction_auctionEnd_wf\n              BlindAuction_auctionEnd_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_auctionEnd_prim.\n      rewrite BlindAuction_auctionEnd_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              BlindAuction_auctionEnd_passthrough_prf\n              BlindAuction_auctionEnd_wf\n              BlindAuction_auctionEnd_passthrough_cond).\n    (*\n    - unfold PRIMsem, BlindAuction_auctionEnd_prim.\n      rewrite BlindAuction_auctionEnd_spec_hlist_eq.\n      exact (synth_func_spec_match\n              BlindAuction_auctionEnd_passthrough_prf\n              BlindAuction_auctionEnd_wf\n              BlindAuction_auctionEnd_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, BlindAuction_auctionEnd_prim.\n      rewrite BlindAuction_auctionEnd_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              BlindAuction_auctionEnd_passthrough_prf\n              BlindAuction_auctionEnd_wf\n              BlindAuction_auctionEnd_passthrough_cond).\n  Qed.\n\n  Lemma BlindAuction_auctionEnd_exists :\n    forall j d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      BlindAuction_auctionEnd_spec d1 = Some d1' ->\n      exists d2',\n        BlindAuction_auctionEnd_spec d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * BlindAuction_auctionEnd_spec_eq.\n    exact (synth_func_relate_0_void\n            BlindAuction_auctionEnd_passthrough_prf\n            BlindAuction_auctionEnd_wf\n            BlindAuction_auctionEnd_passthrough_cond\n            j).\n  Qed.\n\n  Lemma BlindAuction_auctionEnd_match :\n    forall j d d' m,\n      match_AbData d m j ->\n      BlindAuction_auctionEnd_spec d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * BlindAuction_auctionEnd_spec_eq.\n    exact (synth_func_match_0_void\n            BlindAuction_auctionEnd_passthrough_prf\n            BlindAuction_auctionEnd_wf\n            BlindAuction_auctionEnd_passthrough_cond).\n  Qed.\n\n  Section auctionEnd.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) BlindAuction_auctionEnd_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) BlindAuction_auctionEnd_spec}.\n\n    Lemma BlindAuction_auctionEnd_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem BlindAuction_auctionEnd_spec)\n            (id ↦ CompatGenSem.gensem BlindAuction_auctionEnd_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit BlindAuction_auctionEnd_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply BlindAuction_auctionEnd_match; eauto.\n    Qed.\n  End auctionEnd.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/ObjSimEVMOpcode.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.ObjSimEVMOpcode for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\nRequire Import layerlib.RefinementTactic.\nRequire Import layerlib.RefinementTacticAux.\n\nRequire Import spblind.LayerEVMOPCODE.\n\nSection EdsgerGen.\n\n\nContext {Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{HM : HyperMem (LayerSpec := GlobalLayerSpec)}.\n\n  Context {EVMOpcode__events_var_pt_prf : variable_passthrough_prf EVMOpcode__events_var}.\n\n  Lemma EVMOpcode_transfer_passthrough_prf :\n      function_constr_passthrough_prf EVMOpcode_transfer.\n  Proof. solve_passthrough_prf @EVMOpcode_transfer. Qed.\n  Lemma EVMOpcode_transfer_passthrough_cond :\n      synth_func_passthrough_cond EVMOpcode_transfer EVMOpcode_transfer_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance EVMOpcode_transfer_prim_passthrough\n      : primitive_passthrough_prf EVMOpcode_transfer_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, EVMOpcode_transfer_prim.\n      rewrite EVMOpcode_transfer_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              EVMOpcode_transfer_passthrough_prf\n              EVMOpcode_transfer_wf\n              EVMOpcode_transfer_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, EVMOpcode_transfer_prim.\n      rewrite EVMOpcode_transfer_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              EVMOpcode_transfer_passthrough_prf\n              EVMOpcode_transfer_wf\n              EVMOpcode_transfer_passthrough_cond).\n    (*\n    - unfold PRIMsem, EVMOpcode_transfer_prim.\n      rewrite EVMOpcode_transfer_spec_hlist_eq.\n      exact (synth_func_spec_match\n              EVMOpcode_transfer_passthrough_prf\n              EVMOpcode_transfer_wf\n              EVMOpcode_transfer_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, EVMOpcode_transfer_prim.\n      rewrite EVMOpcode_transfer_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              EVMOpcode_transfer_passthrough_prf\n              EVMOpcode_transfer_wf\n              EVMOpcode_transfer_passthrough_cond).\n  Qed.\n\n  Lemma EVMOpcode_transfer_exists :\n    forall j a0 a1 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      EVMOpcode_transfer_spec a0 a1 d1 = Some d1' ->\n      exists d2',\n        EVMOpcode_transfer_spec a0 a1 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * EVMOpcode_transfer_spec_eq.\n    exact (synth_func_relate_2_void\n            EVMOpcode_transfer_passthrough_prf\n            EVMOpcode_transfer_wf\n            EVMOpcode_transfer_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma EVMOpcode_transfer_match :\n    forall j d d' m a0 a1,\n      match_AbData d m j ->\n      EVMOpcode_transfer_spec a0 a1 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * EVMOpcode_transfer_spec_eq.\n    exact (synth_func_match_2_void\n            EVMOpcode_transfer_passthrough_prf\n            EVMOpcode_transfer_wf\n            EVMOpcode_transfer_passthrough_cond).\n  Qed.\n\n  Section transfer.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) EVMOpcode_transfer_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) EVMOpcode_transfer_spec}.\n\n    Lemma EVMOpcode_transfer_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem EVMOpcode_transfer_spec)\n            (id ↦ CompatGenSem.gensem EVMOpcode_transfer_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit EVMOpcode_transfer_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply EVMOpcode_transfer_match; eauto.\n    Qed.\n  End transfer.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/RefineBLINDAUCTION.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.RefineBLINDAUCTION for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import DeepSpec.Linking.\nRequire Import spblind.EdsgerIdents.\nRequire Import spblind.DataTypes.\nRequire Import spblind.DataTypeOps.\nRequire Import spblind.DataTypeProofs.\nRequire Import layerlib.LayerCalculusLemma.\nRequire Import layerlib.RefinementTactic.\nRequire Import layerlib.RefinementTacticAux.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\n\nRequire Import spblind.LayerBLINDAUCTION.\nRequire Import spblind.LSimEVMOPCODE.\n\nSection EdsgerGen.\n\n\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nContext`{CTXT_prf : !Layer_BLINDAUCTION_Context_prf}.\nContext`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\nContext`{BLINDAUCTION_pres_inv : !BLINDAUCTION_preserves_invariants}.\n\nExisting Instances BLINDAUCTION_overlay_spec BLINDAUCTION_underlay_spec.\n\nRecord relate_RData (j : meminj) (habd : GetHighData) (labd : GetLowData) : Prop\n    := mkrelate_RData {\n  (* EVMOpcode *)\n  _events_re : (_events habd) = (_events labd)\n}.\n\nRecord match_RData (habd : GetHighData) (m : mem) (j : meminj) : Prop\n    := MATCH_RDATA {\n  _beneficiary_ma : variable_match BlindAuction__beneficiary_var habd m;\n  _biddingEnd_ma : variable_match BlindAuction__biddingEnd_var habd m;\n  _revealEnd_ma : variable_match BlindAuction__revealEnd_var habd m;\n  _ended_ma : variable_match BlindAuction__ended_var habd m;\n  _bids_ma : variable_match BlindAuction__bids_var habd m;\n  _highestBidder_ma : variable_match BlindAuction__highestBidder_var habd m;\n  _highestBid_ma : variable_match BlindAuction__highestBid_var habd m;\n  _secondBid_ma : variable_match BlindAuction__secondBid_var habd m;\n  _revealed_ma : variable_match BlindAuction__revealed_var habd m;\n  _amountOf_ma : variable_match BlindAuction__amountOf_var habd m\n}.\n\nLocal Hint Resolve MATCH_RDATA.\n\nGlobal Instance rel_ops: CompatRelOps GetHighDataX GetLowDataX :=\n{\n  relate_AbData f d1 d2 := relate_RData f d1 d2;\n  match_AbData d1 m f := match_RData d1 m f;\n  new_glbl := var_BlindAuction__beneficiary_ident :: var_BlindAuction__biddingEnd_ident :: var_BlindAuction__revealEnd_ident :: var_BlindAuction__ended_ident :: var_BlindAuction__bids_ident :: var_BlindAuction__highestBidder_ident :: var_BlindAuction__highestBid_ident :: var_BlindAuction__secondBid_ident :: var_BlindAuction__revealed_ident :: var_BlindAuction__amountOf_ident :: nil\n}.\n\nGlobal Instance BlindAuction__beneficiary_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__beneficiary_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__beneficiary_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__biddingEnd_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__biddingEnd_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__biddingEnd_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__revealEnd_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__revealEnd_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__revealEnd_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__ended_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__ended_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__ended_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__bids_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__bids_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__bids_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__highestBidder_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__highestBidder_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__highestBidder_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__highestBid_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__highestBid_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__highestBid_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__secondBid_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__secondBid_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__secondBid_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__revealed_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__revealed_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__revealed_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance BlindAuction__amountOf_hyper_ltype_static :\n    HyperLTypeStatic BlindAuction__amountOf_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl BlindAuction__amountOf_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nLemma relate_incr:\n  forall abd abd' f f',\n    relate_RData f abd abd' ->\n    inject_incr f f' ->\n    relate_RData f' abd abd'.\nProof.\n  inversion 1; subst; intros; simpl in *.\n  repeat match goal with\n  | H : _ /\\ _ |- _ => destruct H\n  end.\n  repeat (constructor; simpl; eauto).\nQed.\nGlobal Instance rel_prf: CompatRel GetHighDataX GetLowDataX.\nProof.\n  constructor; [ destruct 1 .. |]; intros.\n  - constructor; eapply inject_match_correct; eauto with typeclass_instances.\n  - constructor; eapply store_match_correct; eauto with typeclass_instances.\n  - constructor; eapply alloc_match_correct; eauto with typeclass_instances.\n  - constructor; eapply free_match_correct; eauto with typeclass_instances.\n  - constructor; eapply storebytes_match_correct; eauto with typeclass_instances.\n  - eapply relate_incr; eauto.\nQed.\n\n(*\nLocal Instance: ExternalCallsOps (mwd GetLowDataX) := CompatExternalCalls.compatlayer_extcall_ops EVMOPCODE_Layer.\nLocal Instance: CompilerConfigOps _ := CompatExternalCalls.compatlayer_compiler_config_ops EVMOPCODE_Layer.\n*)\n\nInstance BLINDAUCTION_hypermem : MemoryModel.HyperMem\n  := { Hcompatrel := {| crel_prf := rel_prf |} }.\n\nClass BLINDAUCTION_Underlay_preserves_invariants := {\n  BLINDAUCTION_Underlay_EVMOpcode_transfer_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) EVMOpcode_transfer_spec | 5\n}.\nInstance BLINDAUCTION'EVMOPCODE_preserves_invariants : BLINDAUCTION_Underlay_preserves_invariants.\nProof. esplit; apply EVMOPCODE_pres_inv. Defined.\n\n(*\nLemma passthrough_correct:\n  sim (crel (CompatRel0 := rel_prf) _ _) BLINDAUCTION_Layer_passthrough EVMOPCODE_Layer.\nProof.\n  Local Opaque simRR mapsto layer_mapsto_primitive.\n  unfold GlobalLayerSpec, MemoryModel.GetHighDataX.\n  simpl.\n\n  sim_oplus; simpl.\n\n  Local Transparent simRR mapsto layer_mapsto_primitive.\nQed.*)\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/Symbols.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module spblind.Symbols for spblind.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import spblind.EdsgerIdents.\nRequire Import String.\nRequire Import List.\nRequire Import compcert.common.AST.\nSection EdsgerGen.\n\n\nOpen Scope string_scope.\n\nDefinition symbols: list (ident * string) :=\n  (ident_EVMOpcode_transfer, \"EVMOpcode_transfer\")::\n  (ident_BlindAuction_initialize, \"BlindAuction_initialize\")::\n  (ident_BlindAuction_transferb, \"BlindAuction_transferb\")::\n  (ident_BlindAuction_reveal, \"BlindAuction_reveal\")::\n  (ident_BlindAuction_bid, \"BlindAuction_bid\")::\n  (ident_BlindAuction_withdraw, \"BlindAuction_withdraw\")::\n  (ident_BlindAuction_auctionEnd, \"BlindAuction_auctionEnd\")::\n  (var_BlindAuction__beneficiary_ident, \"BlindAuction__beneficiary\")::\n  (var_BlindAuction__biddingEnd_ident, \"BlindAuction__biddingEnd\")::\n  (var_BlindAuction__revealEnd_ident, \"BlindAuction__revealEnd\")::\n  (var_BlindAuction__ended_ident, \"BlindAuction__ended\")::\n  (var_BlindAuction__bids_ident, \"BlindAuction__bids\")::\n  (var_BlindAuction__highestBidder_ident, \"BlindAuction__highestBidder\")::\n  (var_BlindAuction__highestBid_ident, \"BlindAuction__highestBid\")::\n  (var_BlindAuction__secondBid_ident, \"BlindAuction__secondBid\")::\n  (var_BlindAuction__revealed_ident, \"BlindAuction__revealed\")::\n  (var_BlindAuction__amountOf_ident, \"BlindAuction__amountOf\")::\n  nil.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/fpblind/spblind/_CoqProject",
    "content": "-R ../../.. DeepSpec\n\nEdsgerIdents.v\nDataTypeOps.v\nDataTypeProofs.v\nDataTypes.v\nLayerBLINDAUCTION.v\nLayerEVMOPCODE.v\nRefineBLINDAUCTION.v\nObjBlindAuctionCodeProofs.v\n"
  },
  {
    "path": "contracts/fpblind/spblind/extraction/Makefile",
    "content": "lastfiles = HyperType.mli HyperTypeInst.mli DataTypeOps.mli EdsgerIdents.mli LayerEVMOPCODE.mli LSrcEVMOPCODE.mli  LayerBLINDAUCTION.mli LSrcBLINDAUCTION.mli "
  },
  {
    "path": "contracts/fpblind/spblind/extraction/Tester.ml",
    "content": "open LSrcEVMOPCODE\nopen LSrcBLINDAUCTION\n\nlet usage () = \n  Printf.eprintf \"usage: extract (bytecode | debug)\\n\" ;\n  exit 1\n\nlet () = if Array.length Sys.argv != 2 then usage ()\n\nlet debug_flag = match Array.get Sys.argv 1 with\n  | \"bytecode\" -> false\n  | \"debug\"    -> true\n  | _          -> usage ()\n\nlet ge_compiled = Glue.full_compile_genv ge\n\nlet rec convert_list = function\n  | Datatypes.Coq_nil -> []\n  | Datatypes.Coq_cons (x, xs) -> x :: convert_list xs\n\nlet (program, label) =\n  match ge_compiled with\n  | None -> (Printf.eprintf \"error in compilation\\n\" ; exit 1)\n  | Some Coq_pair (p, l) -> (List.rev (convert_list p), l)\n\nlet intermediate = ASM.split program label\nlet asm = ASM.transform intermediate\nlet bytecode = ASM.assemble asm\nlet human_readable = ASM.show_asm asm\n\nlet () =\n  if debug_flag then\n    Printf.printf \"%s\\n\" human_readable\n  else\n    Printf.printf \"%s\\n\" bytecode\n"
  },
  {
    "path": "contracts/fpblind/spblind/subdir.mk",
    "content": "# WARNING: This file is generated by Edsger, the DeepSEA compiler.\n#          All modification will be lost when regenerating.\nspblind_FILES = \\\nspblind/CertiKOS.v \\\nspblind/DataTypeOps.v \\\nspblind/DataTypeProofs.v \\\nspblind/DataTypes.v \\\nspblind/EdsgerIdents.v \\\nspblind/LSimBLINDAUCTION.v \\\nspblind/LSimEVMOPCODE.v \\\nspblind/LSrcBLINDAUCTION.v \\\nspblind/LSrcEVMOPCODE.v \\\nspblind/LayerBLINDAUCTION.v \\\nspblind/LayerEVMOPCODE.v \\\nspblind/ObjBlindAuctionCode.v \\\nspblind/ObjBlindAuctionCodeProofs.v \\\nspblind/ObjSimBlindAuction.v \\\nspblind/ObjSimEVMOpcode.v \\\nspblind/RefineBLINDAUCTION.v \\\nspblind/Symbols.v\n"
  },
  {
    "path": "contracts/fpblind/spblind.ds",
    "content": "(* second-price sealed-blind auction *)\n\ntype Bid = {\n    _blindedBid : hashvalue;\n    _deposit : uint;\n}\n\ntype Transfer = {\n    _amount : uint;\n    _to : uint;\n}\n\n(* external, linking with Coq? *)\nexternal let transfer_nil [[unfold always]] : list Transfer = \"nil\"\nexternal let transfer_cons [[unfold always]] : Transfer * (list Transfer) -> (list Transfer) = \"(fun a b => (cons a b))\"\nexternal let transfer_length [[unfold always]] : (list Transfer) -> int = \"(fun l => Z_of_nat (length l))\"\n\n(* external implementation of transfer since struct cannot be let-binded *)\nexternal let transfer_cons_unzip [[unfold always]] : uint * address * (list Transfer) -> (list Transfer) = \"(fun toaddr much e => {| _amount := much; _to := toaddr|} :: e)\"\n\n(* event AuctionEnded (winner : address indexed) (highestBid : uint) *)\n\nobject signature EVMOpcodeInterface = {\n    transfer : address * uint -> unit;\n}\n\nobject signature BlindAuctionInterface = {\n    initialize : uint * uint -> unit;\n    bid : hashvalue -> unit;\n    transferb : address * address * uint -> unit;\n    reveal : uint * hashvalue -> unit;\n    withdraw : unit -> unit;\n    auctionEnd : unit -> unit;\n}\n\n(*  make it have an actual list variable (this would be a coq list, since we are not generating code), and what the function would do would be to cons one more item to the list, recording that a transfer happened. *)\n\ntrusted object EVMOpcode : EVMOpcodeInterface {\n    let _events : list Transfer := transfer_nil\n\n    let transfer (toaddr, much) =\n        let e = _events in\n        _events := transfer_cons_unzip (much, toaddr, e);\n        ()\n}\n\nobject BlindAuction (evm: EVMOpcodeInterface) : BlindAuctionInterface {\n    (* initial values *)\n    let _beneficiary : address := address(0u0)\n    let _biddingEnd : uint := 0u0\n    let _revealEnd : uint := 0u0\n    let _ended : bool := false\n    let _bids : mapping[address] Bid := mapping_init\n    let _highestBidder : address := address(0u0)\n    let _highestBid : uint := 0u0\n    let _secondBid : uint := 0u0\n    let _revealed : mapping[address] bool := mapping_init\n    let _amountOf : mapping[address] uint := mapping_init\n\n    (* placeholder for constructor *)\n    let initialize (biddingTime, revealTime) =\n        _beneficiary := msg_sender;\n        _biddingEnd := block_number + biddingTime;\n        _revealEnd := block_number + biddingTime + revealTime;\n        let beneficiary = _beneficiary in\n        _highestBidder := beneficiary;\n        _revealed [beneficiary] := true;\n        ()\n\n    let transferb (fromaddr, toaddr, amount) =\n        let base = _amountOf [toaddr] in\n        _amountOf [toaddr] := base + amount;\n        let base = _amountOf [fromaddr] in\n        _amountOf [fromaddr] := base - amount;\n        ()\n\n    (* Reveal your blinded bids. You will get a refund for all\n       correctly blinded invalid bids and for all bids except for\n       the totally highest.\n     *)\n    let reveal (value, secret) =\n        let biddingEnd = _biddingEnd in\n        let revealEnd = _revealEnd in\n        assert (block_number > biddingEnd);\n        assert (block_number < revealEnd);\n\n        let hashed = keccak256 (value, secret) in\n        let blindedBid = _bids[msg_sender]._blindedBid in\n        let deposit = _bids[msg_sender]._deposit in\n\n        let revealedp = _revealed[msg_sender] in\n        assert (!revealedp);\n        _revealed[msg_sender] := true;\n        \n        if hashed = blindedBid\n        then \n            let beneficiary = _beneficiary in\n            if value > deposit\n            then \n                ()\n            else\n                let highestBid = _highestBid in\n                if value >= highestBid\n                then\n                    let highestBidder = _highestBidder in\n                    let secondBid = _secondBid in\n                    (* transferb (beneficiary, highestBidder, secondBid); *)\n                    let base = _amountOf [highestBidder] in\n                    _amountOf [highestBidder] := base + secondBid;\n                    let base = _amountOf [beneficiary] in\n                    _amountOf [beneficiary] := base - secondBid;\n\n                    _secondBid := highestBid;\n                    _highestBid := value;\n                    _highestBidder := msg_sender;\n                    let highestBidder = _highestBidder in\n                    let secondBid = _secondBid in\n                    (*  transferb (highestBidder, beneficiary, secondBid); *)\n                    let base = _amountOf [beneficiary] in\n                    _amountOf [beneficiary] := base + secondBid;\n                    let base = _amountOf [highestBidder] in\n                    _amountOf [highestBidder] := base - secondBid;\n\n                    ()\n                else \n                    let secondBid = _secondBid in\n                    if value > secondBid\n                    then\n                        let highestBidder = _highestBidder in\n                        (* transferb (beneficiary, highestBidder, secondBid); *)\n                        let base = _amountOf [highestBidder] in\n                        _amountOf [highestBidder] := base + secondBid;\n                        let base = _amountOf [beneficiary] in\n                        _amountOf [beneficiary] := base - secondBid;\n\n                        _secondBid := value;\n                        let secondBid = _secondBid in\n                        (* transferb (highestBidder, beneficiary, secondBid); *)\n                        let base = _amountOf [beneficiary] in\n                        _amountOf [beneficiary] := base + secondBid;\n                        let base = _amountOf [highestBidder] in\n                        _amountOf [highestBidder] := base - secondBid;\n\n                        ()\n                    else\n                        ()\n        else\n            ()\n\n    (* Place a blinded bid with `blindedBid` = keccak256(value, secret).\n       Each person transfer their capital proof (an amount of ether larger\n       than the price of the auction object), they can transfer more ether or \n       many times to hide their true bid. \n     *)\n  let bid blindedBid =\n        let biddingEnd = _biddingEnd in\n        let beneficiary = _beneficiary in\n        assert (block_number < biddingEnd);\n        assert (msg_sender <> beneficiary);\n\n        let old_deposit = _bids[msg_sender]._deposit in\n        if old_deposit <> 0u0 \n        then\n            begin\n                _bids[msg_sender]._blindedBid := blindedBid;\n                _bids[msg_sender]._deposit := msg_value;\n                _amountOf[msg_sender]  := msg_value;\n                evm.transfer (msg_sender, old_deposit);\n                ()\n            end\n        else\n            _bids[msg_sender] := {_blindedBid = blindedBid; _deposit = msg_value}; \n            ()\n\t  \n    (* Withdraw a bid that was overbid. *)\n    let withdraw () = \n        let revealEnd = _revealEnd in\n        let ended = _ended in\n        assert (block_number > revealEnd);\n        assert (! ended);\n\n        let amount = _amountOf[msg_sender] in\n        _amountOf[msg_sender] := 0u0;\n        (* In order to avoid a re-entrency attack, the transfer happens last. *)\n        evm.transfer (msg_sender, amount);\n        ()\n\n    (* End the auction and send the highest bid to the beneficiary. *)\n    let auctionEnd () = \n        let revealEnd = _revealEnd in\n        let ended = _ended in\n        assert (block_number > revealEnd);\n        assert (! ended);\n        (* emit AuctionEnded(_highestBidder, _highestBid); *)\n        _ended := true;\n        let beneficiary = _beneficiary in\n        let highestBid = _highestBid in\n        evm.transfer (beneficiary, highestBid); \n        ()    \n}\n\nlayer signature BLINDAUCTIONSig = {\n    blindauction : BlindAuctionInterface\n}\n\nlayer signature EVMOPCODESig = {\n    evm : EVMOpcodeInterface\n}\n\nlayer EVMOPCODE : [{}] EVMOPCODESig = {\n    evm = EVMOpcode\n}\n\nlayer BLINDAUCTION : [EVMOPCODESig] BLINDAUCTIONSig = {\n  blindauction = BlindAuction\n}\n\nlayer COMPLETE = BLINDAUCTION @ EVMOPCODE\n"
  },
  {
    "path": "contracts/livevar/clash.dot",
    "content": "digraph mygraph {\n  node [shape=box];\n\" tempvar_c \"\n\" tempvar_c \" -> \" tempvar_d \"\n\" tempvar_c \" -> \" tempvar_25 \"\n\" tempvar_c \" -> \" tempvar_1e \"\n\" tempvar_c \" -> \" tempvar_a \"\n\" tempvar_c \" -> \" tempvar_c \"\n\" tempvar_a \"\n\" tempvar_a \" -> \" tempvar_d \"\n\" tempvar_a \" -> \" tempvar_25 \"\n\" tempvar_a \" -> \" tempvar_1e \"\n\" tempvar_a \" -> \" tempvar_a \"\n\" tempvar_a \" -> \" tempvar_c \"\n\" tempvar_1e \"\n\" tempvar_1e \" -> \" tempvar_d \"\n\" tempvar_1e \" -> \" tempvar_25 \"\n\" tempvar_1e \" -> \" tempvar_1e \"\n\" tempvar_1e \" -> \" tempvar_a \"\n\" tempvar_1e \" -> \" tempvar_c \"\n\" tempvar_25 \"\n\" tempvar_25 \" -> \" tempvar_d \"\n\" tempvar_25 \" -> \" tempvar_25 \"\n\" tempvar_25 \" -> \" tempvar_1e \"\n\" tempvar_25 \" -> \" tempvar_a \"\n\" tempvar_25 \" -> \" tempvar_c \"\n\" tempvar_d \"\n\" tempvar_d \" -> \" tempvar_d \"\n\" tempvar_d \" -> \" tempvar_25 \"\n\" tempvar_d \" -> \" tempvar_1e \"\n\" tempvar_d \" -> \" tempvar_a \"\n\" tempvar_d \" -> \" tempvar_c \"\n}\n"
  },
  {
    "path": "contracts/livevar/livevar.dot",
    "content": "digraph mygraph {\n  node [shape=box];\n\n  \"entry\"\n  \"entry\" -> \"5\"\n\"4 : tempvar_1 = 0x00\"\n\"4 : tempvar_1 = 0x00\" -> \"3 : return \"\n\"2 : revert \"\n\n\"1 : done \"\n\n\"5 : tempvar_1 = (binop @ tempvar_7 tempvar_f)\"\n\"5 : tempvar_1 = (binop @ tempvar_7 tempvar_f)\" -> \"4 : tempvar_1 = 0x00\"\n\"3 : return \"\n\"3 : return \" -> \"1 : done \"\n}\n"
  },
  {
    "path": "contracts/livevar/livevar.ds",
    "content": "object signature OS = {\n  f : unit -> unit;\n}\n\nobject O : OS {\n  (* should succeed *)\n  let f () =\n    let a1 = 1 in\n    let a2 = a1 in\n    let a3 = a2 in\n    let a4 = a1 in\n    let a5 = a2 in\n    let a6 = a1 in\n    let a7 = a2 in\n    let a8 = a1 in\n    let a9 = a2 in\n    let a10 = a1 in\n    let a11 = a2 in\n    let a12 = a1 in\n    let a13 = a2 in\n    let a14 = a1 in\n    let a15 = a2 in\n    let a16 = a1 in\n    let a17 = a2 in\n    let a18 = a2 in\n    let a19 = a1 in\n    let a20 = a2 in\n    let a21 = a1 in\n    let a32 = a2 in\n    let a232 = a1 in\n    let a31 = a2 in\n    let a211 = a1 in\n    let a399 = a2 in\n    assert (a399+a19 = 2)\n\n}\n\nlayer L = {\n  o = O\n}"
  },
  {
    "path": "contracts/livevar/livevar_clash.dot",
    "content": "digraph mygraph {\n  node [shape=box];\n\n}\n"
  },
  {
    "path": "contracts/livevar/lv.dot",
    "content": "digraph mygraph {\n  node [shape=box];\n\n  \"entry\"\n  \"entry\" -> \"21\"\n\"20 : tempvar_c = 0x01\"\n\"20 : tempvar_c = 0x01\" -> \"1f : tempvar_d = tempvar_c\"\n\"10 : tempvar_1c = tempvar_d\"\n\"10 : tempvar_1c = tempvar_d\" -> \"f : tempvar_1d = tempvar_d\"\n\"8 : tempvar_24 = tempvar_c\"\n\"8 : tempvar_24 = tempvar_c\" -> \"7 : tempvar_25 = tempvar_d\"\n\"18 : tempvar_14 = tempvar_d\"\n\"18 : tempvar_14 = tempvar_d\" -> \"17 : tempvar_15 = tempvar_c\"\n\"4 : 0x0920 :m= (binop @ (mload 0x0920) 0x00)\"\n\"4 : 0x0920 :m= (binop @ (mload 0x0920) 0x00)\" -> \"3 : return \"\n\"14 : tempvar_18 = tempvar_d\"\n\"14 : tempvar_18 = tempvar_d\" -> \"13 : tempvar_19 = tempvar_c\"\n\"c : tempvar_20 = tempvar_c\"\n\"c : tempvar_20 = tempvar_c\" -> \"b : tempvar_21 = tempvar_d\"\n\"1c : tempvar_10 = tempvar_d\"\n\"1c : tempvar_10 = tempvar_d\" -> \"1b : tempvar_11 = tempvar_c\"\n\"2 : revert \"\n\n\"12 : tempvar_1a = tempvar_d\"\n\"12 : tempvar_1a = tempvar_d\" -> \"11 : tempvar_1b = tempvar_c\"\n\"a : tempvar_22 = tempvar_c\"\n\"a : tempvar_22 = tempvar_c\" -> \"9 : tempvar_23 = tempvar_d\"\n\"1a : tempvar_12 = tempvar_d\"\n\"1a : tempvar_12 = tempvar_d\" -> \"19 : tempvar_13 = tempvar_c\"\n\"6 : tempvar_a = (binop @ (binop @ tempvar_25 tempvar_1e) 0x02)\"\n\"6 : tempvar_a = (binop @ (binop @ tempvar_25 tempvar_1e) 0x02)\" -> \"5 : if tempvar_a\"\n\"16 : tempvar_16 = tempvar_d\"\n\"16 : tempvar_16 = tempvar_d\" -> \"15 : tempvar_17 = tempvar_c\"\n\"e : tempvar_1e = tempvar_c\"\n\"e : tempvar_1e = tempvar_c\" -> \"d : tempvar_1f = tempvar_d\"\n\"1e : tempvar_e = tempvar_d\"\n\"1e : tempvar_e = tempvar_d\" -> \"1d : tempvar_f = tempvar_c\"\n\"1 : done \"\n\n\"21 : 0x0920 :m= (binop @ (mload 0x0920) 0x00)\"\n\"21 : 0x0920 :m= (binop @ (mload 0x0920) 0x00)\" -> \"20 : tempvar_c = 0x01\"\n\"11 : tempvar_1b = tempvar_c\"\n\"11 : tempvar_1b = tempvar_c\" -> \"10 : tempvar_1c = tempvar_d\"\n\"9 : tempvar_23 = tempvar_d\"\n\"9 : tempvar_23 = tempvar_d\" -> \"8 : tempvar_24 = tempvar_c\"\n\"19 : tempvar_13 = tempvar_c\"\n\"19 : tempvar_13 = tempvar_c\" -> \"18 : tempvar_14 = tempvar_d\"\n\"5 : if tempvar_a\"\n\"5 : if tempvar_a\" -> \"4 : 0x0920 :m= (binop @ (mload 0x0920) 0x00)\"\n\"5 : if tempvar_a\" -> \"2 : revert \"\n\"15 : tempvar_17 = tempvar_c\"\n\"15 : tempvar_17 = tempvar_c\" -> \"14 : tempvar_18 = tempvar_d\"\n\"d : tempvar_1f = tempvar_d\"\n\"d : tempvar_1f = tempvar_d\" -> \"c : tempvar_20 = tempvar_c\"\n\"1d : tempvar_f = tempvar_c\"\n\"1d : tempvar_f = tempvar_c\" -> \"1c : tempvar_10 = tempvar_d\"\n\"3 : return \"\n\"3 : return \" -> \"1 : done \"\n\"13 : tempvar_19 = tempvar_c\"\n\"13 : tempvar_19 = tempvar_c\" -> \"12 : tempvar_1a = tempvar_d\"\n\"b : tempvar_21 = tempvar_d\"\n\"b : tempvar_21 = tempvar_d\" -> \"a : tempvar_22 = tempvar_c\"\n\"1b : tempvar_11 = tempvar_c\"\n\"1b : tempvar_11 = tempvar_c\" -> \"1a : tempvar_12 = tempvar_d\"\n\"7 : tempvar_25 = tempvar_d\"\n\"7 : tempvar_25 = tempvar_d\" -> \"6 : tempvar_a = (binop @ (binop @ tempvar_25 tempvar_1e) 0x02)\"\n\"17 : tempvar_15 = tempvar_c\"\n\"17 : tempvar_15 = tempvar_c\" -> \"16 : tempvar_16 = tempvar_d\"\n\"f : tempvar_1d = tempvar_d\"\n\"f : tempvar_1d = tempvar_d\" -> \"e : tempvar_1e = tempvar_c\"\n\"1f : tempvar_d = tempvar_c\"\n\"1f : tempvar_d = tempvar_c\" -> \"1e : tempvar_e = tempvar_d\"\n}\n"
  },
  {
    "path": "contracts/olive/Olive.ds",
    "content": "(* This contract is inspired by olive/contracts/Olive.sol , a very vanilla ERC20 token contract. *)\n\nobject signature OwnableInterface = {\n  constructor : unit -> unit;\n  onlyOwner : unit -> unit;\n  transferOwnership : address -> unit\n}\n\nevent\n  | OwnershipTransferred (previousOwner : address indexed) (newOwner: address indexed)\n\nobject Ownable : OwnableInterface {\n  let owner : address := address(0)\n\n  let constructor () =\n    owner := msg_sender    \n\n  let onlyOwner () =\n    let a = owner in\n      assert(a = msg_sender)\n\n  let transferOwnership(newOwner) =\n    (* assert (newOwner != 0); *)\n    let b = owner in\n    emit OwnershipTransferred(b, newOwner);\n    owner := newOwner\n}\n\nlayer OWNABLE : [ { } ] { ownable : OwnableInterface }  = {\n  ownable = Ownable\n}\n\nobject signature PausableInterface = {\n  whenPaused : unit -> unit;\n  whenNotPaused : unit -> unit;\n  pause : unit -> unit;\n  unpause : unit -> unit\n}\n\nevent\n  | Pause(v : bool)\n  | Unpause(v : bool)\n\nobject Pausable (ownable : OwnableInterface) : PausableInterface  {\n  let paused : bool  := false\n\n  let whenPaused () =\n    let a = paused in \n    assert (a = true)\n\n  let whenNotPaused () =\n    let b = paused in\n    assert (b = false)\n\n  let pause () =\n    ownable.onlyOwner();\n    paused := true;\n    let a = paused in\n    emit Pause(a)\n\n  let unpause () =\n    ownable.onlyOwner();\n    paused := false;\n    let a = paused in\n    emit Unpause(a)\n\n}\n\nlayer PAUSABLE : [{ ownable : OwnableInterface }]\n                 { pausable : PausableInterface }\n= {\n  pausable = Pausable\n}\n\nevent\n  | Transfer(from : address indexed) (to_: address indexed) (value: uint)\n  | Approval(owner: address indexed) (spender: address indexed) (value: uint)\n\nobject signature LockableInterface = {  \n  increaseLockedValue : address * uint -> unit;\n  const isLocked : uint -> bool;\n  lockCheck : address * uint * uint -> bool;\n  lockAddress : address -> unit;\n  unlockAddress : address -> unit;\n  unlock : unit -> unit\n}\n\nobject Lockable (ownable : OwnableInterface): LockableInterface {  \n  let _balanceOfLocked : mapping[address] uint := mapping_init\n  let _addressLocked : mapping[address] bool := mapping_init\n  let _unlocktime : uint := 0u1527868800\n  let _manualUnlock : bool := false\n\n  let increaseLockedValue(addr, n) =\n     let a = _balanceOfLocked[addr] in\n        _balanceOfLocked[addr] := a + n\n\n  let isLocked now =\n    let unlock_time = _unlocktime in\n      let manual_unlock = _manualUnlock in\n        ((now < unlock_time) /\\ (!manual_unlock))\n\n  let lockCheck (from, val, now) =\n    (* assert (_addressLocked[from] == false); *)\n      let unlock_time = _unlocktime in\n        let manual_unlock = _manualUnlock in\n          if ((now < unlock_time) /\\ (!manual_unlock)) \n          then begin\n            (* assert(val <= (balances[from] - balanceOfLocked[from])); *)\n            true   \n          end else\n            false\n\n  let lockAddress addr =\n    _addressLocked[addr] := true\n\n  let unlockAddress addr =\n    _addressLocked[addr] := false\n\n  let unlock () =\n    ownable.onlyOwner();\n    let manual_unlock = _manualUnlock in\n      assert(!manual_unlock);\n      _manualUnlock := true\n\n}\n\nlayer LOCKABLE : [{ ownable : OwnableInterface }]\n                 { lockable : LockableInterface }\n= {\n  lockable = Lockable\n}\n\n(* we cannot have \"to\" which is a token that could cause parse error; need to mention in reference *)\n\nobject signature ERC20Interface = {\n  constructor : unit -> unit;\n  const balanceOf : address -> uint;\n  transfer : address * uint * uint -> bool;\n  allowance : address * address -> uint;\n  transferFrom : address * address * uint * uint -> bool;\n  approve : address * uint -> bool;\n\n  increaseApproval : address * uint -> bool;\n  decreaseApproval : address * uint -> bool\n}\n\nobject Token (pausable : PausableInterface, ownable : OwnableInterface, lockable : LockableInterface) : ERC20Interface {\n  let _totalSupply : uint := 0u10000000000\n  let _balances : mapping[address] uint := mapping_init\n  let _allowed : mapping[address] mapping[address] uint := mapping_init\n\n  let constructor () =\n    let a = _totalSupply in\n      _balances[msg_sender] := a\n\n  let balanceOf addr =\n    _balances[addr]\n\n  let transfer (to_, value, now) =\n    let check = lockable.lockCheck(msg_sender, value, now) in\n    assert(check <> false);\n    pausable.whenNotPaused();\n    let from_ = msg_sender in \n    let sender_bal = _balances[from_] in\n    let receiver_bal = _balances[to_] in\n    assert(to_ <> address(0));\n    assert(value <= sender_bal);\n    assert (sender_bal >= value);\n    _balances[from_] := sender_bal - value;\n    (* todo: add suitable overflow assertion here. *)\n    _balances[to_] := receiver_bal + value;\n    emit Transfer(msg_sender, to_, value);\n    true\n\n  let allowance (owner, spender)  =\n     let res = _allowed[owner][spender] in\n      res\n\n  let transferFrom (from_, to_, value, now) = \n    let check = lockable.lockCheck(from_, value, now) in\n    assert(check <> false);\n    pausable.whenNotPaused();\n    let from_bal = _balances[from_] in\n      let from_allow = _allowed[from_][msg_sender] in\n        let to_bal = _balances[to_] in\n    assert(to_ <> address(0));\n    assert(value <= from_bal);\n    assert(value <= from_allow);\n    _balances[from_] := from_bal - value;\n    (* todo: overflow check for the addition. *)\n    _balances[to_] := to_bal + value;\n    _allowed[from_][msg_sender] := from_allow- (value);\n    emit Transfer(from_, to_, value);\n    true\n\n  let approve (spender, value) =\n     (* pausable.whenNotPaused(); *)\n     _allowed[msg_sender][spender] := value;\n     emit Approval(msg_sender, spender, value);\n     true\n\n\n  let increaseApproval(spender, addedValue) =\n    pausable.whenNotPaused();\n    (* todo: overflow check *)\n    let allowmsgsender = _allowed[msg_sender][spender] in\n    _allowed[msg_sender][spender] := allowmsgsender + addedValue;\n    emit Approval(msg_sender, spender, allowmsgsender);\n    true\n\n  let decreaseApproval (_spender, _subtractedValue) =\n    pausable.whenNotPaused();\n    let oldValue = _allowed[msg_sender][_spender] in\n    if (_subtractedValue > oldValue) then begin\n      _allowed[msg_sender][_spender] := 0u0;\n      let a = _allowed[msg_sender][_spender] in\n      emit Approval(msg_sender, _spender, a);\n      true\n    end else begin\n      _allowed[msg_sender][_spender] := oldValue - _subtractedValue;\n      let b = _allowed[msg_sender][_spender] in\n      emit Approval(msg_sender, _spender, b);\n      true\n    end\n}\n\nlayer TOKEN : [{ pausable : PausableInterface; ownable : OwnableInterface; lockable : LockableInterface}] { token : ERC20Interface }\n= {\ntoken = Token\n}\n\nlayer CONTRACT = TOKEN @ LOCKABLE @ PAUSABLE @ OWNABLE\n\n"
  },
  {
    "path": "contracts/olive/lockable.ds",
    "content": "event\n  | Transfer (from : address indexed) (to_ : address indexed) (value : uint)\n  | Approval (owner : address indexed) (spender_ : address indexed) (value : uint)\n\n(* we cannot have \"to\" which is a token that could cause parse error; need to mention in reference *)\n\nobject signature ERC20Interface = {\n  constructor : unit -> unit;\n  balanceOf : address -> uint;\n  transfer : address * uint -> bool;\n\n  allowance : address * address -> uint \n}\n\nobject Token : ERC20Interface {\n  let _totalSupply : uint := 0u10000000000\n  let _balances : mapping[address] uint := mapping_init\n  let _allowed : mapping [address] mapping[address] uint := mapping_init\n\n  let constructor () =\n    let a = _totalSupply in\n      _balances[msg_sender] := a\n\n  let balanceOf addr =\n    _balances[addr]\n\n  let transfer (to_, value) =\n    (* lockable.lockCheck(msg_sender, value);\n    pausable.whenNotPaused(); *)\n    let sender_bal = _balances[msg_sender] in\n      let receiver_bal = _balances[to_] in\n    assert(to_ <> address(0));\n    assert(value <= sender_bal);\n    assert (sender_bal >= value);\n    _balances[msg_sender] := sender_bal - value;\n    (* todo: add suitable overflow assertion here. *)\n    _balances[to_] := receiver_bal + value;\n    emit Transfer(msg_sender, to_, value);\n    true\n\n  let allowance (owner, spender)  =\n    let res = _allowed[owner][spender] in\n    res\n\n}\n\nlayer L = {\n  o = Token\n}\n\n"
  },
  {
    "path": "contracts/olive/test.js",
    "content": "#!/usr/bin/env node\n\nconst fs = require('fs');\nconst ethers = require(\"ethers\");\n\nif (process.argv.length != 3) {\n    console.log(\"invalid args\");\n    process.exit(1);\n}\n\nconst endpoint = \"http://localhost:8545\";\nconst provider = new ethers.providers.JsonRpcProvider(endpoint);\n\nconst abi = [ {\"type\":\"constructor\",\n   \"name\":\"constructor\",\n   \"inputs\":[],\n   \"outputs\":[],\n   \"payable\":false,\n   \"constant\":false,\n   \"stateMutability\":\"nonpayable\"},\n {\"type\":\"function\",\n   \"name\":\"balanceOf\",\n   \"inputs\":[{\"name\":\"addr\", \"type\":\"address\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"transfer\",\n   \"inputs\":[{\"name\":\"to_\", \"type\":\"address\"},{\"name\":\"value\", \"type\":\"uint256\"},{\"name\":\"now\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n {\"type\":\"function\",\n   \"name\":\"allowance\",\n   \"inputs\":[{\"name\":\"owner\", \"type\":\"address\"},{\"name\":\"spender\", \"type\":\"address\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n {\"type\":\"function\",\n   \"name\":\"transferFrom\",\n   \"inputs\":[{\"name\":\"from_\", \"type\":\"address\"},{\"name\":\"to_\", \"type\":\"address\"},{\"name\":\"value\", \"type\":\"uint256\"},{\"name\":\"now\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n {\"type\":\"function\",\n   \"name\":\"approve\",\n   \"inputs\":[{\"name\":\"spender\", \"type\":\"address\"},{\"name\":\"value\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n {\"type\":\"function\",\n   \"name\":\"increaseApproval\",\n   \"inputs\":[{\"name\":\"spender\", \"type\":\"address\"},{\"name\":\"addedValue\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n {\"type\":\"function\",\n   \"name\":\"decreaseApproval\",\n   \"inputs\":[{\"name\":\"_spender\", \"type\":\"address\"},{\"name\":\"_subtractedValue\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n {\"type\":\"event\",\n   \"name\":\"OwnershipTransferred\",\n   \"inputs\":[{\"name\":\"previousOwner\", \"type\":\"address\", \"internalType\": \"address\", \"indexed\": true}, {\"name\":\"newOwner\", \"type\":\"address\", \"internalType\": \"address\", \"indexed\": true}]},\n {\"type\":\"event\",\n   \"name\":\"Pause\",\n   \"inputs\":[{\"name\":\"v\", \"type\":\"bool\", \"internalType\": \"bool\", \"indexed\": false}]},\n {\"type\":\"event\",\n   \"name\":\"Unpause\",\n   \"inputs\":[{\"name\":\"v\", \"type\":\"bool\", \"internalType\": \"bool\", \"indexed\": false}]},\n {\"type\":\"event\",\n   \"name\":\"Transfer\",\n   \"inputs\":[{\"name\":\"from\", \"type\":\"address\", \"internalType\": \"address\", \"indexed\": true}, {\"name\":\"to_\", \"type\":\"address\", \"internalType\": \"address\", \"indexed\": true}, {\"name\":\"value\", \"type\":\"uint256\", \"internalType\": \"uint256\", \"indexed\": false}]},\n {\"type\":\"event\",\n   \"name\":\"Approval\",\n   \"inputs\":[{\"name\":\"owner\", \"type\":\"address\", \"internalType\": \"address\", \"indexed\": true}, {\"name\":\"spender\", \"type\":\"address\", \"internalType\": \"address\", \"indexed\": true}, {\"name\":\"value\", \"type\":\"uint256\", \"internalType\": \"uint256\", \"indexed\": false}]}]\n\n      \nconst bytecode = fs.readFileSync(process.argv[2]).toString().replace(/\\n|\\t|\\r| /g, \"\");\nconst signer = provider.getSigner(0);\nconst creator = signer.getAddress();\n\nasync function deploy() {\n  console.log(\"sending creation transaction...\")\n  let factory = new ethers.ContractFactory(abi, bytecode, signer);\n  let contract = await factory.deploy();\n  await contract.deployed();\n  console.log(\"contract address: \" + contract.address);\n  console.log(\"transaction hash: \" + contract.deployTransaction.hash);\n  let deployedBytecode = await provider.getCode(contract.address);\n  console.log(\"deployed bytecode: \" + deployedBytecode);\n\n  // contract.on(\"Transfer\", (from, to, val) => {\n  //     console.log(\"Transfer event\");\n  //     console.log(from, to, val);\n  // });\n\n  console.log(\"calling balanceOf creator...\");\n  let balanceOf = await contract.balanceOf(creator);\n  console.log(\"value get as: \" + balanceOf);\n  // console.log(balanceOf);\n  let alice = ethers.utils.getAddress(\"0x0000000000000000000000000000000000000024\"); // arbitrary address\n\n  // console.log(\"calling approve...\");\n  // let approve_res = await contract.approve(creator, 1000);\n  // console.log(\"approve result is \" + approve_res);\n\n\n  // console.log(\"calling allowance\");\n  // let allowance_res = await contract.allowance(creator, alice);\n  // console.log(\"allowance result is \" + allowance_res);\n\n  console.log(\"calling approve... \");\n  let approve_res2 = await contract.approve(alice, 100);\n  console.log(\"approve result is \" + approve_res2);\n\n  console.log(\"calling allowance \");\n  let allowance_res2 = await contract.allowance(creator, alice);\n  console.log(\"allowance result is \" + allowance_res2);\n\n  console.log(\"calling transfer...\");\n  // to_, value, now\n  let transfer_res = await contract.transfer(alice, 100, 100);\n  console.log(\"transfer result is: \" + transfer_res);\n  \n\n\n  console.log(\"calling balanceOf alice... after receive the token\");\n  let balanceOfreceiver = await contract.balanceOf(alice);\n  console.log(\"value get as after receiving: \" + balanceOfreceiver);\n\n  console.log(\"calling balanceOf creator... after receive the token\");\n  let balanceOfcreator = await contract.balanceOf(creator);\n  console.log(\"value get as after receiving: \" + balanceOfcreator);\n  //console.log(balanceOf);\n\n}\n\ndeploy();\n"
  },
  {
    "path": "contracts/simplestorage/simplestorage.ds",
    "content": "object signature SimpleStorageInterface = {\n  get : unit -> uint;\n  set : uint -> unit\n}\n\nobject SimpleStorage : SimpleStorageInterface {\n  let _val : uint := 0u1234\n\n  let get () =\n    let val = _val in\n    val\n\n  let set x =\n    _val := x\n}\n    \nlayer signature SIMPLESTORAGECONTRACTSig = {\n  simpleStorage : SimpleStorageInterface\n}\n\nlayer SIMPLESTORAGECONTRACT : [{}] SIMPLESTORAGECONTRACTSig = {\n  simpleStorage = SimpleStorage\n}"
  },
  {
    "path": "contracts/swaps/build.sh",
    "content": " ../../_build/Edsger/edsger.byte swaps.ds coq\ncd swaps\n coq_makefile -f _CoqProject -o Makefile\nmake\n"
  },
  {
    "path": "contracts/swaps/impl.v",
    "content": "Require Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import cclib.Maps. \n\n\nDefinition addr := int256.\nDefinition timeunit := int256. \nDefinition e_maps := Int256Map.t (list addr). \nDefinition b_maps := Int256Map.t bool.\n\n(* Record Digraph := {\n  leaders : list addr;o\n  vertices : list addr; \n  edges : Int256Map.t (list addr);\n}.*) \nCompute ((Int256.add Int256.one Int256.one)).\n\n\nDefinition edges := Int256Map.init (nil : (list addr)). \nCompute (Int256Map.get  Int256.zero edges).\n\nDefinition dummy_set := Int256Map.init (false).\nFixpoint in_list (a: addr) (lst: list addr) : bool :=\n  match lst with \n  | nil => false\n  | (cons it rest) => if (Int256.eq a it) then true\n        else (in_list a rest)\n  end. \n\nCompute (Int256Map.set Int256.zero nil edges). \nCompute (Int256.lt Int256.zero Int256.one).\n\nFixpoint num_unvisited (vertices: list addr) (visited: b_maps) : nat := \n  match vertices with \n  | nil => 0%nat\n  | (cons a rest) => let rest_res := (num_unvisited rest visited) in \n                     match (Int256Map.get a visited) with \n                      | true => rest_res+1%nat\n                      | false => rest_res \n                     end \n  end.\n\nFixpoint app_to_lst (f: addr->int256) (lst: list addr) := \n  match lst with \n  | nil => Int256.zero (* never happens *)\n  | (cons a rest) => let rest_maxl := (app_to_lst f rest) in \n                     let a_l := (f a) in \n                      if (Int256.lt rest_maxl a_l) then a_l else rest_maxl\n  end. \n\n(* this is i will fix that later. :( *)\nProgram Fixpoint compute_longest_path \n  (src: addr) (dst: addr) (vertices: list addr) (edges: e_maps) (visited: b_maps) (l: int256) (dummy: nat) (node: addr)\n  :\nint256 \n:= match dummy with \n  | (S new_dummy) => \n   (\n    if (Int256.eq node dst) then l\n    else match (Int256Map.get node visited) with \n    | true => Int256.zero (* loop that doesn't have dst in it *)\n    | false => \n      (let new_list := (Int256Map.get node edges) in \n        let new_visited := (Int256Map.set node true visited) in \n       match new_list with\n      | nil => Int256.zero (* hit a deadend *)\n      | _ => (app_to_lst (compute_longest_path src dst vertices edges new_visited (Int256.add l Int256.one) new_dummy) new_list)\n      end)\n    end) \n  | O => Int256.zero\n  end\n.\n\nCheck compute_longest_path. \n(*\nwith helper (src: addr) (dst: addr) (vertices: list addr) (lst: list addr) (edges: e_maps) (visited: b_maps) (l: int256) : int256 \n:= match lst with \n  | nil => (* means recursive call to self was [a] *) Int256.zero \n  | (cons it rest) => let newl_1 := (compute_longest_path src dst vertices it edges visited l) in \n                      let newl_2 := (helper src dst vertices rest edges visited l) in \n                      if (Int256.lt newl_2 newl_1) then newl_1 else newl_2 \n  end. \n*) \n\nFixpoint merge l1 l2 :=\nlet fix merge_aux l2 :=\nmatch l1, l2 with\n| nil, _ => l2\n| _, nil => l1\n| x1::l1', x2::l2' =>\nif  x1 <? x2 then x1::merge l1' l2\nelse x2::merge_aux l2'\nend\nin merge_aux l2.\n\n\nDefinition a:=\n(fix in_list_aux a lds := match lds with | nil => false | (cons d rest) => if (Int256.eq a d) then true else (in_list_aux a rest) end).\n\n\nCheck a. \n\nDefinition b := (Int256Map.t int256).\nDefinition d : b := (Int256Map.init int.zero). \n\n\n\n\n"
  },
  {
    "path": "contracts/swaps/prf_setup.v",
    "content": "Require Export swaps_threeway.DataTypes.\nRequire Export swaps_threeway.DataTypeOps.\nRequire Export swaps_threeway.LayerSWAPCONTRACT.\nRequire Export cclib.Integers. \nRequire Export cclib.Maps.\nRequire Export ZArith.\nRequire Export core.HyperTypeInst.\nRequire Import core.MemoryModel.\nRequire Export lib.Monad.StateMonadOption.\nRequire Export backend.MachineModel.\nRequire Export lib.ArithInv.\n\nExisting Instance GlobalLayerSpec.\n\nDefinition player_addr := int256.\nDefinition wei := Z.\n\nRecord contract := (* represented by a weighted edge *)\n  { party: player_addr; \n    counter_party: player_addr;\n    amount: int256;}.\n\n\n(* three players, A -> B -> C -> A, where A is the leader. \n  The behaviors of the players are not symmetric. *)\n(* Inductive player_type := player_A | player_B | player_C. *)\n\n(* Record player : Type := \n  { addr: player_addr; secret (* private key *): int256; capital_proof: wei;\n    neighbors_incoming: list player_addr; neighbors_outgoing: list player_addr;\n    tp: player_type}. *)\n\nRecord player : Type := \n  { addr: player_addr; secret (*private key*): int256;\n    neighbors_incoming: list (player_addr * int256);\n    neighbors_outgoing: list (player_addr * int256);}.\n\nRecord state : Type := Build_state {\n\tcontract_state : global_abstract_data_type;\n  blocktimestamp : int256; (* check *)\n  player_transfers : list (player_addr * wei);\n  contracts_published: list contract;\n  secrets_revealed: list (player_addr * int256);\n}.\n\n(* outcome of all possible choices at a given time, \n  where the player knows both the current state and the previous block *)\nDefinition strategy : Type :=\n  forall (prev_block:state)\n  (A:Type)\n  (refined_prev_block:A)\n  (unlock : wei -> int256 -> osT A unit)\n  (claim : wei -> osT A unit)\n  (refund : wei -> osT A unit)\n  (publish_contracts: wei -> list (player_addr * int256) -> osT A unit), osT A unit.\n\n\nDefinition strategy_tuple := player -> strategy.\n\n(* Relevant definitions pasted; delete after complete.\n    Record stateT (t : Type) : Type := mkStateT\n    { runStateT : S -> m (t * S)%type }.\n    Definition osT := @stateT D option.\n\n  (osT state A) -> state monad with state type state and return value type A.\n  available methods: put, ret, get (with the types as implied from the following instances.\n*)\nGlobal Instance MosT_osT_state : Monad (osT state) := MosT state.\nGlobal Instance MonadState_osT_state :MonadState state (osT state) := MonadState_osT state.\nGlobal Instance MonadZero_osT_state : MonadZero (osT state) := MonadZero_osT state.\n\n(* Basic step simulations. *)\nSection step.\n\n  Context (strategies: strategy_tuple)\n          (initial_balances: player_addr -> Z)\n          (contract_address: int256).\n\n  (* The amount that is transferred from contract to player *)\n  Definition transfer_con2player (p: player_addr)\n                                (ts: list Transfer) := \n  List.fold_left (fun z t => \n                    if Int256.eq (_to t) p\n                    then (Int256.intval (_amount t) + z)%Z\n                    else z) \n                 ts 0%Z.\n\n  (* The amount that is transferred from player to contract *)\n  Definition transfer_player2con (p: player_addr)\n                                (ts: list (player_addr * wei)) := \n  List.fold_left (fun z t => \n                    if Int256.eq (fst t) p\n                    then ((snd t) +z)%Z\n                    else z)\n                 ts 0%Z.\n\n  Definition compute_balances_player (player2con: list (player_addr * wei))\n                              (con2player: list Transfer)\n                              (p: player_addr) : int256 :=\n  Int256.repr (initial_balances p\n               - transfer_player2con p player2con\n               + transfer_con2player p con2player).\n\n  Section mstep.\n  (* These are the parameters that will stay constant for the lifetime a given block *)\n  Context (coinbase: int256)\n          (timestamp: int256)\n          (number: int256)\n          (blockhash: int256 -> int256)\n          (prev_contract_state: state).\n\n  Definition make_machine_env (addr: int256)\n                              (callvalue: wei)\n                              (player2con: list (player_addr * wei))\n                              (con2player: list Transfer)\n       : machine_env GetHighData\n    := {| me_address := contract_address;\n          me_origin := addr;\n          me_caller := addr;\n          me_callvalue := Int256.repr (callvalue);\n          me_coinbase := coinbase;\n          me_timestamp := timestamp;\n          me_number := number;\n          me_balance := compute_balances_player player2con con2player;\n          me_blockhash := blockhash;\n          me_transfer _ _ _ _ _ := False;\n          me_callmethod _ _ _ _ _ _ _ _ _ _ := False;\n          me_log _ _ d := d\n       |}.\n\n  Import MonadNotation.\n  Require Import List.\n\n  (* embed the change `cmd` has on contract_state into\n    the entire world state. *)\n  Import ListNotations.\n  Definition lif {A:Type}\n                 (addr : player_addr)\n                 (callvalue : wei) \n                 (cmd : machine_env GetHighData -> osT global_abstract_data_type A)\n                 (f: state -> state) (* allowing for effects on the state *)\n    : osT state A :=\n    st  <- get;;\n      let incoming' := (addr, callvalue) :: (player_transfers st) in\n      let s := st.(secrets_revealed) in\n      let me := make_machine_env addr callvalue incoming' st.(contract_state).(_events) in\n      match runStateT (cmd me) (contract_state st) with\n      | None => mzero\n      | Some (v, st') => put (f (Build_state st' st.(blocktimestamp) incoming' st.(contracts_published) s)) ;; ret v\n      end.\n\n  Definition lif_simpl {A:Type}\n                 (addr : player_addr)\n                 (callvalue : wei) \n                 (cmd : machine_env GetHighData -> osT global_abstract_data_type A)\n                 (*f: state -> state*) (* allowing for effects on the state *)\n    : osT state A :=\n    st  <- get;;\n      let incoming' := (addr, callvalue) :: (player_transfers st) in\n      let s := st.(secrets_revealed) in\n      let me := make_machine_env addr callvalue incoming' st.(contract_state).(_events) in\n      match runStateT (cmd me) (contract_state st) with\n      | None => mzero\n      | Some (v, st') => put (Build_state st' st.(blocktimestamp) incoming' st.(contracts_published) s) ;; ret v\n      end.\n\n\n  Definition f_unlock (pt: player_addr) (s: int256) (st: state) : state :=\n  let s' := (pt, s) :: (secrets_revealed st) in\n  Build_state (contract_state st) (blocktimestamp st) (player_transfers st) (contracts_published st) s'.\n\n  Definition f_id (st: state) : state :=\n  st.\n\n  Definition append_contract (pt c_pt: player_addr) (amt: int256) (st: state): state :=\n  let new_contract := Build_contract pt c_pt amt in\n  Build_state\n  st.(contract_state) st.(blocktimestamp) st.(player_transfers)\n  (new_contract :: st.(contracts_published)) st.(secrets_revealed).\n  (* change to `state` should include new contract published, as well as \n     transfer amount made to the contract. *)\n  Definition lifted_init := fun (pt: player_addr) (w: wei) (ld op c_pt: player_addr) (hl: hashvalue) (st dt: int256) \n  => lif pt w (SwapContract_initialize_opt ld op c_pt hl st dt) (* f_id *) (append_contract pt c_pt (Int256.repr w)).\n\n  Definition lifted_init_id := fun (pt: player_addr) (w: wei) (ld op c_pt: player_addr) (hl: hashvalue) (st dt: int256) \n  => lif pt w (SwapContract_initialize_opt ld op c_pt hl st dt) f_id.\n\n  Definition lifted_unlock := fun (pt: player_addr) (w: wei) (s: int256)\n  => lif pt w (SwapContract_unlock_opt s) (f_unlock pt s).\n\n  Definition lifted_claim := fun (pt: player_addr) (w: wei) \n  => lif pt w (SwapContract_claim_opt) f_id.\n\n  Definition lifted_refund := fun (pt: player_addr) (w: wei)\n  => lif pt w (SwapContract_refund_opt) f_id.\n\n  (* change both player_transfers list and the contracts list *)\n  Definition pub_contracts (pt: player_addr) (c_pt: list (player_addr * int256)) (callvalue: wei) \n  : osT state unit := \n  st <- get ;;\n  let incoming' := (pt, callvalue) :: (player_transfers st) in\n  let new_contracts := List.map (fun x => Build_contract pt (fst x) (snd x)) c_pt in\n  let c' :=  new_contracts ++ (contracts_published st) in\n  put (Build_state st.(contract_state) st.(blocktimestamp) incoming' c' st.(secrets_revealed)).\n\n\n  (* State transition by applying the strategy *)\n  Inductive mstep : state -> state -> Prop :=\n  | mstep_call : forall p st retval st' (*rst*),\n      (* assume that `rst = prev_contract_state` for our purposes for now. *)\n      runStateT ((strategies p prev_contract_state state (* rst *) prev_contract_state\n                    (fun w secret => lif p.(addr) w (SwapContract_unlock_opt secret) (f_unlock p.(addr) secret))\n                    (fun w => lif p.(addr) w SwapContract_claim_opt f_id)\n                    (fun w => lif p.(addr) w SwapContract_refund_opt f_id)\n                    (fun w c_pt => pub_contracts p.(addr) c_pt w))\n                         : osT state unit) st\n      = Some (retval, st') ->\n      mstep st st'.\n\n  Inductive multi_mstep : state -> state -> Prop := \n  | multi_mstep_reflexive : forall (st : state), multi_mstep st st\n  | multi_mstep_transitive : forall (st st' st'' : state), \n    mstep st st' -> multi_mstep st' st'' -> multi_mstep st st''.\n  (* | multi_mstep_synchronicity : forall (stg : strategy) (s s' a a': state),\n    multi_mstep s a /\\ mstep a a' /\\ multi_mstep a' s'. *)\n  End mstep.\n\n  Definition construct_incremented_state := \n  fun st => \n  (Build_state st.(contract_state) (Int256.add (blocktimestamp st) Int256.one) \n        (player_transfers st) (contracts_published st) (secrets_revealed st)).\n\n  Inductive bstep : state -> state -> Prop :=\n  | step_blocktimestamp : forall coinbase timstamp number blockhash p st st',\n      construct_incremented_state st = st' -> \n      multi_mstep coinbase timstamp number blockhash p st st' -> \n      bstep st st'.\n\n  Inductive multi_bstep : state -> state -> Prop := \n  | multi_bstep_reflexive : forall (st : state), multi_bstep st st\n  | multi_bstep_transitive : forall (st st' st'' : state), \n    bstep st st' -> multi_bstep st' st'' -> multi_bstep st st''.\n\n  Example prop1 : Prop := forall coinbase timstamp number blockhash p (st : state),\n  mstep coinbase timstamp number blockhash p st st.\n\nEnd step.\n\nSection Transactions.\n  Context (p: player)\n          (st: state).\n\n  Definition player_paid : Z :=\n  (transfer_player2con p.(addr) (player_transfers st)).\n\n  Definition player_gained : Z :=\n  (transfer_con2player p.(addr) st.(contract_state).(_events)).\n\n\n  Definition player_netgain : int256 :=\n  Int256.repr (player_gained - player_paid).\n\n  Definition player_bestpayoff : int256 :=\n  let incoming := List.fold_left (fun x y => Int256.add x (snd y)) p.(neighbors_incoming) Int256.zero in\n  let outgoing := List.fold_left (fun x y => Int256.add x (snd y)) p.(neighbors_outgoing) Int256.zero in\n  (Int256.sub incoming outgoing).\n\nEnd Transactions.\n\nDefinition is_nil {A:Type} (l: list A) : bool :=\n  match l with\n  | nil => true\n  | _ => false\n  end.\n(* There are two phases to the transaction: \n  * phase1: populating the contracts.\n    we are doing a case specific modeling here - not in the general sense.\n  * phase2: populating the secrets. *)\nSection properties.\n  Context (st: state).\n  Import ListNotations.\n\n  (* validity of contracts? *)\n  Fixpoint edge_contract_valid (pt c_pt: player_addr) (amt: int256) (c: list contract) : bool :=\n  match c with\n  | [] => false\n  | {|party := pt'; counter_party := c_pt'; amount := amt' |} :: rest => \n    if andb (Int256.eq pt pt') (andb (Int256.eq c_pt c_pt') (Int256.eq amt' amt))\n    then true else edge_contract_valid pt c_pt amt rest\n  end.\n\n  (* all the incoming contracts are placed and have the right amount *)\n  Definition incoming_contracts_complete (p: player) : bool :=\n  let neighs := p.(neighbors_incoming) in\n  let c := st.(contracts_published) in\n    (List.forallb (fun x => (edge_contract_valid (fst x) p.(addr) (snd x) c)) neighs).\n\n  Definition outgoing_contracts_complete (p: player) : bool :=\n  let neighs := p.(neighbors_outgoing) in\n  let c := st.(contracts_published) in\n    (List.forallb (fun x => (edge_contract_valid p.(addr) (fst x) (snd x) c)) neighs).\n\n  (* contracts not yet published, p as the party *)\n  Definition unpublished_contracts (p: player) : list (player_addr * int256) :=\n  let neighs := p.(neighbors_outgoing) in\n  let c := st.(contracts_published) in\n  List.concat\n   (List.map (fun x => if (edge_contract_valid p.(addr) (fst x) (snd x) c) then [] else [x]) neighs).\n\n  (* lemma: outgoing_contracts_complete if and only if of unpublished contracts length 0 *)\n\n  (* Note that this is not the same as pre-publication phase. *)\n  Definition is_pre_initialization_phase :bool :=\n  andb (is_nil st.(secrets_revealed)) \n        (andb (is_nil st.(player_transfers)) (is_nil st.(contracts_published))).\n\n  Definition hashlock_unlocked : bool :=\n  st.(contract_state).(_unlocked).\n\n  Definition contract_ended : bool :=\n  st.(contract_state).(_ended).\n\n  Definition is_leader (p: player) : bool :=\n  Int256.eq st.(contract_state).(_leader) p.(addr).\n\n\n  (* secret learned from any one of its outgoing neighbors *)\n  Definition has_learned_secret (p: player) : bool :=\n  let neighs := p.(neighbors_outgoing) in\n  let s := st.(secrets_revealed) in \n  List.existsb (fun x => List.existsb (fun k => Int256.eq (fst k) (fst x)) s) neighs.\n\n  Definition get_secret (p: player) : option (player_addr * int256) :=\n  let neighs := p.(neighbors_outgoing) in\n  let s := st.(secrets_revealed) in\n  List.find (fun x => List.existsb (fun k => Int256.eq (fst k) (fst x)) neighs) s.\n\nEnd properties.\n\nDefinition mtt {A: Type} (m: option (unit * A)): osT A unit :=\n  match m with\n  | None => ret tt\n  | Some (v, st) => put st\n  end.\n\n(* Differentiate between leader and follower\n  Assumption needed: player's capital proof is >= sum of its outgoing contracts \n                     who can call these functions (unlock, claim, refund)\n  FIXME: not yet included `refund`. It relies on time, tricky.... *)\nDefinition protocol_implementation (p: player): strategy :=\n(fun (prev_block: state)\n     (A: Type)\n     (refined_prev_block: A)\n     (unlock : wei -> int256 -> osT A unit)\n     (claim : wei -> osT A unit)\n     (refund : wei -> osT A unit) \n     (publish_contracts : wei -> list (player_addr * int256) -> osT A unit) =>\n  (* pre-initialized -> no actions taken. *)\nif is_pre_initialization_phase prev_block\nthen put refined_prev_block\nelse\n(* leader *)\nif is_leader prev_block p\nthen\n  if negb (outgoing_contracts_complete prev_block p)\n  then let unpublished_neighs := unpublished_contracts prev_block p in\n       let z_neighs := List.map (fun x => (fst x, Int256.intval (snd x))) unpublished_neighs in\n       let total_cost := List.fold_left (fun x z => (x + (snd z))%Z) z_neighs 0%Z in\n       mtt (runStateT (publish_contracts total_cost unpublished_neighs) refined_prev_block)\n  else\n  if (incoming_contracts_complete prev_block p)\n  then \n    if (is_nil (secrets_revealed prev_block))\n    then mtt (runStateT (unlock 0%Z p.(secret)) refined_prev_block)\n    else mtt (runStateT (claim 0%Z) refined_prev_block)\n  else put refined_prev_block\n(* follower *)\nelse \n  if andb (incoming_contracts_complete prev_block p)\n        (negb (outgoing_contracts_complete prev_block p))\n  then let unpublished_neighs := unpublished_contracts prev_block p in\n     let z_neighs := List.map (fun x => (fst x, Int256.intval (snd x))) unpublished_neighs in\n     let total_cost := List.fold_left (fun x z => (x + (snd z))%Z) z_neighs 0%Z in\n     (* Important: need to assert that capital_proof >= sum of outgoing contracts *)\n     mtt (runStateT (publish_contracts total_cost unpublished_neighs) refined_prev_block)\n  else\n  if (has_learned_secret prev_block p)\n  then if hashlock_unlocked prev_block\n     then (* claim *)\n          mtt (runStateT (claim 0%Z) refined_prev_block)\n     else match get_secret prev_block p with\n          | None => put refined_prev_block (* should never happen *)\n          | Some (_, v) => mtt (runStateT (unlock 0%Z v) refined_prev_block)\n          end\n  else\n  put refined_prev_block\n).\n"
  },
  {
    "path": "contracts/swaps/swaps_general/CertiKOS.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.CertiKOS for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\n\nSection EdsgerGen.\n\n\nRequire Import compcert.lib.Coqlib.\nRequire Import liblayers.lib.Decision.\nRequire Import liblayers.compcertx.ErrorMonad.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import compcertx.common.MemimplX.\nRequire Import liblayers.compcertx.MakeProgramImpl.\nRequire Import liblayers.compat.CompatLayers.\nRequire Import mcertikos.layerlib.LAsmModuleSemDef.\nRequire Import mcertikos.layerlib.CompCertiKOS.\n\nLocal Instance mwd_ops: MemWithData.UseMemWithData Memimpl.mem.\n\nRequire Import swaps_general.LayerEVMOPCODE.\nRequire Import swaps_general.LayerSWAPCONTRACT.\n\nDefinition EVMOpcode_transfer_core := (@EVMOpcode_transfer Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition EVMOpcode_transfer_func := (synth_func_func EVMOpcode_transfer_core).\n\nDefinition DiGraph_initialize_core := (@DiGraph_initialize Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_initialize_func := (synth_func_func DiGraph_initialize_core).\n\nDefinition DiGraph_is_leader_core := (@DiGraph_is_leader Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_is_leader_func := (synth_func_func DiGraph_is_leader_core).\n\nDefinition DiGraph_is_party_core := (@DiGraph_is_party Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_is_party_func := (synth_func_func DiGraph_is_party_core).\n\nDefinition DiGraph_is_edge_core := (@DiGraph_is_edge Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_is_edge_func := (synth_func_func DiGraph_is_edge_core).\n\nDefinition DiGraph_get_leader_ind_core := (@DiGraph_get_leader_ind Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_get_leader_ind_func := (synth_func_func DiGraph_get_leader_ind_core).\n\nDefinition DiGraph_get_party_ind_core := (@DiGraph_get_party_ind Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_get_party_ind_func := (synth_func_func DiGraph_get_party_ind_core).\n\nDefinition DiGraph_valid_path_core := (@DiGraph_valid_path Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_valid_path_func := (synth_func_func DiGraph_valid_path_core).\n\nDefinition DiGraph_sign_follower_core := (@DiGraph_sign_follower Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_sign_follower_func := (synth_func_func DiGraph_sign_follower_core).\n\nDefinition DiGraph_sign_leader_core := (@DiGraph_sign_leader Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_sign_leader_func := (synth_func_func DiGraph_sign_leader_core).\n\nDefinition DiGraph_can_sign_follower_core := (@DiGraph_can_sign_follower Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_can_sign_follower_func := (synth_func_func DiGraph_can_sign_follower_core).\n\nDefinition DiGraph_get_path_len_core := (@DiGraph_get_path_len Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_get_path_len_func := (synth_func_func DiGraph_get_path_len_core).\n\nDefinition DiGraph_diam_core := (@DiGraph_diam Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_diam_func := (synth_func_func DiGraph_diam_core).\n\nDefinition DiGraph_maxpathlen_core := (@DiGraph_maxpathlen Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition DiGraph_maxpathlen_func := (synth_func_func DiGraph_maxpathlen_core).\n\nDefinition EVMOPCODE_impl : res LAsm.module := \n  ret (∅).\n\nDefinition SwapContract_initialize_core := (@SwapContract_initialize Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition SwapContract_initialize_func := (synth_func_func SwapContract_initialize_core).\n\nDefinition SwapContract_unlock_core := (@SwapContract_unlock Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition SwapContract_unlock_func := (synth_func_func SwapContract_unlock_core).\n\nDefinition SwapContract_claim_core := (@SwapContract_claim Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition SwapContract_claim_func := (synth_func_func SwapContract_claim_core).\n\nDefinition SwapContract_refund_core := (@SwapContract_refund Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition SwapContract_refund_func := (synth_func_func SwapContract_refund_core).\n\nDefinition SWAPCONTRACT_impl : res LAsm.module := \n  M_SwapContract_initialize <- CompCertiKOS.transf_module (ident_SwapContract_initialize ↦ SwapContract_initialize_func);\n  M_SwapContract_unlock <- CompCertiKOS.transf_module (ident_SwapContract_unlock ↦ SwapContract_unlock_func);\n  M_SwapContract_claim <- CompCertiKOS.transf_module (ident_SwapContract_claim ↦ SwapContract_claim_func);\n  M_SwapContract_refund <- CompCertiKOS.transf_module (ident_SwapContract_refund ↦ SwapContract_refund_func);\n  ret (var_SwapContract__assetAmount_ident ↦ SwapContract__assetAmount_globvar ⊕ var_SwapContract__timelocks_ident ↦ SwapContract__timelocks_globvar ⊕ var_SwapContract__hashlocks_ident ↦ SwapContract__hashlocks_globvar ⊕ var_SwapContract__party_ident ↦ SwapContract__party_globvar ⊕ var_SwapContract__counterparty_ident ↦ SwapContract__counterparty_globvar ⊕ var_SwapContract__start_ident ↦ SwapContract__start_globvar ⊕ var_SwapContract__delta_ident ↦ SwapContract__delta_globvar ⊕ var_SwapContract__unlocked_ident ↦ SwapContract__unlocked_globvar ⊕ var_SwapContract__ended_ident ↦ SwapContract__ended_globvar ⊕ var_SwapContract__canrefund_ident ↦ SwapContract__canrefund_globvar ⊕   M_SwapContract_initialize  ⊕   M_SwapContract_unlock  ⊕   M_SwapContract_claim  ⊕   M_SwapContract_refund  ⊕ ∅).\n\nDefinition certikos := \n  MEVMOPCODE <- EVMOPCODE_impl;\n  MSWAPCONTRACT <- SWAPCONTRACT_impl;\n  ret ( MEVMOPCODE ⊕ MSWAPCONTRACT ⊕ ∅).\n\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/DataTypeOps.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.DataTypeOps for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\n\nSection EdsgerGen.\n\nDefinition tint_U := (Tpair addr tint).\nGlobal Instance tint_U_hyper_type_impl : HyperTypeImpl tint_U := {\n  ht_cval f := (@ht_cval tint_U _ f);\n  ht_ft_cond f := (@ht_ft_cond tint_U _ f);\n  ht_default := (@ht_default tint_U _);\n  ht_valid_ft_cond f := @ht_valid_ft_cond tint_U _ f;\n  ht_valid_ft_ocond := (@ht_valid_ft_ocond tint_U _);\n  ht_inject j a b := a = b\n}.\nDefinition int_U_pair := mk_hyper_type_pair tint_U.\nGlobal Instance tint_U_hyper_type : HyperType tint_U := _.\nGlobal Instance tint_U_hyper_binary_impl_eq : HyperBinaryImpl Oeq tint_U tint_U tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := (* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) false\n}.\nDefinition tint_U := (Tpair timeunit tint).\nGlobal Instance tint_U_hyper_type_impl : HyperTypeImpl tint_U := {\n  ht_cval f := (@ht_cval tint_U _ f);\n  ht_ft_cond f := (@ht_ft_cond tint_U _ f);\n  ht_default := (@ht_default tint_U _);\n  ht_valid_ft_cond f := @ht_valid_ft_cond tint_U _ f;\n  ht_valid_ft_ocond := (@ht_valid_ft_ocond tint_U _);\n  ht_inject j a b := a = b\n}.\nDefinition int_U_pair := mk_hyper_type_pair tint_U.\nGlobal Instance tint_U_hyper_type : HyperType tint_U := _.\nGlobal Instance tint_U_hyper_binary_impl_eq : HyperBinaryImpl Oeq tint_U tint_U tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := (* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) false\n}.\nDefinition tTransfer_Transfer := (Tpair Transfer (Tstruct Transfer_struct_ident\n  (Fcons Transfer_struct__amount_ident tint\n  (Fcons Transfer_struct__to_ident tint\n   Fnil)))).\nGlobal Instance tTransfer_Transfer_hyper_type_impl : HyperTypeImpl tTransfer_Transfer := {\n  ht_cval f := \n    (CVstruct (CSmap\n      (PTree.set  Transfer_struct__amount_ident  (@ht_cval tint_U _ (_amount f))\n      (PTree.set  Transfer_struct__to_ident  (@ht_cval tint_U _ (_to f))\n      (@PTree.empty cval)))));\n  ht_ft_cond f := (@ht_ft_cond tint_U _ (_amount f))\n    /\\ (@ht_ft_cond tint_U _ (_to f));\n  ht_default := {| _amount := (@ht_default tint_U _);\n       _to := (@ht_default tint_U _)\n    |};\n  ht_valid_ft_cond f := @ht_valid_ft_cond tint_U _ (_amount f)\n    /\\ @ht_valid_ft_cond tint_U _ (_to f);\n  ht_valid_ft_ocond := (\n    (@ht_valid_ft_ocond tint_U _) m{ _amount }\n    /\\ (@ht_valid_ft_ocond tint_U _) m{ _to })%oprop1;\n  ht_inject j a b := a = b\n}.\nDefinition Transfer_Transfer_pair := mk_hyper_type_pair tTransfer_Transfer.\nGlobal Instance tTransfer_Transfer_hyper_type : HyperType tTransfer_Transfer.\nProof. solve_algebraic_record_data_type_hyper_type tTransfer_Transfer_hyper_type_impl. Qed.\nGlobal Instance tTransfer_Transfer__amount_field_impl : HyperFieldImpl tTransfer_Transfer tint_U Transfer_struct__amount_ident := {\n  Hfield_offset := 0;\n  Hfield_get s := _amount s;\n  Hfield_set v s := Build_Transfer v (_to s)\n}.\nGlobal Instance tTransfer_Transfer__amount_field : HyperField tTransfer_Transfer tint_U Transfer_struct__amount_ident.\nProof. solve_record_type_hyper_field. Qed.\nGlobal Instance tTransfer_Transfer__to_field_impl : HyperFieldImpl tTransfer_Transfer tint_U Transfer_struct__to_ident := {\n  Hfield_offset := 1;\n  Hfield_get s := _to s;\n  Hfield_set v s := Build_Transfer (_amount s) v\n}.\nGlobal Instance tTransfer_Transfer__to_field : HyperField tTransfer_Transfer tint_U Transfer_struct__to_ident.\nProof. solve_record_type_hyper_field. Qed.\nDefinition tint_list_Transfer := (Tpair list_Transfer tint).\nGlobal Instance tint_list_Transfer_hyper_type_impl : HyperTypeImpl tint_list_Transfer := {\n  ht_cval := fun _ => CVany;\n  ht_ft_cond := fun _ => True;\n  ht_default := nil;\n  ht_valid_ft_cond := fun _ => True;\n  ht_valid_ft_ocond := otrue1;\n  ht_inject j a b := a = b\n}.\nDefinition int_list_Transfer_pair := mk_hyper_type_pair tint_list_Transfer.\nGlobal Instance tint_list_Transfer_hyper_binary_impl_eq : HyperBinaryImpl Oeq tint_list_Transfer tint_list_Transfer tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := (* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) false\n}.\nDefinition tint_list_Z := (Tpair list_Z tint).\nGlobal Instance tint_list_Z_hyper_type_impl : HyperTypeImpl tint_list_Z := {\n  ht_cval := fun _ => CVany;\n  ht_ft_cond := fun _ => True;\n  ht_default := nil;\n  ht_valid_ft_cond := fun _ => True;\n  ht_valid_ft_ocond := otrue1;\n  ht_inject j a b := a = b\n}.\nDefinition int_list_Z_pair := mk_hyper_type_pair tint_list_Z.\nGlobal Instance tint_list_Z_hyper_binary_impl_eq : HyperBinaryImpl Oeq tint_list_Z tint_list_Z tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := (* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) false\n}.\nDefinition tedgeSet := (Tpair edgeSet tint).\nGlobal Instance tedgeSet_hyper_type_impl : HyperTypeImpl tedgeSet := {\n  ht_cval := fun _ => CVany;\n  ht_ft_cond := fun _ => True;\n  ht_default := (Int256Map.init (nil: (list addr)));\n  ht_valid_ft_cond := fun _ => True;\n  ht_valid_ft_ocond := otrue1;\n  ht_inject j a b := a = b\n}.\nDefinition edgeSet_pair := mk_hyper_type_pair tedgeSet.\nGlobal Instance tedgeSet_hyper_binary_impl_eq : HyperBinaryImpl Oeq tedgeSet tedgeSet tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := (* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) false\n}.\nDefinition tint2intMap := (Tpair int2intMap tint).\nGlobal Instance tint2intMap_hyper_type_impl : HyperTypeImpl tint2intMap := {\n  ht_cval := fun _ => CVany;\n  ht_ft_cond := fun _ => True;\n  ht_default := (Int256Map.init (Int256Map.zero));\n  ht_valid_ft_cond := fun _ => True;\n  ht_valid_ft_ocond := otrue1;\n  ht_inject j a b := a = b\n}.\nDefinition int2intMap_pair := mk_hyper_type_pair tint2intMap.\nGlobal Instance tint2intMap_hyper_binary_impl_eq : HyperBinaryImpl Oeq tint2intMap tint2intMap tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := (* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) false\n}.\nDefinition tarray_int_AR3_Z := (Tpair AR3_Z (Tarray tint 3)).\nGlobal Instance tarray_int_AR3_Z_hyper_type_impl : HyperTypeImpl tarray_int_AR3_Z :=\n  ZMap_inject_equal_array_hyper_type_impl tint_U 3.\nDefinition array_int_AR3_Z_pair := mk_hyper_type_pair tarray_int_AR3_Z.\nGlobal Instance tarray_int_AR3_Z_hyper_type : HyperType tarray_int_AR3_Z :=\n  Int256Tree_inject_equal_hashmap_hyper_type tint_U 3.\nGlobal Instance tarray_int_AR3_Z_index_impl : HyperIndexImpl tarray_int_AR3_Z tint_U :=\n  ZMap_inject_equal_array_hyper_index_impl tint_U 3.\nGlobal Instance tarray_int_AR3_Z_index : HyperIndex tarray_int_AR3_Z tint_U :=\n  ZMap_inject_equal_array_hyper_index tint_U 3.\nDefinition thash_array_int_HASH_Z_AR3_Z := (Tpair HASH_Z_AR3_Z (Thashmap tint (Tarray tint 3))).\nGlobal Instance thash_array_int_HASH_Z_AR3_Z_hyper_type_impl : HyperTypeImpl thash_array_int_HASH_Z_AR3_Z :=\n   Int256Tree_inject_equal_hashmap_hyper_type_impl tarray_int_AR3_Z.\nDefinition hash_array_int_HASH_Z_AR3_Z_pair := mk_hyper_type_pair thash_array_int_HASH_Z_AR3_Z.\nGlobal Instance thash_array_int_HASH_Z_AR3_Z_hyper_type : HyperType thash_array_int_HASH_Z_AR3_Z :=\n  Int256Tree_inject_equal_hashmap_hyper_type tarray_int_AR3_Z.\nGlobal Instance thash_array_int_HASH_Z_AR3_Z_index_impl : HyperIntHashImpl thash_array_int_HASH_Z_AR3_Z tarray_int_AR3_Z :=\n  Int256Tree_inject_equal_hashmap_hash_impl tarray_int_AR3_Z.\nGlobal Instance thash_array_int_HASH_Z_AR3_Z_hash : HyperIntHash thash_array_int_HASH_Z_AR3_Z tarray_int_AR3_Z :=\n  Int256Tree_inject_equal_hashmap_hash tarray_int_AR3_Z.\nDefinition thash_array_int_HASH_Z_AR3_Z := (Tpair edgeset (Thashmap tint (Tarray tint 3))).\nGlobal Instance thash_array_int_HASH_Z_AR3_Z_hyper_type_impl : HyperTypeImpl thash_array_int_HASH_Z_AR3_Z :=\n   Int256Tree_inject_equal_hashmap_hyper_type_impl tarray_int_AR3_Z.\nDefinition hash_array_int_HASH_Z_AR3_Z_pair := mk_hyper_type_pair thash_array_int_HASH_Z_AR3_Z.\nGlobal Instance thash_array_int_HASH_Z_AR3_Z_hyper_type : HyperType thash_array_int_HASH_Z_AR3_Z :=\n  Int256Tree_inject_equal_hashmap_hyper_type tarray_int_AR3_Z.\nGlobal Instance thash_array_int_HASH_Z_AR3_Z_index_impl : HyperIntHashImpl thash_array_int_HASH_Z_AR3_Z tarray_int_AR3_Z :=\n  Int256Tree_inject_equal_hashmap_hash_impl tarray_int_AR3_Z.\nGlobal Instance thash_array_int_HASH_Z_AR3_Z_hash : HyperIntHash thash_array_int_HASH_Z_AR3_Z tarray_int_AR3_Z :=\n  Int256Tree_inject_equal_hashmap_hash tarray_int_AR3_Z.\nDefinition tPath_Path := (Tpair Path (Tstruct Path_struct_ident\n  (Fcons Path_struct_path_ident (Tarray tint 3)\n  (Fcons Path_struct_nextInd_ident tint\n   Fnil)))).\nGlobal Instance tPath_Path_hyper_type_impl : HyperTypeImpl tPath_Path := {\n  ht_cval f := \n    (CVstruct (CSmap\n      (PTree.set  Path_struct_path_ident  (@ht_cval tarray_int_AR3_Z _ (path f))\n      (PTree.set  Path_struct_nextInd_ident  (@ht_cval tint_Z32 _ (nextInd f))\n      (@PTree.empty cval)))));\n  ht_ft_cond f := (@ht_ft_cond tarray_int_AR3_Z _ (path f))\n    /\\ (@ht_ft_cond tint_Z32 _ (nextInd f));\n  ht_default := {| path := (@ht_default tarray_int_AR3_Z _);\n       nextInd := (@ht_default tint_Z32 _)\n    |};\n  ht_valid_ft_cond f := @ht_valid_ft_cond tarray_int_AR3_Z _ (path f)\n    /\\ @ht_valid_ft_cond tint_Z32 _ (nextInd f);\n  ht_valid_ft_ocond := (\n    (@ht_valid_ft_ocond tarray_int_AR3_Z _) m{ path }\n    /\\ (@ht_valid_ft_ocond tint_Z32 _) m{ nextInd })%oprop1;\n  ht_inject j a b := a = b\n}.\nDefinition Path_Path_pair := mk_hyper_type_pair tPath_Path.\nGlobal Instance tPath_Path_hyper_type : HyperType tPath_Path.\nProof. solve_algebraic_record_data_type_hyper_type tPath_Path_hyper_type_impl. Qed.\nGlobal Instance tPath_Path_path_field_impl : HyperFieldImpl tPath_Path tarray_int_AR3_Z Path_struct_path_ident := {\n  Hfield_offset := 0;\n  Hfield_get s := path s;\n  Hfield_set v s := Build_Path v (nextInd s)\n}.\nGlobal Instance tPath_Path_path_field : HyperField tPath_Path tarray_int_AR3_Z Path_struct_path_ident.\nProof. solve_record_type_hyper_field. Qed.\nGlobal Instance tPath_Path_nextInd_field_impl : HyperFieldImpl tPath_Path tint_Z32 Path_struct_nextInd_ident := {\n  Hfield_offset := 1;\n  Hfield_get s := nextInd s;\n  Hfield_set v s := Build_Path (path s) v\n}.\nGlobal Instance tPath_Path_nextInd_field : HyperField tPath_Path tint_Z32 Path_struct_nextInd_ident.\nProof. solve_record_type_hyper_field. Qed.\nDefinition tarray_Path_AR1_Path := (Tpair AR1_Path (Tarray (Tstruct Path_struct_ident\n  (Fcons Path_struct_path_ident (Tarray tint 3)\n  (Fcons Path_struct_nextInd_ident tint\n   Fnil))) 1)).\nGlobal Instance tarray_Path_AR1_Path_hyper_type_impl : HyperTypeImpl tarray_Path_AR1_Path :=\n  ZMap_inject_equal_array_hyper_type_impl tPath_Path 1.\nDefinition array_Path_AR1_Path_pair := mk_hyper_type_pair tarray_Path_AR1_Path.\nGlobal Instance tarray_Path_AR1_Path_hyper_type : HyperType tarray_Path_AR1_Path :=\n  Int256Tree_inject_equal_hashmap_hyper_type tPath_Path 1.\nGlobal Instance tarray_Path_AR1_Path_index_impl : HyperIndexImpl tarray_Path_AR1_Path tPath_Path :=\n  ZMap_inject_equal_array_hyper_index_impl tPath_Path 1.\nGlobal Instance tarray_Path_AR1_Path_index : HyperIndex tarray_Path_AR1_Path tPath_Path :=\n  ZMap_inject_equal_array_hyper_index tPath_Path 1.\nDefinition tHashkeys_Hashkeys := (Tpair Hashkeys (Tstruct Hashkeys_struct_ident\n  (Fcons Hashkeys_struct_toleader_ident (Tarray (Tstruct Path_struct_ident\n    (Fcons Path_struct_path_ident (Tarray tint 3)\n    (Fcons Path_struct_nextInd_ident tint\n     Fnil))) 1)\n   Fnil))).\nGlobal Instance tHashkeys_Hashkeys_hyper_type_impl : HyperTypeImpl tHashkeys_Hashkeys := {\n  ht_cval f := \n    (CVstruct (CSmap\n      (PTree.set  Hashkeys_struct_toleader_ident  (@ht_cval tarray_Path_AR1_Path _ (toleader f))\n      (@PTree.empty cval))));\n  ht_ft_cond f := (@ht_ft_cond tarray_Path_AR1_Path _ (toleader f));\n  ht_default := {| toleader := (@ht_default tarray_Path_AR1_Path _)\n    |};\n  ht_valid_ft_cond f := @ht_valid_ft_cond tarray_Path_AR1_Path _ (toleader f);\n  ht_valid_ft_ocond := (\n    (@ht_valid_ft_ocond tarray_Path_AR1_Path _) m{ toleader })%oprop1;\n  ht_inject j a b := a = b\n}.\nDefinition Hashkeys_Hashkeys_pair := mk_hyper_type_pair tHashkeys_Hashkeys.\nGlobal Instance tHashkeys_Hashkeys_hyper_type : HyperType tHashkeys_Hashkeys.\nProof. solve_algebraic_record_data_type_hyper_type tHashkeys_Hashkeys_hyper_type_impl. Qed.\nGlobal Instance tHashkeys_Hashkeys_toleader_field_impl : HyperFieldImpl tHashkeys_Hashkeys tarray_Path_AR1_Path Hashkeys_struct_toleader_ident := {\n  Hfield_offset := 0;\n  Hfield_get s := toleader s;\n  Hfield_set v s := Build_Hashkeys v\n}.\nGlobal Instance tHashkeys_Hashkeys_toleader_field : HyperField tHashkeys_Hashkeys tarray_Path_AR1_Path Hashkeys_struct_toleader_ident.\nProof. solve_record_type_hyper_field. Qed.\nDefinition tarray_int_AR1_Z := (Tpair AR1_Z (Tarray tint 1)).\nGlobal Instance tarray_int_AR1_Z_hyper_type_impl : HyperTypeImpl tarray_int_AR1_Z :=\n  ZMap_inject_equal_array_hyper_type_impl tint_U 1.\nDefinition array_int_AR1_Z_pair := mk_hyper_type_pair tarray_int_AR1_Z.\nGlobal Instance tarray_int_AR1_Z_hyper_type : HyperType tarray_int_AR1_Z :=\n  Int256Tree_inject_equal_hashmap_hyper_type tint_U 1.\nGlobal Instance tarray_int_AR1_Z_index_impl : HyperIndexImpl tarray_int_AR1_Z tint_U :=\n  ZMap_inject_equal_array_hyper_index_impl tint_U 1.\nGlobal Instance tarray_int_AR1_Z_index : HyperIndex tarray_int_AR1_Z tint_U :=\n  ZMap_inject_equal_array_hyper_index tint_U 1.\nDefinition thash_int_HASH_Z_Z32 := (Tpair HASH_Z_Z32 (Thashmap tint tint)).\nGlobal Instance thash_int_HASH_Z_Z32_hyper_type_impl : HyperTypeImpl thash_int_HASH_Z_Z32 :=\n   Int256Tree_inject_equal_hashmap_hyper_type_impl tint_Z32.\nDefinition hash_int_HASH_Z_Z32_pair := mk_hyper_type_pair thash_int_HASH_Z_Z32.\nGlobal Instance thash_int_HASH_Z_Z32_hyper_type : HyperType thash_int_HASH_Z_Z32 :=\n  Int256Tree_inject_equal_hashmap_hyper_type tint_Z32.\nGlobal Instance thash_int_HASH_Z_Z32_index_impl : HyperIntHashImpl thash_int_HASH_Z_Z32 tint_Z32 :=\n  Int256Tree_inject_equal_hashmap_hash_impl tint_Z32.\nGlobal Instance thash_int_HASH_Z_Z32_hash : HyperIntHash thash_int_HASH_Z_Z32 tint_Z32 :=\n  Int256Tree_inject_equal_hashmap_hash tint_Z32.\nDefinition tarray_Hashkeys_AR3_Hashkeys := (Tpair AR3_Hashkeys (Tarray (Tstruct Hashkeys_struct_ident\n  (Fcons Hashkeys_struct_toleader_ident (Tarray (Tstruct Path_struct_ident\n    (Fcons Path_struct_path_ident (Tarray tint 3)\n    (Fcons Path_struct_nextInd_ident tint\n     Fnil))) 1)\n   Fnil)) 3)).\nGlobal Instance tarray_Hashkeys_AR3_Hashkeys_hyper_type_impl : HyperTypeImpl tarray_Hashkeys_AR3_Hashkeys :=\n  ZMap_inject_equal_array_hyper_type_impl tHashkeys_Hashkeys 3.\nDefinition array_Hashkeys_AR3_Hashkeys_pair := mk_hyper_type_pair tarray_Hashkeys_AR3_Hashkeys.\nGlobal Instance tarray_Hashkeys_AR3_Hashkeys_hyper_type : HyperType tarray_Hashkeys_AR3_Hashkeys :=\n  Int256Tree_inject_equal_hashmap_hyper_type tHashkeys_Hashkeys 3.\nGlobal Instance tarray_Hashkeys_AR3_Hashkeys_index_impl : HyperIndexImpl tarray_Hashkeys_AR3_Hashkeys tHashkeys_Hashkeys :=\n  ZMap_inject_equal_array_hyper_index_impl tHashkeys_Hashkeys 3.\nGlobal Instance tarray_Hashkeys_AR3_Hashkeys_index : HyperIndex tarray_Hashkeys_AR3_Hashkeys tHashkeys_Hashkeys :=\n  ZMap_inject_equal_array_hyper_index tHashkeys_Hashkeys 3.\nDefinition tarray_array_Hashkeys_AR3_AR3_Hashkeys := (Tpair AR3_AR3_Hashkeys (Tarray (Tarray (Tstruct Hashkeys_struct_ident\n  (Fcons Hashkeys_struct_toleader_ident (Tarray (Tstruct Path_struct_ident\n    (Fcons Path_struct_path_ident (Tarray tint 3)\n    (Fcons Path_struct_nextInd_ident tint\n     Fnil))) 1)\n   Fnil)) 3) 3)).\nGlobal Instance tarray_array_Hashkeys_AR3_AR3_Hashkeys_hyper_type_impl : HyperTypeImpl tarray_array_Hashkeys_AR3_AR3_Hashkeys :=\n  ZMap_inject_equal_array_hyper_type_impl tarray_Hashkeys_AR3_Hashkeys 3.\nDefinition array_array_Hashkeys_AR3_AR3_Hashkeys_pair := mk_hyper_type_pair tarray_array_Hashkeys_AR3_AR3_Hashkeys.\nGlobal Instance tarray_array_Hashkeys_AR3_AR3_Hashkeys_hyper_type : HyperType tarray_array_Hashkeys_AR3_AR3_Hashkeys :=\n  Int256Tree_inject_equal_hashmap_hyper_type tarray_Hashkeys_AR3_Hashkeys 3.\nGlobal Instance tarray_array_Hashkeys_AR3_AR3_Hashkeys_index_impl : HyperIndexImpl tarray_array_Hashkeys_AR3_AR3_Hashkeys tarray_Hashkeys_AR3_Hashkeys :=\n  ZMap_inject_equal_array_hyper_index_impl tarray_Hashkeys_AR3_Hashkeys 3.\nGlobal Instance tarray_array_Hashkeys_AR3_AR3_Hashkeys_index : HyperIndex tarray_array_Hashkeys_AR3_AR3_Hashkeys tarray_Hashkeys_AR3_Hashkeys :=\n  ZMap_inject_equal_array_hyper_index tarray_Hashkeys_AR3_Hashkeys 3.\nDefinition tarray_int_AR1_hashvalue := (Tpair AR1_hashvalue (Tarray tint 1)).\nGlobal Instance tarray_int_AR1_hashvalue_hyper_type_impl : HyperTypeImpl tarray_int_AR1_hashvalue :=\n  ZMap_inject_equal_array_hyper_type_impl tint_hashvalue 1.\nDefinition array_int_AR1_hashvalue_pair := mk_hyper_type_pair tarray_int_AR1_hashvalue.\nGlobal Instance tarray_int_AR1_hashvalue_hyper_type : HyperType tarray_int_AR1_hashvalue :=\n  Int256Tree_inject_equal_hashmap_hyper_type tint_hashvalue 1.\nGlobal Instance tarray_int_AR1_hashvalue_index_impl : HyperIndexImpl tarray_int_AR1_hashvalue tint_hashvalue :=\n  ZMap_inject_equal_array_hyper_index_impl tint_hashvalue 1.\nGlobal Instance tarray_int_AR1_hashvalue_index : HyperIndex tarray_int_AR1_hashvalue tint_hashvalue :=\n  ZMap_inject_equal_array_hyper_index tint_hashvalue 1.\nDefinition tarray_int_AR1_bool := (Tpair AR1_bool (Tarray tint 1)).\nGlobal Instance tarray_int_AR1_bool_hyper_type_impl : HyperTypeImpl tarray_int_AR1_bool :=\n  ZMap_inject_equal_array_hyper_type_impl tint_bool 1.\nDefinition array_int_AR1_bool_pair := mk_hyper_type_pair tarray_int_AR1_bool.\nGlobal Instance tarray_int_AR1_bool_hyper_type : HyperType tarray_int_AR1_bool :=\n  Int256Tree_inject_equal_hashmap_hyper_type tint_bool 1.\nGlobal Instance tarray_int_AR1_bool_index_impl : HyperIndexImpl tarray_int_AR1_bool tint_bool :=\n  ZMap_inject_equal_array_hyper_index_impl tint_bool 1.\nGlobal Instance tarray_int_AR1_bool_index : HyperIndex tarray_int_AR1_bool tint_bool :=\n  ZMap_inject_equal_array_hyper_index tint_bool 1.\nRecord global_abstract_data_type : Type := {\n  _assetAmount : int256;\n  _timelocks : (ZMap.t int256);\n  _hashlocks : (ZMap.t hashvalue);\n  _party : int256;\n  _counterparty : int256;\n  _start : int256;\n  _delta : int256;\n  _unlocked : (ZMap.t bool);\n  _ended : bool;\n  _canrefund : bool;\n  _events : (list Transfer);\n  _leaders : (ZMap.t int256);\n  _parties : (ZMap.t int256);\n  _edges : (Int256Tree.t (ZMap.t int256));\n  _edges_reverse : (Int256Tree.t (ZMap.t int256));\n  _party_addr_to_ind : (Int256Tree.t Z32);\n  _leader_addr_to_ind : (Int256Tree.t Z32);\n  _party : int256;\n  _counterparty : int256;\n  _hashkeyinit : (ZMap.t Path);\n  _innerpathinit : (ZMap.t Hashkeys);\n  _allpaths : (ZMap.t (ZMap.t Hashkeys));\n  _res_is_leader : bool;\n  _res_is_party : bool;\n  _res_is_edge : bool;\n  _res_has_signed : bool;\n  _res_can_sign : bool;\n  _res_path_len : int256\n}.\nDefinition update__assetAmount glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type glabs_b (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__timelocks glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) glabs_b (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__hashlocks glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) glabs_b (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__party glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) glabs_b (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__counterparty glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) glabs_b (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__start glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) glabs_b (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__delta glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) glabs_b (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__unlocked glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) glabs_b (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__ended glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) glabs_b (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__canrefund glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) glabs_b (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__events glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) glabs_b (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__leaders glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) glabs_b (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__parties glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) glabs_b (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__edges glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) glabs_b (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__edges_reverse glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) glabs_b (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__party_addr_to_ind glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) glabs_b (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__leader_addr_to_ind glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) glabs_b (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__party glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) glabs_b (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__counterparty glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) glabs_b (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__hashkeyinit glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) glabs_b (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__innerpathinit glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) glabs_b (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__allpaths glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) glabs_b (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__res_is_leader glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) glabs_b (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__res_is_party glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) glabs_b (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__res_is_edge glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) glabs_b (_res_has_signed glabs_a) (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__res_has_signed glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) glabs_b (_res_can_sign glabs_a) (_res_path_len glabs_a) .\nDefinition update__res_can_sign glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) glabs_b (_res_path_len glabs_a) .\nDefinition update__res_path_len glabs_b (glabs_a : global_abstract_data_type)\n  := Build_global_abstract_data_type (_assetAmount glabs_a) (_timelocks glabs_a) (_hashlocks glabs_a) (_party glabs_a) (_counterparty glabs_a) (_start glabs_a) (_delta glabs_a) (_unlocked glabs_a) (_ended glabs_a) (_canrefund glabs_a) (_events glabs_a) (_leaders glabs_a) (_parties glabs_a) (_edges glabs_a) (_edges_reverse glabs_a) (_party_addr_to_ind glabs_a) (_leader_addr_to_ind glabs_a) (_party glabs_a) (_counterparty glabs_a) (_hashkeyinit glabs_a) (_innerpathinit glabs_a) (_allpaths glabs_a) (_res_is_leader glabs_a) (_res_is_party glabs_a) (_res_is_edge glabs_a) (_res_has_signed glabs_a) (_res_can_sign glabs_a) glabs_b .\n\nDefinition init_global_abstract_data : global_abstract_data_type := {|\n  _assetAmount := (Int256.repr 0);\n  _timelocks := (ZMap.init (@ht_default tint_U _));\n  _hashlocks := (ZMap.init (@ht_default tint_hashvalue _));\n  _party := (Int256.repr 0);\n  _counterparty := (Int256.repr 0);\n  _start := (Int256.repr 0);\n  _delta := (Int256.repr 0);\n  _unlocked := (ZMap.init (@ht_default tint_bool _));\n  _ended := false;\n  _canrefund := false;\n  _events := nil;\n  _leaders := (ZMap.init (@ht_default tint_U _));\n  _parties := (ZMap.init (@ht_default tint_U _));\n  _edges := (Int256Tree.empty (ZMap.t int256));\n  _edges_reverse := (Int256Tree.empty (ZMap.t int256));\n  _party_addr_to_ind := (Int256Tree.empty Z32);\n  _leader_addr_to_ind := (Int256Tree.empty Z32);\n  _party := (Int256.repr 0);\n  _counterparty := (Int256.repr 0);\n  _hashkeyinit := (ZMap.init {| path := (@ht_default tarray_int_AR3_Z _);\n           nextInd := (@ht_default tint_Z32 _)\n        |});\n  _innerpathinit := (ZMap.init {| toleader := (@ht_default tarray_Path_AR1_Path _)\n        |});\n  _allpaths := (ZMap.init (ZMap.init (@ht_default tHashkeys_Hashkeys _)));\n  _res_is_leader := false;\n  _res_is_party := false;\n  _res_is_edge := false;\n  _res_has_signed := false;\n  _res_can_sign := false;\n  _res_path_len := (Int256.repr 0)\n|}.\n\nDefinition block := positive.\nDefinition global_low_level_invariant (n : block)(abd : global_abstract_data_type) := True.\nEnd EdsgerGen.\n\nLemma _assetAmount_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__assetAmount _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__assetAmount : updates.\n\nLemma _assetAmount_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__timelocks _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__timelocks : updates.\n\nLemma _assetAmount_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__hashlocks _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__hashlocks : updates.\n\nLemma _assetAmount_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__party _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__party : updates.\n\nLemma _assetAmount_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__counterparty _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__counterparty : updates.\n\nLemma _assetAmount_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__start _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__start : updates.\n\nLemma _assetAmount_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__delta _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__delta : updates.\n\nLemma _assetAmount_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__unlocked _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__unlocked : updates.\n\nLemma _assetAmount_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__ended _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__ended : updates.\n\nLemma _assetAmount_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__canrefund _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__canrefund : updates.\n\nLemma _assetAmount_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__events _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__events : updates.\n\nLemma _assetAmount_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__leaders _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__leaders : updates.\n\nLemma _assetAmount_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__parties _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__parties : updates.\n\nLemma _assetAmount_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__edges _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__edges : updates.\n\nLemma _assetAmount_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__edges_reverse _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__edges_reverse : updates.\n\nLemma _assetAmount_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__party_addr_to_ind _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__party_addr_to_ind : updates.\n\nLemma _assetAmount_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__leader_addr_to_ind _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__leader_addr_to_ind : updates.\n\nLemma _assetAmount_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__party _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__party : updates.\n\nLemma _assetAmount_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__counterparty _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__counterparty : updates.\n\nLemma _assetAmount_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__hashkeyinit _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__hashkeyinit : updates.\n\nLemma _assetAmount_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__innerpathinit _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__innerpathinit : updates.\n\nLemma _assetAmount_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__allpaths _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__allpaths : updates.\n\nLemma _assetAmount_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__res_is_leader _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__res_is_leader : updates.\n\nLemma _assetAmount_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__res_is_party _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__res_is_party : updates.\n\nLemma _assetAmount_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__res_is_edge _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__res_is_edge : updates.\n\nLemma _assetAmount_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__res_has_signed _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__res_has_signed : updates.\n\nLemma _assetAmount_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__res_can_sign _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__res_can_sign : updates.\n\nLemma _assetAmount_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _assetAmount (update__res_path_len _x glabs_a) = _assetAmount glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _assetAmount_of_update__res_path_len : updates.\n\n\nLemma _timelocks_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__assetAmount _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__assetAmount : updates.\n\nLemma _timelocks_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__timelocks _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__timelocks : updates.\n\nLemma _timelocks_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__hashlocks _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__hashlocks : updates.\n\nLemma _timelocks_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__party _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__party : updates.\n\nLemma _timelocks_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__counterparty _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__counterparty : updates.\n\nLemma _timelocks_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__start _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__start : updates.\n\nLemma _timelocks_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__delta _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__delta : updates.\n\nLemma _timelocks_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__unlocked _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__unlocked : updates.\n\nLemma _timelocks_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__ended _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__ended : updates.\n\nLemma _timelocks_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__canrefund _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__canrefund : updates.\n\nLemma _timelocks_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__events _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__events : updates.\n\nLemma _timelocks_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__leaders _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__leaders : updates.\n\nLemma _timelocks_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__parties _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__parties : updates.\n\nLemma _timelocks_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__edges _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__edges : updates.\n\nLemma _timelocks_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__edges_reverse _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__edges_reverse : updates.\n\nLemma _timelocks_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__party_addr_to_ind _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__party_addr_to_ind : updates.\n\nLemma _timelocks_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__leader_addr_to_ind _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__leader_addr_to_ind : updates.\n\nLemma _timelocks_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__party _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__party : updates.\n\nLemma _timelocks_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__counterparty _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__counterparty : updates.\n\nLemma _timelocks_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__hashkeyinit _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__hashkeyinit : updates.\n\nLemma _timelocks_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__innerpathinit _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__innerpathinit : updates.\n\nLemma _timelocks_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__allpaths _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__allpaths : updates.\n\nLemma _timelocks_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__res_is_leader _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__res_is_leader : updates.\n\nLemma _timelocks_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__res_is_party _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__res_is_party : updates.\n\nLemma _timelocks_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__res_is_edge _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__res_is_edge : updates.\n\nLemma _timelocks_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__res_has_signed _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__res_has_signed : updates.\n\nLemma _timelocks_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__res_can_sign _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__res_can_sign : updates.\n\nLemma _timelocks_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _timelocks (update__res_path_len _x glabs_a) = _timelocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _timelocks_of_update__res_path_len : updates.\n\n\nLemma _hashlocks_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__assetAmount _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__assetAmount : updates.\n\nLemma _hashlocks_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__timelocks _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__timelocks : updates.\n\nLemma _hashlocks_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__hashlocks _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__hashlocks : updates.\n\nLemma _hashlocks_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__party _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__party : updates.\n\nLemma _hashlocks_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__counterparty _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__counterparty : updates.\n\nLemma _hashlocks_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__start _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__start : updates.\n\nLemma _hashlocks_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__delta _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__delta : updates.\n\nLemma _hashlocks_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__unlocked _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__unlocked : updates.\n\nLemma _hashlocks_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__ended _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__ended : updates.\n\nLemma _hashlocks_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__canrefund _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__canrefund : updates.\n\nLemma _hashlocks_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__events _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__events : updates.\n\nLemma _hashlocks_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__leaders _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__leaders : updates.\n\nLemma _hashlocks_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__parties _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__parties : updates.\n\nLemma _hashlocks_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__edges _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__edges : updates.\n\nLemma _hashlocks_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__edges_reverse _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__edges_reverse : updates.\n\nLemma _hashlocks_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__party_addr_to_ind _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__party_addr_to_ind : updates.\n\nLemma _hashlocks_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__leader_addr_to_ind _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__leader_addr_to_ind : updates.\n\nLemma _hashlocks_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__party _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__party : updates.\n\nLemma _hashlocks_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__counterparty _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__counterparty : updates.\n\nLemma _hashlocks_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__hashkeyinit _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__hashkeyinit : updates.\n\nLemma _hashlocks_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__innerpathinit _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__innerpathinit : updates.\n\nLemma _hashlocks_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__allpaths _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__allpaths : updates.\n\nLemma _hashlocks_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__res_is_leader _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__res_is_leader : updates.\n\nLemma _hashlocks_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__res_is_party _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__res_is_party : updates.\n\nLemma _hashlocks_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__res_is_edge _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__res_is_edge : updates.\n\nLemma _hashlocks_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__res_has_signed _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__res_has_signed : updates.\n\nLemma _hashlocks_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__res_can_sign _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__res_can_sign : updates.\n\nLemma _hashlocks_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _hashlocks (update__res_path_len _x glabs_a) = _hashlocks glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashlocks_of_update__res_path_len : updates.\n\n\nLemma _party_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__assetAmount _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__assetAmount : updates.\n\nLemma _party_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__timelocks _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__timelocks : updates.\n\nLemma _party_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__hashlocks _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__hashlocks : updates.\n\nLemma _party_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__party _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__party : updates.\n\nLemma _party_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__counterparty _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__counterparty : updates.\n\nLemma _party_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__start _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__start : updates.\n\nLemma _party_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__delta _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__delta : updates.\n\nLemma _party_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__unlocked _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__unlocked : updates.\n\nLemma _party_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__ended _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__ended : updates.\n\nLemma _party_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__canrefund _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__canrefund : updates.\n\nLemma _party_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__events _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__events : updates.\n\nLemma _party_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__leaders _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__leaders : updates.\n\nLemma _party_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__parties _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__parties : updates.\n\nLemma _party_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__edges _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__edges : updates.\n\nLemma _party_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__edges_reverse _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__edges_reverse : updates.\n\nLemma _party_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__party_addr_to_ind _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__party_addr_to_ind : updates.\n\nLemma _party_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__leader_addr_to_ind _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__leader_addr_to_ind : updates.\n\nLemma _party_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__party _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__party : updates.\n\nLemma _party_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__counterparty _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__counterparty : updates.\n\nLemma _party_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__hashkeyinit _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__hashkeyinit : updates.\n\nLemma _party_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__innerpathinit _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__innerpathinit : updates.\n\nLemma _party_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__allpaths _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__allpaths : updates.\n\nLemma _party_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_is_leader _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_is_leader : updates.\n\nLemma _party_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_is_party _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_is_party : updates.\n\nLemma _party_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_is_edge _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_is_edge : updates.\n\nLemma _party_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_has_signed _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_has_signed : updates.\n\nLemma _party_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_can_sign _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_can_sign : updates.\n\nLemma _party_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_path_len _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_path_len : updates.\n\n\nLemma _counterparty_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__assetAmount _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__assetAmount : updates.\n\nLemma _counterparty_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__timelocks _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__timelocks : updates.\n\nLemma _counterparty_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__hashlocks _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__hashlocks : updates.\n\nLemma _counterparty_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__party _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__party : updates.\n\nLemma _counterparty_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__counterparty _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__counterparty : updates.\n\nLemma _counterparty_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__start _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__start : updates.\n\nLemma _counterparty_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__delta _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__delta : updates.\n\nLemma _counterparty_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__unlocked _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__unlocked : updates.\n\nLemma _counterparty_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__ended _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__ended : updates.\n\nLemma _counterparty_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__canrefund _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__canrefund : updates.\n\nLemma _counterparty_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__events _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__events : updates.\n\nLemma _counterparty_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__leaders _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__leaders : updates.\n\nLemma _counterparty_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__parties _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__parties : updates.\n\nLemma _counterparty_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__edges _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__edges : updates.\n\nLemma _counterparty_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__edges_reverse _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__edges_reverse : updates.\n\nLemma _counterparty_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__party_addr_to_ind _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__party_addr_to_ind : updates.\n\nLemma _counterparty_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__leader_addr_to_ind _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__leader_addr_to_ind : updates.\n\nLemma _counterparty_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__party _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__party : updates.\n\nLemma _counterparty_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__counterparty _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__counterparty : updates.\n\nLemma _counterparty_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__hashkeyinit _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__hashkeyinit : updates.\n\nLemma _counterparty_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__innerpathinit _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__innerpathinit : updates.\n\nLemma _counterparty_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__allpaths _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__allpaths : updates.\n\nLemma _counterparty_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_is_leader _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_is_leader : updates.\n\nLemma _counterparty_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_is_party _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_is_party : updates.\n\nLemma _counterparty_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_is_edge _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_is_edge : updates.\n\nLemma _counterparty_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_has_signed _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_has_signed : updates.\n\nLemma _counterparty_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_can_sign _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_can_sign : updates.\n\nLemma _counterparty_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_path_len _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_path_len : updates.\n\n\nLemma _start_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__assetAmount _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__assetAmount : updates.\n\nLemma _start_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__timelocks _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__timelocks : updates.\n\nLemma _start_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__hashlocks _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__hashlocks : updates.\n\nLemma _start_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__party _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__party : updates.\n\nLemma _start_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__counterparty _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__counterparty : updates.\n\nLemma _start_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__start _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__start : updates.\n\nLemma _start_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__delta _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__delta : updates.\n\nLemma _start_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__unlocked _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__unlocked : updates.\n\nLemma _start_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__ended _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__ended : updates.\n\nLemma _start_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__canrefund _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__canrefund : updates.\n\nLemma _start_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__events _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__events : updates.\n\nLemma _start_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__leaders _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__leaders : updates.\n\nLemma _start_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__parties _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__parties : updates.\n\nLemma _start_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__edges _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__edges : updates.\n\nLemma _start_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__edges_reverse _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__edges_reverse : updates.\n\nLemma _start_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__party_addr_to_ind _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__party_addr_to_ind : updates.\n\nLemma _start_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__leader_addr_to_ind _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__leader_addr_to_ind : updates.\n\nLemma _start_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__party _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__party : updates.\n\nLemma _start_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__counterparty _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__counterparty : updates.\n\nLemma _start_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__hashkeyinit _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__hashkeyinit : updates.\n\nLemma _start_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__innerpathinit _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__innerpathinit : updates.\n\nLemma _start_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__allpaths _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__allpaths : updates.\n\nLemma _start_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__res_is_leader _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__res_is_leader : updates.\n\nLemma _start_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__res_is_party _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__res_is_party : updates.\n\nLemma _start_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__res_is_edge _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__res_is_edge : updates.\n\nLemma _start_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__res_has_signed _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__res_has_signed : updates.\n\nLemma _start_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__res_can_sign _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__res_can_sign : updates.\n\nLemma _start_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _start (update__res_path_len _x glabs_a) = _start glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _start_of_update__res_path_len : updates.\n\n\nLemma _delta_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__assetAmount _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__assetAmount : updates.\n\nLemma _delta_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__timelocks _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__timelocks : updates.\n\nLemma _delta_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__hashlocks _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__hashlocks : updates.\n\nLemma _delta_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__party _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__party : updates.\n\nLemma _delta_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__counterparty _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__counterparty : updates.\n\nLemma _delta_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__start _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__start : updates.\n\nLemma _delta_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__delta _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__delta : updates.\n\nLemma _delta_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__unlocked _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__unlocked : updates.\n\nLemma _delta_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__ended _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__ended : updates.\n\nLemma _delta_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__canrefund _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__canrefund : updates.\n\nLemma _delta_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__events _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__events : updates.\n\nLemma _delta_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__leaders _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__leaders : updates.\n\nLemma _delta_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__parties _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__parties : updates.\n\nLemma _delta_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__edges _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__edges : updates.\n\nLemma _delta_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__edges_reverse _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__edges_reverse : updates.\n\nLemma _delta_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__party_addr_to_ind _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__party_addr_to_ind : updates.\n\nLemma _delta_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__leader_addr_to_ind _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__leader_addr_to_ind : updates.\n\nLemma _delta_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__party _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__party : updates.\n\nLemma _delta_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__counterparty _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__counterparty : updates.\n\nLemma _delta_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__hashkeyinit _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__hashkeyinit : updates.\n\nLemma _delta_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__innerpathinit _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__innerpathinit : updates.\n\nLemma _delta_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__allpaths _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__allpaths : updates.\n\nLemma _delta_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__res_is_leader _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__res_is_leader : updates.\n\nLemma _delta_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__res_is_party _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__res_is_party : updates.\n\nLemma _delta_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__res_is_edge _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__res_is_edge : updates.\n\nLemma _delta_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__res_has_signed _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__res_has_signed : updates.\n\nLemma _delta_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__res_can_sign _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__res_can_sign : updates.\n\nLemma _delta_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _delta (update__res_path_len _x glabs_a) = _delta glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _delta_of_update__res_path_len : updates.\n\n\nLemma _unlocked_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__assetAmount _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__assetAmount : updates.\n\nLemma _unlocked_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__timelocks _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__timelocks : updates.\n\nLemma _unlocked_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__hashlocks _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__hashlocks : updates.\n\nLemma _unlocked_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__party _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__party : updates.\n\nLemma _unlocked_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__counterparty _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__counterparty : updates.\n\nLemma _unlocked_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__start _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__start : updates.\n\nLemma _unlocked_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__delta _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__delta : updates.\n\nLemma _unlocked_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__unlocked _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__unlocked : updates.\n\nLemma _unlocked_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__ended _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__ended : updates.\n\nLemma _unlocked_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__canrefund _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__canrefund : updates.\n\nLemma _unlocked_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__events _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__events : updates.\n\nLemma _unlocked_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__leaders _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__leaders : updates.\n\nLemma _unlocked_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__parties _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__parties : updates.\n\nLemma _unlocked_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__edges _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__edges : updates.\n\nLemma _unlocked_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__edges_reverse _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__edges_reverse : updates.\n\nLemma _unlocked_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__party_addr_to_ind _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__party_addr_to_ind : updates.\n\nLemma _unlocked_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__leader_addr_to_ind _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__leader_addr_to_ind : updates.\n\nLemma _unlocked_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__party _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__party : updates.\n\nLemma _unlocked_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__counterparty _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__counterparty : updates.\n\nLemma _unlocked_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__hashkeyinit _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__hashkeyinit : updates.\n\nLemma _unlocked_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__innerpathinit _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__innerpathinit : updates.\n\nLemma _unlocked_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__allpaths _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__allpaths : updates.\n\nLemma _unlocked_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__res_is_leader _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__res_is_leader : updates.\n\nLemma _unlocked_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__res_is_party _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__res_is_party : updates.\n\nLemma _unlocked_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__res_is_edge _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__res_is_edge : updates.\n\nLemma _unlocked_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__res_has_signed _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__res_has_signed : updates.\n\nLemma _unlocked_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__res_can_sign _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__res_can_sign : updates.\n\nLemma _unlocked_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _unlocked (update__res_path_len _x glabs_a) = _unlocked glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _unlocked_of_update__res_path_len : updates.\n\n\nLemma _ended_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__assetAmount _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__assetAmount : updates.\n\nLemma _ended_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__timelocks _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__timelocks : updates.\n\nLemma _ended_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__hashlocks _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__hashlocks : updates.\n\nLemma _ended_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__party _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__party : updates.\n\nLemma _ended_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__counterparty _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__counterparty : updates.\n\nLemma _ended_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__start _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__start : updates.\n\nLemma _ended_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__delta _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__delta : updates.\n\nLemma _ended_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__unlocked _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__unlocked : updates.\n\nLemma _ended_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__ended _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__ended : updates.\n\nLemma _ended_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__canrefund _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__canrefund : updates.\n\nLemma _ended_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__events _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__events : updates.\n\nLemma _ended_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__leaders _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__leaders : updates.\n\nLemma _ended_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__parties _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__parties : updates.\n\nLemma _ended_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__edges _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__edges : updates.\n\nLemma _ended_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__edges_reverse _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__edges_reverse : updates.\n\nLemma _ended_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__party_addr_to_ind _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__party_addr_to_ind : updates.\n\nLemma _ended_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__leader_addr_to_ind _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__leader_addr_to_ind : updates.\n\nLemma _ended_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__party _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__party : updates.\n\nLemma _ended_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__counterparty _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__counterparty : updates.\n\nLemma _ended_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__hashkeyinit _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__hashkeyinit : updates.\n\nLemma _ended_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__innerpathinit _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__innerpathinit : updates.\n\nLemma _ended_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__allpaths _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__allpaths : updates.\n\nLemma _ended_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__res_is_leader _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__res_is_leader : updates.\n\nLemma _ended_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__res_is_party _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__res_is_party : updates.\n\nLemma _ended_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__res_is_edge _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__res_is_edge : updates.\n\nLemma _ended_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__res_has_signed _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__res_has_signed : updates.\n\nLemma _ended_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__res_can_sign _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__res_can_sign : updates.\n\nLemma _ended_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _ended (update__res_path_len _x glabs_a) = _ended glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _ended_of_update__res_path_len : updates.\n\n\nLemma _canrefund_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__assetAmount _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__assetAmount : updates.\n\nLemma _canrefund_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__timelocks _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__timelocks : updates.\n\nLemma _canrefund_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__hashlocks _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__hashlocks : updates.\n\nLemma _canrefund_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__party _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__party : updates.\n\nLemma _canrefund_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__counterparty _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__counterparty : updates.\n\nLemma _canrefund_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__start _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__start : updates.\n\nLemma _canrefund_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__delta _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__delta : updates.\n\nLemma _canrefund_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__unlocked _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__unlocked : updates.\n\nLemma _canrefund_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__ended _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__ended : updates.\n\nLemma _canrefund_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__canrefund _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__canrefund : updates.\n\nLemma _canrefund_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__events _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__events : updates.\n\nLemma _canrefund_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__leaders _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__leaders : updates.\n\nLemma _canrefund_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__parties _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__parties : updates.\n\nLemma _canrefund_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__edges _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__edges : updates.\n\nLemma _canrefund_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__edges_reverse _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__edges_reverse : updates.\n\nLemma _canrefund_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__party_addr_to_ind _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__party_addr_to_ind : updates.\n\nLemma _canrefund_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__leader_addr_to_ind _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__leader_addr_to_ind : updates.\n\nLemma _canrefund_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__party _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__party : updates.\n\nLemma _canrefund_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__counterparty _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__counterparty : updates.\n\nLemma _canrefund_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__hashkeyinit _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__hashkeyinit : updates.\n\nLemma _canrefund_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__innerpathinit _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__innerpathinit : updates.\n\nLemma _canrefund_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__allpaths _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__allpaths : updates.\n\nLemma _canrefund_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__res_is_leader _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__res_is_leader : updates.\n\nLemma _canrefund_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__res_is_party _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__res_is_party : updates.\n\nLemma _canrefund_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__res_is_edge _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__res_is_edge : updates.\n\nLemma _canrefund_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__res_has_signed _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__res_has_signed : updates.\n\nLemma _canrefund_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__res_can_sign _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__res_can_sign : updates.\n\nLemma _canrefund_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _canrefund (update__res_path_len _x glabs_a) = _canrefund glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _canrefund_of_update__res_path_len : updates.\n\n\nLemma _events_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__assetAmount _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__assetAmount : updates.\n\nLemma _events_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__timelocks _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__timelocks : updates.\n\nLemma _events_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__hashlocks _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__hashlocks : updates.\n\nLemma _events_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__party _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__party : updates.\n\nLemma _events_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__counterparty _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__counterparty : updates.\n\nLemma _events_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__start _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__start : updates.\n\nLemma _events_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__delta _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__delta : updates.\n\nLemma _events_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__unlocked _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__unlocked : updates.\n\nLemma _events_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__ended _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__ended : updates.\n\nLemma _events_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__canrefund _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__canrefund : updates.\n\nLemma _events_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__events _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__events : updates.\n\nLemma _events_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__leaders _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__leaders : updates.\n\nLemma _events_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__parties _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__parties : updates.\n\nLemma _events_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__edges _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__edges : updates.\n\nLemma _events_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__edges_reverse _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__edges_reverse : updates.\n\nLemma _events_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__party_addr_to_ind _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__party_addr_to_ind : updates.\n\nLemma _events_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__leader_addr_to_ind _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__leader_addr_to_ind : updates.\n\nLemma _events_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__party _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__party : updates.\n\nLemma _events_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__counterparty _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__counterparty : updates.\n\nLemma _events_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__hashkeyinit _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__hashkeyinit : updates.\n\nLemma _events_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__innerpathinit _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__innerpathinit : updates.\n\nLemma _events_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__allpaths _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__allpaths : updates.\n\nLemma _events_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__res_is_leader _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__res_is_leader : updates.\n\nLemma _events_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__res_is_party _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__res_is_party : updates.\n\nLemma _events_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__res_is_edge _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__res_is_edge : updates.\n\nLemma _events_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__res_has_signed _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__res_has_signed : updates.\n\nLemma _events_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__res_can_sign _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__res_can_sign : updates.\n\nLemma _events_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _events (update__res_path_len _x glabs_a) = _events glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _events_of_update__res_path_len : updates.\n\n\nLemma _leaders_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__assetAmount _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__assetAmount : updates.\n\nLemma _leaders_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__timelocks _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__timelocks : updates.\n\nLemma _leaders_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__hashlocks _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__hashlocks : updates.\n\nLemma _leaders_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__party _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__party : updates.\n\nLemma _leaders_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__counterparty _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__counterparty : updates.\n\nLemma _leaders_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__start _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__start : updates.\n\nLemma _leaders_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__delta _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__delta : updates.\n\nLemma _leaders_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__unlocked _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__unlocked : updates.\n\nLemma _leaders_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__ended _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__ended : updates.\n\nLemma _leaders_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__canrefund _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__canrefund : updates.\n\nLemma _leaders_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__events _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__events : updates.\n\nLemma _leaders_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__leaders _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__leaders : updates.\n\nLemma _leaders_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__parties _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__parties : updates.\n\nLemma _leaders_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__edges _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__edges : updates.\n\nLemma _leaders_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__edges_reverse _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__edges_reverse : updates.\n\nLemma _leaders_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__party_addr_to_ind _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__party_addr_to_ind : updates.\n\nLemma _leaders_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__leader_addr_to_ind _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__leader_addr_to_ind : updates.\n\nLemma _leaders_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__party _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__party : updates.\n\nLemma _leaders_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__counterparty _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__counterparty : updates.\n\nLemma _leaders_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__hashkeyinit _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__hashkeyinit : updates.\n\nLemma _leaders_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__innerpathinit _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__innerpathinit : updates.\n\nLemma _leaders_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__allpaths _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__allpaths : updates.\n\nLemma _leaders_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__res_is_leader _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__res_is_leader : updates.\n\nLemma _leaders_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__res_is_party _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__res_is_party : updates.\n\nLemma _leaders_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__res_is_edge _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__res_is_edge : updates.\n\nLemma _leaders_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__res_has_signed _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__res_has_signed : updates.\n\nLemma _leaders_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__res_can_sign _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__res_can_sign : updates.\n\nLemma _leaders_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _leaders (update__res_path_len _x glabs_a) = _leaders glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leaders_of_update__res_path_len : updates.\n\n\nLemma _parties_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__assetAmount _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__assetAmount : updates.\n\nLemma _parties_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__timelocks _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__timelocks : updates.\n\nLemma _parties_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__hashlocks _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__hashlocks : updates.\n\nLemma _parties_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__party _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__party : updates.\n\nLemma _parties_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__counterparty _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__counterparty : updates.\n\nLemma _parties_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__start _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__start : updates.\n\nLemma _parties_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__delta _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__delta : updates.\n\nLemma _parties_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__unlocked _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__unlocked : updates.\n\nLemma _parties_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__ended _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__ended : updates.\n\nLemma _parties_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__canrefund _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__canrefund : updates.\n\nLemma _parties_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__events _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__events : updates.\n\nLemma _parties_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__leaders _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__leaders : updates.\n\nLemma _parties_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__parties _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__parties : updates.\n\nLemma _parties_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__edges _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__edges : updates.\n\nLemma _parties_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__edges_reverse _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__edges_reverse : updates.\n\nLemma _parties_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__party_addr_to_ind _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__party_addr_to_ind : updates.\n\nLemma _parties_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__leader_addr_to_ind _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__leader_addr_to_ind : updates.\n\nLemma _parties_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__party _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__party : updates.\n\nLemma _parties_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__counterparty _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__counterparty : updates.\n\nLemma _parties_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__hashkeyinit _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__hashkeyinit : updates.\n\nLemma _parties_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__innerpathinit _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__innerpathinit : updates.\n\nLemma _parties_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__allpaths _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__allpaths : updates.\n\nLemma _parties_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__res_is_leader _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__res_is_leader : updates.\n\nLemma _parties_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__res_is_party _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__res_is_party : updates.\n\nLemma _parties_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__res_is_edge _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__res_is_edge : updates.\n\nLemma _parties_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__res_has_signed _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__res_has_signed : updates.\n\nLemma _parties_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__res_can_sign _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__res_can_sign : updates.\n\nLemma _parties_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _parties (update__res_path_len _x glabs_a) = _parties glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _parties_of_update__res_path_len : updates.\n\n\nLemma _edges_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__assetAmount _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__assetAmount : updates.\n\nLemma _edges_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__timelocks _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__timelocks : updates.\n\nLemma _edges_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__hashlocks _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__hashlocks : updates.\n\nLemma _edges_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__party _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__party : updates.\n\nLemma _edges_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__counterparty _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__counterparty : updates.\n\nLemma _edges_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__start _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__start : updates.\n\nLemma _edges_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__delta _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__delta : updates.\n\nLemma _edges_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__unlocked _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__unlocked : updates.\n\nLemma _edges_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__ended _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__ended : updates.\n\nLemma _edges_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__canrefund _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__canrefund : updates.\n\nLemma _edges_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__events _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__events : updates.\n\nLemma _edges_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__leaders _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__leaders : updates.\n\nLemma _edges_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__parties _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__parties : updates.\n\nLemma _edges_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__edges _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__edges : updates.\n\nLemma _edges_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__edges_reverse _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__edges_reverse : updates.\n\nLemma _edges_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__party_addr_to_ind _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__party_addr_to_ind : updates.\n\nLemma _edges_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__leader_addr_to_ind _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__leader_addr_to_ind : updates.\n\nLemma _edges_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__party _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__party : updates.\n\nLemma _edges_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__counterparty _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__counterparty : updates.\n\nLemma _edges_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__hashkeyinit _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__hashkeyinit : updates.\n\nLemma _edges_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__innerpathinit _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__innerpathinit : updates.\n\nLemma _edges_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__allpaths _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__allpaths : updates.\n\nLemma _edges_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__res_is_leader _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__res_is_leader : updates.\n\nLemma _edges_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__res_is_party _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__res_is_party : updates.\n\nLemma _edges_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__res_is_edge _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__res_is_edge : updates.\n\nLemma _edges_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__res_has_signed _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__res_has_signed : updates.\n\nLemma _edges_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__res_can_sign _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__res_can_sign : updates.\n\nLemma _edges_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _edges (update__res_path_len _x glabs_a) = _edges glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_of_update__res_path_len : updates.\n\n\nLemma _edges_reverse_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__assetAmount _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__assetAmount : updates.\n\nLemma _edges_reverse_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__timelocks _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__timelocks : updates.\n\nLemma _edges_reverse_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__hashlocks _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__hashlocks : updates.\n\nLemma _edges_reverse_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__party _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__party : updates.\n\nLemma _edges_reverse_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__counterparty _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__counterparty : updates.\n\nLemma _edges_reverse_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__start _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__start : updates.\n\nLemma _edges_reverse_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__delta _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__delta : updates.\n\nLemma _edges_reverse_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__unlocked _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__unlocked : updates.\n\nLemma _edges_reverse_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__ended _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__ended : updates.\n\nLemma _edges_reverse_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__canrefund _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__canrefund : updates.\n\nLemma _edges_reverse_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__events _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__events : updates.\n\nLemma _edges_reverse_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__leaders _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__leaders : updates.\n\nLemma _edges_reverse_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__parties _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__parties : updates.\n\nLemma _edges_reverse_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__edges _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__edges : updates.\n\nLemma _edges_reverse_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__edges_reverse _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__edges_reverse : updates.\n\nLemma _edges_reverse_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__party_addr_to_ind _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__party_addr_to_ind : updates.\n\nLemma _edges_reverse_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__leader_addr_to_ind _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__leader_addr_to_ind : updates.\n\nLemma _edges_reverse_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__party _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__party : updates.\n\nLemma _edges_reverse_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__counterparty _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__counterparty : updates.\n\nLemma _edges_reverse_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__hashkeyinit _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__hashkeyinit : updates.\n\nLemma _edges_reverse_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__innerpathinit _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__innerpathinit : updates.\n\nLemma _edges_reverse_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__allpaths _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__allpaths : updates.\n\nLemma _edges_reverse_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__res_is_leader _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__res_is_leader : updates.\n\nLemma _edges_reverse_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__res_is_party _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__res_is_party : updates.\n\nLemma _edges_reverse_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__res_is_edge _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__res_is_edge : updates.\n\nLemma _edges_reverse_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__res_has_signed _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__res_has_signed : updates.\n\nLemma _edges_reverse_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__res_can_sign _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__res_can_sign : updates.\n\nLemma _edges_reverse_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _edges_reverse (update__res_path_len _x glabs_a) = _edges_reverse glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _edges_reverse_of_update__res_path_len : updates.\n\n\nLemma _party_addr_to_ind_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__assetAmount _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__assetAmount : updates.\n\nLemma _party_addr_to_ind_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__timelocks _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__timelocks : updates.\n\nLemma _party_addr_to_ind_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__hashlocks _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__hashlocks : updates.\n\nLemma _party_addr_to_ind_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__party _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__party : updates.\n\nLemma _party_addr_to_ind_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__counterparty _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__counterparty : updates.\n\nLemma _party_addr_to_ind_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__start _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__start : updates.\n\nLemma _party_addr_to_ind_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__delta _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__delta : updates.\n\nLemma _party_addr_to_ind_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__unlocked _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__unlocked : updates.\n\nLemma _party_addr_to_ind_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__ended _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__ended : updates.\n\nLemma _party_addr_to_ind_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__canrefund _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__canrefund : updates.\n\nLemma _party_addr_to_ind_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__events _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__events : updates.\n\nLemma _party_addr_to_ind_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__leaders _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__leaders : updates.\n\nLemma _party_addr_to_ind_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__parties _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__parties : updates.\n\nLemma _party_addr_to_ind_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__edges _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__edges : updates.\n\nLemma _party_addr_to_ind_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__edges_reverse _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__edges_reverse : updates.\n\nLemma _party_addr_to_ind_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__party_addr_to_ind _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__party_addr_to_ind : updates.\n\nLemma _party_addr_to_ind_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__leader_addr_to_ind _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__leader_addr_to_ind : updates.\n\nLemma _party_addr_to_ind_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__party _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__party : updates.\n\nLemma _party_addr_to_ind_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__counterparty _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__counterparty : updates.\n\nLemma _party_addr_to_ind_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__hashkeyinit _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__hashkeyinit : updates.\n\nLemma _party_addr_to_ind_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__innerpathinit _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__innerpathinit : updates.\n\nLemma _party_addr_to_ind_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__allpaths _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__allpaths : updates.\n\nLemma _party_addr_to_ind_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__res_is_leader _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__res_is_leader : updates.\n\nLemma _party_addr_to_ind_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__res_is_party _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__res_is_party : updates.\n\nLemma _party_addr_to_ind_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__res_is_edge _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__res_is_edge : updates.\n\nLemma _party_addr_to_ind_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__res_has_signed _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__res_has_signed : updates.\n\nLemma _party_addr_to_ind_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__res_can_sign _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__res_can_sign : updates.\n\nLemma _party_addr_to_ind_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _party_addr_to_ind (update__res_path_len _x glabs_a) = _party_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_addr_to_ind_of_update__res_path_len : updates.\n\n\nLemma _leader_addr_to_ind_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__assetAmount _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__assetAmount : updates.\n\nLemma _leader_addr_to_ind_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__timelocks _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__timelocks : updates.\n\nLemma _leader_addr_to_ind_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__hashlocks _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__hashlocks : updates.\n\nLemma _leader_addr_to_ind_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__party _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__party : updates.\n\nLemma _leader_addr_to_ind_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__counterparty _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__counterparty : updates.\n\nLemma _leader_addr_to_ind_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__start _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__start : updates.\n\nLemma _leader_addr_to_ind_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__delta _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__delta : updates.\n\nLemma _leader_addr_to_ind_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__unlocked _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__unlocked : updates.\n\nLemma _leader_addr_to_ind_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__ended _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__ended : updates.\n\nLemma _leader_addr_to_ind_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__canrefund _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__canrefund : updates.\n\nLemma _leader_addr_to_ind_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__events _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__events : updates.\n\nLemma _leader_addr_to_ind_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__leaders _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__leaders : updates.\n\nLemma _leader_addr_to_ind_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__parties _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__parties : updates.\n\nLemma _leader_addr_to_ind_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__edges _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__edges : updates.\n\nLemma _leader_addr_to_ind_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__edges_reverse _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__edges_reverse : updates.\n\nLemma _leader_addr_to_ind_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__party_addr_to_ind _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__party_addr_to_ind : updates.\n\nLemma _leader_addr_to_ind_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__leader_addr_to_ind _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__leader_addr_to_ind : updates.\n\nLemma _leader_addr_to_ind_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__party _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__party : updates.\n\nLemma _leader_addr_to_ind_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__counterparty _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__counterparty : updates.\n\nLemma _leader_addr_to_ind_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__hashkeyinit _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__hashkeyinit : updates.\n\nLemma _leader_addr_to_ind_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__innerpathinit _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__innerpathinit : updates.\n\nLemma _leader_addr_to_ind_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__allpaths _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__allpaths : updates.\n\nLemma _leader_addr_to_ind_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__res_is_leader _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__res_is_leader : updates.\n\nLemma _leader_addr_to_ind_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__res_is_party _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__res_is_party : updates.\n\nLemma _leader_addr_to_ind_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__res_is_edge _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__res_is_edge : updates.\n\nLemma _leader_addr_to_ind_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__res_has_signed _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__res_has_signed : updates.\n\nLemma _leader_addr_to_ind_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__res_can_sign _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__res_can_sign : updates.\n\nLemma _leader_addr_to_ind_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _leader_addr_to_ind (update__res_path_len _x glabs_a) = _leader_addr_to_ind glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _leader_addr_to_ind_of_update__res_path_len : updates.\n\n\nLemma _party_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__assetAmount _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__assetAmount : updates.\n\nLemma _party_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__timelocks _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__timelocks : updates.\n\nLemma _party_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__hashlocks _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__hashlocks : updates.\n\nLemma _party_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__party _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__party : updates.\n\nLemma _party_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__counterparty _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__counterparty : updates.\n\nLemma _party_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__start _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__start : updates.\n\nLemma _party_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__delta _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__delta : updates.\n\nLemma _party_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__unlocked _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__unlocked : updates.\n\nLemma _party_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__ended _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__ended : updates.\n\nLemma _party_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__canrefund _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__canrefund : updates.\n\nLemma _party_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__events _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__events : updates.\n\nLemma _party_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__leaders _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__leaders : updates.\n\nLemma _party_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__parties _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__parties : updates.\n\nLemma _party_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__edges _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__edges : updates.\n\nLemma _party_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__edges_reverse _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__edges_reverse : updates.\n\nLemma _party_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__party_addr_to_ind _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__party_addr_to_ind : updates.\n\nLemma _party_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__leader_addr_to_ind _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__leader_addr_to_ind : updates.\n\nLemma _party_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__party _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__party : updates.\n\nLemma _party_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__counterparty _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__counterparty : updates.\n\nLemma _party_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__hashkeyinit _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__hashkeyinit : updates.\n\nLemma _party_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__innerpathinit _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__innerpathinit : updates.\n\nLemma _party_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__allpaths _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__allpaths : updates.\n\nLemma _party_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_is_leader _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_is_leader : updates.\n\nLemma _party_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_is_party _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_is_party : updates.\n\nLemma _party_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_is_edge _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_is_edge : updates.\n\nLemma _party_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_has_signed _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_has_signed : updates.\n\nLemma _party_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_can_sign _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_can_sign : updates.\n\nLemma _party_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _party (update__res_path_len _x glabs_a) = _party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _party_of_update__res_path_len : updates.\n\n\nLemma _counterparty_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__assetAmount _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__assetAmount : updates.\n\nLemma _counterparty_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__timelocks _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__timelocks : updates.\n\nLemma _counterparty_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__hashlocks _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__hashlocks : updates.\n\nLemma _counterparty_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__party _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__party : updates.\n\nLemma _counterparty_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__counterparty _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__counterparty : updates.\n\nLemma _counterparty_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__start _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__start : updates.\n\nLemma _counterparty_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__delta _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__delta : updates.\n\nLemma _counterparty_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__unlocked _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__unlocked : updates.\n\nLemma _counterparty_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__ended _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__ended : updates.\n\nLemma _counterparty_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__canrefund _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__canrefund : updates.\n\nLemma _counterparty_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__events _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__events : updates.\n\nLemma _counterparty_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__leaders _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__leaders : updates.\n\nLemma _counterparty_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__parties _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__parties : updates.\n\nLemma _counterparty_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__edges _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__edges : updates.\n\nLemma _counterparty_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__edges_reverse _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__edges_reverse : updates.\n\nLemma _counterparty_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__party_addr_to_ind _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__party_addr_to_ind : updates.\n\nLemma _counterparty_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__leader_addr_to_ind _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__leader_addr_to_ind : updates.\n\nLemma _counterparty_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__party _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__party : updates.\n\nLemma _counterparty_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__counterparty _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__counterparty : updates.\n\nLemma _counterparty_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__hashkeyinit _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__hashkeyinit : updates.\n\nLemma _counterparty_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__innerpathinit _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__innerpathinit : updates.\n\nLemma _counterparty_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__allpaths _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__allpaths : updates.\n\nLemma _counterparty_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_is_leader _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_is_leader : updates.\n\nLemma _counterparty_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_is_party _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_is_party : updates.\n\nLemma _counterparty_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_is_edge _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_is_edge : updates.\n\nLemma _counterparty_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_has_signed _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_has_signed : updates.\n\nLemma _counterparty_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_can_sign _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_can_sign : updates.\n\nLemma _counterparty_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _counterparty (update__res_path_len _x glabs_a) = _counterparty glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _counterparty_of_update__res_path_len : updates.\n\n\nLemma _hashkeyinit_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__assetAmount _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__assetAmount : updates.\n\nLemma _hashkeyinit_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__timelocks _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__timelocks : updates.\n\nLemma _hashkeyinit_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__hashlocks _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__hashlocks : updates.\n\nLemma _hashkeyinit_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__party _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__party : updates.\n\nLemma _hashkeyinit_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__counterparty _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__counterparty : updates.\n\nLemma _hashkeyinit_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__start _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__start : updates.\n\nLemma _hashkeyinit_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__delta _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__delta : updates.\n\nLemma _hashkeyinit_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__unlocked _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__unlocked : updates.\n\nLemma _hashkeyinit_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__ended _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__ended : updates.\n\nLemma _hashkeyinit_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__canrefund _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__canrefund : updates.\n\nLemma _hashkeyinit_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__events _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__events : updates.\n\nLemma _hashkeyinit_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__leaders _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__leaders : updates.\n\nLemma _hashkeyinit_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__parties _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__parties : updates.\n\nLemma _hashkeyinit_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__edges _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__edges : updates.\n\nLemma _hashkeyinit_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__edges_reverse _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__edges_reverse : updates.\n\nLemma _hashkeyinit_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__party_addr_to_ind _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__party_addr_to_ind : updates.\n\nLemma _hashkeyinit_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__leader_addr_to_ind _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__leader_addr_to_ind : updates.\n\nLemma _hashkeyinit_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__party _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__party : updates.\n\nLemma _hashkeyinit_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__counterparty _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__counterparty : updates.\n\nLemma _hashkeyinit_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__hashkeyinit _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__hashkeyinit : updates.\n\nLemma _hashkeyinit_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__innerpathinit _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__innerpathinit : updates.\n\nLemma _hashkeyinit_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__allpaths _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__allpaths : updates.\n\nLemma _hashkeyinit_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__res_is_leader _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__res_is_leader : updates.\n\nLemma _hashkeyinit_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__res_is_party _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__res_is_party : updates.\n\nLemma _hashkeyinit_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__res_is_edge _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__res_is_edge : updates.\n\nLemma _hashkeyinit_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__res_has_signed _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__res_has_signed : updates.\n\nLemma _hashkeyinit_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__res_can_sign _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__res_can_sign : updates.\n\nLemma _hashkeyinit_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _hashkeyinit (update__res_path_len _x glabs_a) = _hashkeyinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _hashkeyinit_of_update__res_path_len : updates.\n\n\nLemma _innerpathinit_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__assetAmount _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__assetAmount : updates.\n\nLemma _innerpathinit_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__timelocks _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__timelocks : updates.\n\nLemma _innerpathinit_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__hashlocks _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__hashlocks : updates.\n\nLemma _innerpathinit_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__party _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__party : updates.\n\nLemma _innerpathinit_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__counterparty _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__counterparty : updates.\n\nLemma _innerpathinit_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__start _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__start : updates.\n\nLemma _innerpathinit_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__delta _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__delta : updates.\n\nLemma _innerpathinit_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__unlocked _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__unlocked : updates.\n\nLemma _innerpathinit_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__ended _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__ended : updates.\n\nLemma _innerpathinit_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__canrefund _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__canrefund : updates.\n\nLemma _innerpathinit_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__events _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__events : updates.\n\nLemma _innerpathinit_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__leaders _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__leaders : updates.\n\nLemma _innerpathinit_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__parties _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__parties : updates.\n\nLemma _innerpathinit_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__edges _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__edges : updates.\n\nLemma _innerpathinit_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__edges_reverse _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__edges_reverse : updates.\n\nLemma _innerpathinit_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__party_addr_to_ind _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__party_addr_to_ind : updates.\n\nLemma _innerpathinit_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__leader_addr_to_ind _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__leader_addr_to_ind : updates.\n\nLemma _innerpathinit_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__party _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__party : updates.\n\nLemma _innerpathinit_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__counterparty _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__counterparty : updates.\n\nLemma _innerpathinit_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__hashkeyinit _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__hashkeyinit : updates.\n\nLemma _innerpathinit_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__innerpathinit _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__innerpathinit : updates.\n\nLemma _innerpathinit_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__allpaths _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__allpaths : updates.\n\nLemma _innerpathinit_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__res_is_leader _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__res_is_leader : updates.\n\nLemma _innerpathinit_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__res_is_party _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__res_is_party : updates.\n\nLemma _innerpathinit_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__res_is_edge _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__res_is_edge : updates.\n\nLemma _innerpathinit_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__res_has_signed _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__res_has_signed : updates.\n\nLemma _innerpathinit_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__res_can_sign _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__res_can_sign : updates.\n\nLemma _innerpathinit_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _innerpathinit (update__res_path_len _x glabs_a) = _innerpathinit glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _innerpathinit_of_update__res_path_len : updates.\n\n\nLemma _allpaths_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__assetAmount _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__assetAmount : updates.\n\nLemma _allpaths_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__timelocks _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__timelocks : updates.\n\nLemma _allpaths_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__hashlocks _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__hashlocks : updates.\n\nLemma _allpaths_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__party _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__party : updates.\n\nLemma _allpaths_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__counterparty _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__counterparty : updates.\n\nLemma _allpaths_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__start _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__start : updates.\n\nLemma _allpaths_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__delta _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__delta : updates.\n\nLemma _allpaths_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__unlocked _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__unlocked : updates.\n\nLemma _allpaths_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__ended _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__ended : updates.\n\nLemma _allpaths_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__canrefund _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__canrefund : updates.\n\nLemma _allpaths_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__events _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__events : updates.\n\nLemma _allpaths_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__leaders _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__leaders : updates.\n\nLemma _allpaths_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__parties _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__parties : updates.\n\nLemma _allpaths_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__edges _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__edges : updates.\n\nLemma _allpaths_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__edges_reverse _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__edges_reverse : updates.\n\nLemma _allpaths_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__party_addr_to_ind _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__party_addr_to_ind : updates.\n\nLemma _allpaths_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__leader_addr_to_ind _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__leader_addr_to_ind : updates.\n\nLemma _allpaths_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__party _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__party : updates.\n\nLemma _allpaths_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__counterparty _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__counterparty : updates.\n\nLemma _allpaths_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__hashkeyinit _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__hashkeyinit : updates.\n\nLemma _allpaths_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__innerpathinit _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__innerpathinit : updates.\n\nLemma _allpaths_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__allpaths _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__allpaths : updates.\n\nLemma _allpaths_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__res_is_leader _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__res_is_leader : updates.\n\nLemma _allpaths_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__res_is_party _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__res_is_party : updates.\n\nLemma _allpaths_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__res_is_edge _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__res_is_edge : updates.\n\nLemma _allpaths_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__res_has_signed _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__res_has_signed : updates.\n\nLemma _allpaths_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__res_can_sign _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__res_can_sign : updates.\n\nLemma _allpaths_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _allpaths (update__res_path_len _x glabs_a) = _allpaths glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _allpaths_of_update__res_path_len : updates.\n\n\nLemma _res_is_leader_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__assetAmount _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__assetAmount : updates.\n\nLemma _res_is_leader_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__timelocks _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__timelocks : updates.\n\nLemma _res_is_leader_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__hashlocks _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__hashlocks : updates.\n\nLemma _res_is_leader_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__party _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__party : updates.\n\nLemma _res_is_leader_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__counterparty _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__counterparty : updates.\n\nLemma _res_is_leader_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__start _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__start : updates.\n\nLemma _res_is_leader_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__delta _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__delta : updates.\n\nLemma _res_is_leader_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__unlocked _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__unlocked : updates.\n\nLemma _res_is_leader_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__ended _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__ended : updates.\n\nLemma _res_is_leader_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__canrefund _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__canrefund : updates.\n\nLemma _res_is_leader_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__events _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__events : updates.\n\nLemma _res_is_leader_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__leaders _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__leaders : updates.\n\nLemma _res_is_leader_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__parties _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__parties : updates.\n\nLemma _res_is_leader_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__edges _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__edges : updates.\n\nLemma _res_is_leader_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__edges_reverse _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__edges_reverse : updates.\n\nLemma _res_is_leader_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__party_addr_to_ind _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__party_addr_to_ind : updates.\n\nLemma _res_is_leader_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__leader_addr_to_ind _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__leader_addr_to_ind : updates.\n\nLemma _res_is_leader_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__party _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__party : updates.\n\nLemma _res_is_leader_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__counterparty _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__counterparty : updates.\n\nLemma _res_is_leader_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__hashkeyinit _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__hashkeyinit : updates.\n\nLemma _res_is_leader_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__innerpathinit _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__innerpathinit : updates.\n\nLemma _res_is_leader_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__allpaths _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__allpaths : updates.\n\nLemma _res_is_leader_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__res_is_leader _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__res_is_leader : updates.\n\nLemma _res_is_leader_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__res_is_party _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__res_is_party : updates.\n\nLemma _res_is_leader_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__res_is_edge _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__res_is_edge : updates.\n\nLemma _res_is_leader_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__res_has_signed _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__res_has_signed : updates.\n\nLemma _res_is_leader_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__res_can_sign _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__res_can_sign : updates.\n\nLemma _res_is_leader_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_leader (update__res_path_len _x glabs_a) = _res_is_leader glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_leader_of_update__res_path_len : updates.\n\n\nLemma _res_is_party_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__assetAmount _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__assetAmount : updates.\n\nLemma _res_is_party_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__timelocks _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__timelocks : updates.\n\nLemma _res_is_party_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__hashlocks _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__hashlocks : updates.\n\nLemma _res_is_party_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__party _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__party : updates.\n\nLemma _res_is_party_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__counterparty _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__counterparty : updates.\n\nLemma _res_is_party_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__start _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__start : updates.\n\nLemma _res_is_party_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__delta _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__delta : updates.\n\nLemma _res_is_party_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__unlocked _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__unlocked : updates.\n\nLemma _res_is_party_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__ended _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__ended : updates.\n\nLemma _res_is_party_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__canrefund _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__canrefund : updates.\n\nLemma _res_is_party_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__events _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__events : updates.\n\nLemma _res_is_party_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__leaders _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__leaders : updates.\n\nLemma _res_is_party_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__parties _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__parties : updates.\n\nLemma _res_is_party_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__edges _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__edges : updates.\n\nLemma _res_is_party_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__edges_reverse _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__edges_reverse : updates.\n\nLemma _res_is_party_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__party_addr_to_ind _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__party_addr_to_ind : updates.\n\nLemma _res_is_party_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__leader_addr_to_ind _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__leader_addr_to_ind : updates.\n\nLemma _res_is_party_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__party _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__party : updates.\n\nLemma _res_is_party_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__counterparty _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__counterparty : updates.\n\nLemma _res_is_party_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__hashkeyinit _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__hashkeyinit : updates.\n\nLemma _res_is_party_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__innerpathinit _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__innerpathinit : updates.\n\nLemma _res_is_party_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__allpaths _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__allpaths : updates.\n\nLemma _res_is_party_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__res_is_leader _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__res_is_leader : updates.\n\nLemma _res_is_party_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__res_is_party _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__res_is_party : updates.\n\nLemma _res_is_party_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__res_is_edge _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__res_is_edge : updates.\n\nLemma _res_is_party_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__res_has_signed _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__res_has_signed : updates.\n\nLemma _res_is_party_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__res_can_sign _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__res_can_sign : updates.\n\nLemma _res_is_party_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_party (update__res_path_len _x glabs_a) = _res_is_party glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_party_of_update__res_path_len : updates.\n\n\nLemma _res_is_edge_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__assetAmount _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__assetAmount : updates.\n\nLemma _res_is_edge_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__timelocks _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__timelocks : updates.\n\nLemma _res_is_edge_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__hashlocks _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__hashlocks : updates.\n\nLemma _res_is_edge_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__party _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__party : updates.\n\nLemma _res_is_edge_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__counterparty _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__counterparty : updates.\n\nLemma _res_is_edge_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__start _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__start : updates.\n\nLemma _res_is_edge_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__delta _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__delta : updates.\n\nLemma _res_is_edge_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__unlocked _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__unlocked : updates.\n\nLemma _res_is_edge_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__ended _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__ended : updates.\n\nLemma _res_is_edge_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__canrefund _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__canrefund : updates.\n\nLemma _res_is_edge_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__events _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__events : updates.\n\nLemma _res_is_edge_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__leaders _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__leaders : updates.\n\nLemma _res_is_edge_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__parties _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__parties : updates.\n\nLemma _res_is_edge_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__edges _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__edges : updates.\n\nLemma _res_is_edge_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__edges_reverse _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__edges_reverse : updates.\n\nLemma _res_is_edge_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__party_addr_to_ind _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__party_addr_to_ind : updates.\n\nLemma _res_is_edge_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__leader_addr_to_ind _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__leader_addr_to_ind : updates.\n\nLemma _res_is_edge_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__party _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__party : updates.\n\nLemma _res_is_edge_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__counterparty _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__counterparty : updates.\n\nLemma _res_is_edge_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__hashkeyinit _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__hashkeyinit : updates.\n\nLemma _res_is_edge_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__innerpathinit _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__innerpathinit : updates.\n\nLemma _res_is_edge_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__allpaths _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__allpaths : updates.\n\nLemma _res_is_edge_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__res_is_leader _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__res_is_leader : updates.\n\nLemma _res_is_edge_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__res_is_party _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__res_is_party : updates.\n\nLemma _res_is_edge_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__res_is_edge _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__res_is_edge : updates.\n\nLemma _res_is_edge_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__res_has_signed _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__res_has_signed : updates.\n\nLemma _res_is_edge_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__res_can_sign _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__res_can_sign : updates.\n\nLemma _res_is_edge_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _res_is_edge (update__res_path_len _x glabs_a) = _res_is_edge glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_is_edge_of_update__res_path_len : updates.\n\n\nLemma _res_has_signed_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__assetAmount _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__assetAmount : updates.\n\nLemma _res_has_signed_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__timelocks _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__timelocks : updates.\n\nLemma _res_has_signed_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__hashlocks _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__hashlocks : updates.\n\nLemma _res_has_signed_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__party _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__party : updates.\n\nLemma _res_has_signed_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__counterparty _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__counterparty : updates.\n\nLemma _res_has_signed_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__start _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__start : updates.\n\nLemma _res_has_signed_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__delta _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__delta : updates.\n\nLemma _res_has_signed_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__unlocked _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__unlocked : updates.\n\nLemma _res_has_signed_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__ended _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__ended : updates.\n\nLemma _res_has_signed_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__canrefund _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__canrefund : updates.\n\nLemma _res_has_signed_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__events _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__events : updates.\n\nLemma _res_has_signed_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__leaders _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__leaders : updates.\n\nLemma _res_has_signed_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__parties _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__parties : updates.\n\nLemma _res_has_signed_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__edges _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__edges : updates.\n\nLemma _res_has_signed_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__edges_reverse _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__edges_reverse : updates.\n\nLemma _res_has_signed_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__party_addr_to_ind _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__party_addr_to_ind : updates.\n\nLemma _res_has_signed_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__leader_addr_to_ind _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__leader_addr_to_ind : updates.\n\nLemma _res_has_signed_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__party _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__party : updates.\n\nLemma _res_has_signed_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__counterparty _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__counterparty : updates.\n\nLemma _res_has_signed_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__hashkeyinit _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__hashkeyinit : updates.\n\nLemma _res_has_signed_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__innerpathinit _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__innerpathinit : updates.\n\nLemma _res_has_signed_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__allpaths _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__allpaths : updates.\n\nLemma _res_has_signed_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__res_is_leader _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__res_is_leader : updates.\n\nLemma _res_has_signed_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__res_is_party _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__res_is_party : updates.\n\nLemma _res_has_signed_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__res_is_edge _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__res_is_edge : updates.\n\nLemma _res_has_signed_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__res_has_signed _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__res_has_signed : updates.\n\nLemma _res_has_signed_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__res_can_sign _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__res_can_sign : updates.\n\nLemma _res_has_signed_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _res_has_signed (update__res_path_len _x glabs_a) = _res_has_signed glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_has_signed_of_update__res_path_len : updates.\n\n\nLemma _res_can_sign_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__assetAmount _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__assetAmount : updates.\n\nLemma _res_can_sign_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__timelocks _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__timelocks : updates.\n\nLemma _res_can_sign_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__hashlocks _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__hashlocks : updates.\n\nLemma _res_can_sign_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__party _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__party : updates.\n\nLemma _res_can_sign_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__counterparty _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__counterparty : updates.\n\nLemma _res_can_sign_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__start _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__start : updates.\n\nLemma _res_can_sign_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__delta _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__delta : updates.\n\nLemma _res_can_sign_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__unlocked _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__unlocked : updates.\n\nLemma _res_can_sign_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__ended _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__ended : updates.\n\nLemma _res_can_sign_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__canrefund _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__canrefund : updates.\n\nLemma _res_can_sign_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__events _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__events : updates.\n\nLemma _res_can_sign_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__leaders _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__leaders : updates.\n\nLemma _res_can_sign_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__parties _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__parties : updates.\n\nLemma _res_can_sign_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__edges _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__edges : updates.\n\nLemma _res_can_sign_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__edges_reverse _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__edges_reverse : updates.\n\nLemma _res_can_sign_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__party_addr_to_ind _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__party_addr_to_ind : updates.\n\nLemma _res_can_sign_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__leader_addr_to_ind _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__leader_addr_to_ind : updates.\n\nLemma _res_can_sign_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__party _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__party : updates.\n\nLemma _res_can_sign_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__counterparty _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__counterparty : updates.\n\nLemma _res_can_sign_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__hashkeyinit _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__hashkeyinit : updates.\n\nLemma _res_can_sign_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__innerpathinit _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__innerpathinit : updates.\n\nLemma _res_can_sign_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__allpaths _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__allpaths : updates.\n\nLemma _res_can_sign_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__res_is_leader _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__res_is_leader : updates.\n\nLemma _res_can_sign_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__res_is_party _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__res_is_party : updates.\n\nLemma _res_can_sign_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__res_is_edge _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__res_is_edge : updates.\n\nLemma _res_can_sign_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__res_has_signed _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__res_has_signed : updates.\n\nLemma _res_can_sign_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__res_can_sign _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__res_can_sign : updates.\n\nLemma _res_can_sign_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _res_can_sign (update__res_path_len _x glabs_a) = _res_can_sign glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_can_sign_of_update__res_path_len : updates.\n\n\nLemma _res_path_len_of_update__assetAmount : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__assetAmount _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__assetAmount : updates.\n\nLemma _res_path_len_of_update__timelocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__timelocks _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__timelocks : updates.\n\nLemma _res_path_len_of_update__hashlocks : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__hashlocks _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__hashlocks : updates.\n\nLemma _res_path_len_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__party _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__party : updates.\n\nLemma _res_path_len_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__counterparty _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__counterparty : updates.\n\nLemma _res_path_len_of_update__start : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__start _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__start : updates.\n\nLemma _res_path_len_of_update__delta : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__delta _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__delta : updates.\n\nLemma _res_path_len_of_update__unlocked : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__unlocked _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__unlocked : updates.\n\nLemma _res_path_len_of_update__ended : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__ended _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__ended : updates.\n\nLemma _res_path_len_of_update__canrefund : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__canrefund _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__canrefund : updates.\n\nLemma _res_path_len_of_update__events : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__events _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__events : updates.\n\nLemma _res_path_len_of_update__leaders : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__leaders _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__leaders : updates.\n\nLemma _res_path_len_of_update__parties : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__parties _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__parties : updates.\n\nLemma _res_path_len_of_update__edges : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__edges _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__edges : updates.\n\nLemma _res_path_len_of_update__edges_reverse : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__edges_reverse _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__edges_reverse : updates.\n\nLemma _res_path_len_of_update__party_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__party_addr_to_ind _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__party_addr_to_ind : updates.\n\nLemma _res_path_len_of_update__leader_addr_to_ind : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__leader_addr_to_ind _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__leader_addr_to_ind : updates.\n\nLemma _res_path_len_of_update__party : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__party _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__party : updates.\n\nLemma _res_path_len_of_update__counterparty : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__counterparty _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__counterparty : updates.\n\nLemma _res_path_len_of_update__hashkeyinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__hashkeyinit _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__hashkeyinit : updates.\n\nLemma _res_path_len_of_update__innerpathinit : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__innerpathinit _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__innerpathinit : updates.\n\nLemma _res_path_len_of_update__allpaths : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__allpaths _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__allpaths : updates.\n\nLemma _res_path_len_of_update__res_is_leader : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__res_is_leader _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__res_is_leader : updates.\n\nLemma _res_path_len_of_update__res_is_party : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__res_is_party _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__res_is_party : updates.\n\nLemma _res_path_len_of_update__res_is_edge : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__res_is_edge _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__res_is_edge : updates.\n\nLemma _res_path_len_of_update__res_has_signed : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__res_has_signed _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__res_has_signed : updates.\n\nLemma _res_path_len_of_update__res_can_sign : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__res_can_sign _x glabs_a) = _res_path_len glabs_a.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__res_can_sign : updates.\n\nLemma _res_path_len_of_update__res_path_len : forall _x (glabs_a : global_abstract_data_type),\n  _res_path_len (update__res_path_len _x glabs_a) = _x.\nProof. intros. destruct glabs_a. reflexivity. Qed.\nHint Rewrite _res_path_len_of_update__res_path_len : updates.\n\nOpaque _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _events update__events _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len.\n\n"
  },
  {
    "path": "contracts/swaps/swaps_general/DataTypeProofs.v",
    "content": "(* Skeleton by Edgser for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\n\nSection EdsgerGen.\n\n\n(* (* commented out because the Ethereum backend doesn't do any proofs. *)\nGlobal Instance tint_U_hyper_arg_ret : HyperArgRet tint_U.\nProof. esplit.\n  - (* ht_basic *) admit.\n  - (* ht_cast_ident *) admit.\n  - (* ht_injective *) admit.\n  - (* ht_inject_refl *) admit.\n  - (* ht_has_type *) admit.\nQed.\n*)\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/DataTypes.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.DataTypes for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\n\nSection EdsgerGen.\n\n\nDefinition addr := int256.\n\nDefinition timeunit := int256.\n\nRecord Transfer := {\n  _amount : int256;\n  _to : int256\n}.\n\nDefinition list_Transfer := (list Transfer).\n\nDefinition list_Z := (list int256).\n\nDefinition edgeSet := (Int256Map.t (list int256)).\n\nDefinition int2intMap := (Int256Map.t int256).\n\nDefinition AR3_Z := (ZMap.t int256).\n\nDefinition HASH_Z_AR3_Z := (Int256Tree.t (ZMap.t int256)).\n\nDefinition edgeset := (Int256Tree.t (ZMap.t int256)).\n\nRecord Path := {\n  path : (ZMap.t int256);\n  nextInd : Z32\n}.\n\nDefinition AR1_Path := (ZMap.t Path).\n\nRecord Hashkeys := {\n  toleader : (ZMap.t Path)\n}.\n\nDefinition AR1_Z := (ZMap.t int256).\n\nDefinition HASH_Z_Z32 := (Int256Tree.t Z32).\n\nDefinition AR3_Hashkeys := (ZMap.t Hashkeys).\n\nDefinition AR3_AR3_Hashkeys := (ZMap.t (ZMap.t Hashkeys)).\n\nDefinition AR1_hashvalue := (ZMap.t hashvalue).\n\nDefinition AR1_bool := (ZMap.t bool).\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/EdsgerIdents.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.EdsgerIdents for swaps_general.ds *)\nRequire Import BinPos.  (* positive_scope *)\nRequire Import backend.AST. (* for ident *)\n\nDefinition Hashkeys_struct_ident : ident  := 550%positive.\nDefinition Hashkeys_struct_toleader_ident : ident  := 551%positive.\nDefinition Path_struct_ident : ident  := 552%positive.\nDefinition Path_struct_nextInd_ident : ident  := 553%positive.\nDefinition Path_struct_path_ident : ident  := 554%positive.\nDefinition Transfer_struct__amount_ident : ident  := 555%positive.\nDefinition Transfer_struct__to_ident : ident  := 556%positive.\nDefinition Transfer_struct_ident : ident  := 557%positive.\n\nDefinition ident_DiGraph_can_sign_follower : ident  := 558%positive.\nDefinition ident_DiGraph_diam : ident  := 559%positive.\nDefinition ident_DiGraph_get_leader_ind : ident  := 560%positive.\nDefinition ident_DiGraph_get_party_ind : ident  := 561%positive.\nDefinition ident_DiGraph_get_path_len : ident  := 562%positive.\nDefinition ident_DiGraph_initialize : ident  := 563%positive.\nDefinition ident_DiGraph_is_edge : ident  := 564%positive.\nDefinition ident_DiGraph_is_leader : ident  := 565%positive.\nDefinition ident_DiGraph_is_party : ident  := 566%positive.\nDefinition ident_DiGraph_maxpathlen : ident  := 567%positive.\nDefinition ident_DiGraph_sign_follower : ident  := 568%positive.\nDefinition ident_DiGraph_sign_leader : ident  := 569%positive.\nDefinition ident_DiGraph_valid_path : ident  := 570%positive.\nDefinition ident_EVMOpcode_transfer : ident  := 571%positive.\nDefinition ident_SwapContract_claim : ident  := 572%positive.\nDefinition ident_SwapContract_initialize : ident  := 573%positive.\nDefinition ident_SwapContract_refund : ident  := 574%positive.\nDefinition ident_SwapContract_unlock : ident  := 575%positive.\nDefinition var_SwapContract__assetAmount_ident : ident  := 576%positive.\nDefinition var_SwapContract__canrefund_ident : ident  := 577%positive.\nDefinition var_SwapContract__counterparty_ident : ident  := 578%positive.\nDefinition var_SwapContract__delta_ident : ident  := 579%positive.\nDefinition var_SwapContract__ended_ident : ident  := 580%positive.\nDefinition var_SwapContract__hashlocks_ident : ident  := 581%positive.\nDefinition var_SwapContract__party_ident : ident  := 582%positive.\nDefinition var_SwapContract__start_ident : ident  := 583%positive.\nDefinition var_SwapContract__timelocks_ident : ident  := 584%positive.\nDefinition var_SwapContract__unlocked_ident : ident  := 585%positive.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/LSimEVMOPCODE.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.LSimEVMOPCODE for swaps_general.ds *)\nRequire Export swaps_general.ObjSimEVMOpcode.\nRequire Export swaps_general.ObjSimDiGraph.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/LSimSWAPCONTRACT.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.LSimSWAPCONTRACT for swaps_general.ds *)\nRequire Export swaps_general.LSimEVMOPCODE.\nRequire Export swaps_general.ObjSimSwapContract.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/LSrcEVMOPCODE.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.LSrcEVMOPCODE for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\n\n\nRequire Import swaps_general.LayerEVMOPCODE.\n\nRequire Import cclib.Integers.\nRequire Import cclib.Coqlib.\nRequire Import cclib.Maps.\n\nRequire Import backend.Options.\nRequire Import backend.AST.\nRequire Import backend.phase.Clike.Language.\nRequire Import backend.phase.MiniC.Language.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.Compiled.\nRequire Import backend.Compiled.\nRequire Import backend.Globalenvs.\nRequire Import backend.Glue.\n\n\nSection EdsgerGen.\n\nDefinition ge : genv := new_genv (nil)\n\tnil\n\t(nil)\n\tNone.\n\n\nEnd EdsgerGen.\n\n(*change into extract directory*)\nCd \"/Users/lemontree/Dropbox/Year4-2/CPSC528/DeepSEA/contracts/swaps/swaps_general/extraction\".\n\n(* Avoid name clashes *)\nExtraction Blacklist List String Int.\n\nSeparate Extraction\n    positive global_abstract_data_type  (* This line forces Coq to generate some files even if they are not used, to make the makefile work correctly. *)\n    Glue.full_compile_genv\n    ge.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/LSrcSWAPCONTRACT.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.LSrcSWAPCONTRACT for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\n\n\nRequire Import swaps_general.LayerSWAPCONTRACT.\n\nRequire Import cclib.Integers.\nRequire Import cclib.Coqlib.\nRequire Import cclib.Maps.\n\nRequire Import backend.Options.\nRequire Import backend.AST.\nRequire Import backend.phase.Clike.Language.\nRequire Import backend.phase.MiniC.Language.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.Compiled.\nRequire Import backend.Compiled.\nRequire Import backend.Globalenvs.\nRequire Import backend.Glue.\n\n\nSection EdsgerGen.\n\nDefinition SwapContract_initialize_done : function := \n\tmkfunction\n\tSwapContract_initialize_cfun.(fn_return)\n\tSwapContract_initialize_cfun.(fn_params)\n\tSwapContract_initialize_cfun.(fn_temps)\n\tSwapContract_initialize_cfun.(fn_body).\n\nDefinition SwapContract_unlock_done : function := \n\tmkfunction\n\tSwapContract_unlock_cfun.(fn_return)\n\tSwapContract_unlock_cfun.(fn_params)\n\tSwapContract_unlock_cfun.(fn_temps)\n\tSwapContract_unlock_cfun.(fn_body).\n\nDefinition SwapContract_claim_done : function := \n\tmkfunction\n\tSwapContract_claim_cfun.(fn_return)\n\tSwapContract_claim_cfun.(fn_params)\n\tSwapContract_claim_cfun.(fn_temps)\n\tSwapContract_claim_cfun.(fn_body).\n\nDefinition SwapContract_refund_done : function := \n\tmkfunction\n\tSwapContract_refund_cfun.(fn_return)\n\tSwapContract_refund_cfun.(fn_params)\n\tSwapContract_refund_cfun.(fn_temps)\n\tSwapContract_refund_cfun.(fn_body).\n\nDefinition ge : genv := new_genv (\n\t(var_SwapContract__assetAmount_ident, unpair_ty tint_U)::\n\t(var_SwapContract__timelocks_ident, unpair_ty tarray_int_AR1_Z)::\n\t(var_SwapContract__hashlocks_ident, unpair_ty tarray_int_AR1_hashvalue)::\n\t(var_SwapContract__party_ident, unpair_ty tint_U)::\n\t(var_SwapContract__counterparty_ident, unpair_ty tint_U)::\n\t(var_SwapContract__start_ident, unpair_ty tint_U)::\n\t(var_SwapContract__delta_ident, unpair_ty tint_U)::\n\t(var_SwapContract__unlocked_ident, unpair_ty tarray_int_AR1_bool)::\n\t(var_SwapContract__ended_ident, unpair_ty tint_bool)::\n\t(var_SwapContract__canrefund_ident, unpair_ty tint_bool)::nil)\n\tnil\n\t(\n\t(Int.repr 1621285444, SwapContract_initialize_done):: (* 0x60a2da44 = \"initialize(uint256,uint256,uint256,uint256)\" *)\n\n\t(Int.repr 1543166756, SwapContract_unlock_done):: (* 0x5bfadb24 = \"unlock(uint256,uint256)\" *)\n\n\t(Int.repr 1316084013, SwapContract_claim_done):: (* 0x4e71d92d = \"claim()\" *)\n\n\t(Int.repr 1494096611, SwapContract_refund_done):: (* 0x590e1ae3 = \"refund()\" *)\nnil)\n\tNone.\n\n\nEnd EdsgerGen.\n\n(*change into extract directory*)\nCd \"/Users/lemontree/Dropbox/Year4-2/CPSC528/DeepSEA/contracts/swaps/swaps_general/extraction\".\n\n(* Avoid name clashes *)\nExtraction Blacklist List String Int.\n\nSeparate Extraction\n    positive global_abstract_data_type  (* This line forces Coq to generate some files even if they are not used, to make the makefile work correctly. *)\n    Glue.full_compile_genv\n    ge.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/LayerEVMOPCODE.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.LayerEVMOPCODE for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\n(*Require Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.*)\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.StateMonad.\nRequire Import DeepSpec.lib.Monad.OptionMonad.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.core.SynthesisStmt.\nRequire Import backend.MachineModel.\nExisting Instance MonadState_DS.\nExisting Instance MonadZero_DS.\n\nSection EdsgerGen.\n\n\n\nContext {memModelOps : MemoryModelOps mem}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  memModelOps := memModelOps;                                            \n  GetHighData := global_abstract_data_type \n}.\n\n\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nDefinition EVMOPCODE_kernel_mode (abd : global_abstract_data_type) := True.\nGlobal Arguments EVMOPCODE_kernel_mode / abd.\n\nClass Layer_EVMOPCODE_Context_prf  := {\n  (* ensuring global empty data matches those in the object definitions *)\n  EVMOPCODE_init__events_eq : _events init_global_abstract_data = nil;\n  EVMOPCODE_init__leaders_eq : _leaders init_global_abstract_data = (ZMap.init (@ht_default tint_U _));\n  EVMOPCODE_init__parties_eq : _parties init_global_abstract_data = (ZMap.init (@ht_default tint_U _));\n  EVMOPCODE_init__edges_eq : _edges init_global_abstract_data = (Int256Tree.empty (ZMap.t int256));\n  EVMOPCODE_init__edges_reverse_eq : _edges_reverse init_global_abstract_data = (Int256Tree.empty (ZMap.t int256));\n  EVMOPCODE_init__party_addr_to_ind_eq : _party_addr_to_ind init_global_abstract_data = (Int256Tree.empty Z32);\n  EVMOPCODE_init__leader_addr_to_ind_eq : _leader_addr_to_ind init_global_abstract_data = (Int256Tree.empty Z32);\n  EVMOPCODE_init__party_eq : _party init_global_abstract_data = (Int256.repr 0);\n  EVMOPCODE_init__counterparty_eq : _counterparty init_global_abstract_data = (Int256.repr 0);\n  EVMOPCODE_init__hashkeyinit_eq : _hashkeyinit init_global_abstract_data = (ZMap.init {| path := (@ht_default tarray_int_AR3_Z _);\n         nextInd := (@ht_default tint_Z32 _)\n      |});\n  EVMOPCODE_init__innerpathinit_eq : _innerpathinit init_global_abstract_data = (ZMap.init {| toleader := (@ht_default tarray_Path_AR1_Path _)\n      |});\n  EVMOPCODE_init__allpaths_eq : _allpaths init_global_abstract_data = (ZMap.init (ZMap.init (@ht_default tHashkeys_Hashkeys _)));\n  EVMOPCODE_init__res_is_leader_eq : _res_is_leader init_global_abstract_data = false;\n  EVMOPCODE_init__res_is_party_eq : _res_is_party init_global_abstract_data = false;\n  EVMOPCODE_init__res_is_edge_eq : _res_is_edge init_global_abstract_data = false;\n  EVMOPCODE_init__res_has_signed_eq : _res_has_signed init_global_abstract_data = false;\n  EVMOPCODE_init__res_can_sign_eq : _res_can_sign init_global_abstract_data = false;\n  EVMOPCODE_init__res_path_len_eq : _res_path_len init_global_abstract_data = (Int256.repr 0)\n}.\nContext`{CTXT_prf : !Layer_EVMOPCODE_Context_prf}.\n\nInstance EVMOPCODE_data_ops : CompatDataOps global_abstract_data_type := {\n  empty_data := init_global_abstract_data;\n  high_level_invariant d := True;\n  (* low_level_invariant := global_low_level_invariant; *) (* Omitted in Ethereum backend. \n  kernel_mode d := EVMOPCODE_kernel_mode d *)\n}.\n\nInstance EVMOPCODE_data : CompatData global_abstract_data_type := {\n  (* low_level_invariant_incr := AbData_low_level_invariant_incr;\n  empty_data_low_level_invariant := AbData_empty_data_low_level_invariant; *) (* Omitted in Ethereum backend. *)\n  empty_data_high_level_invariant := I\n}.\n\nInstance EVMOPCODE_overlay_spec : OverlaySpecClass := {\n  (*cdataOpsHigh := EVMOPCODE_data_ops;\n  cdataHigh := EVMOPCODE_data *)\n}.\n\n\n\nInstance EVMOPCODE_underlay_spec : UnderlaySpecClass := {\n  cdataOpsLow := @BuiltinBase_data_ops GlobalLayerSpec init_global_abstract_data;\n  cdataLow := BuiltinBase_data;\n  (*GetLowLayer := BuiltinBase_Layer *)\n}.\n\n\nSection OBJECT_EVMOpcode_DEFINITION.\n  Context`{HM : !HyperMem}.\n\n  (* Object variables *)\n  Definition EVMOpcode__events_var := {|\n    ltype_tp_marker := tint_list_Transfer;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _events;\n    ltype_set := update__events;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n\n  Definition EVMOpcode_transfer := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* toaddr : *) int_U_pair (cons (* much : *) int_U_pair nil));\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* e := *) 13%positive\n      (CCload (LCvar EVMOpcode__events_var))\n      (CCsequence\n        (CCrespec_opt\n          (AList.set 13%positive int_list_Transfer_pair (AList.set 12%positive int_U_pair (AList.set 11%positive int_U_pair (@AList.empty hyper_type_pair))))\n          (CCpanic tvoid_unit)\n          (fun se => @bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>\n          let a := (fun toaddr much e => {|_amount := much; _to := toaddr |} :: e)\n               (SpecTree.get 12%positive (* much *) se)\n               (SpecTree.get 11%positive (* toaddr *) se)\n               (SpecTree.get 13%positive (* e *) se) in\nput (EVMOpcode__events_var.(ltype_set) a d)\n           )))\n        (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))\n  |}.\n  Lemma EVMOpcode_transfer_wf\n      : synth_func_wellformed EVMOpcode_transfer.\n  Proof. solve_wellformed. Defined.\n  Definition EVMOpcode_transfer_opt :int256 -> int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _events update__events]\n  in synth_func_spec_opt EVMOpcode_transfer EVMOpcode_transfer_wf.\n  Definition EVMOpcode_transfer_spec_hlist_opt args :=\n    @apply_param_func EVMOpcode_transfer.(FC_params) _\n                      (EVMOpcode_transfer_opt) args.\n  Definition EVMOpcode_transfer_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _events update__events]\n  in *)\n  synth_func_spec_cond EVMOpcode_transfer EVMOpcode_transfer_wf.\n\n  Definition EVMOpcode_transfer_prim := {|\n    PRIMident := ident_EVMOpcode_transfer;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := EVMOpcode_transfer.(FC_params);\n    PRIMret_marker := EVMOpcode_transfer.(FC_returns);\n    PRIMcond := EVMOpcode_transfer_spec_cond;\n    (* PRIMsem := EVMOpcode_transfer_spec_hlist; *)\n    PRIMsem_opt := EVMOpcode_transfer_spec_hlist_opt\n  |}.\n\n  Lemma EVMOpcode_transfer_spec_hlist_opt_eq :\n    EVMOpcode_transfer_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt EVMOpcode_transfer EVMOpcode_transfer_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition EVMOpcode_transfer_cfun :=\n  Eval cbv in synth_func_func EVMOpcode_transfer.\n\n  Definition EVMOpcode_transfer_cond  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond EVMOpcode_transfer EVMOpcode_transfer_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma EVMOpcode_transfer_cond_eq : forall  a0 a1 me d, \n    EVMOpcode_transfer_cond  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond EVMOpcode_transfer EVMOpcode_transfer_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition EVMOpcode_transfer_obligation  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation EVMOpcode_transfer EVMOpcode_transfer_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma EVMOpcode_transfer_obligation_eq : forall  a0 a1 me d, \n    EVMOpcode_transfer_obligation  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation EVMOpcode_transfer EVMOpcode_transfer_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition EVMOpcode_transfer_spec :=\n  Eval cbv [sf_mem sf_return fst snd EVMOpcode_transfer_opt] in\n    fun  a0 a1 me => execStateT (EVMOpcode_transfer_opt a0 a1 me).\n  Lemma EVMOpcode_transfer_spec_eq :\n    EVMOpcode_transfer_spec =\n    fun  a0 a1 me => execStateT (synth_func_spec_opt EVMOpcode_transfer EVMOpcode_transfer_wf a0 a1 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque EVMOpcode_transfer_opt.\nEnd OBJECT_EVMOpcode_DEFINITION.\n\nSection OBJECT_DiGraph_DEFINITION.\n  Context`{HM : !HyperMem}.\n\n  (* Object variables *)\n  Definition DiGraph__leaders_var := {|\n    ltype_tp_marker := tarray_int_AR1_Z;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _leaders;\n    ltype_set := update__leaders;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__parties_var := {|\n    ltype_tp_marker := tarray_int_AR3_Z;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _parties;\n    ltype_set := update__parties;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__edges_var := {|\n    ltype_tp_marker := thash_array_int_HASH_Z_AR3_Z;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _edges;\n    ltype_set := update__edges;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__edges_reverse_var := {|\n    ltype_tp_marker := thash_array_int_HASH_Z_AR3_Z;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _edges_reverse;\n    ltype_set := update__edges_reverse;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__party_addr_to_ind_var := {|\n    ltype_tp_marker := thash_int_HASH_Z_Z32;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _party_addr_to_ind;\n    ltype_set := update__party_addr_to_ind;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__leader_addr_to_ind_var := {|\n    ltype_tp_marker := thash_int_HASH_Z_Z32;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _leader_addr_to_ind;\n    ltype_set := update__leader_addr_to_ind;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__party_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _party;\n    ltype_set := update__party;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__counterparty_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _counterparty;\n    ltype_set := update__counterparty;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__hashkeyinit_var := {|\n    ltype_tp_marker := tarray_Path_AR1_Path;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _hashkeyinit;\n    ltype_set := update__hashkeyinit;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__innerpathinit_var := {|\n    ltype_tp_marker := tarray_Hashkeys_AR3_Hashkeys;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _innerpathinit;\n    ltype_set := update__innerpathinit;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__allpaths_var := {|\n    ltype_tp_marker := tarray_array_Hashkeys_AR3_AR3_Hashkeys;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _allpaths;\n    ltype_set := update__allpaths;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__res_is_leader_var := {|\n    ltype_tp_marker := tint_bool;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _res_is_leader;\n    ltype_set := update__res_is_leader;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__res_is_party_var := {|\n    ltype_tp_marker := tint_bool;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _res_is_party;\n    ltype_set := update__res_is_party;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__res_is_edge_var := {|\n    ltype_tp_marker := tint_bool;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _res_is_edge;\n    ltype_set := update__res_is_edge;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__res_has_signed_var := {|\n    ltype_tp_marker := tint_bool;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _res_has_signed;\n    ltype_set := update__res_has_signed;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__res_can_sign_var := {|\n    ltype_tp_marker := tint_bool;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _res_can_sign;\n    ltype_set := update__res_can_sign;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n  Definition DiGraph__res_path_len_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident 99%positive;\n    ltype_ghost := true;\n\n    ltype_get := _res_path_len;\n    ltype_set := update__res_path_len;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n\n  Definition DiGraph_initialize := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* counterparty : *) int_U_pair nil);\n    FC_returns := void_unit_pair;\n    FC_body := (CCsequence\n      (CCstore\n        (LCvar DiGraph__counterparty_var)\n        (ECtempvar tint_U 11%positive (* counterparty *)))\n      (CCsequence\n        (CCstore\n          (LCvar DiGraph__party_var)\n          (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n        (CCsequence\n          (CCfor (* i := *) 12%positive 13%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECconst_int256 tint_Z32 1 (Int256.repr 1))\n            (CCsequence\n              (CCstore\n                (LCfield tarray_int_AR3_Z Path_struct_path_ident\n                  (LCindex tPath_Path\n                    (LCvar DiGraph__hashkeyinit_var)\n                    (ECtempvar tint_Z32 12%positive (* i *))))\n                (ECconst_int256 tarray_int_AR3_Z array_init Int256.zero))\n              (CCstore\n                (LCfield tint_Z32 Path_struct_nextInd_ident\n                  (LCindex tPath_Path\n                    (LCvar DiGraph__hashkeyinit_var)\n                    (ECtempvar tint_Z32 12%positive (* i *))))\n                (ECconst_int256 tint_Z32 0 (Int256.repr 0)))))\n          (CClet (* hashkeyinit := *) 14%positive\n            (CCload (LCvar DiGraph__hashkeyinit_var))\n            (CCsequence\n              (CCfor (* i := *) 15%positive 16%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECconst_int256 tint_Z32 3 (Int256.repr 3))\n                (CCstore\n                  (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                    (LCindex tHashkeys_Hashkeys\n                      (LCvar DiGraph__innerpathinit_var)\n                      (ECtempvar tint_Z32 15%positive (* i *))))\n                  (ECtempvar tarray_Path_AR1_Path 14%positive (* hashkeyinit *))))\n              (CClet (* innerpathinit := *) 17%positive\n                (CCload (LCvar DiGraph__innerpathinit_var))\n                (CCsequence\n                  (CCfor (* i := *) 18%positive 19%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECconst_int256 tint_Z32 3 (Int256.repr 3))\n                    (CCstore\n                      (LCindex tarray_Hashkeys_AR3_Hashkeys\n                        (LCvar DiGraph__allpaths_var)\n                        (ECtempvar tint_Z32 18%positive (* i *)))\n                      (ECtempvar tarray_Hashkeys_AR3_Hashkeys 17%positive (* innerpathinit *))))\n                  (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))))))\n  |}.\n  Lemma DiGraph_initialize_wf\n      : synth_func_wellformed DiGraph_initialize.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_initialize_opt :int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_initialize DiGraph_initialize_wf.\n  Definition DiGraph_initialize_spec_hlist_opt args :=\n    @apply_param_func DiGraph_initialize.(FC_params) _\n                      (DiGraph_initialize_opt) args.\n  Definition DiGraph_initialize_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_initialize DiGraph_initialize_wf.\n\n  Definition DiGraph_initialize_prim := {|\n    PRIMident := ident_DiGraph_initialize;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := DiGraph_initialize.(FC_params);\n    PRIMret_marker := DiGraph_initialize.(FC_returns);\n    PRIMcond := DiGraph_initialize_spec_cond;\n    (* PRIMsem := DiGraph_initialize_spec_hlist; *)\n    PRIMsem_opt := DiGraph_initialize_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_initialize_spec_hlist_opt_eq :\n    DiGraph_initialize_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_initialize DiGraph_initialize_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_initialize_cfun :=\n  Eval cbv in synth_func_func DiGraph_initialize.\n\n  Definition DiGraph_initialize_cond  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_initialize DiGraph_initialize_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma DiGraph_initialize_cond_eq : forall  a0 me d, \n    DiGraph_initialize_cond  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_initialize DiGraph_initialize_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_initialize_obligation  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_initialize DiGraph_initialize_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma DiGraph_initialize_obligation_eq : forall  a0 me d, \n    DiGraph_initialize_obligation  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_initialize DiGraph_initialize_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_initialize_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_initialize_opt] in\n    fun  a0 me => execStateT (DiGraph_initialize_opt a0 me).\n  Lemma DiGraph_initialize_spec_eq :\n    DiGraph_initialize_spec =\n    fun  a0 me => execStateT (synth_func_spec_opt DiGraph_initialize DiGraph_initialize_wf a0 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_initialize_opt.\n\n  Definition DiGraph_is_leader := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* ld_addr : *) int_U_pair nil);\n    FC_returns := int_bool_pair;\n    FC_body := (CCsequence\n      (CCstore\n        (LCvar DiGraph__res_is_leader_var)\n        (ECconst_int256 tint_bool false Int256.zero))\n      (CCsequence\n        (CCfor (* i := *) 12%positive 13%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECconst_int256 tint_Z32 1 (Int256.repr 1))\n          (CClet (* it := *) 14%positive\n            (CCload (LCindex tint_U\n              (LCvar DiGraph__leaders_var)\n              (ECtempvar tint_Z32 12%positive (* i *))))\n            (CCifthenelse (ECbinop tint_bool Oeq\n                (ECtempvar tint_U 14%positive (* it *))\n                (ECtempvar tint_U 11%positive (* ld_addr *)))\n              (CCstore\n                (LCvar DiGraph__res_is_leader_var)\n                (ECconst_int256 tint_bool true Int256.one))\n              (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))\n        (CClet (* res_is_leader := *) 15%positive\n          (CCload (LCvar DiGraph__res_is_leader_var))\n          (CCyield (ECtempvar tint_bool 15%positive (* res_is_leader *))))))\n  |}.\n  Lemma DiGraph_is_leader_wf\n      : synth_func_wellformed DiGraph_is_leader.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_is_leader_opt :int256 ->  machine_env -> DS bool  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_is_leader DiGraph_is_leader_wf.\n  Definition DiGraph_is_leader_spec_hlist_opt args :=\n    @apply_param_func DiGraph_is_leader.(FC_params) _\n                      (DiGraph_is_leader_opt) args.\n  Definition DiGraph_is_leader_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_is_leader DiGraph_is_leader_wf.\n\n  Definition DiGraph_is_leader_prim := {|\n    PRIMident := ident_DiGraph_is_leader;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := DiGraph_is_leader.(FC_params);\n    PRIMret_marker := DiGraph_is_leader.(FC_returns);\n    PRIMcond := DiGraph_is_leader_spec_cond;\n    (* PRIMsem := DiGraph_is_leader_spec_hlist; *)\n    PRIMsem_opt := DiGraph_is_leader_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_is_leader_spec_hlist_opt_eq :\n    DiGraph_is_leader_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_is_leader DiGraph_is_leader_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_is_leader_cfun :=\n  Eval cbv in synth_func_func DiGraph_is_leader.\n\n  Definition DiGraph_is_leader_cond  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_is_leader DiGraph_is_leader_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma DiGraph_is_leader_cond_eq : forall  a0 me d, \n    DiGraph_is_leader_cond  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_is_leader DiGraph_is_leader_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_is_leader_obligation  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_is_leader DiGraph_is_leader_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma DiGraph_is_leader_obligation_eq : forall  a0 me d, \n    DiGraph_is_leader_obligation  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_is_leader DiGraph_is_leader_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_is_leader_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_is_leader_opt] in\n    fun  a0 me => runStateT (DiGraph_is_leader_opt a0 me).\n  Lemma DiGraph_is_leader_spec_eq :\n    DiGraph_is_leader_spec =\n    fun  a0 me => runStateT (synth_func_spec_opt DiGraph_is_leader DiGraph_is_leader_wf a0 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_is_leader_opt.\n\n  Definition DiGraph_is_party := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* pt_addr : *) int_U_pair nil);\n    FC_returns := int_bool_pair;\n    FC_body := (CCsequence\n      (CCstore\n        (LCvar DiGraph__res_is_party_var)\n        (ECconst_int256 tint_bool false Int256.zero))\n      (CCsequence\n        (CCfor (* i := *) 12%positive 13%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECconst_int256 tint_Z32 3 (Int256.repr 3))\n          (CClet (* it := *) 14%positive\n            (CCload (LCindex tint_U\n              (LCvar DiGraph__parties_var)\n              (ECtempvar tint_Z32 12%positive (* i *))))\n            (CCifthenelse (ECbinop tint_bool Oeq\n                (ECtempvar tint_U 14%positive (* it *))\n                (ECtempvar tint_U 11%positive (* pt_addr *)))\n              (CCstore\n                (LCvar DiGraph__res_is_party_var)\n                (ECconst_int256 tint_bool true Int256.one))\n              (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))\n        (CClet (* res_is_party := *) 15%positive\n          (CCload (LCvar DiGraph__res_is_party_var))\n          (CCyield (ECtempvar tint_bool 15%positive (* res_is_party *))))))\n  |}.\n  Lemma DiGraph_is_party_wf\n      : synth_func_wellformed DiGraph_is_party.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_is_party_opt :int256 ->  machine_env -> DS bool  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_is_party DiGraph_is_party_wf.\n  Definition DiGraph_is_party_spec_hlist_opt args :=\n    @apply_param_func DiGraph_is_party.(FC_params) _\n                      (DiGraph_is_party_opt) args.\n  Definition DiGraph_is_party_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_is_party DiGraph_is_party_wf.\n\n  Definition DiGraph_is_party_prim := {|\n    PRIMident := ident_DiGraph_is_party;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := DiGraph_is_party.(FC_params);\n    PRIMret_marker := DiGraph_is_party.(FC_returns);\n    PRIMcond := DiGraph_is_party_spec_cond;\n    (* PRIMsem := DiGraph_is_party_spec_hlist; *)\n    PRIMsem_opt := DiGraph_is_party_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_is_party_spec_hlist_opt_eq :\n    DiGraph_is_party_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_is_party DiGraph_is_party_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_is_party_cfun :=\n  Eval cbv in synth_func_func DiGraph_is_party.\n\n  Definition DiGraph_is_party_cond  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_is_party DiGraph_is_party_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma DiGraph_is_party_cond_eq : forall  a0 me d, \n    DiGraph_is_party_cond  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_is_party DiGraph_is_party_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_is_party_obligation  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_is_party DiGraph_is_party_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma DiGraph_is_party_obligation_eq : forall  a0 me d, \n    DiGraph_is_party_obligation  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_is_party DiGraph_is_party_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_is_party_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_is_party_opt] in\n    fun  a0 me => runStateT (DiGraph_is_party_opt a0 me).\n  Lemma DiGraph_is_party_spec_eq :\n    DiGraph_is_party_spec =\n    fun  a0 me => runStateT (synth_func_spec_opt DiGraph_is_party DiGraph_is_party_wf a0 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_is_party_opt.\n\n  Definition DiGraph_is_edge := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* src : *) int_U_pair (cons (* dst : *) int_U_pair nil));\n    FC_returns := int_bool_pair;\n    FC_body := (CCsequence\n      (CCstore\n        (LCvar DiGraph__res_is_edge_var)\n        (ECconst_int256 tint_bool false Int256.zero))\n      (CCsequence\n        (CCfor (* i := *) 13%positive 14%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECconst_int256 tint_Z32 3 (Int256.repr 3))\n          (CClet (* it := *) 15%positive\n            (CCload (LCindex tint_U\n              (LChash tarray_int_AR3_Z\n                (LCvar DiGraph__edges_var)\n                (ECtempvar tint_U 11%positive (* src *)))\n              (ECtempvar tint_Z32 13%positive (* i *))))\n            (CCifthenelse (ECbinop tint_bool Oeq\n                (ECtempvar tint_U 15%positive (* it *))\n                (ECtempvar tint_U 12%positive (* dst *)))\n              (CCstore\n                (LCvar DiGraph__res_is_edge_var)\n                (ECconst_int256 tint_bool true Int256.one))\n              (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))\n        (CClet (* res_is_edge := *) 16%positive\n          (CCload (LCvar DiGraph__res_is_edge_var))\n          (CCyield (ECtempvar tint_bool 16%positive (* res_is_edge *))))))\n  |}.\n  Lemma DiGraph_is_edge_wf\n      : synth_func_wellformed DiGraph_is_edge.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_is_edge_opt :int256 -> int256 ->  machine_env -> DS bool  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_is_edge DiGraph_is_edge_wf.\n  Definition DiGraph_is_edge_spec_hlist_opt args :=\n    @apply_param_func DiGraph_is_edge.(FC_params) _\n                      (DiGraph_is_edge_opt) args.\n  Definition DiGraph_is_edge_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_is_edge DiGraph_is_edge_wf.\n\n  Definition DiGraph_is_edge_prim := {|\n    PRIMident := ident_DiGraph_is_edge;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := DiGraph_is_edge.(FC_params);\n    PRIMret_marker := DiGraph_is_edge.(FC_returns);\n    PRIMcond := DiGraph_is_edge_spec_cond;\n    (* PRIMsem := DiGraph_is_edge_spec_hlist; *)\n    PRIMsem_opt := DiGraph_is_edge_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_is_edge_spec_hlist_opt_eq :\n    DiGraph_is_edge_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_is_edge DiGraph_is_edge_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_is_edge_cfun :=\n  Eval cbv in synth_func_func DiGraph_is_edge.\n\n  Definition DiGraph_is_edge_cond  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_is_edge DiGraph_is_edge_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma DiGraph_is_edge_cond_eq : forall  a0 a1 me d, \n    DiGraph_is_edge_cond  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_is_edge DiGraph_is_edge_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_is_edge_obligation  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_is_edge DiGraph_is_edge_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma DiGraph_is_edge_obligation_eq : forall  a0 a1 me d, \n    DiGraph_is_edge_obligation  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_is_edge DiGraph_is_edge_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_is_edge_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_is_edge_opt] in\n    fun  a0 a1 me => runStateT (DiGraph_is_edge_opt a0 a1 me).\n  Lemma DiGraph_is_edge_spec_eq :\n    DiGraph_is_edge_spec =\n    fun  a0 a1 me => runStateT (synth_func_spec_opt DiGraph_is_edge DiGraph_is_edge_wf a0 a1 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_is_edge_opt.\n\n  Definition DiGraph_get_leader_ind := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* ld_addr : *) int_U_pair nil);\n    FC_returns := int_Z32_pair;\n    FC_body := (CClet (* res := *) 12%positive\n      (CCload (LChash tint_Z32\n        (LCvar DiGraph__leader_addr_to_ind_var)\n        (ECtempvar tint_U 11%positive (* ld_addr *))))\n      (CCyield (ECtempvar tint_Z32 12%positive (* res *))))\n  |}.\n  Lemma DiGraph_get_leader_ind_wf\n      : synth_func_wellformed DiGraph_get_leader_ind.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_get_leader_ind_opt :int256 ->  machine_env -> DS Z32  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_get_leader_ind DiGraph_get_leader_ind_wf.\n  Definition DiGraph_get_leader_ind_spec_hlist_opt args :=\n    @apply_param_func DiGraph_get_leader_ind.(FC_params) _\n                      (DiGraph_get_leader_ind_opt) args.\n  Definition DiGraph_get_leader_ind_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_get_leader_ind DiGraph_get_leader_ind_wf.\n\n  Definition DiGraph_get_leader_ind_prim := {|\n    PRIMident := ident_DiGraph_get_leader_ind;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := true;\n    PRIMargt_marker := DiGraph_get_leader_ind.(FC_params);\n    PRIMret_marker := DiGraph_get_leader_ind.(FC_returns);\n    PRIMcond := DiGraph_get_leader_ind_spec_cond;\n    (* PRIMsem := DiGraph_get_leader_ind_spec_hlist; *)\n    PRIMsem_opt := DiGraph_get_leader_ind_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_get_leader_ind_spec_hlist_opt_eq :\n    DiGraph_get_leader_ind_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_get_leader_ind DiGraph_get_leader_ind_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_get_leader_ind_cfun :=\n  Eval cbv in synth_func_func DiGraph_get_leader_ind.\n\n  Definition DiGraph_get_leader_ind_cond  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_get_leader_ind DiGraph_get_leader_ind_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma DiGraph_get_leader_ind_cond_eq : forall  a0 me d, \n    DiGraph_get_leader_ind_cond  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_get_leader_ind DiGraph_get_leader_ind_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_get_leader_ind_obligation  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_get_leader_ind DiGraph_get_leader_ind_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma DiGraph_get_leader_ind_obligation_eq : forall  a0 me d, \n    DiGraph_get_leader_ind_obligation  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_get_leader_ind DiGraph_get_leader_ind_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_get_leader_ind_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_get_leader_ind_opt] in\n    fun  a0 me => evalStateT (DiGraph_get_leader_ind_opt a0 me).\n  Lemma DiGraph_get_leader_ind_spec_eq :\n    DiGraph_get_leader_ind_spec =\n    fun  a0 me => evalStateT (synth_func_spec_opt DiGraph_get_leader_ind DiGraph_get_leader_ind_wf a0 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_get_leader_ind_opt.\n\n  Definition DiGraph_get_party_ind := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* pt_addr : *) int_U_pair nil);\n    FC_returns := int_Z32_pair;\n    FC_body := (CClet (* res := *) 12%positive\n      (CCload (LChash tint_Z32\n        (LCvar DiGraph__party_addr_to_ind_var)\n        (ECtempvar tint_U 11%positive (* pt_addr *))))\n      (CCyield (ECtempvar tint_Z32 12%positive (* res *))))\n  |}.\n  Lemma DiGraph_get_party_ind_wf\n      : synth_func_wellformed DiGraph_get_party_ind.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_get_party_ind_opt :int256 ->  machine_env -> DS Z32  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_get_party_ind DiGraph_get_party_ind_wf.\n  Definition DiGraph_get_party_ind_spec_hlist_opt args :=\n    @apply_param_func DiGraph_get_party_ind.(FC_params) _\n                      (DiGraph_get_party_ind_opt) args.\n  Definition DiGraph_get_party_ind_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_get_party_ind DiGraph_get_party_ind_wf.\n\n  Definition DiGraph_get_party_ind_prim := {|\n    PRIMident := ident_DiGraph_get_party_ind;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := true;\n    PRIMargt_marker := DiGraph_get_party_ind.(FC_params);\n    PRIMret_marker := DiGraph_get_party_ind.(FC_returns);\n    PRIMcond := DiGraph_get_party_ind_spec_cond;\n    (* PRIMsem := DiGraph_get_party_ind_spec_hlist; *)\n    PRIMsem_opt := DiGraph_get_party_ind_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_get_party_ind_spec_hlist_opt_eq :\n    DiGraph_get_party_ind_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_get_party_ind DiGraph_get_party_ind_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_get_party_ind_cfun :=\n  Eval cbv in synth_func_func DiGraph_get_party_ind.\n\n  Definition DiGraph_get_party_ind_cond  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_get_party_ind DiGraph_get_party_ind_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma DiGraph_get_party_ind_cond_eq : forall  a0 me d, \n    DiGraph_get_party_ind_cond  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_get_party_ind DiGraph_get_party_ind_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_get_party_ind_obligation  a0 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_get_party_ind DiGraph_get_party_ind_wf\n\t\t\t\t\t\t\t\t      a0 me d.\n  \n  Lemma DiGraph_get_party_ind_obligation_eq : forall  a0 me d, \n    DiGraph_get_party_ind_obligation  a0 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_get_party_ind DiGraph_get_party_ind_wf  a0 me d.\n    Proof.\n      intros  a0 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_get_party_ind_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_get_party_ind_opt] in\n    fun  a0 me => evalStateT (DiGraph_get_party_ind_opt a0 me).\n  Lemma DiGraph_get_party_ind_spec_eq :\n    DiGraph_get_party_ind_spec =\n    fun  a0 me => evalStateT (synth_func_spec_opt DiGraph_get_party_ind DiGraph_get_party_ind_wf a0 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_get_party_ind_opt.\n\n  Definition DiGraph_valid_path := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* party_addr : *) int_U_pair (cons (* counterparty_addr : *) int_U_pair (cons (* leader_addr : *) int_U_pair nil)));\n    FC_returns := int_bool_pair;\n    FC_body := (CClet (* pt_ind := *) 14%positive\n      (CCload (LChash tint_Z32\n        (LCvar DiGraph__party_addr_to_ind_var)\n        (ECtempvar tint_U 11%positive (* party_addr *))))\n      (CClet (* counterpt_ind := *) 15%positive\n        (CCload (LChash tint_Z32\n          (LCvar DiGraph__party_addr_to_ind_var)\n          (ECtempvar tint_U 12%positive (* counterparty_addr *))))\n        (CClet (* ld_ind := *) 16%positive\n          (CCload (LChash tint_Z32\n            (LCvar DiGraph__leader_addr_to_ind_var)\n            (ECtempvar tint_U 13%positive (* leader_addr *))))\n          (CClet (* path_len := *) 17%positive\n            (CCload (LCfield tint_Z32 Path_struct_nextInd_ident\n              (LCindex tPath_Path\n                (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                  (LCindex tHashkeys_Hashkeys\n                    (LCindex tarray_Hashkeys_AR3_Hashkeys\n                      (LCvar DiGraph__allpaths_var)\n                      (ECtempvar tint_Z32 15%positive (* counterpt_ind *)))\n                    (ECtempvar tint_Z32 14%positive (* pt_ind *))))\n                (ECtempvar tint_Z32 16%positive (* ld_ind *)))))\n            (CCifthenelse (ECbinop tint_bool Oeq\n                (ECtempvar tint_Z32 17%positive (* path_len *))\n                (ECconst_int256 tint_Z32 0 (Int256.repr 0)))\n              (CCyield (ECconst_int256 tint_bool false Int256.zero))\n              (CClet (* first_signer := *) 18%positive\n                (CCload (LCindex tint_U\n                  (LCfield tarray_int_AR3_Z Path_struct_path_ident\n                    (LCindex tPath_Path\n                      (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                        (LCindex tHashkeys_Hashkeys\n                          (LCindex tarray_Hashkeys_AR3_Hashkeys\n                            (LCvar DiGraph__allpaths_var)\n                            (ECtempvar tint_Z32 15%positive (* counterpt_ind *)))\n                          (ECtempvar tint_Z32 14%positive (* pt_ind *))))\n                      (ECtempvar tint_Z32 16%positive (* ld_ind *))))\n                  (ECconst_int256 tint_Z32 0 (Int256.repr 0))))\n                (CClet (* last_signer := *) 19%positive\n                  (CCload (LCindex tint_U\n                    (LCfield tarray_int_AR3_Z Path_struct_path_ident\n                      (LCindex tPath_Path\n                        (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                          (LCindex tHashkeys_Hashkeys\n                            (LCindex tarray_Hashkeys_AR3_Hashkeys\n                              (LCvar DiGraph__allpaths_var)\n                              (ECtempvar tint_Z32 15%positive (* counterpt_ind *)))\n                            (ECtempvar tint_Z32 14%positive (* pt_ind *))))\n                        (ECtempvar tint_Z32 16%positive (* ld_ind *))))\n                    (ECbinop tint_Z32 Osub\n                      (ECtempvar tint_Z32 17%positive (* path_len *))\n                      (ECconst_int256 tint_Z32 1 (Int256.repr 1)))))\n                  (CCyield (ECbinop tint_bool Oand\n                    (ECbinop tint_bool Oeq\n                      (ECtempvar tint_U 18%positive (* first_signer *))\n                      (ECtempvar tint_U 13%positive (* leader_addr *)))\n                    (ECbinop tint_bool Oeq\n                      (ECtempvar tint_U 19%positive (* last_signer *))\n                      (ECtempvar tint_U 12%positive (* counterparty_addr *))))))))))))\n  |}.\n  Lemma DiGraph_valid_path_wf\n      : synth_func_wellformed DiGraph_valid_path.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_valid_path_opt :int256 -> int256 -> int256 ->  machine_env -> DS bool  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_valid_path DiGraph_valid_path_wf.\n  Definition DiGraph_valid_path_spec_hlist_opt args :=\n    @apply_param_func DiGraph_valid_path.(FC_params) _\n                      (DiGraph_valid_path_opt) args.\n  Definition DiGraph_valid_path_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_valid_path DiGraph_valid_path_wf.\n\n  Definition DiGraph_valid_path_prim := {|\n    PRIMident := ident_DiGraph_valid_path;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := true;\n    PRIMargt_marker := DiGraph_valid_path.(FC_params);\n    PRIMret_marker := DiGraph_valid_path.(FC_returns);\n    PRIMcond := DiGraph_valid_path_spec_cond;\n    (* PRIMsem := DiGraph_valid_path_spec_hlist; *)\n    PRIMsem_opt := DiGraph_valid_path_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_valid_path_spec_hlist_opt_eq :\n    DiGraph_valid_path_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_valid_path DiGraph_valid_path_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_valid_path_cfun :=\n  Eval cbv in synth_func_func DiGraph_valid_path.\n\n  Definition DiGraph_valid_path_cond  a0 a1 a2 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_valid_path DiGraph_valid_path_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 me d.\n  \n  Lemma DiGraph_valid_path_cond_eq : forall  a0 a1 a2 me d, \n    DiGraph_valid_path_cond  a0 a1 a2 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_valid_path DiGraph_valid_path_wf  a0 a1 a2 me d.\n    Proof.\n      intros  a0 a1 a2 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_valid_path_obligation  a0 a1 a2 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_valid_path DiGraph_valid_path_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 me d.\n  \n  Lemma DiGraph_valid_path_obligation_eq : forall  a0 a1 a2 me d, \n    DiGraph_valid_path_obligation  a0 a1 a2 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_valid_path DiGraph_valid_path_wf  a0 a1 a2 me d.\n    Proof.\n      intros  a0 a1 a2 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_valid_path_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_valid_path_opt] in\n    fun  a0 a1 a2 me => evalStateT (DiGraph_valid_path_opt a0 a1 a2 me).\n  Lemma DiGraph_valid_path_spec_eq :\n    DiGraph_valid_path_spec =\n    fun  a0 a1 a2 me => evalStateT (synth_func_spec_opt DiGraph_valid_path DiGraph_valid_path_wf a0 a1 a2 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_valid_path_opt.\n\n  Definition DiGraph_sign_follower := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* party_addr : *) int_U_pair (cons (* counterparty_addr : *) int_U_pair (cons (* src_addr : *) int_U_pair (cons (* leader_addr : *) int_U_pair nil))));\n    FC_returns := void_unit_pair;\n    FC_body := (CCsequence\n      (CCassert (CCyield (ECbinop tint_bool Oeq\n        (ECtempvar tint_U 12%positive (* counterparty_addr *))\n        (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n      (CClet (* pt_ind := *) 16%positive\n        (CCload (LChash tint_Z32\n          (LCvar DiGraph__party_addr_to_ind_var)\n          (ECtempvar tint_U 11%positive (* party_addr *))))\n        (CClet (* counterpt_ind := *) 17%positive\n          (CCload (LChash tint_Z32\n            (LCvar DiGraph__party_addr_to_ind_var)\n            (ECtempvar tint_U 12%positive (* counterparty_addr *))))\n          (CClet (* ld_ind := *) 18%positive\n            (CCload (LChash tint_Z32\n              (LCvar DiGraph__leader_addr_to_ind_var)\n              (ECtempvar tint_U 14%positive (* leader_addr *))))\n            (CClet (* src_ind := *) 19%positive\n              (CCload (LChash tint_Z32\n                (LCvar DiGraph__party_addr_to_ind_var)\n                (ECtempvar tint_U 13%positive (* src_addr *))))\n              (CClet (* next_ind := *) 20%positive\n                (CCload (LCfield tint_Z32 Path_struct_nextInd_ident\n                  (LCindex tPath_Path\n                    (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                      (LCindex tHashkeys_Hashkeys\n                        (LCindex tarray_Hashkeys_AR3_Hashkeys\n                          (LCvar DiGraph__allpaths_var)\n                          (ECtempvar tint_Z32 19%positive (* src_ind *)))\n                        (ECtempvar tint_Z32 17%positive (* counterpt_ind *))))\n                    (ECtempvar tint_Z32 18%positive (* ld_ind *)))))\n                (CCsequence\n                  (CCassert (CCyield (ECbinop tint_bool Ogt\n                    (ECtempvar tint_Z32 20%positive (* next_ind *))\n                    (ECconst_int256 tint_Z32 0 (Int256.repr 0)))))\n                  (CClet (* last_signer := *) 22%positive\n                    (CCload (LCindex tint_U\n                      (LCfield tarray_int_AR3_Z Path_struct_path_ident\n                        (LCindex tPath_Path\n                          (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                            (LCindex tHashkeys_Hashkeys\n                              (LCindex tarray_Hashkeys_AR3_Hashkeys\n                                (LCvar DiGraph__allpaths_var)\n                                (ECtempvar tint_Z32 19%positive (* src_ind *)))\n                              (ECtempvar tint_Z32 17%positive (* counterpt_ind *))))\n                          (ECtempvar tint_Z32 18%positive (* ld_ind *))))\n                      (ECbinop tint_Z32 Osub\n                        (ECtempvar tint_Z32 20%positive (* next_ind *))\n                        (ECconst_int256 tint_Z32 1 (Int256.repr 1)))))\n                    (CCsequence\n                      (CCassert (CCyield (ECbinop tint_bool Oeq\n                        (ECtempvar tint_U 22%positive (* last_signer *))\n                        (ECtempvar tint_U 13%positive (* src_addr *)))))\n                      (CCsequence\n                        (CCfor (* i := *) 24%positive 25%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECtempvar tint_Z32 20%positive (* next_ind *))\n                          (CClet (* to_copy := *) 26%positive\n                            (CCload (LCindex tint_U\n                              (LCfield tarray_int_AR3_Z Path_struct_path_ident\n                                (LCindex tPath_Path\n                                  (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                                    (LCindex tHashkeys_Hashkeys\n                                      (LCindex tarray_Hashkeys_AR3_Hashkeys\n                                        (LCvar DiGraph__allpaths_var)\n                                        (ECtempvar tint_Z32 19%positive (* src_ind *)))\n                                      (ECtempvar tint_Z32 17%positive (* counterpt_ind *))))\n                                  (ECtempvar tint_Z32 18%positive (* ld_ind *))))\n                              (ECtempvar tint_Z32 24%positive (* i *))))\n                            (CCstore\n                              (LCindex tint_U\n                                (LCfield tarray_int_AR3_Z Path_struct_path_ident\n                                  (LCindex tPath_Path\n                                    (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                                      (LCindex tHashkeys_Hashkeys\n                                        (LCindex tarray_Hashkeys_AR3_Hashkeys\n                                          (LCvar DiGraph__allpaths_var)\n                                          (ECtempvar tint_Z32 17%positive (* counterpt_ind *)))\n                                        (ECtempvar tint_Z32 16%positive (* pt_ind *))))\n                                    (ECtempvar tint_Z32 18%positive (* ld_ind *))))\n                                (ECtempvar tint_Z32 24%positive (* i *)))\n                              (ECtempvar tint_U 26%positive (* to_copy *)))))\n                        (CCsequence\n                          (CCstore\n                            (LCindex tint_U\n                              (LCfield tarray_int_AR3_Z Path_struct_path_ident\n                                (LCindex tPath_Path\n                                  (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                                    (LCindex tHashkeys_Hashkeys\n                                      (LCindex tarray_Hashkeys_AR3_Hashkeys\n                                        (LCvar DiGraph__allpaths_var)\n                                        (ECtempvar tint_Z32 17%positive (* counterpt_ind *)))\n                                      (ECtempvar tint_Z32 16%positive (* pt_ind *))))\n                                  (ECtempvar tint_Z32 18%positive (* ld_ind *))))\n                              (ECtempvar tint_Z32 20%positive (* next_ind *)))\n                            (ECtempvar tint_U 12%positive (* counterparty_addr *)))\n                          (CCsequence\n                            (CCstore\n                              (LCfield tint_Z32 Path_struct_nextInd_ident\n                                (LCindex tPath_Path\n                                  (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                                    (LCindex tHashkeys_Hashkeys\n                                      (LCindex tarray_Hashkeys_AR3_Hashkeys\n                                        (LCvar DiGraph__allpaths_var)\n                                        (ECtempvar tint_Z32 17%positive (* counterpt_ind *)))\n                                      (ECtempvar tint_Z32 16%positive (* pt_ind *))))\n                                  (ECtempvar tint_Z32 18%positive (* ld_ind *))))\n                              (ECbinop tint_Z32 Oadd\n                                (ECtempvar tint_Z32 20%positive (* next_ind *))\n                                (ECconst_int256 tint_Z32 1 (Int256.repr 1))))\n                            (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))))))))))\n  |}.\n  Lemma DiGraph_sign_follower_wf\n      : synth_func_wellformed DiGraph_sign_follower.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_sign_follower_opt :int256 -> int256 -> int256 -> int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_sign_follower DiGraph_sign_follower_wf.\n  Definition DiGraph_sign_follower_spec_hlist_opt args :=\n    @apply_param_func DiGraph_sign_follower.(FC_params) _\n                      (DiGraph_sign_follower_opt) args.\n  Definition DiGraph_sign_follower_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_sign_follower DiGraph_sign_follower_wf.\n\n  Definition DiGraph_sign_follower_prim := {|\n    PRIMident := ident_DiGraph_sign_follower;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := DiGraph_sign_follower.(FC_params);\n    PRIMret_marker := DiGraph_sign_follower.(FC_returns);\n    PRIMcond := DiGraph_sign_follower_spec_cond;\n    (* PRIMsem := DiGraph_sign_follower_spec_hlist; *)\n    PRIMsem_opt := DiGraph_sign_follower_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_sign_follower_spec_hlist_opt_eq :\n    DiGraph_sign_follower_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_sign_follower DiGraph_sign_follower_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_sign_follower_cfun :=\n  Eval cbv in synth_func_func DiGraph_sign_follower.\n\n  Definition DiGraph_sign_follower_cond  a0 a1 a2 a3 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    ht_ft_cond a3 -> ht_valid_ft_cond a3 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_sign_follower DiGraph_sign_follower_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 a3 me d.\n  \n  Lemma DiGraph_sign_follower_cond_eq : forall  a0 a1 a2 a3 me d, \n    DiGraph_sign_follower_cond  a0 a1 a2 a3 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    ht_ft_cond a3 -> ht_valid_ft_cond a3 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_sign_follower DiGraph_sign_follower_wf  a0 a1 a2 a3 me d.\n    Proof.\n      intros  a0 a1 a2 a3 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_sign_follower_obligation  a0 a1 a2 a3 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    ht_ft_cond a3 -> ht_valid_ft_cond a3 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_sign_follower DiGraph_sign_follower_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 a3 me d.\n  \n  Lemma DiGraph_sign_follower_obligation_eq : forall  a0 a1 a2 a3 me d, \n    DiGraph_sign_follower_obligation  a0 a1 a2 a3 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    ht_ft_cond a3 -> ht_valid_ft_cond a3 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_sign_follower DiGraph_sign_follower_wf  a0 a1 a2 a3 me d.\n    Proof.\n      intros  a0 a1 a2 a3 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_sign_follower_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_sign_follower_opt] in\n    fun  a0 a1 a2 a3 me => execStateT (DiGraph_sign_follower_opt a0 a1 a2 a3 me).\n  Lemma DiGraph_sign_follower_spec_eq :\n    DiGraph_sign_follower_spec =\n    fun  a0 a1 a2 a3 me => execStateT (synth_func_spec_opt DiGraph_sign_follower DiGraph_sign_follower_wf a0 a1 a2 a3 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_sign_follower_opt.\n\n  Definition DiGraph_sign_leader := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* party_addr : *) int_U_pair (cons (* counterparty_addr : *) int_U_pair (cons (* leader_addr : *) int_U_pair nil)));\n    FC_returns := void_unit_pair;\n    FC_body := (CCsequence\n      (CCassert (CCyield (ECbinop tint_bool Oeq\n        (ECtempvar tint_U 12%positive (* counterparty_addr *))\n        (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n      (CCsequence\n        (CCassert (CCyield (ECbinop tint_bool Oeq\n          (ECtempvar tint_U 13%positive (* leader_addr *))\n          (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n        (CClet (* pt_ind := *) 16%positive\n          (CCload (LChash tint_Z32\n            (LCvar DiGraph__party_addr_to_ind_var)\n            (ECtempvar tint_U 11%positive (* party_addr *))))\n          (CClet (* counterpt_ind := *) 17%positive\n            (CCload (LChash tint_Z32\n              (LCvar DiGraph__party_addr_to_ind_var)\n              (ECtempvar tint_U 12%positive (* counterparty_addr *))))\n            (CClet (* ld_ind := *) 18%positive\n              (CCload (LChash tint_Z32\n                (LCvar DiGraph__leader_addr_to_ind_var)\n                (ECtempvar tint_U 13%positive (* leader_addr *))))\n              (CClet (* path_len := *) 19%positive\n                (CCload (LCfield tint_Z32 Path_struct_nextInd_ident\n                  (LCindex tPath_Path\n                    (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                      (LCindex tHashkeys_Hashkeys\n                        (LCindex tarray_Hashkeys_AR3_Hashkeys\n                          (LCvar DiGraph__allpaths_var)\n                          (ECtempvar tint_Z32 17%positive (* counterpt_ind *)))\n                        (ECtempvar tint_Z32 16%positive (* pt_ind *))))\n                    (ECtempvar tint_Z32 18%positive (* ld_ind *)))))\n                (CCsequence\n                  (CCassert (CCyield (ECbinop tint_bool Oeq\n                    (ECtempvar tint_Z32 19%positive (* path_len *))\n                    (ECconst_int256 tint_Z32 0 (Int256.repr 0)))))\n                  (CCsequence\n                    (CCstore\n                      (LCindex tint_U\n                        (LCfield tarray_int_AR3_Z Path_struct_path_ident\n                          (LCindex tPath_Path\n                            (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                              (LCindex tHashkeys_Hashkeys\n                                (LCindex tarray_Hashkeys_AR3_Hashkeys\n                                  (LCvar DiGraph__allpaths_var)\n                                  (ECtempvar tint_Z32 17%positive (* counterpt_ind *)))\n                                (ECtempvar tint_Z32 16%positive (* pt_ind *))))\n                            (ECtempvar tint_Z32 18%positive (* ld_ind *))))\n                        (ECconst_int256 tint_Z32 0 (Int256.repr 0)))\n                      (ECtempvar tint_U 13%positive (* leader_addr *)))\n                    (CCsequence\n                      (CCstore\n                        (LCfield tint_Z32 Path_struct_nextInd_ident\n                          (LCindex tPath_Path\n                            (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                              (LCindex tHashkeys_Hashkeys\n                                (LCindex tarray_Hashkeys_AR3_Hashkeys\n                                  (LCvar DiGraph__allpaths_var)\n                                  (ECtempvar tint_Z32 17%positive (* counterpt_ind *)))\n                                (ECtempvar tint_Z32 16%positive (* pt_ind *))))\n                            (ECtempvar tint_Z32 18%positive (* ld_ind *))))\n                        (ECbinop tint_Z32 Oadd\n                          (ECtempvar tint_Z32 19%positive (* path_len *))\n                          (ECconst_int256 tint_Z32 1 (Int256.repr 1))))\n                      (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))))))))\n  |}.\n  Lemma DiGraph_sign_leader_wf\n      : synth_func_wellformed DiGraph_sign_leader.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_sign_leader_opt :int256 -> int256 -> int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_sign_leader DiGraph_sign_leader_wf.\n  Definition DiGraph_sign_leader_spec_hlist_opt args :=\n    @apply_param_func DiGraph_sign_leader.(FC_params) _\n                      (DiGraph_sign_leader_opt) args.\n  Definition DiGraph_sign_leader_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_sign_leader DiGraph_sign_leader_wf.\n\n  Definition DiGraph_sign_leader_prim := {|\n    PRIMident := ident_DiGraph_sign_leader;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := DiGraph_sign_leader.(FC_params);\n    PRIMret_marker := DiGraph_sign_leader.(FC_returns);\n    PRIMcond := DiGraph_sign_leader_spec_cond;\n    (* PRIMsem := DiGraph_sign_leader_spec_hlist; *)\n    PRIMsem_opt := DiGraph_sign_leader_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_sign_leader_spec_hlist_opt_eq :\n    DiGraph_sign_leader_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_sign_leader DiGraph_sign_leader_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_sign_leader_cfun :=\n  Eval cbv in synth_func_func DiGraph_sign_leader.\n\n  Definition DiGraph_sign_leader_cond  a0 a1 a2 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_sign_leader DiGraph_sign_leader_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 me d.\n  \n  Lemma DiGraph_sign_leader_cond_eq : forall  a0 a1 a2 me d, \n    DiGraph_sign_leader_cond  a0 a1 a2 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_sign_leader DiGraph_sign_leader_wf  a0 a1 a2 me d.\n    Proof.\n      intros  a0 a1 a2 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_sign_leader_obligation  a0 a1 a2 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_sign_leader DiGraph_sign_leader_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 me d.\n  \n  Lemma DiGraph_sign_leader_obligation_eq : forall  a0 a1 a2 me d, \n    DiGraph_sign_leader_obligation  a0 a1 a2 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_sign_leader DiGraph_sign_leader_wf  a0 a1 a2 me d.\n    Proof.\n      intros  a0 a1 a2 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_sign_leader_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_sign_leader_opt] in\n    fun  a0 a1 a2 me => execStateT (DiGraph_sign_leader_opt a0 a1 a2 me).\n  Lemma DiGraph_sign_leader_spec_eq :\n    DiGraph_sign_leader_spec =\n    fun  a0 a1 a2 me => execStateT (synth_func_spec_opt DiGraph_sign_leader DiGraph_sign_leader_wf a0 a1 a2 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_sign_leader_opt.\n\n  Definition DiGraph_can_sign_follower := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* party_addr : *) int_U_pair (cons (* counterparty_addr : *) int_U_pair (cons (* leader_addr : *) int_U_pair nil)));\n    FC_returns := int_bool_pair;\n    FC_body := (CCsequence\n      (CCassert (CCyield (ECbinop tint_bool Oeq\n        (ECtempvar tint_U 12%positive (* counterparty_addr *))\n        (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n      (CCsequence\n        (CCstore\n          (LCvar DiGraph__res_can_sign_var)\n          (ECconst_int256 tint_bool false Int256.zero))\n        (CClet (* ld_ind := *) 15%positive\n          (CCload (LChash tint_Z32\n            (LCvar DiGraph__leader_addr_to_ind_var)\n            (ECtempvar tint_U 13%positive (* leader_addr *))))\n          (CClet (* self_ind := *) 16%positive\n            (CCload (LChash tint_Z32\n              (LCvar DiGraph__party_addr_to_ind_var)\n              (ECtempvar tint_U 12%positive (* counterparty_addr *))))\n            (CCsequence\n              (CCfor (* i := *) 17%positive 18%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECconst_int256 tint_Z32 3 (Int256.repr 3))\n                (CClet (* dst_addr := *) 19%positive\n                  (CCload (LCindex tint_U\n                    (LChash tarray_int_AR3_Z\n                      (LCvar DiGraph__edges_var)\n                      (ECtempvar tint_U 12%positive (* counterparty_addr *)))\n                    (ECtempvar tint_Z32 17%positive (* i *))))\n                  (CCifthenelse (ECbinop tint_bool Oeq\n                      (ECtempvar tint_U 19%positive (* dst_addr *))\n                      (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0)))\n                    (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))\n                    (CClet (* dst_ind := *) 20%positive\n                      (CCload (LChash tint_Z32\n                        (LCvar DiGraph__party_addr_to_ind_var)\n                        (ECtempvar tint_U 19%positive (* dst_addr *))))\n                      (CClet (* next_ind := *) 21%positive\n                        (CCload (LCfield tint_Z32 Path_struct_nextInd_ident\n                          (LCindex tPath_Path\n                            (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                              (LCindex tHashkeys_Hashkeys\n                                (LCindex tarray_Hashkeys_AR3_Hashkeys\n                                  (LCvar DiGraph__allpaths_var)\n                                  (ECtempvar tint_Z32 20%positive (* dst_ind *)))\n                                (ECtempvar tint_Z32 16%positive (* self_ind *))))\n                            (ECtempvar tint_Z32 15%positive (* ld_ind *)))))\n                        (CCifthenelse (ECbinop tint_bool Oeq\n                            (ECtempvar tint_Z32 21%positive (* next_ind *))\n                            (ECconst_int256 tint_Z32 0 (Int256.repr 0)))\n                          (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))\n                          (CClet (* last_signer := *) 22%positive\n                            (CCload (LCindex tint_U\n                              (LCfield tarray_int_AR3_Z Path_struct_path_ident\n                                (LCindex tPath_Path\n                                  (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                                    (LCindex tHashkeys_Hashkeys\n                                      (LCindex tarray_Hashkeys_AR3_Hashkeys\n                                        (LCvar DiGraph__allpaths_var)\n                                        (ECtempvar tint_Z32 20%positive (* dst_ind *)))\n                                      (ECtempvar tint_Z32 16%positive (* self_ind *))))\n                                  (ECtempvar tint_Z32 15%positive (* ld_ind *))))\n                              (ECbinop tint_Z32 Osub\n                                (ECtempvar tint_Z32 21%positive (* next_ind *))\n                                (ECconst_int256 tint_Z32 1 (Int256.repr 1)))))\n                            (CCifthenelse (ECbinop tint_bool Oeq\n                                (ECtempvar tint_U 22%positive (* last_signer *))\n                                (ECtempvar tint_U 19%positive (* dst_addr *)))\n                              (CCstore\n                                (LCvar DiGraph__res_can_sign_var)\n                                (ECconst_int256 tint_bool true Int256.one))\n                              (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))))))\n              (CClet (* res_can_sign := *) 23%positive\n                (CCload (LCvar DiGraph__res_can_sign_var))\n                (CCyield (ECtempvar tint_bool 23%positive (* res_can_sign *)))))))))\n  |}.\n  Lemma DiGraph_can_sign_follower_wf\n      : synth_func_wellformed DiGraph_can_sign_follower.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_can_sign_follower_opt :int256 -> int256 -> int256 ->  machine_env -> DS bool  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_can_sign_follower DiGraph_can_sign_follower_wf.\n  Definition DiGraph_can_sign_follower_spec_hlist_opt args :=\n    @apply_param_func DiGraph_can_sign_follower.(FC_params) _\n                      (DiGraph_can_sign_follower_opt) args.\n  Definition DiGraph_can_sign_follower_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_can_sign_follower DiGraph_can_sign_follower_wf.\n\n  Definition DiGraph_can_sign_follower_prim := {|\n    PRIMident := ident_DiGraph_can_sign_follower;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := DiGraph_can_sign_follower.(FC_params);\n    PRIMret_marker := DiGraph_can_sign_follower.(FC_returns);\n    PRIMcond := DiGraph_can_sign_follower_spec_cond;\n    (* PRIMsem := DiGraph_can_sign_follower_spec_hlist; *)\n    PRIMsem_opt := DiGraph_can_sign_follower_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_can_sign_follower_spec_hlist_opt_eq :\n    DiGraph_can_sign_follower_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_can_sign_follower DiGraph_can_sign_follower_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_can_sign_follower_cfun :=\n  Eval cbv in synth_func_func DiGraph_can_sign_follower.\n\n  Definition DiGraph_can_sign_follower_cond  a0 a1 a2 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_can_sign_follower DiGraph_can_sign_follower_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 me d.\n  \n  Lemma DiGraph_can_sign_follower_cond_eq : forall  a0 a1 a2 me d, \n    DiGraph_can_sign_follower_cond  a0 a1 a2 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_can_sign_follower DiGraph_can_sign_follower_wf  a0 a1 a2 me d.\n    Proof.\n      intros  a0 a1 a2 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_can_sign_follower_obligation  a0 a1 a2 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_can_sign_follower DiGraph_can_sign_follower_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 me d.\n  \n  Lemma DiGraph_can_sign_follower_obligation_eq : forall  a0 a1 a2 me d, \n    DiGraph_can_sign_follower_obligation  a0 a1 a2 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_can_sign_follower DiGraph_can_sign_follower_wf  a0 a1 a2 me d.\n    Proof.\n      intros  a0 a1 a2 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_can_sign_follower_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_can_sign_follower_opt] in\n    fun  a0 a1 a2 me => runStateT (DiGraph_can_sign_follower_opt a0 a1 a2 me).\n  Lemma DiGraph_can_sign_follower_spec_eq :\n    DiGraph_can_sign_follower_spec =\n    fun  a0 a1 a2 me => runStateT (synth_func_spec_opt DiGraph_can_sign_follower DiGraph_can_sign_follower_wf a0 a1 a2 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_can_sign_follower_opt.\n\n  Definition DiGraph_get_path_len := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* party_addr : *) int_U_pair (cons (* counterparty_addr : *) int_U_pair (cons (* leader_addr : *) int_U_pair nil)));\n    FC_returns := int_U_pair;\n    FC_body := (CCsequence\n      (CCstore\n        (LCvar DiGraph__res_path_len_var)\n        (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0)))\n      (CClet (* pt_ind := *) 14%positive\n        (CCload (LChash tint_Z32\n          (LCvar DiGraph__party_addr_to_ind_var)\n          (ECtempvar tint_U 11%positive (* party_addr *))))\n        (CClet (* counterpt_ind := *) 15%positive\n          (CCload (LChash tint_Z32\n            (LCvar DiGraph__party_addr_to_ind_var)\n            (ECtempvar tint_U 12%positive (* counterparty_addr *))))\n          (CClet (* ld_ind := *) 16%positive\n            (CCload (LChash tint_Z32\n              (LCvar DiGraph__leader_addr_to_ind_var)\n              (ECtempvar tint_U 13%positive (* leader_addr *))))\n            (CClet (* path_len := *) 17%positive\n              (CCload (LCfield tint_Z32 Path_struct_nextInd_ident\n                (LCindex tPath_Path\n                  (LCfield tarray_Path_AR1_Path Hashkeys_struct_toleader_ident\n                    (LCindex tHashkeys_Hashkeys\n                      (LCindex tarray_Hashkeys_AR3_Hashkeys\n                        (LCvar DiGraph__allpaths_var)\n                        (ECtempvar tint_Z32 15%positive (* counterpt_ind *)))\n                      (ECtempvar tint_Z32 14%positive (* pt_ind *))))\n                  (ECtempvar tint_Z32 16%positive (* ld_ind *)))))\n              (CCsequence\n                (CCfor (* i := *) 18%positive 19%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECtempvar tint_Z32 17%positive (* path_len *))\n                  (CClet (* old_val := *) 20%positive\n                    (CCload (LCvar DiGraph__res_path_len_var))\n                    (CCstore\n                      (LCvar DiGraph__res_path_len_var)\n                      (ECbinop tint_U Oadd\n                        (ECtempvar tint_U 20%positive (* old_val *))\n                        (ECconst_int256 tint_U (Int256.repr 1) (Int256.repr 1))))))\n                (CClet (* res_path_len := *) 21%positive\n                  (CCload (LCvar DiGraph__res_path_len_var))\n                  (CCyield (ECtempvar tint_U 21%positive (* res_path_len *))))))))))\n  |}.\n  Lemma DiGraph_get_path_len_wf\n      : synth_func_wellformed DiGraph_get_path_len.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_get_path_len_opt :int256 -> int256 -> int256 ->  machine_env -> DS int256  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_get_path_len DiGraph_get_path_len_wf.\n  Definition DiGraph_get_path_len_spec_hlist_opt args :=\n    @apply_param_func DiGraph_get_path_len.(FC_params) _\n                      (DiGraph_get_path_len_opt) args.\n  Definition DiGraph_get_path_len_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_get_path_len DiGraph_get_path_len_wf.\n\n  Definition DiGraph_get_path_len_prim := {|\n    PRIMident := ident_DiGraph_get_path_len;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := DiGraph_get_path_len.(FC_params);\n    PRIMret_marker := DiGraph_get_path_len.(FC_returns);\n    PRIMcond := DiGraph_get_path_len_spec_cond;\n    (* PRIMsem := DiGraph_get_path_len_spec_hlist; *)\n    PRIMsem_opt := DiGraph_get_path_len_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_get_path_len_spec_hlist_opt_eq :\n    DiGraph_get_path_len_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_get_path_len DiGraph_get_path_len_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_get_path_len_cfun :=\n  Eval cbv in synth_func_func DiGraph_get_path_len.\n\n  Definition DiGraph_get_path_len_cond  a0 a1 a2 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_get_path_len DiGraph_get_path_len_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 me d.\n  \n  Lemma DiGraph_get_path_len_cond_eq : forall  a0 a1 a2 me d, \n    DiGraph_get_path_len_cond  a0 a1 a2 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_get_path_len DiGraph_get_path_len_wf  a0 a1 a2 me d.\n    Proof.\n      intros  a0 a1 a2 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_get_path_len_obligation  a0 a1 a2 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_get_path_len DiGraph_get_path_len_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 me d.\n  \n  Lemma DiGraph_get_path_len_obligation_eq : forall  a0 a1 a2 me d, \n    DiGraph_get_path_len_obligation  a0 a1 a2 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_get_path_len DiGraph_get_path_len_wf  a0 a1 a2 me d.\n    Proof.\n      intros  a0 a1 a2 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_get_path_len_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_get_path_len_opt] in\n    fun  a0 a1 a2 me => runStateT (DiGraph_get_path_len_opt a0 a1 a2 me).\n  Lemma DiGraph_get_path_len_spec_eq :\n    DiGraph_get_path_len_spec =\n    fun  a0 a1 a2 me => runStateT (synth_func_spec_opt DiGraph_get_path_len DiGraph_get_path_len_wf a0 a1 a2 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_get_path_len_opt.\n\n  Definition DiGraph_diam := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := nil;\n    FC_returns := int_U_pair;\n    FC_body := (CCyield (ECconst_int256 tint_U (Int256.repr 3) (Int256.repr 3)))\n  |}.\n  Lemma DiGraph_diam_wf\n      : synth_func_wellformed DiGraph_diam.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_diam_opt : machine_env -> DS int256  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_diam DiGraph_diam_wf.\n  Definition DiGraph_diam_spec_hlist_opt args :=\n    @apply_param_func DiGraph_diam.(FC_params) _\n                      (DiGraph_diam_opt) args.\n  Definition DiGraph_diam_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_diam DiGraph_diam_wf.\n\n  Definition DiGraph_diam_prim := {|\n    PRIMident := ident_DiGraph_diam;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := true;\n    PRIMargt_marker := DiGraph_diam.(FC_params);\n    PRIMret_marker := DiGraph_diam.(FC_returns);\n    PRIMcond := DiGraph_diam_spec_cond;\n    (* PRIMsem := DiGraph_diam_spec_hlist; *)\n    PRIMsem_opt := DiGraph_diam_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_diam_spec_hlist_opt_eq :\n    DiGraph_diam_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_diam DiGraph_diam_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_diam_cfun :=\n  Eval cbv in synth_func_func DiGraph_diam.\n\n  Definition DiGraph_diam_cond  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_cond DiGraph_diam DiGraph_diam_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma DiGraph_diam_cond_eq : forall  me d, \n    DiGraph_diam_cond  me d ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_diam DiGraph_diam_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_diam_obligation  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_diam DiGraph_diam_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma DiGraph_diam_obligation_eq : forall  me d, \n    DiGraph_diam_obligation  me d ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_diam DiGraph_diam_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_diam_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_diam_opt] in\n    fun  me => evalStateT (DiGraph_diam_opt me).\n  Lemma DiGraph_diam_spec_eq :\n    DiGraph_diam_spec =\n    fun  me => evalStateT (synth_func_spec_opt DiGraph_diam DiGraph_diam_wf me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_diam_opt.\n\n  Definition DiGraph_maxpathlen := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* pt : *) int_U_pair (cons (* ld : *) int_U_pair nil));\n    FC_returns := int_U_pair;\n    FC_body := (CClet (* parties := *) 13%positive\n      (CCrespec_opt\n        (AList.set 12%positive int_U_pair (AList.set 11%positive int_U_pair (@AList.empty hyper_type_pair)))\n        (CCpanic tint_list_Z)\n        (fun se => ret (nil)))\n      (CClet (* leaders := *) 14%positive\n        (CCrespec_opt\n          (AList.set 13%positive int_list_Z_pair (AList.set 12%positive int_U_pair (AList.set 11%positive int_U_pair (@AList.empty hyper_type_pair))))\n          (CCpanic tint_list_Z)\n          (fun se => ret (nil)))\n        (CClet (* is_party := *) 15%positive\n          (CCrespec_opt\n            (AList.set 14%positive int_list_Z_pair (AList.set 13%positive int_list_Z_pair (AList.set 12%positive int_U_pair (AList.set 11%positive int_U_pair (@AList.empty hyper_type_pair)))))\n            (CCpanic tint_bool)\n            (fun se => @bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>\n            let a := (fix in_list_fix a lds := match lds with | nil => false | (cons d rest) => if (Int256.eq a d) then true else (in_list_aux a rest) end)\n                 (SpecTree.get 11%positive (* pt *) se)\n                 (SpecTree.get 13%positive (* parties *) se) in\n@ret _ (@Monad_DS GlobalLayerSpec) _ a\n             )))\n          (CClet (* is_leader := *) 16%positive\n            (CCrespec_opt\n              (AList.set 15%positive int_bool_pair (AList.set 14%positive int_list_Z_pair (AList.set 13%positive int_list_Z_pair (AList.set 12%positive int_U_pair (AList.set 11%positive int_U_pair (@AList.empty hyper_type_pair))))))\n              (CCpanic tint_bool)\n              (fun se => @bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>\n              let a := (fix in_list_fix a lds := match lds with | nil => false | (cons d rest) => if (Int256.eq a d) then true else (in_list_aux a rest) end)\n                   (SpecTree.get 12%positive (* ld *) se)\n                   (SpecTree.get 14%positive (* leaders *) se) in\n@ret _ (@Monad_DS GlobalLayerSpec) _ a\n               )))\n            (CClet (* res := *) 17%positive\n              (CCrespec_opt\n                (AList.set 16%positive int_bool_pair (AList.set 15%positive int_bool_pair (AList.set 14%positive int_list_Z_pair (AList.set 13%positive int_list_Z_pair (AList.set 12%positive int_U_pair (AList.set 11%positive int_U_pair (@AList.empty hyper_type_pair)))))))\n                (CCpanic tint_U)\n                (fun se => @bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>\n                let a := (fun pt ld => Int256.one)\n                     (SpecTree.get 11%positive (* pt *) se)\n                     (SpecTree.get 12%positive (* ld *) se) in\n@ret _ (@Monad_DS GlobalLayerSpec) _ a\n                 )))\n              (CCsequence\n                (CCassert (CCyield (ECtempvar tint_bool 15%positive (* is_party *))))\n                (CCsequence\n                  (CCassert (CCyield (ECtempvar tint_bool 16%positive (* is_leader *))))\n                  (CCyield (ECtempvar tint_U 17%positive (* res *))))))))))\n  |}.\n  Lemma DiGraph_maxpathlen_wf\n      : synth_func_wellformed DiGraph_maxpathlen.\n  Proof. solve_wellformed. Defined.\n  Definition DiGraph_maxpathlen_opt :int256 -> int256 ->  machine_env -> DS int256  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt DiGraph_maxpathlen DiGraph_maxpathlen_wf.\n  Definition DiGraph_maxpathlen_spec_hlist_opt args :=\n    @apply_param_func DiGraph_maxpathlen.(FC_params) _\n                      (DiGraph_maxpathlen_opt) args.\n  Definition DiGraph_maxpathlen_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond DiGraph_maxpathlen DiGraph_maxpathlen_wf.\n\n  Definition DiGraph_maxpathlen_prim := {|\n    PRIMident := ident_DiGraph_maxpathlen;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := true;\n    PRIMargt_marker := DiGraph_maxpathlen.(FC_params);\n    PRIMret_marker := DiGraph_maxpathlen.(FC_returns);\n    PRIMcond := DiGraph_maxpathlen_spec_cond;\n    (* PRIMsem := DiGraph_maxpathlen_spec_hlist; *)\n    PRIMsem_opt := DiGraph_maxpathlen_spec_hlist_opt\n  |}.\n\n  Lemma DiGraph_maxpathlen_spec_hlist_opt_eq :\n    DiGraph_maxpathlen_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt DiGraph_maxpathlen DiGraph_maxpathlen_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition DiGraph_maxpathlen_cfun :=\n  Eval cbv in synth_func_func DiGraph_maxpathlen.\n\n  Definition DiGraph_maxpathlen_cond  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_maxpathlen DiGraph_maxpathlen_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma DiGraph_maxpathlen_cond_eq : forall  a0 a1 me d, \n    DiGraph_maxpathlen_cond  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond DiGraph_maxpathlen DiGraph_maxpathlen_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_maxpathlen_obligation  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_maxpathlen DiGraph_maxpathlen_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma DiGraph_maxpathlen_obligation_eq : forall  a0 a1 me d, \n    DiGraph_maxpathlen_obligation  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation DiGraph_maxpathlen DiGraph_maxpathlen_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition DiGraph_maxpathlen_spec :=\n  Eval cbv [sf_mem sf_return fst snd DiGraph_maxpathlen_opt] in\n    fun  a0 a1 me => evalStateT (DiGraph_maxpathlen_opt a0 a1 me).\n  Lemma DiGraph_maxpathlen_spec_eq :\n    DiGraph_maxpathlen_spec =\n    fun  a0 a1 me => evalStateT (synth_func_spec_opt DiGraph_maxpathlen DiGraph_maxpathlen_wf a0 a1 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque DiGraph_maxpathlen_opt.\nEnd OBJECT_DiGraph_DEFINITION.\n(* (*Temporarily omitted in the Ethereum version.*)\n\nSection LAYER_EVMOPCODE_DEFINITION.\n  Definition EVMOPCODE_evm_transfer_prim := EVMOpcode_transfer_prim.\n  Definition EVMOPCODE_digraph_initialize_prim := DiGraph_initialize_prim.\n  Definition EVMOPCODE_digraph_is_leader_prim := DiGraph_is_leader_prim.\n  Definition EVMOPCODE_digraph_is_party_prim := DiGraph_is_party_prim.\n  Definition EVMOPCODE_digraph_is_edge_prim := DiGraph_is_edge_prim.\n  Definition EVMOPCODE_digraph_get_leader_ind_prim := DiGraph_get_leader_ind_prim.\n  Definition EVMOPCODE_digraph_get_party_ind_prim := DiGraph_get_party_ind_prim.\n  Definition EVMOPCODE_digraph_valid_path_prim := DiGraph_valid_path_prim.\n  Definition EVMOPCODE_digraph_sign_follower_prim := DiGraph_sign_follower_prim.\n  Definition EVMOPCODE_digraph_sign_leader_prim := DiGraph_sign_leader_prim.\n  Definition EVMOPCODE_digraph_can_sign_follower_prim := DiGraph_can_sign_follower_prim.\n  Definition EVMOPCODE_digraph_get_path_len_prim := DiGraph_get_path_len_prim.\n  Definition EVMOPCODE_digraph_diam_prim := DiGraph_diam_prim.\n  Definition EVMOPCODE_digraph_maxpathlen_prim := DiGraph_maxpathlen_prim.\n\n  Class EVMOPCODE_preserves_invariants := {\n    EVMOPCODE_EVMOpcode_transfer_preserves_invariants :>\n      CompatGenSem.PreservesInvariants EVMOpcode_transfer_spec;\n    EVMOPCODE_DiGraph_initialize_preserves_invariants :>\n      CompatGenSem.PreservesInvariants DiGraph_initialize_spec;\n    EVMOPCODE_DiGraph_is_leader_preserves_invariants :>\n      CompatGenSem.PreservesInvariants DiGraph_is_leader_spec;\n    EVMOPCODE_DiGraph_is_party_preserves_invariants :>\n      CompatGenSem.PreservesInvariants DiGraph_is_party_spec;\n    EVMOPCODE_DiGraph_is_edge_preserves_invariants :>\n      CompatGenSem.PreservesInvariants DiGraph_is_edge_spec;\n    EVMOPCODE_DiGraph_sign_follower_preserves_invariants :>\n      CompatGenSem.PreservesInvariants DiGraph_sign_follower_spec;\n    EVMOPCODE_DiGraph_sign_leader_preserves_invariants :>\n      CompatGenSem.PreservesInvariants DiGraph_sign_leader_spec;\n    EVMOPCODE_DiGraph_can_sign_follower_preserves_invariants :>\n      CompatGenSem.PreservesInvariants DiGraph_can_sign_follower_spec;\n    EVMOPCODE_DiGraph_get_path_len_preserves_invariants :>\n      CompatGenSem.PreservesInvariants DiGraph_get_path_len_spec\n  }.\n  Context`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\n\n  Definition EVMOPCODE_Layer : CompatLayerDef.compatlayer GetHighDataX :=\n    transfer ↦ CompatGenSem.gensem EVMOpcode_transfer_spec\n      ⊕ initialize ↦ CompatGenSem.gensem DiGraph_initialize_spec\n      ⊕ is_leader ↦ CompatGenSem.gensem DiGraph_is_leader_spec\n      ⊕ is_party ↦ CompatGenSem.gensem DiGraph_is_party_spec\n      ⊕ is_edge ↦ CompatGenSem.gensem DiGraph_is_edge_spec\n      ⊕ get_leader_ind ↦ CompatGenSem.gensem DiGraph_get_leader_ind_spec\n      ⊕ get_party_ind ↦ CompatGenSem.gensem DiGraph_get_party_ind_spec\n      ⊕ valid_path ↦ CompatGenSem.gensem DiGraph_valid_path_spec\n      ⊕ sign_follower ↦ CompatGenSem.gensem DiGraph_sign_follower_spec\n      ⊕ sign_leader ↦ CompatGenSem.gensem DiGraph_sign_leader_spec\n      ⊕ can_sign_follower ↦ CompatGenSem.gensem DiGraph_can_sign_follower_spec\n      ⊕ get_path_len ↦ CompatGenSem.gensem DiGraph_get_path_len_spec\n      ⊕ diam ↦ CompatGenSem.gensem DiGraph_diam_spec\n      ⊕ maxpathlen ↦ CompatGenSem.gensem DiGraph_maxpathlen_spec.\nEnd LAYER_EVMOPCODE_DEFINITION.\n*)\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/LayerSWAPCONTRACT.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.LayerSWAPCONTRACT for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\n(*Require Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.*)\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.StateMonad.\nRequire Import DeepSpec.lib.Monad.OptionMonad.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.core.SynthesisStmt.\nRequire Import backend.MachineModel.\nExisting Instance MonadState_DS.\nExisting Instance MonadZero_DS.\nRequire Export swaps_general.LayerEVMOPCODE.\n\nSection EdsgerGen.\n\n\n\nContext {memModelOps : MemoryModelOps mem}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  memModelOps := memModelOps;                                            \n  GetHighData := global_abstract_data_type \n}.\n\n\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nDefinition SWAPCONTRACT_kernel_mode (abd : global_abstract_data_type) := True.\nGlobal Arguments SWAPCONTRACT_kernel_mode / abd.\n\nClass Layer_SWAPCONTRACT_Context_prf  := {\n  (* ensuring global empty data matches those in the object definitions *)\n  SWAPCONTRACT_init__assetAmount_eq : _assetAmount init_global_abstract_data = (Int256.repr 0);\n  SWAPCONTRACT_init__timelocks_eq : _timelocks init_global_abstract_data = (ZMap.init (@ht_default tint_U _));\n  SWAPCONTRACT_init__hashlocks_eq : _hashlocks init_global_abstract_data = (ZMap.init (@ht_default tint_hashvalue _));\n  SWAPCONTRACT_init__party_eq : _party init_global_abstract_data = (Int256.repr 0);\n  SWAPCONTRACT_init__counterparty_eq : _counterparty init_global_abstract_data = (Int256.repr 0);\n  SWAPCONTRACT_init__start_eq : _start init_global_abstract_data = (Int256.repr 0);\n  SWAPCONTRACT_init__delta_eq : _delta init_global_abstract_data = (Int256.repr 0);\n  SWAPCONTRACT_init__unlocked_eq : _unlocked init_global_abstract_data = (ZMap.init (@ht_default tint_bool _));\n  SWAPCONTRACT_init__ended_eq : _ended init_global_abstract_data = false;\n  SWAPCONTRACT_init__canrefund_eq : _canrefund init_global_abstract_data = false;\n  SWAPCONTRACT_init__events_eq : _events init_global_abstract_data = nil;\n  SWAPCONTRACT_init__leaders_eq : _leaders init_global_abstract_data = (ZMap.init (@ht_default tint_U _));\n  SWAPCONTRACT_init__parties_eq : _parties init_global_abstract_data = (ZMap.init (@ht_default tint_U _));\n  SWAPCONTRACT_init__edges_eq : _edges init_global_abstract_data = (Int256Tree.empty (ZMap.t int256));\n  SWAPCONTRACT_init__edges_reverse_eq : _edges_reverse init_global_abstract_data = (Int256Tree.empty (ZMap.t int256));\n  SWAPCONTRACT_init__party_addr_to_ind_eq : _party_addr_to_ind init_global_abstract_data = (Int256Tree.empty Z32);\n  SWAPCONTRACT_init__leader_addr_to_ind_eq : _leader_addr_to_ind init_global_abstract_data = (Int256Tree.empty Z32);\n  SWAPCONTRACT_init__party_eq : _party init_global_abstract_data = (Int256.repr 0);\n  SWAPCONTRACT_init__counterparty_eq : _counterparty init_global_abstract_data = (Int256.repr 0);\n  SWAPCONTRACT_init__hashkeyinit_eq : _hashkeyinit init_global_abstract_data = (ZMap.init {| path := (@ht_default tarray_int_AR3_Z _);\n         nextInd := (@ht_default tint_Z32 _)\n      |});\n  SWAPCONTRACT_init__innerpathinit_eq : _innerpathinit init_global_abstract_data = (ZMap.init {| toleader := (@ht_default tarray_Path_AR1_Path _)\n      |});\n  SWAPCONTRACT_init__allpaths_eq : _allpaths init_global_abstract_data = (ZMap.init (ZMap.init (@ht_default tHashkeys_Hashkeys _)));\n  SWAPCONTRACT_init__res_is_leader_eq : _res_is_leader init_global_abstract_data = false;\n  SWAPCONTRACT_init__res_is_party_eq : _res_is_party init_global_abstract_data = false;\n  SWAPCONTRACT_init__res_is_edge_eq : _res_is_edge init_global_abstract_data = false;\n  SWAPCONTRACT_init__res_has_signed_eq : _res_has_signed init_global_abstract_data = false;\n  SWAPCONTRACT_init__res_can_sign_eq : _res_can_sign init_global_abstract_data = false;\n  SWAPCONTRACT_init__res_path_len_eq : _res_path_len init_global_abstract_data = (Int256.repr 0)\n}.\nContext`{CTXT_prf : !Layer_SWAPCONTRACT_Context_prf}.\n\nInstance SWAPCONTRACT_data_ops : CompatDataOps global_abstract_data_type := {\n  empty_data := init_global_abstract_data;\n  high_level_invariant d := True;\n  (* low_level_invariant := global_low_level_invariant; *) (* Omitted in Ethereum backend. \n  kernel_mode d := SWAPCONTRACT_kernel_mode d *)\n}.\n\nInstance SWAPCONTRACT_data : CompatData global_abstract_data_type := {\n  (* low_level_invariant_incr := AbData_low_level_invariant_incr;\n  empty_data_low_level_invariant := AbData_empty_data_low_level_invariant; *) (* Omitted in Ethereum backend. *)\n  empty_data_high_level_invariant := I\n}.\n\nInstance SWAPCONTRACT_overlay_spec : OverlaySpecClass := {\n  (*cdataOpsHigh := SWAPCONTRACT_data_ops;\n  cdataHigh := SWAPCONTRACT_data *)\n}.\n\n\n\n(* (* TODO: add this back in for the Ethereum backend. *)\nGlobal Instance Layer_SWAPCONTRACT'EVMOPCODE_Context_prf : Layer_EVMOPCODE_Context_prf.\nProof. esplit; apply CTXT_prf.\n  (*\n  - intros; simpl.\n    rewrite SWAPCONTRACT_AbData_get_set.\n    destruct abd; reflexivity.\n  - intros; simpl.\n    rewrite SWAPCONTRACT_AbData_get_set, SWAPCONTRACT_AbData_set_set.\n    reflexivity.\n  - simpl.\n    rewrite SWAPCONTRACT_AbData_get_empty_data.\n    reflexivity.\n  - admit.\n  *)\nQed.\nContext`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\n*)\n\nInstance SWAPCONTRACT_underlay_spec : UnderlaySpecClass := {\n  cdataOpsLow := EVMOPCODE_data_ops;\n  cdataLow := EVMOPCODE_data;\n  (*GetLowLayer := EVMOPCODE_Layer *)\n}.\n\n\nSection OBJECT_SwapContract_DEFINITION.\n  Context`{HM : !HyperMem}.\n\n  (* Object variables *)\n  Definition SwapContract__assetAmount_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_SwapContract__assetAmount_ident;\n    ltype_ghost := false;\n\n    ltype_get := _assetAmount;\n    ltype_set := update__assetAmount;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition SwapContract__assetAmount_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition SwapContract__timelocks_var := {|\n    ltype_tp_marker := tarray_int_AR1_Z;\n\n    ltype_ident := Values.Iident var_SwapContract__timelocks_ident;\n    ltype_ghost := false;\n\n    ltype_get := _timelocks;\n    ltype_set := update__timelocks;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition SwapContract__timelocks_globvar : AST.globvar type :=\n    let ty := unpair_ty tarray_int_AR1_Z in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition SwapContract__hashlocks_var := {|\n    ltype_tp_marker := tarray_int_AR1_hashvalue;\n\n    ltype_ident := Values.Iident var_SwapContract__hashlocks_ident;\n    ltype_ghost := false;\n\n    ltype_get := _hashlocks;\n    ltype_set := update__hashlocks;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition SwapContract__hashlocks_globvar : AST.globvar type :=\n    let ty := unpair_ty tarray_int_AR1_hashvalue in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition SwapContract__party_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_SwapContract__party_ident;\n    ltype_ghost := false;\n\n    ltype_get := _party;\n    ltype_set := update__party;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition SwapContract__party_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition SwapContract__counterparty_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_SwapContract__counterparty_ident;\n    ltype_ghost := false;\n\n    ltype_get := _counterparty;\n    ltype_set := update__counterparty;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition SwapContract__counterparty_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition SwapContract__start_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_SwapContract__start_ident;\n    ltype_ghost := false;\n\n    ltype_get := _start;\n    ltype_set := update__start;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition SwapContract__start_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition SwapContract__delta_var := {|\n    ltype_tp_marker := tint_U;\n\n    ltype_ident := Values.Iident var_SwapContract__delta_ident;\n    ltype_ghost := false;\n\n    ltype_get := _delta;\n    ltype_set := update__delta;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition SwapContract__delta_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_U in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition SwapContract__unlocked_var := {|\n    ltype_tp_marker := tarray_int_AR1_bool;\n\n    ltype_ident := Values.Iident var_SwapContract__unlocked_ident;\n    ltype_ghost := false;\n\n    ltype_get := _unlocked;\n    ltype_set := update__unlocked;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition SwapContract__unlocked_globvar : AST.globvar type :=\n    let ty := unpair_ty tarray_int_AR1_bool in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition SwapContract__ended_var := {|\n    ltype_tp_marker := tint_bool;\n\n    ltype_ident := Values.Iident var_SwapContract__ended_ident;\n    ltype_ghost := false;\n\n    ltype_get := _ended;\n    ltype_set := update__ended;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition SwapContract__ended_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_bool in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n  Definition SwapContract__canrefund_var := {|\n    ltype_tp_marker := tint_bool;\n\n    ltype_ident := Values.Iident var_SwapContract__canrefund_ident;\n    ltype_ghost := false;\n\n    ltype_get := _canrefund;\n    ltype_set := update__canrefund;\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\n(*TODO: variables.*) (*  Definition SwapContract__canrefund_globvar : AST.globvar type :=\n    let ty := unpair_ty tint_bool in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\n\n  Definition SwapContract_initialize := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* amount : *) int_U_pair (cons (* counterparty : *) int_U_pair (cons (* start : *) int_U_pair (cons (* delta : *) int_U_pair nil))));\n    FC_returns := void_unit_pair;\n    FC_body := (CCsequence\n      (CCassert (CCyield (ECbinop tint_bool Oge\n        (ECtempvar tint_U 13%positive (* start *))\n        (ECbinop tint_U Oadd\n          (@ECbuiltin0 _ _  _ builtin0_timestamp_impl)\n          (ECtempvar tint_U 14%positive (* delta *))))))\n      (CCsequence\n        (CCstore\n          (LCvar SwapContract__counterparty_var)\n          (ECtempvar tint_U 12%positive (* counterparty *)))\n        (CCsequence\n          (CCstore\n            (LCvar SwapContract__assetAmount_var)\n            (ECtempvar tint_U 11%positive (* amount *)))\n          (CCsequence\n            (CCstore\n              (LCvar SwapContract__party_var)\n              (@ECbuiltin0 _ _  _ builtin0_caller_impl))\n            (CCsequence\n              (CCstore\n                (LCvar SwapContract__start_var)\n                (ECtempvar tint_U 13%positive (* start *)))\n              (CCsequence\n                (CCstore\n                  (LCvar SwapContract__delta_var)\n                  (ECtempvar tint_U 14%positive (* delta *)))\n                (CCsequence\n                  (CCstore\n                    (LCvar SwapContract__canrefund_var)\n                    (ECconst_int256 tint_bool false Int256.zero))\n                  (CCsequence\n                    (CCfor (* i := *) 16%positive 17%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECconst_int256 tint_Z32 1 (Int256.repr 1))\n                      (CCstore\n                        (LCindex tint_bool\n                          (LCvar SwapContract__unlocked_var)\n                          (ECtempvar tint_Z32 16%positive (* i *)))\n                        (ECconst_int256 tint_bool false Int256.zero)))\n                    (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))))))\n  |}.\n  Lemma SwapContract_initialize_wf\n      : synth_func_wellformed SwapContract_initialize.\n  Proof. solve_wellformed. Defined.\n  Definition SwapContract_initialize_opt :int256 -> int256 -> int256 -> int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt SwapContract_initialize SwapContract_initialize_wf.\n  Definition SwapContract_initialize_spec_hlist_opt args :=\n    @apply_param_func SwapContract_initialize.(FC_params) _\n                      (SwapContract_initialize_opt) args.\n  Definition SwapContract_initialize_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond SwapContract_initialize SwapContract_initialize_wf.\n\n  Definition SwapContract_initialize_prim := {|\n    PRIMident := ident_SwapContract_initialize;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := SwapContract_initialize.(FC_params);\n    PRIMret_marker := SwapContract_initialize.(FC_returns);\n    PRIMcond := SwapContract_initialize_spec_cond;\n    (* PRIMsem := SwapContract_initialize_spec_hlist; *)\n    PRIMsem_opt := SwapContract_initialize_spec_hlist_opt\n  |}.\n\n  Lemma SwapContract_initialize_spec_hlist_opt_eq :\n    SwapContract_initialize_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt SwapContract_initialize SwapContract_initialize_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition SwapContract_initialize_cfun :=\n  Eval cbv in synth_func_func SwapContract_initialize.\n\n  Definition SwapContract_initialize_cond  a0 a1 a2 a3 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    ht_ft_cond a3 -> ht_valid_ft_cond a3 ->\n    high_level_invariant d ->\n    synth_func_cond SwapContract_initialize SwapContract_initialize_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 a3 me d.\n  \n  Lemma SwapContract_initialize_cond_eq : forall  a0 a1 a2 a3 me d, \n    SwapContract_initialize_cond  a0 a1 a2 a3 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    ht_ft_cond a3 -> ht_valid_ft_cond a3 ->\n    high_level_invariant d ->\n    synth_func_cond SwapContract_initialize SwapContract_initialize_wf  a0 a1 a2 a3 me d.\n    Proof.\n      intros  a0 a1 a2 a3 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition SwapContract_initialize_obligation  a0 a1 a2 a3 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    ht_ft_cond a3 -> ht_valid_ft_cond a3 ->\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_initialize SwapContract_initialize_wf\n\t\t\t\t\t\t\t\t      a0 a1 a2 a3 me d.\n  \n  Lemma SwapContract_initialize_obligation_eq : forall  a0 a1 a2 a3 me d, \n    SwapContract_initialize_obligation  a0 a1 a2 a3 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    ht_ft_cond a3 -> ht_valid_ft_cond a3 ->\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_initialize SwapContract_initialize_wf  a0 a1 a2 a3 me d.\n    Proof.\n      intros  a0 a1 a2 a3 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition SwapContract_initialize_spec :=\n  Eval cbv [sf_mem sf_return fst snd SwapContract_initialize_opt] in\n    fun  a0 a1 a2 a3 me => execStateT (SwapContract_initialize_opt a0 a1 a2 a3 me).\n  Lemma SwapContract_initialize_spec_eq :\n    SwapContract_initialize_spec =\n    fun  a0 a1 a2 a3 me => execStateT (synth_func_spec_opt SwapContract_initialize SwapContract_initialize_wf a0 a1 a2 a3 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque SwapContract_initialize_opt.\n\n  Definition SwapContract_unlock := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := (cons (* leader_addr : *) int_U_pair (cons (* secret : *) int_U_pair nil));\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* is_leader := *) 13%positive\n      (CCcall DiGraph_is_leader_prim\n        (HCons int_U_pair _\n          (ECtempvar tint_U 11%positive (* leader_addr *))\n          HNil))\n      (CClet (* party := *) 14%positive\n        (CCload (LCvar SwapContract__party_var))\n        (CClet (* counterparty := *) 15%positive\n          (CCload (LCvar SwapContract__counterparty_var))\n          (CClet (* ld_ind := *) 16%positive\n            (CCcall DiGraph_get_leader_ind_prim\n              (HCons int_U_pair _\n                (ECtempvar tint_U 11%positive (* leader_addr *))\n                HNil))\n            (CClet (* hashlock := *) 17%positive\n              (CCload (LCindex tint_hashvalue\n                (LCvar SwapContract__hashlocks_var)\n                (ECtempvar tint_Z32 16%positive (* ld_ind *))))\n              (CCsequence\n                (CCassert (CCyield (ECtempvar tint_bool 13%positive (* is_leader *))))\n                (CCsequence\n                  (CCassert (CCyield (ECbinop tint_bool Oeq\n                    (@ECbuiltin0 _ _  _ builtin0_caller_impl)\n                    (ECtempvar tint_U 15%positive (* counterparty *)))))\n                  (CCsequence\n                    (CCassert (CCyield (ECbinop tint_bool Oeq\n                      (ECtempvar tint_hashvalue 17%positive (* hashlock *))\n                      (ECunop tint_hashvalue Osha_1 (ECtempvar tint_U 12%positive (* secret *))))))\n                    (CClet (* path_verified := *) 21%positive\n                      (CCcall DiGraph_valid_path_prim\n                        (HCons int_U_pair _\n                          (ECtempvar tint_U 14%positive (* party *))\n                          (HCons int_U_pair _\n                            (ECtempvar tint_U 15%positive (* counterparty *))\n                            (HCons int_U_pair _\n                              (ECtempvar tint_U 11%positive (* leader_addr *))\n                              HNil))))\n                      (CClet (* path_len := *) 22%positive\n                        (CCcall DiGraph_get_path_len_prim\n                          (HCons int_U_pair _\n                            (ECtempvar tint_U 14%positive (* party *))\n                            (HCons int_U_pair _\n                              (ECtempvar tint_U 15%positive (* counterparty *))\n                              (HCons int_U_pair _\n                                (ECtempvar tint_U 11%positive (* leader_addr *))\n                                HNil))))\n                        (CClet (* start := *) 23%positive\n                          (CCload (LCvar SwapContract__start_var))\n                          (CClet (* delta := *) 24%positive\n                            (CCload (LCvar SwapContract__delta_var))\n                            (CCsequence\n                              (CCassert (CCyield (ECbinop tint_bool Olt\n                                (@ECbuiltin0 _ _  _ builtin0_timestamp_impl)\n                                (ECbinop tint_U Oadd\n                                  (ECtempvar tint_U 23%positive (* start *))\n                                  (ECbinop tint_U Omul\n                                    (ECbinop tint_U Oadd\n                                      (ECconst_int256 tint_U (Int256.repr 3) (Int256.repr 3))\n                                      (ECtempvar tint_U 22%positive (* path_len *)))\n                                    (ECtempvar tint_U 24%positive (* delta *)))))))\n                              (CCsequence\n                                (CCassert (CCyield (ECtempvar tint_bool 21%positive (* path_verified *))))\n                                (CCsequence\n                                  (CCstore\n                                    (LCindex tint_bool\n                                      (LCvar SwapContract__unlocked_var)\n                                      (ECtempvar tint_Z32 16%positive (* ld_ind *)))\n                                    (ECconst_int256 tint_bool true Int256.one))\n                                  (CCyield (ECconst_int256 tvoid_unit tt Int256.zero)))))))))))))))))\n  |}.\n  Lemma SwapContract_unlock_wf\n      : synth_func_wellformed SwapContract_unlock.\n  Proof. solve_wellformed. Defined.\n  Definition SwapContract_unlock_opt :int256 -> int256 ->  machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt SwapContract_unlock SwapContract_unlock_wf.\n  Definition SwapContract_unlock_spec_hlist_opt args :=\n    @apply_param_func SwapContract_unlock.(FC_params) _\n                      (SwapContract_unlock_opt) args.\n  Definition SwapContract_unlock_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond SwapContract_unlock SwapContract_unlock_wf.\n\n  Definition SwapContract_unlock_prim := {|\n    PRIMident := ident_SwapContract_unlock;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := SwapContract_unlock.(FC_params);\n    PRIMret_marker := SwapContract_unlock.(FC_returns);\n    PRIMcond := SwapContract_unlock_spec_cond;\n    (* PRIMsem := SwapContract_unlock_spec_hlist; *)\n    PRIMsem_opt := SwapContract_unlock_spec_hlist_opt\n  |}.\n\n  Lemma SwapContract_unlock_spec_hlist_opt_eq :\n    SwapContract_unlock_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt SwapContract_unlock SwapContract_unlock_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition SwapContract_unlock_cfun :=\n  Eval cbv in synth_func_func SwapContract_unlock.\n\n  Definition SwapContract_unlock_cond  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond SwapContract_unlock SwapContract_unlock_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma SwapContract_unlock_cond_eq : forall  a0 a1 me d, \n    SwapContract_unlock_cond  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond SwapContract_unlock SwapContract_unlock_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition SwapContract_unlock_obligation  a0 a1 me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_unlock SwapContract_unlock_wf\n\t\t\t\t\t\t\t\t      a0 a1 me d.\n  \n  Lemma SwapContract_unlock_obligation_eq : forall  a0 a1 me d, \n    SwapContract_unlock_obligation  a0 a1 me d ->\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_unlock SwapContract_unlock_wf  a0 a1 me d.\n    Proof.\n      intros  a0 a1 me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition SwapContract_unlock_spec :=\n  Eval cbv [sf_mem sf_return fst snd SwapContract_unlock_opt] in\n    fun  a0 a1 me => execStateT (SwapContract_unlock_opt a0 a1 me).\n  Lemma SwapContract_unlock_spec_eq :\n    SwapContract_unlock_spec =\n    fun  a0 a1 me => execStateT (synth_func_spec_opt SwapContract_unlock SwapContract_unlock_wf a0 a1 me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque SwapContract_unlock_opt.\n\n  Definition SwapContract_claim := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := nil;\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* counterparty := *) 12%positive\n      (CCload (LCvar SwapContract__counterparty_var))\n      (CClet (* assetAmount := *) 13%positive\n        (CCload (LCvar SwapContract__assetAmount_var))\n        (CClet (* ended := *) 14%positive\n          (CCload (LCvar SwapContract__ended_var))\n          (CCsequence\n            (CCassert (CCyield (ECunop tint_bool Onotbool (ECtempvar tint_bool 14%positive (* ended *)))))\n            (CCsequence\n              (CCassert (CCyield (ECbinop tint_bool Oeq\n                (ECtempvar tint_U 12%positive (* counterparty *))\n                (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n              (CCsequence\n                (CCfor (* i := *) 17%positive 18%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECconst_int256 tint_Z32 1 (Int256.repr 1))\n                  (CClet (* unlock_status := *) 19%positive\n                    (CCload (LCindex tint_bool\n                      (LCvar SwapContract__unlocked_var)\n                      (ECtempvar tint_Z32 17%positive (* i *))))\n                    (CCassert (CCyield (ECbinop tint_bool Oeq\n                      (ECtempvar tint_bool 19%positive (* unlock_status *))\n                      (ECconst_int256 tint_bool true Int256.one))))))\n                (CCsequence\n                  (CCcall EVMOpcode_transfer_prim\n                    (HCons int_U_pair _\n                      (ECtempvar tint_U 12%positive (* counterparty *))\n                      (HCons int_U_pair _\n                        (ECtempvar tint_U 13%positive (* assetAmount *))\n                        HNil)))\n                  (CCsequence\n                    (CCstore\n                      (LCvar SwapContract__ended_var)\n                      (ECconst_int256 tint_bool true Int256.one))\n                    (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))))))\n  |}.\n  Lemma SwapContract_claim_wf\n      : synth_func_wellformed SwapContract_claim.\n  Proof. solve_wellformed. Defined.\n  Definition SwapContract_claim_opt : machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt SwapContract_claim SwapContract_claim_wf.\n  Definition SwapContract_claim_spec_hlist_opt args :=\n    @apply_param_func SwapContract_claim.(FC_params) _\n                      (SwapContract_claim_opt) args.\n  Definition SwapContract_claim_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond SwapContract_claim SwapContract_claim_wf.\n\n  Definition SwapContract_claim_prim := {|\n    PRIMident := ident_SwapContract_claim;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := SwapContract_claim.(FC_params);\n    PRIMret_marker := SwapContract_claim.(FC_returns);\n    PRIMcond := SwapContract_claim_spec_cond;\n    (* PRIMsem := SwapContract_claim_spec_hlist; *)\n    PRIMsem_opt := SwapContract_claim_spec_hlist_opt\n  |}.\n\n  Lemma SwapContract_claim_spec_hlist_opt_eq :\n    SwapContract_claim_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt SwapContract_claim SwapContract_claim_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition SwapContract_claim_cfun :=\n  Eval cbv in synth_func_func SwapContract_claim.\n\n  Definition SwapContract_claim_cond  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_cond SwapContract_claim SwapContract_claim_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma SwapContract_claim_cond_eq : forall  me d, \n    SwapContract_claim_cond  me d ->\n    high_level_invariant d ->\n    synth_func_cond SwapContract_claim SwapContract_claim_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition SwapContract_claim_obligation  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_claim SwapContract_claim_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma SwapContract_claim_obligation_eq : forall  me d, \n    SwapContract_claim_obligation  me d ->\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_claim SwapContract_claim_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition SwapContract_claim_spec :=\n  Eval cbv [sf_mem sf_return fst snd SwapContract_claim_opt] in\n    fun  me => execStateT (SwapContract_claim_opt me).\n  Lemma SwapContract_claim_spec_eq :\n    SwapContract_claim_spec =\n    fun  me => execStateT (synth_func_spec_opt SwapContract_claim SwapContract_claim_wf me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque SwapContract_claim_opt.\n\n  Definition SwapContract_refund := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := nil;\n    FC_returns := void_unit_pair;\n    FC_body := (CClet (* party := *) 12%positive\n      (CCload (LCvar SwapContract__party_var))\n      (CClet (* assetAmount := *) 13%positive\n        (CCload (LCvar SwapContract__assetAmount_var))\n        (CClet (* ended := *) 14%positive\n          (CCload (LCvar SwapContract__ended_var))\n          (CClet (* start := *) 15%positive\n            (CCload (LCvar SwapContract__start_var))\n            (CCsequence\n              (CCstore\n                (LCvar SwapContract__canrefund_var)\n                (ECconst_int256 tint_bool false Int256.zero))\n              (CCsequence\n                (CCassert (CCyield (ECunop tint_bool Onotbool (ECtempvar tint_bool 14%positive (* ended *)))))\n                (CCsequence\n                  (CCassert (CCyield (ECbinop tint_bool Oeq\n                    (ECtempvar tint_U 12%positive (* party *))\n                    (@ECbuiltin0 _ _  _ builtin0_caller_impl))))\n                  (CCsequence\n                    (CCfor (* i := *) 18%positive 19%positive (ECconst_int256 tint_Z32 0 (Int256.repr 0)) (ECconst_int256 tint_Z32 1 (Int256.repr 1))\n                      (CClet (* isunlocked := *) 20%positive\n                        (CCload (LCindex tint_bool\n                          (LCvar SwapContract__unlocked_var)\n                          (ECtempvar tint_Z32 18%positive (* i *))))\n                        (CClet (* timeout := *) 21%positive\n                          (CCload (LCindex tint_U\n                            (LCvar SwapContract__timelocks_var)\n                            (ECtempvar tint_Z32 18%positive (* i *))))\n                          (CCifthenelse (ECbinop tint_bool Oand\n                              (ECbinop tint_bool Oeq\n                                (ECtempvar tint_bool 20%positive (* isunlocked *))\n                                (ECconst_int256 tint_bool false Int256.zero))\n                              (ECbinop tint_bool Oge\n                                (@ECbuiltin0 _ _  _ builtin0_timestamp_impl)\n                                (ECbinop tint_U Oadd\n                                  (ECtempvar tint_U 15%positive (* start *))\n                                  (ECtempvar tint_U 21%positive (* timeout *)))))\n                            (CCstore\n                              (LCvar SwapContract__canrefund_var)\n                              (ECconst_int256 tint_bool true Int256.one))\n                            (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))\n                    (CClet (* canrefund := *) 22%positive\n                      (CCload (LCvar SwapContract__canrefund_var))\n                      (CCsequence\n                        (CCassert (CCyield (ECtempvar tint_bool 22%positive (* canrefund *))))\n                        (CCsequence\n                          (CCcall EVMOpcode_transfer_prim\n                            (HCons int_U_pair _\n                              (ECtempvar tint_U 12%positive (* party *))\n                              (HCons int_U_pair _\n                                (ECtempvar tint_U 13%positive (* assetAmount *))\n                                HNil)))\n                          (CCsequence\n                            (CCstore\n                              (LCvar SwapContract__ended_var)\n                              (ECconst_int256 tint_bool true Int256.one))\n                            (CCyield (ECconst_int256 tvoid_unit tt Int256.zero))))))))))))))\n  |}.\n  Lemma SwapContract_refund_wf\n      : synth_func_wellformed SwapContract_refund.\n  Proof. solve_wellformed. Defined.\n  Definition SwapContract_refund_opt : machine_env -> DS unit  := \n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in synth_func_spec_opt SwapContract_refund SwapContract_refund_wf.\n  Definition SwapContract_refund_spec_hlist_opt args :=\n    @apply_param_func SwapContract_refund.(FC_params) _\n                      (SwapContract_refund_opt) args.\n  Definition SwapContract_refund_spec_cond :=\n   (*Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             omap2 oand2 oimply2 oabsorption2 hlist_param_func (* SpecTree.get SpecTree.get_eq SpecTree.set *)\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n  in *)\n  synth_func_spec_cond SwapContract_refund SwapContract_refund_wf.\n\n  Definition SwapContract_refund_prim := {|\n    PRIMident := ident_SwapContract_refund;\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := false;\n    PRIMpure := false;\n    PRIMargt_marker := SwapContract_refund.(FC_params);\n    PRIMret_marker := SwapContract_refund.(FC_returns);\n    PRIMcond := SwapContract_refund_spec_cond;\n    (* PRIMsem := SwapContract_refund_spec_hlist; *)\n    PRIMsem_opt := SwapContract_refund_spec_hlist_opt\n  |}.\n\n  Lemma SwapContract_refund_spec_hlist_opt_eq :\n    SwapContract_refund_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt SwapContract_refund SwapContract_refund_wf)\n      args.\n  Proof.\n    (*cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]. *)\n     reflexivity. \n  Qed.\n  Definition SwapContract_refund_cfun :=\n  Eval cbv in synth_func_func SwapContract_refund.\n\n  Definition SwapContract_refund_cond  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_cond SwapContract_refund SwapContract_refund_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma SwapContract_refund_cond_eq : forall  me d, \n    SwapContract_refund_cond  me d ->\n    high_level_invariant d ->\n    synth_func_cond SwapContract_refund SwapContract_refund_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition SwapContract_refund_obligation  me d  :=\n  Eval cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events]\n    in\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_refund SwapContract_refund_wf\n\t\t\t\t\t\t\t\t      me d.\n  \n  Lemma SwapContract_refund_obligation_eq : forall  me d, \n    SwapContract_refund_obligation  me d ->\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_refund SwapContract_refund_wf  me d.\n    Proof.\n      intros  me d H_cond.\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n             ret bind mzero get put gets guard modify runStateT evalStateT execStateT\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n             _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n       exact H_cond.\n    Qed.\n\n  Definition SwapContract_refund_spec :=\n  Eval cbv [sf_mem sf_return fst snd SwapContract_refund_opt] in\n    fun  me => execStateT (SwapContract_refund_opt me).\n  Lemma SwapContract_refund_spec_eq :\n    SwapContract_refund_spec =\n    fun  me => execStateT (synth_func_spec_opt SwapContract_refund SwapContract_refund_wf me).\n  Proof.\n    cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length HyperType.Hquery0 hashvalue_eqb\n          ret bind mzero get put gets guard modify\n          GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set\n          (fun src e_set => (Int256Map.get src e_set)) (fun pt ld => Int256.one)\n          _assetAmount update__assetAmount _timelocks update__timelocks _hashlocks update__hashlocks _party update__party _counterparty update__counterparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _canrefund update__canrefund _leaders update__leaders _parties update__parties _edges update__edges _edges_reverse update__edges_reverse _party_addr_to_ind update__party_addr_to_ind _leader_addr_to_ind update__leader_addr_to_ind _party update__party _counterparty update__counterparty _hashkeyinit update__hashkeyinit _innerpathinit update__innerpathinit _allpaths update__allpaths _res_is_leader update__res_is_leader _res_is_party update__res_is_party _res_is_edge update__res_is_edge _res_has_signed update__res_has_signed _res_can_sign update__res_can_sign _res_path_len update__res_path_len _events update__events].\n    reflexivity.\n  Qed.\n\nGlobal Opaque SwapContract_refund_opt.\nEnd OBJECT_SwapContract_DEFINITION.\n(* (*Temporarily omitted in the Ethereum version.*)\n\nSection LAYER_SWAPCONTRACT_DEFINITION.\n  Definition SWAPCONTRACT_swapcontract_initialize_prim := SwapContract_initialize_prim.\n  Definition SWAPCONTRACT_swapcontract_unlock_prim := SwapContract_unlock_prim.\n  Definition SWAPCONTRACT_swapcontract_claim_prim := SwapContract_claim_prim.\n  Definition SWAPCONTRACT_swapcontract_refund_prim := SwapContract_refund_prim.\n\n  Class SWAPCONTRACT_preserves_invariants := {\n    SWAPCONTRACT_SwapContract_initialize_preserves_invariants :>\n      CompatGenSem.PreservesInvariants SwapContract_initialize_spec;\n    SWAPCONTRACT_SwapContract_unlock_preserves_invariants :>\n      CompatGenSem.PreservesInvariants SwapContract_unlock_spec;\n    SWAPCONTRACT_SwapContract_claim_preserves_invariants :>\n      CompatGenSem.PreservesInvariants SwapContract_claim_spec;\n    SWAPCONTRACT_SwapContract_refund_preserves_invariants :>\n      CompatGenSem.PreservesInvariants SwapContract_refund_spec\n  }.\n  Context`{SWAPCONTRACT_pres_inv : !SWAPCONTRACT_preserves_invariants}.\n\n  Definition SWAPCONTRACT_Layer : CompatLayerDef.compatlayer GetHighDataX :=\n    initialize ↦ CompatGenSem.gensem SwapContract_initialize_spec\n      ⊕ unlock ↦ CompatGenSem.gensem SwapContract_unlock_spec\n      ⊕ claim ↦ CompatGenSem.gensem SwapContract_claim_spec\n      ⊕ refund ↦ CompatGenSem.gensem SwapContract_refund_spec.\nEnd LAYER_SWAPCONTRACT_DEFINITION.\n*)\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/ObjSimDiGraph.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.ObjSimDiGraph for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\nRequire Import layerlib.RefinementTactic.\nRequire Import layerlib.RefinementTacticAux.\n\nRequire Import swaps_general.LayerEVMOPCODE.\n\nSection EdsgerGen.\n\n\nContext {Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{HM : HyperMem (LayerSpec := GlobalLayerSpec)}.\n\n  Context {DiGraph__leaders_var_pt_prf : variable_passthrough_prf DiGraph__leaders_var}.\n  Context {DiGraph__parties_var_pt_prf : variable_passthrough_prf DiGraph__parties_var}.\n  Context {DiGraph__edges_var_pt_prf : variable_passthrough_prf DiGraph__edges_var}.\n  Context {DiGraph__edges_reverse_var_pt_prf : variable_passthrough_prf DiGraph__edges_reverse_var}.\n  Context {DiGraph__party_addr_to_ind_var_pt_prf : variable_passthrough_prf DiGraph__party_addr_to_ind_var}.\n  Context {DiGraph__leader_addr_to_ind_var_pt_prf : variable_passthrough_prf DiGraph__leader_addr_to_ind_var}.\n  Context {DiGraph__party_var_pt_prf : variable_passthrough_prf DiGraph__party_var}.\n  Context {DiGraph__counterparty_var_pt_prf : variable_passthrough_prf DiGraph__counterparty_var}.\n  Context {DiGraph__hashkeyinit_var_pt_prf : variable_passthrough_prf DiGraph__hashkeyinit_var}.\n  Context {DiGraph__innerpathinit_var_pt_prf : variable_passthrough_prf DiGraph__innerpathinit_var}.\n  Context {DiGraph__allpaths_var_pt_prf : variable_passthrough_prf DiGraph__allpaths_var}.\n  Context {DiGraph__res_is_leader_var_pt_prf : variable_passthrough_prf DiGraph__res_is_leader_var}.\n  Context {DiGraph__res_is_party_var_pt_prf : variable_passthrough_prf DiGraph__res_is_party_var}.\n  Context {DiGraph__res_is_edge_var_pt_prf : variable_passthrough_prf DiGraph__res_is_edge_var}.\n  Context {DiGraph__res_has_signed_var_pt_prf : variable_passthrough_prf DiGraph__res_has_signed_var}.\n  Context {DiGraph__res_can_sign_var_pt_prf : variable_passthrough_prf DiGraph__res_can_sign_var}.\n  Context {DiGraph__res_path_len_var_pt_prf : variable_passthrough_prf DiGraph__res_path_len_var}.\n\n  Lemma DiGraph_initialize_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_initialize.\n  Proof. solve_passthrough_prf @DiGraph_initialize. Qed.\n  Lemma DiGraph_initialize_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_initialize DiGraph_initialize_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_initialize_prim_passthrough\n      : primitive_passthrough_prf DiGraph_initialize_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_initialize_prim.\n      rewrite DiGraph_initialize_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_initialize_passthrough_prf\n              DiGraph_initialize_wf\n              DiGraph_initialize_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_initialize_prim.\n      rewrite DiGraph_initialize_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_initialize_passthrough_prf\n              DiGraph_initialize_wf\n              DiGraph_initialize_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_initialize_prim.\n      rewrite DiGraph_initialize_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_initialize_passthrough_prf\n              DiGraph_initialize_wf\n              DiGraph_initialize_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_initialize_prim.\n      rewrite DiGraph_initialize_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_initialize_passthrough_prf\n              DiGraph_initialize_wf\n              DiGraph_initialize_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_initialize_exists :\n    forall j a0 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      DiGraph_initialize_spec a0 d1 = Some d1' ->\n      exists d2',\n        DiGraph_initialize_spec a0 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * DiGraph_initialize_spec_eq.\n    exact (synth_func_relate_1_void\n            DiGraph_initialize_passthrough_prf\n            DiGraph_initialize_wf\n            DiGraph_initialize_passthrough_cond\n            j (fun _ _ x => x)).\n  Qed.\n\n  Lemma DiGraph_initialize_match :\n    forall j d d' m a0,\n      match_AbData d m j ->\n      DiGraph_initialize_spec a0 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * DiGraph_initialize_spec_eq.\n    exact (synth_func_match_1_void\n            DiGraph_initialize_passthrough_prf\n            DiGraph_initialize_wf\n            DiGraph_initialize_passthrough_cond).\n  Qed.\n\n  Section initialize.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) DiGraph_initialize_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_initialize_spec}.\n\n    Lemma DiGraph_initialize_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_initialize_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_initialize_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit DiGraph_initialize_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply DiGraph_initialize_match; eauto.\n    Qed.\n  End initialize.\n\n  Lemma DiGraph_is_leader_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_is_leader.\n  Proof. solve_passthrough_prf @DiGraph_is_leader. Qed.\n  Lemma DiGraph_is_leader_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_is_leader DiGraph_is_leader_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_is_leader_prim_passthrough\n      : primitive_passthrough_prf DiGraph_is_leader_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_is_leader_prim.\n      rewrite DiGraph_is_leader_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_is_leader_passthrough_prf\n              DiGraph_is_leader_wf\n              DiGraph_is_leader_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_is_leader_prim.\n      rewrite DiGraph_is_leader_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_is_leader_passthrough_prf\n              DiGraph_is_leader_wf\n              DiGraph_is_leader_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_is_leader_prim.\n      rewrite DiGraph_is_leader_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_is_leader_passthrough_prf\n              DiGraph_is_leader_wf\n              DiGraph_is_leader_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_is_leader_prim.\n      rewrite DiGraph_is_leader_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_is_leader_passthrough_prf\n              DiGraph_is_leader_wf\n              DiGraph_is_leader_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_is_leader_exists :\n    forall j a0 d1 d2 d1' r,\n      relate_AbData j d1 d2 ->\n      DiGraph_is_leader_spec a0 d1 = Some (r, d1') ->\n      exists d2',\n        DiGraph_is_leader_spec a0 d2 = Some (r, d2') /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * DiGraph_is_leader_spec_eq.\n    exact (synth_func_relate_1\n            DiGraph_is_leader_passthrough_prf\n            DiGraph_is_leader_wf\n            DiGraph_is_leader_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma DiGraph_is_leader_match :\n    forall j d d' m a0 r,\n      match_AbData d m j ->\n      DiGraph_is_leader_spec a0 d = Some (r, d') ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * DiGraph_is_leader_spec_eq.\n    exact (synth_func_match_1\n            DiGraph_is_leader_passthrough_prf\n            DiGraph_is_leader_wf\n            DiGraph_is_leader_passthrough_cond).\n  Qed.\n\n  Section is_leader.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) DiGraph_is_leader_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_is_leader_spec}.\n\n    Lemma DiGraph_is_leader_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_is_leader_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_is_leader_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit DiGraph_is_leader_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply DiGraph_is_leader_match; eauto.\n    Qed.\n  End is_leader.\n\n  Lemma DiGraph_is_party_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_is_party.\n  Proof. solve_passthrough_prf @DiGraph_is_party. Qed.\n  Lemma DiGraph_is_party_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_is_party DiGraph_is_party_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_is_party_prim_passthrough\n      : primitive_passthrough_prf DiGraph_is_party_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_is_party_prim.\n      rewrite DiGraph_is_party_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_is_party_passthrough_prf\n              DiGraph_is_party_wf\n              DiGraph_is_party_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_is_party_prim.\n      rewrite DiGraph_is_party_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_is_party_passthrough_prf\n              DiGraph_is_party_wf\n              DiGraph_is_party_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_is_party_prim.\n      rewrite DiGraph_is_party_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_is_party_passthrough_prf\n              DiGraph_is_party_wf\n              DiGraph_is_party_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_is_party_prim.\n      rewrite DiGraph_is_party_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_is_party_passthrough_prf\n              DiGraph_is_party_wf\n              DiGraph_is_party_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_is_party_exists :\n    forall j a0 d1 d2 d1' r,\n      relate_AbData j d1 d2 ->\n      DiGraph_is_party_spec a0 d1 = Some (r, d1') ->\n      exists d2',\n        DiGraph_is_party_spec a0 d2 = Some (r, d2') /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * DiGraph_is_party_spec_eq.\n    exact (synth_func_relate_1\n            DiGraph_is_party_passthrough_prf\n            DiGraph_is_party_wf\n            DiGraph_is_party_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma DiGraph_is_party_match :\n    forall j d d' m a0 r,\n      match_AbData d m j ->\n      DiGraph_is_party_spec a0 d = Some (r, d') ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * DiGraph_is_party_spec_eq.\n    exact (synth_func_match_1\n            DiGraph_is_party_passthrough_prf\n            DiGraph_is_party_wf\n            DiGraph_is_party_passthrough_cond).\n  Qed.\n\n  Section is_party.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) DiGraph_is_party_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_is_party_spec}.\n\n    Lemma DiGraph_is_party_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_is_party_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_is_party_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit DiGraph_is_party_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply DiGraph_is_party_match; eauto.\n    Qed.\n  End is_party.\n\n  Lemma DiGraph_is_edge_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_is_edge.\n  Proof. solve_passthrough_prf @DiGraph_is_edge. Qed.\n  Lemma DiGraph_is_edge_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_is_edge DiGraph_is_edge_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_is_edge_prim_passthrough\n      : primitive_passthrough_prf DiGraph_is_edge_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_is_edge_prim.\n      rewrite DiGraph_is_edge_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_is_edge_passthrough_prf\n              DiGraph_is_edge_wf\n              DiGraph_is_edge_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_is_edge_prim.\n      rewrite DiGraph_is_edge_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_is_edge_passthrough_prf\n              DiGraph_is_edge_wf\n              DiGraph_is_edge_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_is_edge_prim.\n      rewrite DiGraph_is_edge_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_is_edge_passthrough_prf\n              DiGraph_is_edge_wf\n              DiGraph_is_edge_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_is_edge_prim.\n      rewrite DiGraph_is_edge_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_is_edge_passthrough_prf\n              DiGraph_is_edge_wf\n              DiGraph_is_edge_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_is_edge_exists :\n    forall j a0 a1 d1 d2 d1' r,\n      relate_AbData j d1 d2 ->\n      DiGraph_is_edge_spec a0 a1 d1 = Some (r, d1') ->\n      exists d2',\n        DiGraph_is_edge_spec a0 a1 d2 = Some (r, d2') /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * DiGraph_is_edge_spec_eq.\n    exact (synth_func_relate_2\n            DiGraph_is_edge_passthrough_prf\n            DiGraph_is_edge_wf\n            DiGraph_is_edge_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma DiGraph_is_edge_match :\n    forall j d d' m a0 a1 r,\n      match_AbData d m j ->\n      DiGraph_is_edge_spec a0 a1 d = Some (r, d') ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * DiGraph_is_edge_spec_eq.\n    exact (synth_func_match_2\n            DiGraph_is_edge_passthrough_prf\n            DiGraph_is_edge_wf\n            DiGraph_is_edge_passthrough_cond).\n  Qed.\n\n  Section is_edge.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) DiGraph_is_edge_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_is_edge_spec}.\n\n    Lemma DiGraph_is_edge_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_is_edge_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_is_edge_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit DiGraph_is_edge_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply DiGraph_is_edge_match; eauto.\n    Qed.\n  End is_edge.\n\n  Lemma DiGraph_get_leader_ind_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_get_leader_ind.\n  Proof. solve_passthrough_prf @DiGraph_get_leader_ind. Qed.\n  Lemma DiGraph_get_leader_ind_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_get_leader_ind DiGraph_get_leader_ind_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_get_leader_ind_prim_passthrough\n      : primitive_passthrough_prf DiGraph_get_leader_ind_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_get_leader_ind_prim.\n      rewrite DiGraph_get_leader_ind_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_get_leader_ind_passthrough_prf\n              DiGraph_get_leader_ind_wf\n              DiGraph_get_leader_ind_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_get_leader_ind_prim.\n      rewrite DiGraph_get_leader_ind_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_get_leader_ind_passthrough_prf\n              DiGraph_get_leader_ind_wf\n              DiGraph_get_leader_ind_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_get_leader_ind_prim.\n      rewrite DiGraph_get_leader_ind_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_get_leader_ind_passthrough_prf\n              DiGraph_get_leader_ind_wf\n              DiGraph_get_leader_ind_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_get_leader_ind_prim.\n      rewrite DiGraph_get_leader_ind_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_get_leader_ind_passthrough_prf\n              DiGraph_get_leader_ind_wf\n              DiGraph_get_leader_ind_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_get_leader_ind_exists :\n    forall j a0 d1 d2 r,\n      relate_AbData j d1 d2 ->\n      DiGraph_get_leader_ind_spec a0 d1 = Some r ->\n      DiGraph_get_leader_ind_spec a0 d2 = Some r.\n  Proof.\n    intro j.\n    rewrite * DiGraph_get_leader_ind_spec_eq.\n    exact (synth_func_relate_1_pure\n            DiGraph_get_leader_ind_passthrough_prf\n            DiGraph_get_leader_ind_wf\n            DiGraph_get_leader_ind_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Section get_leader_ind.\n    Lemma DiGraph_get_leader_ind_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_get_leader_ind_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_get_leader_ind_spec).\n    Proof.\n      (* pure method *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      inv_semof H0.\n      inversion H0; subst; simpl in H0;\n      match_external_states_csem; auto;\n      erewrite DiGraph_get_leader_ind_exists; eauto; reflexivity.\n    Qed.\n  End get_leader_ind.\n\n  Lemma DiGraph_get_party_ind_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_get_party_ind.\n  Proof. solve_passthrough_prf @DiGraph_get_party_ind. Qed.\n  Lemma DiGraph_get_party_ind_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_get_party_ind DiGraph_get_party_ind_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_get_party_ind_prim_passthrough\n      : primitive_passthrough_prf DiGraph_get_party_ind_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_get_party_ind_prim.\n      rewrite DiGraph_get_party_ind_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_get_party_ind_passthrough_prf\n              DiGraph_get_party_ind_wf\n              DiGraph_get_party_ind_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_get_party_ind_prim.\n      rewrite DiGraph_get_party_ind_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_get_party_ind_passthrough_prf\n              DiGraph_get_party_ind_wf\n              DiGraph_get_party_ind_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_get_party_ind_prim.\n      rewrite DiGraph_get_party_ind_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_get_party_ind_passthrough_prf\n              DiGraph_get_party_ind_wf\n              DiGraph_get_party_ind_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_get_party_ind_prim.\n      rewrite DiGraph_get_party_ind_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_get_party_ind_passthrough_prf\n              DiGraph_get_party_ind_wf\n              DiGraph_get_party_ind_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_get_party_ind_exists :\n    forall j a0 d1 d2 r,\n      relate_AbData j d1 d2 ->\n      DiGraph_get_party_ind_spec a0 d1 = Some r ->\n      DiGraph_get_party_ind_spec a0 d2 = Some r.\n  Proof.\n    intro j.\n    rewrite * DiGraph_get_party_ind_spec_eq.\n    exact (synth_func_relate_1_pure\n            DiGraph_get_party_ind_passthrough_prf\n            DiGraph_get_party_ind_wf\n            DiGraph_get_party_ind_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Section get_party_ind.\n    Lemma DiGraph_get_party_ind_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_get_party_ind_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_get_party_ind_spec).\n    Proof.\n      (* pure method *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      inv_semof H0.\n      inversion H0; subst; simpl in H0;\n      match_external_states_csem; auto;\n      erewrite DiGraph_get_party_ind_exists; eauto; reflexivity.\n    Qed.\n  End get_party_ind.\n\n  Lemma DiGraph_valid_path_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_valid_path.\n  Proof. solve_passthrough_prf @DiGraph_valid_path. Qed.\n  Lemma DiGraph_valid_path_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_valid_path DiGraph_valid_path_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_valid_path_prim_passthrough\n      : primitive_passthrough_prf DiGraph_valid_path_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_valid_path_prim.\n      rewrite DiGraph_valid_path_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_valid_path_passthrough_prf\n              DiGraph_valid_path_wf\n              DiGraph_valid_path_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_valid_path_prim.\n      rewrite DiGraph_valid_path_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_valid_path_passthrough_prf\n              DiGraph_valid_path_wf\n              DiGraph_valid_path_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_valid_path_prim.\n      rewrite DiGraph_valid_path_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_valid_path_passthrough_prf\n              DiGraph_valid_path_wf\n              DiGraph_valid_path_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_valid_path_prim.\n      rewrite DiGraph_valid_path_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_valid_path_passthrough_prf\n              DiGraph_valid_path_wf\n              DiGraph_valid_path_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_valid_path_exists :\n    forall j a0 a1 a2 d1 d2 r,\n      relate_AbData j d1 d2 ->\n      DiGraph_valid_path_spec a0 a1 a2 d1 = Some r ->\n      DiGraph_valid_path_spec a0 a1 a2 d2 = Some r.\n  Proof.\n    intro j.\n    rewrite * DiGraph_valid_path_spec_eq.\n    exact (synth_func_relate_3_pure\n            DiGraph_valid_path_passthrough_prf\n            DiGraph_valid_path_wf\n            DiGraph_valid_path_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Section valid_path.\n    Lemma DiGraph_valid_path_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_valid_path_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_valid_path_spec).\n    Proof.\n      (* pure method *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      inv_semof H0.\n      inversion H0; subst; simpl in H0;\n      match_external_states_csem; auto;\n      erewrite DiGraph_valid_path_exists; eauto; reflexivity.\n    Qed.\n  End valid_path.\n\n  Lemma DiGraph_sign_follower_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_sign_follower.\n  Proof. solve_passthrough_prf @DiGraph_sign_follower. Qed.\n  Lemma DiGraph_sign_follower_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_sign_follower DiGraph_sign_follower_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_sign_follower_prim_passthrough\n      : primitive_passthrough_prf DiGraph_sign_follower_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_sign_follower_prim.\n      rewrite DiGraph_sign_follower_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_sign_follower_passthrough_prf\n              DiGraph_sign_follower_wf\n              DiGraph_sign_follower_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_sign_follower_prim.\n      rewrite DiGraph_sign_follower_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_sign_follower_passthrough_prf\n              DiGraph_sign_follower_wf\n              DiGraph_sign_follower_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_sign_follower_prim.\n      rewrite DiGraph_sign_follower_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_sign_follower_passthrough_prf\n              DiGraph_sign_follower_wf\n              DiGraph_sign_follower_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_sign_follower_prim.\n      rewrite DiGraph_sign_follower_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_sign_follower_passthrough_prf\n              DiGraph_sign_follower_wf\n              DiGraph_sign_follower_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_sign_follower_exists :\n    forall j a0 a1 a2 a3 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      DiGraph_sign_follower_spec a0 a1 a2 a3 d1 = Some d1' ->\n      exists d2',\n        DiGraph_sign_follower_spec a0 a1 a2 a3 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * DiGraph_sign_follower_spec_eq.\n    exact (synth_func_relate_4_void\n            DiGraph_sign_follower_passthrough_prf\n            DiGraph_sign_follower_wf\n            DiGraph_sign_follower_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma DiGraph_sign_follower_match :\n    forall j d d' m a0 a1 a2 a3,\n      match_AbData d m j ->\n      DiGraph_sign_follower_spec a0 a1 a2 a3 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * DiGraph_sign_follower_spec_eq.\n    exact (synth_func_match_4_void\n            DiGraph_sign_follower_passthrough_prf\n            DiGraph_sign_follower_wf\n            DiGraph_sign_follower_passthrough_cond).\n  Qed.\n\n  Section sign_follower.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) DiGraph_sign_follower_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_sign_follower_spec}.\n\n    Lemma DiGraph_sign_follower_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_sign_follower_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_sign_follower_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit DiGraph_sign_follower_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply DiGraph_sign_follower_match; eauto.\n    Qed.\n  End sign_follower.\n\n  Lemma DiGraph_sign_leader_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_sign_leader.\n  Proof. solve_passthrough_prf @DiGraph_sign_leader. Qed.\n  Lemma DiGraph_sign_leader_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_sign_leader DiGraph_sign_leader_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_sign_leader_prim_passthrough\n      : primitive_passthrough_prf DiGraph_sign_leader_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_sign_leader_prim.\n      rewrite DiGraph_sign_leader_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_sign_leader_passthrough_prf\n              DiGraph_sign_leader_wf\n              DiGraph_sign_leader_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_sign_leader_prim.\n      rewrite DiGraph_sign_leader_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_sign_leader_passthrough_prf\n              DiGraph_sign_leader_wf\n              DiGraph_sign_leader_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_sign_leader_prim.\n      rewrite DiGraph_sign_leader_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_sign_leader_passthrough_prf\n              DiGraph_sign_leader_wf\n              DiGraph_sign_leader_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_sign_leader_prim.\n      rewrite DiGraph_sign_leader_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_sign_leader_passthrough_prf\n              DiGraph_sign_leader_wf\n              DiGraph_sign_leader_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_sign_leader_exists :\n    forall j a0 a1 a2 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      DiGraph_sign_leader_spec a0 a1 a2 d1 = Some d1' ->\n      exists d2',\n        DiGraph_sign_leader_spec a0 a1 a2 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * DiGraph_sign_leader_spec_eq.\n    exact (synth_func_relate_3_void\n            DiGraph_sign_leader_passthrough_prf\n            DiGraph_sign_leader_wf\n            DiGraph_sign_leader_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma DiGraph_sign_leader_match :\n    forall j d d' m a0 a1 a2,\n      match_AbData d m j ->\n      DiGraph_sign_leader_spec a0 a1 a2 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * DiGraph_sign_leader_spec_eq.\n    exact (synth_func_match_3_void\n            DiGraph_sign_leader_passthrough_prf\n            DiGraph_sign_leader_wf\n            DiGraph_sign_leader_passthrough_cond).\n  Qed.\n\n  Section sign_leader.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) DiGraph_sign_leader_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_sign_leader_spec}.\n\n    Lemma DiGraph_sign_leader_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_sign_leader_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_sign_leader_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit DiGraph_sign_leader_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply DiGraph_sign_leader_match; eauto.\n    Qed.\n  End sign_leader.\n\n  Lemma DiGraph_can_sign_follower_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_can_sign_follower.\n  Proof. solve_passthrough_prf @DiGraph_can_sign_follower. Qed.\n  Lemma DiGraph_can_sign_follower_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_can_sign_follower DiGraph_can_sign_follower_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_can_sign_follower_prim_passthrough\n      : primitive_passthrough_prf DiGraph_can_sign_follower_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_can_sign_follower_prim.\n      rewrite DiGraph_can_sign_follower_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_can_sign_follower_passthrough_prf\n              DiGraph_can_sign_follower_wf\n              DiGraph_can_sign_follower_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_can_sign_follower_prim.\n      rewrite DiGraph_can_sign_follower_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_can_sign_follower_passthrough_prf\n              DiGraph_can_sign_follower_wf\n              DiGraph_can_sign_follower_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_can_sign_follower_prim.\n      rewrite DiGraph_can_sign_follower_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_can_sign_follower_passthrough_prf\n              DiGraph_can_sign_follower_wf\n              DiGraph_can_sign_follower_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_can_sign_follower_prim.\n      rewrite DiGraph_can_sign_follower_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_can_sign_follower_passthrough_prf\n              DiGraph_can_sign_follower_wf\n              DiGraph_can_sign_follower_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_can_sign_follower_exists :\n    forall j a0 a1 a2 d1 d2 d1' r,\n      relate_AbData j d1 d2 ->\n      DiGraph_can_sign_follower_spec a0 a1 a2 d1 = Some (r, d1') ->\n      exists d2',\n        DiGraph_can_sign_follower_spec a0 a1 a2 d2 = Some (r, d2') /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * DiGraph_can_sign_follower_spec_eq.\n    exact (synth_func_relate_3\n            DiGraph_can_sign_follower_passthrough_prf\n            DiGraph_can_sign_follower_wf\n            DiGraph_can_sign_follower_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma DiGraph_can_sign_follower_match :\n    forall j d d' m a0 a1 a2 r,\n      match_AbData d m j ->\n      DiGraph_can_sign_follower_spec a0 a1 a2 d = Some (r, d') ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * DiGraph_can_sign_follower_spec_eq.\n    exact (synth_func_match_3\n            DiGraph_can_sign_follower_passthrough_prf\n            DiGraph_can_sign_follower_wf\n            DiGraph_can_sign_follower_passthrough_cond).\n  Qed.\n\n  Section can_sign_follower.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) DiGraph_can_sign_follower_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_can_sign_follower_spec}.\n\n    Lemma DiGraph_can_sign_follower_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_can_sign_follower_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_can_sign_follower_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit DiGraph_can_sign_follower_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply DiGraph_can_sign_follower_match; eauto.\n    Qed.\n  End can_sign_follower.\n\n  Lemma DiGraph_get_path_len_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_get_path_len.\n  Proof. solve_passthrough_prf @DiGraph_get_path_len. Qed.\n  Lemma DiGraph_get_path_len_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_get_path_len DiGraph_get_path_len_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_get_path_len_prim_passthrough\n      : primitive_passthrough_prf DiGraph_get_path_len_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_get_path_len_prim.\n      rewrite DiGraph_get_path_len_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_get_path_len_passthrough_prf\n              DiGraph_get_path_len_wf\n              DiGraph_get_path_len_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_get_path_len_prim.\n      rewrite DiGraph_get_path_len_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_get_path_len_passthrough_prf\n              DiGraph_get_path_len_wf\n              DiGraph_get_path_len_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_get_path_len_prim.\n      rewrite DiGraph_get_path_len_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_get_path_len_passthrough_prf\n              DiGraph_get_path_len_wf\n              DiGraph_get_path_len_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_get_path_len_prim.\n      rewrite DiGraph_get_path_len_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_get_path_len_passthrough_prf\n              DiGraph_get_path_len_wf\n              DiGraph_get_path_len_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_get_path_len_exists :\n    forall j a0 a1 a2 d1 d2 d1' r,\n      relate_AbData j d1 d2 ->\n      DiGraph_get_path_len_spec a0 a1 a2 d1 = Some (r, d1') ->\n      exists d2',\n        DiGraph_get_path_len_spec a0 a1 a2 d2 = Some (r, d2') /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * DiGraph_get_path_len_spec_eq.\n    exact (synth_func_relate_3\n            DiGraph_get_path_len_passthrough_prf\n            DiGraph_get_path_len_wf\n            DiGraph_get_path_len_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma DiGraph_get_path_len_match :\n    forall j d d' m a0 a1 a2 r,\n      match_AbData d m j ->\n      DiGraph_get_path_len_spec a0 a1 a2 d = Some (r, d') ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * DiGraph_get_path_len_spec_eq.\n    exact (synth_func_match_3\n            DiGraph_get_path_len_passthrough_prf\n            DiGraph_get_path_len_wf\n            DiGraph_get_path_len_passthrough_cond).\n  Qed.\n\n  Section get_path_len.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) DiGraph_get_path_len_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_get_path_len_spec}.\n\n    Lemma DiGraph_get_path_len_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_get_path_len_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_get_path_len_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit DiGraph_get_path_len_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply DiGraph_get_path_len_match; eauto.\n    Qed.\n  End get_path_len.\n\n  Lemma DiGraph_diam_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_diam.\n  Proof. solve_passthrough_prf @DiGraph_diam. Qed.\n  Lemma DiGraph_diam_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_diam DiGraph_diam_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_diam_prim_passthrough\n      : primitive_passthrough_prf DiGraph_diam_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_diam_prim.\n      rewrite DiGraph_diam_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_diam_passthrough_prf\n              DiGraph_diam_wf\n              DiGraph_diam_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_diam_prim.\n      rewrite DiGraph_diam_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_diam_passthrough_prf\n              DiGraph_diam_wf\n              DiGraph_diam_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_diam_prim.\n      rewrite DiGraph_diam_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_diam_passthrough_prf\n              DiGraph_diam_wf\n              DiGraph_diam_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_diam_prim.\n      rewrite DiGraph_diam_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_diam_passthrough_prf\n              DiGraph_diam_wf\n              DiGraph_diam_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_diam_exists :\n    forall j d1 d2 r,\n      relate_AbData j d1 d2 ->\n      DiGraph_diam_spec d1 = Some r ->\n      DiGraph_diam_spec d2 = Some r.\n  Proof.\n    intro j.\n    rewrite * DiGraph_diam_spec_eq.\n    exact (synth_func_relate_0_pure\n            DiGraph_diam_passthrough_prf\n            DiGraph_diam_wf\n            DiGraph_diam_passthrough_cond\n            j (fun _ _ x => x)).\n  Qed.\n\n  Section diam.\n    Lemma DiGraph_diam_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_diam_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_diam_spec).\n    Proof.\n      (* pure method *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      inv_semof H0.\n      inversion H0; subst; simpl in H0;\n      match_external_states_csem; auto;\n      erewrite DiGraph_diam_exists; eauto; reflexivity.\n    Qed.\n  End diam.\n\n  Lemma DiGraph_maxpathlen_passthrough_prf :\n      function_constr_passthrough_prf DiGraph_maxpathlen.\n  Proof. solve_passthrough_prf @DiGraph_maxpathlen. Qed.\n  Lemma DiGraph_maxpathlen_passthrough_cond :\n      synth_func_passthrough_cond DiGraph_maxpathlen DiGraph_maxpathlen_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance DiGraph_maxpathlen_prim_passthrough\n      : primitive_passthrough_prf DiGraph_maxpathlen_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, DiGraph_maxpathlen_prim.\n      rewrite DiGraph_maxpathlen_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              DiGraph_maxpathlen_passthrough_prf\n              DiGraph_maxpathlen_wf\n              DiGraph_maxpathlen_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_maxpathlen_prim.\n      rewrite DiGraph_maxpathlen_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              DiGraph_maxpathlen_passthrough_prf\n              DiGraph_maxpathlen_wf\n              DiGraph_maxpathlen_passthrough_cond).\n    (*\n    - unfold PRIMsem, DiGraph_maxpathlen_prim.\n      rewrite DiGraph_maxpathlen_spec_hlist_eq.\n      exact (synth_func_spec_match\n              DiGraph_maxpathlen_passthrough_prf\n              DiGraph_maxpathlen_wf\n              DiGraph_maxpathlen_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, DiGraph_maxpathlen_prim.\n      rewrite DiGraph_maxpathlen_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              DiGraph_maxpathlen_passthrough_prf\n              DiGraph_maxpathlen_wf\n              DiGraph_maxpathlen_passthrough_cond).\n  Qed.\n\n  Lemma DiGraph_maxpathlen_exists :\n    forall j a0 a1 d1 d2 r,\n      relate_AbData j d1 d2 ->\n      DiGraph_maxpathlen_spec a0 a1 d1 = Some r ->\n      DiGraph_maxpathlen_spec a0 a1 d2 = Some r.\n  Proof.\n    intro j.\n    rewrite * DiGraph_maxpathlen_spec_eq.\n    exact (synth_func_relate_2_pure\n            DiGraph_maxpathlen_passthrough_prf\n            DiGraph_maxpathlen_wf\n            DiGraph_maxpathlen_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Section maxpathlen.\n    Lemma DiGraph_maxpathlen_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem DiGraph_maxpathlen_spec)\n            (id ↦ CompatGenSem.gensem DiGraph_maxpathlen_spec).\n    Proof.\n      (* pure method *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      inv_semof H0.\n      inversion H0; subst; simpl in H0;\n      match_external_states_csem; auto;\n      erewrite DiGraph_maxpathlen_exists; eauto; reflexivity.\n    Qed.\n  End maxpathlen.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/ObjSimEVMOpcode.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.ObjSimEVMOpcode for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\nRequire Import layerlib.RefinementTactic.\nRequire Import layerlib.RefinementTacticAux.\n\nRequire Import swaps_general.LayerEVMOPCODE.\n\nSection EdsgerGen.\n\n\nContext {Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{HM : HyperMem (LayerSpec := GlobalLayerSpec)}.\n\n  Context {EVMOpcode__events_var_pt_prf : variable_passthrough_prf EVMOpcode__events_var}.\n\n  Lemma EVMOpcode_transfer_passthrough_prf :\n      function_constr_passthrough_prf EVMOpcode_transfer.\n  Proof. solve_passthrough_prf @EVMOpcode_transfer. Qed.\n  Lemma EVMOpcode_transfer_passthrough_cond :\n      synth_func_passthrough_cond EVMOpcode_transfer EVMOpcode_transfer_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance EVMOpcode_transfer_prim_passthrough\n      : primitive_passthrough_prf EVMOpcode_transfer_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, EVMOpcode_transfer_prim.\n      rewrite EVMOpcode_transfer_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              EVMOpcode_transfer_passthrough_prf\n              EVMOpcode_transfer_wf\n              EVMOpcode_transfer_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, EVMOpcode_transfer_prim.\n      rewrite EVMOpcode_transfer_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              EVMOpcode_transfer_passthrough_prf\n              EVMOpcode_transfer_wf\n              EVMOpcode_transfer_passthrough_cond).\n    (*\n    - unfold PRIMsem, EVMOpcode_transfer_prim.\n      rewrite EVMOpcode_transfer_spec_hlist_eq.\n      exact (synth_func_spec_match\n              EVMOpcode_transfer_passthrough_prf\n              EVMOpcode_transfer_wf\n              EVMOpcode_transfer_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, EVMOpcode_transfer_prim.\n      rewrite EVMOpcode_transfer_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              EVMOpcode_transfer_passthrough_prf\n              EVMOpcode_transfer_wf\n              EVMOpcode_transfer_passthrough_cond).\n  Qed.\n\n  Lemma EVMOpcode_transfer_exists :\n    forall j a0 a1 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      EVMOpcode_transfer_spec a0 a1 d1 = Some d1' ->\n      exists d2',\n        EVMOpcode_transfer_spec a0 a1 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * EVMOpcode_transfer_spec_eq.\n    exact (synth_func_relate_2_void\n            EVMOpcode_transfer_passthrough_prf\n            EVMOpcode_transfer_wf\n            EVMOpcode_transfer_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma EVMOpcode_transfer_match :\n    forall j d d' m a0 a1,\n      match_AbData d m j ->\n      EVMOpcode_transfer_spec a0 a1 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * EVMOpcode_transfer_spec_eq.\n    exact (synth_func_match_2_void\n            EVMOpcode_transfer_passthrough_prf\n            EVMOpcode_transfer_wf\n            EVMOpcode_transfer_passthrough_cond).\n  Qed.\n\n  Section transfer.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) EVMOpcode_transfer_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) EVMOpcode_transfer_spec}.\n\n    Lemma EVMOpcode_transfer_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem EVMOpcode_transfer_spec)\n            (id ↦ CompatGenSem.gensem EVMOpcode_transfer_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit EVMOpcode_transfer_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply EVMOpcode_transfer_match; eauto.\n    Qed.\n  End transfer.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/ObjSimSwapContract.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.ObjSimSwapContract for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\nRequire Import layerlib.RefinementTactic.\nRequire Import layerlib.RefinementTacticAux.\n\nRequire Import swaps_general.LayerSWAPCONTRACT.\nRequire Import swaps_general.LSimEVMOPCODE.\n\nSection EdsgerGen.\n\n\nContext {Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{HM : HyperMem (LayerSpec := GlobalLayerSpec)}.\n\n  Context {EVMOpcode__events_var_pt_prf : variable_passthrough_prf EVMOpcode__events_var}.\n  Context {DiGraph__leaders_var_pt_prf : variable_passthrough_prf DiGraph__leaders_var}.\n  Context {DiGraph__parties_var_pt_prf : variable_passthrough_prf DiGraph__parties_var}.\n  Context {DiGraph__edges_var_pt_prf : variable_passthrough_prf DiGraph__edges_var}.\n  Context {DiGraph__edges_reverse_var_pt_prf : variable_passthrough_prf DiGraph__edges_reverse_var}.\n  Context {DiGraph__party_addr_to_ind_var_pt_prf : variable_passthrough_prf DiGraph__party_addr_to_ind_var}.\n  Context {DiGraph__leader_addr_to_ind_var_pt_prf : variable_passthrough_prf DiGraph__leader_addr_to_ind_var}.\n  Context {DiGraph__party_var_pt_prf : variable_passthrough_prf DiGraph__party_var}.\n  Context {DiGraph__counterparty_var_pt_prf : variable_passthrough_prf DiGraph__counterparty_var}.\n  Context {DiGraph__hashkeyinit_var_pt_prf : variable_passthrough_prf DiGraph__hashkeyinit_var}.\n  Context {DiGraph__innerpathinit_var_pt_prf : variable_passthrough_prf DiGraph__innerpathinit_var}.\n  Context {DiGraph__allpaths_var_pt_prf : variable_passthrough_prf DiGraph__allpaths_var}.\n  Context {DiGraph__res_is_leader_var_pt_prf : variable_passthrough_prf DiGraph__res_is_leader_var}.\n  Context {DiGraph__res_is_party_var_pt_prf : variable_passthrough_prf DiGraph__res_is_party_var}.\n  Context {DiGraph__res_is_edge_var_pt_prf : variable_passthrough_prf DiGraph__res_is_edge_var}.\n  Context {DiGraph__res_has_signed_var_pt_prf : variable_passthrough_prf DiGraph__res_has_signed_var}.\n  Context {DiGraph__res_can_sign_var_pt_prf : variable_passthrough_prf DiGraph__res_can_sign_var}.\n  Context {DiGraph__res_path_len_var_pt_prf : variable_passthrough_prf DiGraph__res_path_len_var}.\n  Context {SwapContract__assetAmount_var_pt_prf : variable_passthrough_prf SwapContract__assetAmount_var}.\n  Context {SwapContract__timelocks_var_pt_prf : variable_passthrough_prf SwapContract__timelocks_var}.\n  Context {SwapContract__hashlocks_var_pt_prf : variable_passthrough_prf SwapContract__hashlocks_var}.\n  Context {SwapContract__party_var_pt_prf : variable_passthrough_prf SwapContract__party_var}.\n  Context {SwapContract__counterparty_var_pt_prf : variable_passthrough_prf SwapContract__counterparty_var}.\n  Context {SwapContract__start_var_pt_prf : variable_passthrough_prf SwapContract__start_var}.\n  Context {SwapContract__delta_var_pt_prf : variable_passthrough_prf SwapContract__delta_var}.\n  Context {SwapContract__unlocked_var_pt_prf : variable_passthrough_prf SwapContract__unlocked_var}.\n  Context {SwapContract__ended_var_pt_prf : variable_passthrough_prf SwapContract__ended_var}.\n  Context {SwapContract__canrefund_var_pt_prf : variable_passthrough_prf SwapContract__canrefund_var}.\n\n  Lemma SwapContract_initialize_passthrough_prf :\n      function_constr_passthrough_prf SwapContract_initialize.\n  Proof. solve_passthrough_prf @SwapContract_initialize. Qed.\n  Lemma SwapContract_initialize_passthrough_cond :\n      synth_func_passthrough_cond SwapContract_initialize SwapContract_initialize_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance SwapContract_initialize_prim_passthrough\n      : primitive_passthrough_prf SwapContract_initialize_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, SwapContract_initialize_prim.\n      rewrite SwapContract_initialize_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              SwapContract_initialize_passthrough_prf\n              SwapContract_initialize_wf\n              SwapContract_initialize_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, SwapContract_initialize_prim.\n      rewrite SwapContract_initialize_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              SwapContract_initialize_passthrough_prf\n              SwapContract_initialize_wf\n              SwapContract_initialize_passthrough_cond).\n    (*\n    - unfold PRIMsem, SwapContract_initialize_prim.\n      rewrite SwapContract_initialize_spec_hlist_eq.\n      exact (synth_func_spec_match\n              SwapContract_initialize_passthrough_prf\n              SwapContract_initialize_wf\n              SwapContract_initialize_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, SwapContract_initialize_prim.\n      rewrite SwapContract_initialize_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              SwapContract_initialize_passthrough_prf\n              SwapContract_initialize_wf\n              SwapContract_initialize_passthrough_cond).\n  Qed.\n\n  Lemma SwapContract_initialize_exists :\n    forall j a0 a1 a2 a3 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      SwapContract_initialize_spec a0 a1 a2 a3 d1 = Some d1' ->\n      exists d2',\n        SwapContract_initialize_spec a0 a1 a2 a3 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * SwapContract_initialize_spec_eq.\n    exact (synth_func_relate_4_void\n            SwapContract_initialize_passthrough_prf\n            SwapContract_initialize_wf\n            SwapContract_initialize_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma SwapContract_initialize_match :\n    forall j d d' m a0 a1 a2 a3,\n      match_AbData d m j ->\n      SwapContract_initialize_spec a0 a1 a2 a3 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * SwapContract_initialize_spec_eq.\n    exact (synth_func_match_4_void\n            SwapContract_initialize_passthrough_prf\n            SwapContract_initialize_wf\n            SwapContract_initialize_passthrough_cond).\n  Qed.\n\n  Section initialize.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) SwapContract_initialize_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) SwapContract_initialize_spec}.\n\n    Lemma SwapContract_initialize_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem SwapContract_initialize_spec)\n            (id ↦ CompatGenSem.gensem SwapContract_initialize_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit SwapContract_initialize_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply SwapContract_initialize_match; eauto.\n    Qed.\n  End initialize.\n\n  Lemma SwapContract_unlock_passthrough_prf :\n      function_constr_passthrough_prf SwapContract_unlock.\n  Proof. solve_passthrough_prf @SwapContract_unlock. Qed.\n  Lemma SwapContract_unlock_passthrough_cond :\n      synth_func_passthrough_cond SwapContract_unlock SwapContract_unlock_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance SwapContract_unlock_prim_passthrough\n      : primitive_passthrough_prf SwapContract_unlock_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, SwapContract_unlock_prim.\n      rewrite SwapContract_unlock_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              SwapContract_unlock_passthrough_prf\n              SwapContract_unlock_wf\n              SwapContract_unlock_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, SwapContract_unlock_prim.\n      rewrite SwapContract_unlock_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              SwapContract_unlock_passthrough_prf\n              SwapContract_unlock_wf\n              SwapContract_unlock_passthrough_cond).\n    (*\n    - unfold PRIMsem, SwapContract_unlock_prim.\n      rewrite SwapContract_unlock_spec_hlist_eq.\n      exact (synth_func_spec_match\n              SwapContract_unlock_passthrough_prf\n              SwapContract_unlock_wf\n              SwapContract_unlock_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, SwapContract_unlock_prim.\n      rewrite SwapContract_unlock_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              SwapContract_unlock_passthrough_prf\n              SwapContract_unlock_wf\n              SwapContract_unlock_passthrough_cond).\n  Qed.\n\n  Lemma SwapContract_unlock_exists :\n    forall j a0 a1 d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      SwapContract_unlock_spec a0 a1 d1 = Some d1' ->\n      exists d2',\n        SwapContract_unlock_spec a0 a1 d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * SwapContract_unlock_spec_eq.\n    exact (synth_func_relate_2_void\n            SwapContract_unlock_passthrough_prf\n            SwapContract_unlock_wf\n            SwapContract_unlock_passthrough_cond\n            j (fun _ _ x => x) (fun _ _ x => x)).\n  Qed.\n\n  Lemma SwapContract_unlock_match :\n    forall j d d' m a0 a1,\n      match_AbData d m j ->\n      SwapContract_unlock_spec a0 a1 d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * SwapContract_unlock_spec_eq.\n    exact (synth_func_match_2_void\n            SwapContract_unlock_passthrough_prf\n            SwapContract_unlock_wf\n            SwapContract_unlock_passthrough_cond).\n  Qed.\n\n  Section unlock.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) SwapContract_unlock_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) SwapContract_unlock_spec}.\n\n    Lemma SwapContract_unlock_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem SwapContract_unlock_spec)\n            (id ↦ CompatGenSem.gensem SwapContract_unlock_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit SwapContract_unlock_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply SwapContract_unlock_match; eauto.\n    Qed.\n  End unlock.\n\n  Lemma SwapContract_claim_passthrough_prf :\n      function_constr_passthrough_prf SwapContract_claim.\n  Proof. solve_passthrough_prf @SwapContract_claim. Qed.\n  Lemma SwapContract_claim_passthrough_cond :\n      synth_func_passthrough_cond SwapContract_claim SwapContract_claim_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance SwapContract_claim_prim_passthrough\n      : primitive_passthrough_prf SwapContract_claim_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, SwapContract_claim_prim.\n      rewrite SwapContract_claim_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              SwapContract_claim_passthrough_prf\n              SwapContract_claim_wf\n              SwapContract_claim_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, SwapContract_claim_prim.\n      rewrite SwapContract_claim_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              SwapContract_claim_passthrough_prf\n              SwapContract_claim_wf\n              SwapContract_claim_passthrough_cond).\n    (*\n    - unfold PRIMsem, SwapContract_claim_prim.\n      rewrite SwapContract_claim_spec_hlist_eq.\n      exact (synth_func_spec_match\n              SwapContract_claim_passthrough_prf\n              SwapContract_claim_wf\n              SwapContract_claim_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, SwapContract_claim_prim.\n      rewrite SwapContract_claim_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              SwapContract_claim_passthrough_prf\n              SwapContract_claim_wf\n              SwapContract_claim_passthrough_cond).\n  Qed.\n\n  Lemma SwapContract_claim_exists :\n    forall j d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      SwapContract_claim_spec d1 = Some d1' ->\n      exists d2',\n        SwapContract_claim_spec d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * SwapContract_claim_spec_eq.\n    exact (synth_func_relate_0_void\n            SwapContract_claim_passthrough_prf\n            SwapContract_claim_wf\n            SwapContract_claim_passthrough_cond\n            j).\n  Qed.\n\n  Lemma SwapContract_claim_match :\n    forall j d d' m,\n      match_AbData d m j ->\n      SwapContract_claim_spec d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * SwapContract_claim_spec_eq.\n    exact (synth_func_match_0_void\n            SwapContract_claim_passthrough_prf\n            SwapContract_claim_wf\n            SwapContract_claim_passthrough_cond).\n  Qed.\n\n  Section claim.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) SwapContract_claim_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) SwapContract_claim_spec}.\n\n    Lemma SwapContract_claim_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem SwapContract_claim_spec)\n            (id ↦ CompatGenSem.gensem SwapContract_claim_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit SwapContract_claim_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply SwapContract_claim_match; eauto.\n    Qed.\n  End claim.\n\n  Lemma SwapContract_refund_passthrough_prf :\n      function_constr_passthrough_prf SwapContract_refund.\n  Proof. solve_passthrough_prf @SwapContract_refund. Qed.\n  Lemma SwapContract_refund_passthrough_cond :\n      synth_func_passthrough_cond SwapContract_refund SwapContract_refund_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance SwapContract_refund_prim_passthrough\n      : primitive_passthrough_prf SwapContract_refund_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, SwapContract_refund_prim.\n      rewrite SwapContract_refund_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              SwapContract_refund_passthrough_prf\n              SwapContract_refund_wf\n              SwapContract_refund_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, SwapContract_refund_prim.\n      rewrite SwapContract_refund_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              SwapContract_refund_passthrough_prf\n              SwapContract_refund_wf\n              SwapContract_refund_passthrough_cond).\n    (*\n    - unfold PRIMsem, SwapContract_refund_prim.\n      rewrite SwapContract_refund_spec_hlist_eq.\n      exact (synth_func_spec_match\n              SwapContract_refund_passthrough_prf\n              SwapContract_refund_wf\n              SwapContract_refund_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, SwapContract_refund_prim.\n      rewrite SwapContract_refund_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              SwapContract_refund_passthrough_prf\n              SwapContract_refund_wf\n              SwapContract_refund_passthrough_cond).\n  Qed.\n\n  Lemma SwapContract_refund_exists :\n    forall j d1 d2 d1',\n      relate_AbData j d1 d2 ->\n      SwapContract_refund_spec d1 = Some d1' ->\n      exists d2',\n        SwapContract_refund_spec d2 = Some d2' /\\\n        relate_AbData j d1' d2'.\n  Proof.\n    intro j.\n    rewrite * SwapContract_refund_spec_eq.\n    exact (synth_func_relate_0_void\n            SwapContract_refund_passthrough_prf\n            SwapContract_refund_wf\n            SwapContract_refund_passthrough_cond\n            j).\n  Qed.\n\n  Lemma SwapContract_refund_match :\n    forall j d d' m,\n      match_AbData d m j ->\n      SwapContract_refund_spec d = Some d' ->\n      match_AbData d' m j.\n  Proof.\n    rewrite * SwapContract_refund_spec_eq.\n    exact (synth_func_match_0_void\n            SwapContract_refund_passthrough_prf\n            SwapContract_refund_wf\n            SwapContract_refund_passthrough_cond).\n  Qed.\n\n  Section refund.\n    Context`{inv : !CompatGenSem.PreservesInvariants (HD := cdataHigh) SwapContract_refund_spec}.\n    Context`{inv0 : !CompatGenSem.PreservesInvariants (HD := cdataLow) SwapContract_refund_spec}.\n\n    Lemma SwapContract_refund_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ CompatGenSem.gensem SwapContract_refund_spec)\n            (id ↦ CompatGenSem.gensem SwapContract_refund_spec).\n    Proof.\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit SwapContract_refund_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply SwapContract_refund_match; eauto.\n    Qed.\n  End refund.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/ObjSwapContractCode.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.ObjSwapContractCode for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import DeepSpec.Linking.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\nRequire Import layerlib.LinkSourceTemplate.\n\nRequire Import swaps_general.LayerSWAPCONTRACT.\nRequire Import swaps_general.RefineSWAPCONTRACT.\nRequire Import swaps_general.ObjSwapContractCodeProofs.\n\nSection EdsgerGen.\n\n\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nContext`{CTXT_prf : !Layer_SWAPCONTRACT_Context_prf}.\nContext`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\nExisting Instances SWAPCONTRACT_overlay_spec SWAPCONTRACT_underlay_spec\n                   SWAPCONTRACT_hypermem.\n\nLemma relate_AbData_translates_kernel_mode j d1 d2 :\n    relate_AbData j d1 d2 -> kernel_mode d1 -> kernel_mode d2.\nProof.\n  simpl; intros rel d1_kern.\n  (* rewrite <- (ikern_re _ _ _ rel), <- (ihost_re _ _ _ rel). *)\n  exact d1_kern.\nQed.\n\nInstance EVMOPCODE_evm_transfer_prim_prf :\n    primitive_prf EVMOPCODE_evm_transfer_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem EVMOpcode_transfer_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance EVMOPCODE_digraph_initialize_prim_prf :\n    primitive_prf EVMOPCODE_digraph_initialize_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_initialize_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance EVMOPCODE_digraph_is_leader_prim_prf :\n    primitive_prf EVMOPCODE_digraph_is_leader_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_is_leader_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance EVMOPCODE_digraph_is_party_prim_prf :\n    primitive_prf EVMOPCODE_digraph_is_party_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_is_party_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance EVMOPCODE_digraph_is_edge_prim_prf :\n    primitive_prf EVMOPCODE_digraph_is_edge_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_is_edge_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance EVMOPCODE_digraph_get_leader_ind_prim_prf :\n    primitive_prf EVMOPCODE_digraph_get_leader_ind_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_get_leader_ind_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *)\n    simpl. intros.\n    repeat match goal with\n      | |- context [?X _ d] => unfold X\n      | |- ?G => CommonTactic.subdestruct_if G\n      | |- _ => reflexivity\n      end.\nQed.\n\nInstance EVMOPCODE_digraph_get_party_ind_prim_prf :\n    primitive_prf EVMOPCODE_digraph_get_party_ind_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_get_party_ind_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *)\n    simpl. intros.\n    repeat match goal with\n      | |- context [?X _ d] => unfold X\n      | |- ?G => CommonTactic.subdestruct_if G\n      | |- _ => reflexivity\n      end.\nQed.\n\nInstance EVMOPCODE_digraph_valid_path_prim_prf :\n    primitive_prf EVMOPCODE_digraph_valid_path_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_valid_path_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *)\n    simpl. intros.\n    repeat match goal with\n      | |- context [?X _ d] => unfold X\n      | |- ?G => CommonTactic.subdestruct_if G\n      | |- _ => reflexivity\n      end.\nQed.\n\nInstance EVMOPCODE_digraph_sign_follower_prim_prf :\n    primitive_prf EVMOPCODE_digraph_sign_follower_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_sign_follower_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance EVMOPCODE_digraph_sign_leader_prim_prf :\n    primitive_prf EVMOPCODE_digraph_sign_leader_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_sign_leader_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance EVMOPCODE_digraph_can_sign_follower_prim_prf :\n    primitive_prf EVMOPCODE_digraph_can_sign_follower_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_can_sign_follower_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance EVMOPCODE_digraph_get_path_len_prim_prf :\n    primitive_prf EVMOPCODE_digraph_get_path_len_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_get_path_len_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *) discriminate.\nQed.\n\nInstance EVMOPCODE_digraph_diam_prim_prf :\n    primitive_prf EVMOPCODE_digraph_diam_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_diam_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *)\n    simpl. intros.\n    repeat match goal with\n      | |- context [?X _ d] => unfold X\n      | |- ?G => CommonTactic.subdestruct_if G\n      | |- _ => reflexivity\n      end.\nQed.\n\nInstance EVMOPCODE_digraph_maxpathlen_prim_prf :\n    primitive_prf EVMOPCODE_digraph_maxpathlen_prim.\nProof. esplit; [|\n    | intros _;\n      set (sem := gencsem DiGraph_maxpathlen_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\n  - (* PRIMis_pure *)\n    simpl. intros.\n    repeat match goal with\n      | |- context [?X _ d] => unfold X\n      | |- ?G => CommonTactic.subdestruct_if G\n      | |- _ => reflexivity\n      end.\nQed.\n\nInstance SwapContract__assetAmount_var_prf :\n    HyperLType SwapContract__assetAmount_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get SwapContract__assetAmount_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance SwapContract__timelocks_var_prf :\n    HyperLType SwapContract__timelocks_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get SwapContract__timelocks_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance SwapContract__hashlocks_var_prf :\n    HyperLType SwapContract__hashlocks_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get SwapContract__hashlocks_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance SwapContract__party_var_prf :\n    HyperLType SwapContract__party_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get SwapContract__party_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance SwapContract__counterparty_var_prf :\n    HyperLType SwapContract__counterparty_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get SwapContract__counterparty_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance SwapContract__start_var_prf :\n    HyperLType SwapContract__start_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get SwapContract__start_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance SwapContract__delta_var_prf :\n    HyperLType SwapContract__delta_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get SwapContract__delta_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance SwapContract__unlocked_var_prf :\n    HyperLType SwapContract__unlocked_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get SwapContract__unlocked_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance SwapContract__ended_var_prf :\n    HyperLType SwapContract__ended_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get SwapContract__ended_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\nInstance SwapContract__canrefund_var_prf :\n    HyperLType SwapContract__canrefund_var.\nProof. esplit; [ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get SwapContract__canrefund_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\nQed.\n\n(* Do not assume this context until now to avoid above proofs using the wrong one *)\nContext`{SWAPCONTRACT_pres_inv : !SWAPCONTRACT_preserves_invariants}.\n\nLemma SwapContract_initialize_prf : function_constr_prf SwapContract_initialize.\nProof. solve_function_constr_prf @SwapContract_initialize. Qed.\n\nTheorem SwapContract_initialize_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_SwapContract_initialize ↦ CompatGenSem.gensem SwapContract_initialize_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_SwapContract_initialize SwapContract_initialize_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite SwapContract_initialize_spec_eq.\n    change SwapContract_initialize_cfun\n      with (synth_func_func SwapContract_initialize).\n    apply synth_correct_4_void.\n    + exact SwapContract_initialize_prf.\n    + exact SwapContract_initialize_vc.\n    + exact SwapContract_initialize_oblg.\n(*  - apply semof_prim_kernel_mode_4_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact SwapContract_initialize_spec_requires_kernel_mode. *)\nQed.\n\nLemma SwapContract_unlock_prf : function_constr_prf SwapContract_unlock.\nProof. solve_function_constr_prf @SwapContract_unlock. Qed.\n\nTheorem SwapContract_unlock_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_SwapContract_unlock ↦ CompatGenSem.gensem SwapContract_unlock_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_SwapContract_unlock SwapContract_unlock_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite SwapContract_unlock_spec_eq.\n    change SwapContract_unlock_cfun\n      with (synth_func_func SwapContract_unlock).\n    apply synth_correct_2_void.\n    + exact SwapContract_unlock_prf.\n    + exact SwapContract_unlock_vc.\n    + exact SwapContract_unlock_oblg.\n(*  - apply semof_prim_kernel_mode_2_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact SwapContract_unlock_spec_requires_kernel_mode. *)\nQed.\n\nLemma SwapContract_claim_prf : function_constr_prf SwapContract_claim.\nProof. solve_function_constr_prf @SwapContract_claim. Qed.\n\nTheorem SwapContract_claim_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_SwapContract_claim ↦ CompatGenSem.gensem SwapContract_claim_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_SwapContract_claim SwapContract_claim_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite SwapContract_claim_spec_eq.\n    change SwapContract_claim_cfun\n      with (synth_func_func SwapContract_claim).\n    apply synth_correct_0_void.\n    + exact SwapContract_claim_prf.\n    + exact SwapContract_claim_vc.\n    + exact SwapContract_claim_oblg.\n(*  - apply semof_prim_kernel_mode_0_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact SwapContract_claim_spec_requires_kernel_mode. *)\nQed.\n\nLemma SwapContract_refund_prf : function_constr_prf SwapContract_refund.\nProof. solve_function_constr_prf @SwapContract_refund. Qed.\n\nTheorem SwapContract_refund_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_SwapContract_refund ↦ CompatGenSem.gensem SwapContract_refund_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_SwapContract_refund SwapContract_refund_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite SwapContract_refund_spec_eq.\n    change SwapContract_refund_cfun\n      with (synth_func_func SwapContract_refund).\n    apply synth_correct_0_void.\n    + exact SwapContract_refund_prf.\n    + exact SwapContract_refund_vc.\n    + exact SwapContract_refund_oblg.\n(*  - apply semof_prim_kernel_mode_0_void.\n    + exact relate_AbData_translates_kernel_mode.\n    + exact SwapContract_refund_spec_requires_kernel_mode. *)\nQed.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/ObjSwapContractCodeProofs.v",
    "content": "(* Skeleton by Edgser for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\n\nRequire Import swaps_general.LayerSWAPCONTRACT.\n\nSection EdsgerGen.\n\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nExisting Instances SWAPCONTRACT_overlay_spec.\n\nLemma SwapContract_initialize_spec_requires_kernel_mode a0 a1 a2 a3 d d' :\n    SwapContract_initialize_spec a0 a1 a2 a3 d = Some d' ->\n    kernel_mode d.\nProof.\n  intros spec.\n  unfold SwapContract_initialize_spec in spec.\n  simpl.\n  CommonTactic.subdestruct; auto.\nQed.\n\nLemma SwapContract_initialize_vc a0 a1 a2 a3 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    ht_ft_cond a3 -> ht_valid_ft_cond a3 ->\n    high_level_invariant d ->\n    synth_func_cond SwapContract_initialize SwapContract_initialize_wf\n                    a0 a1 a2 a3 me d.\nProof.\n  admit.\nQed.\n\nLemma SwapContract_initialize_oblg a0 a1 a2 a3 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    ht_ft_cond a3 -> ht_valid_ft_cond a3 ->\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_initialize SwapContract_initialize_wf\n                          a0 a1 a2 a3 me d.\nProof.\n  admit.\nQed.\n\nLemma SwapContract_unlock_spec_requires_kernel_mode a0 a1 d d' :\n    SwapContract_unlock_spec a0 a1 d = Some d' ->\n    kernel_mode d.\nProof.\n  intros spec.\n  unfold SwapContract_unlock_spec in spec.\n  simpl.\n  CommonTactic.subdestruct; auto.\nQed.\n\nLemma SwapContract_unlock_vc a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond SwapContract_unlock SwapContract_unlock_wf\n                    a0 a1 me d.\nProof.\n  admit.\nQed.\n\nLemma SwapContract_unlock_oblg a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_unlock SwapContract_unlock_wf\n                          a0 a1 me d.\nProof.\n  admit.\nQed.\n\nLemma SwapContract_claim_spec_requires_kernel_mode d d' :\n    SwapContract_claim_spec d = Some d' ->\n    kernel_mode d.\nProof.\n  intros spec.\n  unfold SwapContract_claim_spec in spec.\n  simpl.\n  CommonTactic.subdestruct; auto.\nQed.\n\nLemma SwapContract_claim_vc me d :\n    high_level_invariant d ->\n    synth_func_cond SwapContract_claim SwapContract_claim_wf\n                    me d.\nProof.\n  admit.\nQed.\n\nLemma SwapContract_claim_oblg me d :\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_claim SwapContract_claim_wf\n                          me d.\nProof.\n  admit.\nQed.\n\nLemma SwapContract_refund_spec_requires_kernel_mode d d' :\n    SwapContract_refund_spec d = Some d' ->\n    kernel_mode d.\nProof.\n  intros spec.\n  unfold SwapContract_refund_spec in spec.\n  simpl.\n  CommonTactic.subdestruct; auto.\nQed.\n\nLemma SwapContract_refund_vc me d :\n    high_level_invariant d ->\n    synth_func_cond SwapContract_refund SwapContract_refund_wf\n                    me d.\nProof.\n  admit.\nQed.\n\nLemma SwapContract_refund_oblg me d :\n    high_level_invariant d ->\n    synth_func_obligation SwapContract_refund SwapContract_refund_wf\n                          me d.\nProof.\n  admit.\nQed.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/RefineSWAPCONTRACT.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.RefineSWAPCONTRACT for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import DeepSpec.Linking.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import swaps_general.DataTypes.\nRequire Import swaps_general.DataTypeOps.\nRequire Import swaps_general.DataTypeProofs.\nRequire Import layerlib.LayerCalculusLemma.\nRequire Import layerlib.RefinementTactic.\nRequire Import layerlib.RefinementTacticAux.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.\n\nRequire Import swaps_general.LayerSWAPCONTRACT.\nRequire Import swaps_general.LSimEVMOPCODE.\n\nSection EdsgerGen.\n\n\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nContext`{CTXT_prf : !Layer_SWAPCONTRACT_Context_prf}.\nContext`{EVMOPCODE_pres_inv : !EVMOPCODE_preserves_invariants}.\nContext`{SWAPCONTRACT_pres_inv : !SWAPCONTRACT_preserves_invariants}.\n\nExisting Instances SWAPCONTRACT_overlay_spec SWAPCONTRACT_underlay_spec.\n\nRecord relate_RData (j : meminj) (habd : GetHighData) (labd : GetLowData) : Prop\n    := mkrelate_RData {\n  (* EVMOpcode *)\n  _events_re : (_events habd) = (_events labd);\n  (* DiGraph *)\n  _leaders_re : (_leaders habd) = (_leaders labd);\n  _parties_re : (_parties habd) = (_parties labd);\n  _edges_re : (_edges habd) = (_edges labd);\n  _edges_reverse_re : (_edges_reverse habd) = (_edges_reverse labd);\n  _party_addr_to_ind_re : (_party_addr_to_ind habd) = (_party_addr_to_ind labd);\n  _leader_addr_to_ind_re : (_leader_addr_to_ind habd) = (_leader_addr_to_ind labd);\n  _party_re : (_party habd) = (_party labd);\n  _counterparty_re : (_counterparty habd) = (_counterparty labd);\n  _hashkeyinit_re : (_hashkeyinit habd) = (_hashkeyinit labd);\n  _innerpathinit_re : (_innerpathinit habd) = (_innerpathinit labd);\n  _allpaths_re : (_allpaths habd) = (_allpaths labd);\n  _res_is_leader_re : (_res_is_leader habd) = (_res_is_leader labd);\n  _res_is_party_re : (_res_is_party habd) = (_res_is_party labd);\n  _res_is_edge_re : (_res_is_edge habd) = (_res_is_edge labd);\n  _res_has_signed_re : (_res_has_signed habd) = (_res_has_signed labd);\n  _res_can_sign_re : (_res_can_sign habd) = (_res_can_sign labd);\n  _res_path_len_re : (_res_path_len habd) = (_res_path_len labd)\n}.\n\nRecord match_RData (habd : GetHighData) (m : mem) (j : meminj) : Prop\n    := MATCH_RDATA {\n  _assetAmount_ma : variable_match SwapContract__assetAmount_var habd m;\n  _timelocks_ma : variable_match SwapContract__timelocks_var habd m;\n  _hashlocks_ma : variable_match SwapContract__hashlocks_var habd m;\n  _party_ma : variable_match SwapContract__party_var habd m;\n  _counterparty_ma : variable_match SwapContract__counterparty_var habd m;\n  _start_ma : variable_match SwapContract__start_var habd m;\n  _delta_ma : variable_match SwapContract__delta_var habd m;\n  _unlocked_ma : variable_match SwapContract__unlocked_var habd m;\n  _ended_ma : variable_match SwapContract__ended_var habd m;\n  _canrefund_ma : variable_match SwapContract__canrefund_var habd m\n}.\n\nLocal Hint Resolve MATCH_RDATA.\n\nGlobal Instance rel_ops: CompatRelOps GetHighDataX GetLowDataX :=\n{\n  relate_AbData f d1 d2 := relate_RData f d1 d2;\n  match_AbData d1 m f := match_RData d1 m f;\n  new_glbl := var_SwapContract__assetAmount_ident :: var_SwapContract__timelocks_ident :: var_SwapContract__hashlocks_ident :: var_SwapContract__party_ident :: var_SwapContract__counterparty_ident :: var_SwapContract__start_ident :: var_SwapContract__delta_ident :: var_SwapContract__unlocked_ident :: var_SwapContract__ended_ident :: var_SwapContract__canrefund_ident :: nil\n}.\n\nGlobal Instance SwapContract__assetAmount_hyper_ltype_static :\n    HyperLTypeStatic SwapContract__assetAmount_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl SwapContract__assetAmount_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance SwapContract__timelocks_hyper_ltype_static :\n    HyperLTypeStatic SwapContract__timelocks_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl SwapContract__timelocks_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance SwapContract__hashlocks_hyper_ltype_static :\n    HyperLTypeStatic SwapContract__hashlocks_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl SwapContract__hashlocks_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance SwapContract__party_hyper_ltype_static :\n    HyperLTypeStatic SwapContract__party_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl SwapContract__party_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance SwapContract__counterparty_hyper_ltype_static :\n    HyperLTypeStatic SwapContract__counterparty_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl SwapContract__counterparty_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance SwapContract__start_hyper_ltype_static :\n    HyperLTypeStatic SwapContract__start_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl SwapContract__start_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance SwapContract__delta_hyper_ltype_static :\n    HyperLTypeStatic SwapContract__delta_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl SwapContract__delta_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance SwapContract__unlocked_hyper_ltype_static :\n    HyperLTypeStatic SwapContract__unlocked_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl SwapContract__unlocked_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance SwapContract__ended_hyper_ltype_static :\n    HyperLTypeStatic SwapContract__ended_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl SwapContract__ended_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nGlobal Instance SwapContract__canrefund_hyper_ltype_static :\n    HyperLTypeStatic SwapContract__canrefund_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl SwapContract__canrefund_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\n\nLemma relate_incr:\n  forall abd abd' f f',\n    relate_RData f abd abd' ->\n    inject_incr f f' ->\n    relate_RData f' abd abd'.\nProof.\n  inversion 1; subst; intros; simpl in *.\n  repeat match goal with\n  | H : _ /\\ _ |- _ => destruct H\n  end.\n  repeat (constructor; simpl; eauto).\nQed.\nGlobal Instance rel_prf: CompatRel GetHighDataX GetLowDataX.\nProof.\n  constructor; [ destruct 1 .. |]; intros.\n  - constructor; eapply inject_match_correct; eauto with typeclass_instances.\n  - constructor; eapply store_match_correct; eauto with typeclass_instances.\n  - constructor; eapply alloc_match_correct; eauto with typeclass_instances.\n  - constructor; eapply free_match_correct; eauto with typeclass_instances.\n  - constructor; eapply storebytes_match_correct; eauto with typeclass_instances.\n  - eapply relate_incr; eauto.\nQed.\n\n(*\nLocal Instance: ExternalCallsOps (mwd GetLowDataX) := CompatExternalCalls.compatlayer_extcall_ops EVMOPCODE_Layer.\nLocal Instance: CompilerConfigOps _ := CompatExternalCalls.compatlayer_compiler_config_ops EVMOPCODE_Layer.\n*)\n\nInstance SWAPCONTRACT_hypermem : MemoryModel.HyperMem\n  := { Hcompatrel := {| crel_prf := rel_prf |} }.\n\nClass SWAPCONTRACT_Underlay_preserves_invariants := {\n  SWAPCONTRACT_Underlay_EVMOpcode_transfer_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) EVMOpcode_transfer_spec | 5;\n  SWAPCONTRACT_Underlay_DiGraph_initialize_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_initialize_spec | 5;\n  SWAPCONTRACT_Underlay_DiGraph_is_leader_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_is_leader_spec | 5;\n  SWAPCONTRACT_Underlay_DiGraph_is_party_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_is_party_spec | 5;\n  SWAPCONTRACT_Underlay_DiGraph_is_edge_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_is_edge_spec | 5;\n  SWAPCONTRACT_Underlay_DiGraph_sign_follower_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_sign_follower_spec | 5;\n  SWAPCONTRACT_Underlay_DiGraph_sign_leader_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_sign_leader_spec | 5;\n  SWAPCONTRACT_Underlay_DiGraph_can_sign_follower_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_can_sign_follower_spec | 5;\n  SWAPCONTRACT_Underlay_DiGraph_get_path_len_preserves_invariants :>\n    CompatGenSem.PreservesInvariants (HD := cdataLow) DiGraph_get_path_len_spec | 5\n}.\nInstance SWAPCONTRACT'EVMOPCODE_preserves_invariants : SWAPCONTRACT_Underlay_preserves_invariants.\nProof. esplit; apply EVMOPCODE_pres_inv. Defined.\n\n(*\nLemma passthrough_correct:\n  sim (crel (CompatRel0 := rel_prf) _ _) SWAPCONTRACT_Layer_passthrough EVMOPCODE_Layer.\nProof.\n  Local Opaque simRR mapsto layer_mapsto_primitive.\n  unfold GlobalLayerSpec, MemoryModel.GetHighDataX.\n  simpl.\n\n  sim_oplus; simpl.\n\n  Local Transparent simRR mapsto layer_mapsto_primitive.\nQed.*)\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/Symbols.v",
    "content": "(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module swaps_general.Symbols for swaps_general.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import swaps_general.EdsgerIdents.\nRequire Import String.\nRequire Import List.\nRequire Import compcert.common.AST.\nSection EdsgerGen.\n\n\nOpen Scope string_scope.\n\nDefinition symbols: list (ident * string) :=\n  (ident_EVMOpcode_transfer, \"EVMOpcode_transfer\")::\n  (ident_DiGraph_initialize, \"DiGraph_initialize\")::\n  (ident_DiGraph_is_leader, \"DiGraph_is_leader\")::\n  (ident_DiGraph_is_party, \"DiGraph_is_party\")::\n  (ident_DiGraph_is_edge, \"DiGraph_is_edge\")::\n  (ident_DiGraph_get_leader_ind, \"DiGraph_get_leader_ind\")::\n  (ident_DiGraph_get_party_ind, \"DiGraph_get_party_ind\")::\n  (ident_DiGraph_valid_path, \"DiGraph_valid_path\")::\n  (ident_DiGraph_sign_follower, \"DiGraph_sign_follower\")::\n  (ident_DiGraph_sign_leader, \"DiGraph_sign_leader\")::\n  (ident_DiGraph_can_sign_follower, \"DiGraph_can_sign_follower\")::\n  (ident_DiGraph_get_path_len, \"DiGraph_get_path_len\")::\n  (ident_DiGraph_diam, \"DiGraph_diam\")::\n  (ident_DiGraph_maxpathlen, \"DiGraph_maxpathlen\")::\n  (ident_SwapContract_initialize, \"SwapContract_initialize\")::\n  (ident_SwapContract_unlock, \"SwapContract_unlock\")::\n  (ident_SwapContract_claim, \"SwapContract_claim\")::\n  (ident_SwapContract_refund, \"SwapContract_refund\")::\n  (var_SwapContract__assetAmount_ident, \"SwapContract__assetAmount\")::\n  (var_SwapContract__timelocks_ident, \"SwapContract__timelocks\")::\n  (var_SwapContract__hashlocks_ident, \"SwapContract__hashlocks\")::\n  (var_SwapContract__party_ident, \"SwapContract__party\")::\n  (var_SwapContract__counterparty_ident, \"SwapContract__counterparty\")::\n  (var_SwapContract__start_ident, \"SwapContract__start\")::\n  (var_SwapContract__delta_ident, \"SwapContract__delta\")::\n  (var_SwapContract__unlocked_ident, \"SwapContract__unlocked\")::\n  (var_SwapContract__ended_ident, \"SwapContract__ended\")::\n  (var_SwapContract__canrefund_ident, \"SwapContract__canrefund\")::\n  nil.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/swaps/swaps_general/extraction/Makefile",
    "content": "lastfiles = HyperType.mli HyperTypeInst.mli DataTypeOps.mli EdsgerIdents.mli LayerEVMOPCODE.mli LSrcEVMOPCODE.mli  LayerSWAPCONTRACT.mli LSrcSWAPCONTRACT.mli "
  },
  {
    "path": "contracts/swaps/swaps_general/extraction/Tester.ml",
    "content": "open LSrcEVMOPCODE\nopen LSrcSWAPCONTRACT\n\nlet usage () = \n  Printf.eprintf \"usage: extract (bytecode | debug)\\n\" ;\n  exit 1\n\nlet () = if Array.length Sys.argv != 2 then usage ()\n\nlet debug_flag = match Array.get Sys.argv 1 with\n  | \"bytecode\" -> false\n  | \"debug\"    -> true\n  | _          -> usage ()\n\nlet ge_compiled = Glue.full_compile_genv ge\n\nlet rec convert_list = function\n  | Datatypes.Coq_nil -> []\n  | Datatypes.Coq_cons (x, xs) -> x :: convert_list xs\n\nlet (program, label) =\n  match ge_compiled with\n  | None -> (Printf.eprintf \"error in compilation\\n\" ; exit 1)\n  | Some Coq_pair (p, l) -> (List.rev (convert_list p), l)\n\nlet intermediate = ASM.split program label\nlet asm = ASM.transform intermediate\nlet bytecode = ASM.assemble asm\nlet human_readable = ASM.show_asm asm\n\nlet () =\n  if debug_flag then\n    Printf.printf \"%s\\n\" human_readable\n  else\n    Printf.printf \"%s\\n\" bytecode\n"
  },
  {
    "path": "contracts/swaps/swaps_general/subdir.mk",
    "content": "# WARNING: This file is generated by Edsger, the DeepSEA compiler.\n#          All modification will be lost when regenerating.\nswaps_general_FILES = \\\nswaps_general/CertiKOS.v \\\nswaps_general/DataTypeOps.v \\\nswaps_general/DataTypeProofs.v \\\nswaps_general/DataTypes.v \\\nswaps_general/EdsgerIdents.v \\\nswaps_general/LSimEVMOPCODE.v \\\nswaps_general/LSimSWAPCONTRACT.v \\\nswaps_general/LSrcEVMOPCODE.v \\\nswaps_general/LSrcSWAPCONTRACT.v \\\nswaps_general/LayerEVMOPCODE.v \\\nswaps_general/LayerSWAPCONTRACT.v \\\nswaps_general/ObjSimDiGraph.v \\\nswaps_general/ObjSimEVMOpcode.v \\\nswaps_general/ObjSimSwapContract.v \\\nswaps_general/ObjSwapContractCode.v \\\nswaps_general/ObjSwapContractCodeProofs.v \\\nswaps_general/RefineSWAPCONTRACT.v \\\nswaps_general/Symbols.v\n"
  },
  {
    "path": "contracts/swaps/swaps_general.ds",
    "content": "(* atomic cross-chain swaps - general case *)\n\ntype addr := uint \ntype timeunit := uint (* in seconds? *)\n\ntype Transfer = {\n\t_amount : uint;\n\t_to : addr; \n}\n\nexternal let transfer_nil [[unfold always]] : list Transfer = \"nil\"\nexternal let transfer_cons [[unfold always]] : Transfer * (list Transfer) -> (list Transfer) = \"(fun a b => (cons a b))\"\nexternal let transfer_length [[unfold always]] : (list Transfer) -> uint = \"(fun l => Z_of_nat (length l))\"\nexternal let transfer_cons_unzip [[unfold always]] : uint * uint * (list Transfer) -> (list Transfer) = \n\t\t\"(fun toaddr much e => {|_amount := much; _to := toaddr |} :: e)\"\n\n(* static global graph information *)\nconst numLeaders = 0u1\nconst numLeadersInt = 1\nconst numParties = 0u3\nconst numPartiesInt = 3\nconst diam = 0u3\nconst maxIncomingEdges = 1\nconst maxOutgoingEdges = 1\n\n\n(* \tThese are graph related external functions etc, not used in the current version;\n\tWe might have to use these if fixed-sized arrays are very hard to prove things about\n\tcompared to linked lists that are changing structurally. *)\nexternal type edgeSet = \"(Int256Map.t (list int256))\"\nexternal type int2intMap = \"(Int256Map.t int256)\"\n(* change the following to be realistic *)\nexternal let leaderAddrs [[unfold always]] : (list addr) = \"nil\"\nexternal let partyAddrs [[unfold always]] : (list addr) = \"nil\"\nexternal let edges [[unfold always]] : edgeSet = \"(Int256Map.init (nil: (list addr)))\"\nexternal let edges_reverse [[unfold always]] : edgeSet = \"(Int256Map.init (nil: (list addr)))\"\n(* map addresses to index 0 ... n-1 *)\nexternal let leaderInds [[unfold always]] : int2intMap = \"(Int256Map.init (Int256Map.zero))\"\nexternal let partyInds [[unfold always]] : int2intMap = \"(Int256Map.init (Int256Map.zero))\"\nexternal let map_getval [[unfold always]] : (int2intMap * addr) -> int = \"(fun key d => (Int256Map.get key d))\"\nexternal let in_list [[unfold always]] : (addr * (list addr)) -> bool \n\t= \"(fix in_list_fix a lds := match lds with | nil => false | (cons d rest) => if (Int256.eq a d) then true else (in_list_aux a rest) end)\"\nexternal let get_dst_vertices [[unfold disallowed]] : (addr * edgeSet) -> (list addr)\n\t= \"(fun src e_set => (Int256Map.get src e_set))\"\nexternal let compute_longest_path [[unfold disallowed]] : (addr * addr) -> uint = \n\t(* FIXME:\n\t\tcheck out the `compute_longest_path` function in impl.v coq file \n\t\ti don't know how program fixpoint as well as anonymous recursive \n\t\tfunctions work with deepsea, esp since this func required a separate helper\n\t\tfunction \n\t\t\n\t\tFor now, a dummy placeholder. \n\t\t*)\n\t\"(fun pt ld => Int256.one)\"\n\ntype edgeset := mapping[addr] (array[numPartiesInt] addr) \n\n(*external let timelocks [[unfold always]] : list timeunit\n\t= \"(nil)\"\nexternal let hashlocks [[unfold always]] : list hashvalue\n\t= \"(nil)\"*)\n\n\nobject signature EVMOpcodeInterface = {\n\n  transfer : addr * uint -> unit;\n}\n\ntrusted object EVMOpcode : EVMOpcodeInterface {\n    let _events : list Transfer := transfer_nil\n\n\n    let transfer (toaddr, much) =\n        let e = _events in\n        _events := transfer_cons_unzip (much, toaddr, e);\n        ()\n}\n\n(* place holder for digraph related methods *)\nobject signature DiGraphInterface = {\n\tinitialize : addr -> unit; \n\tconst diam : unit -> uint;\n\t(* longest path from party (src) to leader (dst) (secret goes the other way) *)\n\tconst maxpathlen : addr * addr -> uint; \n\t(*const preprocess_sign : addr * addr * addr -> bool; *)\n\tis_leader : addr -> bool;\n\tis_party : addr -> bool; \n\tis_edge : addr * addr -> bool; \n\tconst get_leader_ind : addr -> int; \n\tconst get_party_ind : addr -> int; \n\t(* in regards to the hashlock by leader on edge from party to counterparty *)\n\tconst valid_path : addr * addr * addr -> bool; \n\tsign_follower : addr * addr * addr * addr -> unit; \n\tsign_leader : addr * addr * addr -> unit; \n\t(* the return type may also be addr -> the addr from which this follower learned the secret *)\n\tcan_sign_follower : addr * addr * addr -> bool; \n\tget_path_len : addr * addr * addr -> uint; \n}\n\n\ntype Path = {\n\t(* which hashkey *)\n\tpath : array[numPartiesInt] addr;\n\tnextInd : int; \n}\n\ntype Hashkeys = {\n\ttoleader : array[numLeadersInt] Path; \n}\n\n(* \tin regards to the paths and signatures: \n\tthere is not a real difference between paths and secrets, \n\tsince the way we currently model signature is not based on crypto \n\tbut rather a faithful record of a series of events. *)\n\ntrusted object DiGraph () : DiGraphInterface {\n\t(* di-graph related *)\n\tlet _leaders : array[numLeadersInt] uint := array_init \n\tlet _parties : array[numPartiesInt] uint := array_init \n\tlet _edges : edgeset := mapping_init \n\tlet _edges_reverse : edgeset := mapping_init \n\tlet _party_addr_to_ind : mapping[addr] int := mapping_init\n\tlet _leader_addr_to_ind : mapping[addr] int := mapping_init\n\n\t(* contract related *)\n\tlet _party : addr := 0u0 \n\tlet _counterparty :addr := 0u0 \n\tlet _hashkeyinit : array[numLeadersInt] Path := array_init \n\tlet _innerpathinit : array[numPartiesInt] Hashkeys := array_init \n\n\t(* for each edge, the list of paths so far corresponding to each hashlock \n\t\tindices work like `_allpaths[counterparty_ind][party_ind]` *)\n\tlet _allpaths : array[numPartiesInt] (array[numPartiesInt] Hashkeys) := array_init \n\tlet _res_is_leader : bool := false \n\tlet _res_is_party : bool := false \n\tlet _res_is_edge : bool := false \n\tlet _res_has_signed : bool := false \n\tlet _res_can_sign : bool := false \n\tlet _res_path_len : uint := 0u0 \n\n\tlet initialize (counterparty) = \n\t\t_counterparty := counterparty; \n\t\t_party := msg_sender; \n\t\tfor i = 0 to numLeadersInt do \n\t\t\tbegin _hashkeyinit[i].path := array_init; \n\t\t\t\t\t_hashkeyinit[i].nextInd := 0 \n\t\t\tend\n\t\t;\n\t\tlet hashkeyinit = _hashkeyinit in \n\t\tfor i = 0 to numPartiesInt do \n\t\t\tbegin _innerpathinit[i].toleader := hashkeyinit end \n\t\t;\n\t\tlet innerpathinit = _innerpathinit in \n\t\tfor i = 0 to numPartiesInt do \n\t\t\tbegin _allpaths[i] := innerpathinit end \n\t\t;\n\t\t(* initialize _edges, _edges_reverse, _party_addr_to_ind, _leader_addr_to_ind here *)\n\t\t()\n\n\tlet is_leader (ld_addr) = \n\t\t_res_is_leader := false; \t\n\t\tfor i = 0 to numLeadersInt do \n\t\t\tbegin let it = _leaders[i] in \n\t\t\t\tif it = ld_addr then _res_is_leader := true \n\t\t\t\telse ()\n\t\t\tend \n\t\t;\n\t\tlet res_is_leader = _res_is_leader in \n\t\t\tres_is_leader \n\n\tlet is_party (pt_addr) = \n\t\t_res_is_party := false; \t\t\n\t\tfor i = 0 to numPartiesInt do \n\t\t\tbegin let it = _parties[i] in \n\t\t\t\tif it = pt_addr then _res_is_party := true \n\t\t\t\telse ()\n\t\t\tend\n\t\t;\n\t\tlet res_is_party = _res_is_party in \n\t\t\tres_is_party \n\n\n\tlet is_edge (src, dst) = \n\t\t_res_is_edge := false; \n\t\tfor i = 0 to numPartiesInt do \n\t\t\tbegin let it = _edges[src][i] in \n\t\t\t\tif it = dst then _res_is_edge := true else ()\n\t\t\tend\n\t\t;\n\t\tlet res_is_edge = _res_is_edge in \n\t\t\tres_is_edge \n\n\n\t(* assumption: is_party(ld_addr) = true *)\n\tlet get_leader_ind (ld_addr) = \n\t\tlet res = _leader_addr_to_ind[ld_addr] in \n\t\t\tres \n\n\tlet get_party_ind (pt_addr) = \n\t\tlet res = _party_addr_to_ind[pt_addr] in \n\t\t\tres \n\n\t(* the signer (which is the msg_sender) puts their addr on the \"hashkey\"\n\t\tat one of the hashlocks on the edge from party to counterparty. \n\t\t*)\n\t(* assumption: all addresses and edges are valid *)\n\tlet valid_path (party_addr, counterparty_addr, leader_addr) = \n\t\t(* for now, we only allow counterparty_addr to be msg_sender \n\t\t\t\tbut our definition of _allpaths allow for more signing *)\n\t\tlet pt_ind = _party_addr_to_ind[party_addr] in \n\t\tlet counterpt_ind = _party_addr_to_ind[counterparty_addr] in \n\t\tlet ld_ind = _leader_addr_to_ind[leader_addr] in \n\t\tlet path_len = _allpaths[counterpt_ind][pt_ind].toleader[ld_ind].nextInd in \n\t\t\tif (path_len = 0) then false else \n\t\t\tlet first_signer = _allpaths[counterpt_ind][pt_ind].toleader[ld_ind].path[0] in \n\t\t\tlet last_signer = _allpaths[counterpt_ind][pt_ind].toleader[ld_ind].path[path_len -1] in \n\t\t\t\t((first_signer = leader_addr) /\\ (last_signer = counterparty_addr))\n\t\n\n\tlet sign_follower (party_addr, counterparty_addr, src_addr, leader_addr) = \n\t\tassert (counterparty_addr = msg_sender); \n\t\tlet pt_ind = _party_addr_to_ind[party_addr] in \n\t\tlet counterpt_ind = _party_addr_to_ind[counterparty_addr] in \n\t\tlet ld_ind = _leader_addr_to_ind[leader_addr] in \n\t\tlet src_ind = _party_addr_to_ind[src_addr] in \n\t\tlet next_ind = _allpaths[src_ind][counterpt_ind].toleader[ld_ind].nextInd in \n\t\t\t(* path to copy can't be of length 0 *)\n\t\t\tassert (next_ind > 0); \n\t\t\t(* last signer of this path should be src_addr *)\n\t\t\tlet last_signer = _allpaths[src_ind][counterpt_ind].toleader[ld_ind].path[next_ind-1] in \n\t\t\tassert (last_signer = src_addr);  \n\t\t\t(* now, copy this path and add self (msg_sender) to it *)\n\t\t\tfor i = 0 to next_ind do \n\t\t\tbegin \n\t\t\t\tlet to_copy = _allpaths[src_ind][counterpt_ind].toleader[ld_ind].path[i] in \n\t\t\t\t_allpaths[counterpt_ind][pt_ind].toleader[ld_ind].path[i] := to_copy\n\t\t\tend;\n\t\t\t_allpaths[counterpt_ind][pt_ind].toleader[ld_ind].path[next_ind] := counterparty_addr;\n\t\t\t_allpaths[counterpt_ind][pt_ind].toleader[ld_ind].nextInd := next_ind+1\n\t\t; ()\n\n\tlet sign_leader (party_addr, counterparty_addr, leader_addr) = \n\t\tassert (counterparty_addr = msg_sender); \n\t\tassert (leader_addr = msg_sender); \n\t\tlet pt_ind = _party_addr_to_ind[party_addr] in \n\t\tlet counterpt_ind = _party_addr_to_ind[counterparty_addr] in \n\t\tlet ld_ind = _leader_addr_to_ind[leader_addr] in \n\t\tlet path_len = _allpaths[counterpt_ind][pt_ind].toleader[ld_ind].nextInd in \n\t\t\t(* only leader can sign this, and it should be empty *)\n\t\t\tassert (path_len = 0);\n\t\t\t_allpaths[counterpt_ind][pt_ind].toleader[ld_ind].path[0] := leader_addr; \n\t\t\t_allpaths[counterpt_ind][pt_ind].toleader[ld_ind].nextInd := path_len+1; \n\t\t\t()\n\n\n\tlet can_sign_follower (party_addr, counterparty_addr, leader_addr) = \n\t\tassert (counterparty_addr = msg_sender);\n\t\t_res_can_sign := false; \n\t\t(*let all_outgoing_edges = _edges[counterparty_addr] in *)\n\t\tlet ld_ind = _leader_addr_to_ind[leader_addr] in \n\t\tlet self_ind = _party_addr_to_ind[counterparty_addr] in \n\t\t\tfor i = 0 to numPartiesInt do \n\t\t\t\tbegin \n\t\t\t\t\tlet dst_addr = _edges[counterparty_addr][i] in \n\t\t\t\t\tif dst_addr = 0u0 then () else \n\t\t\t\t\tlet dst_ind = _party_addr_to_ind[dst_addr] in \n\t\t\t\t\tlet next_ind = _allpaths[dst_ind][self_ind].toleader[ld_ind].nextInd in \n\t\t\t\t\tif (next_ind = 0) then () else \n\t\t\t\t\tlet last_signer = _allpaths[dst_ind][self_ind].toleader[ld_ind].path[next_ind-1] in \n\t\t\t\t\tif (last_signer = dst_addr) then _res_can_sign := true else ()\n\t\t\t\tend\n\t\t; let res_can_sign = _res_can_sign in res_can_sign\n\n\t(* needs to do this dumb way because there is no type conversion *)\n\tlet get_path_len (party_addr, counterparty_addr, leader_addr) = \n\t\t(* assume addresses already verified. currently true in code. *)\n\t\t_res_path_len := 0u0; \n\t\tlet pt_ind = _party_addr_to_ind[party_addr] in \n\t\tlet counterpt_ind = _party_addr_to_ind[counterparty_addr] in \n\t\tlet ld_ind = _leader_addr_to_ind[leader_addr] in \n\t\tlet path_len = _allpaths[counterpt_ind][pt_ind].toleader[ld_ind].nextInd in \n\t\t\tfor i = 0 to path_len do \n\t\t\tbegin \n\t\t\t\tlet old_val = _res_path_len in \n\t\t\t\t\t_res_path_len := old_val + 0u1 \n\t\t\tend;\n\t\t\tlet res_path_len = _res_path_len in res_path_len\n\n\tlet diam () = \n\t\tdiam\n\n\tlet maxpathlen (pt, ld) = \n\t\tlet parties = partyAddrs in \n\t\tlet leaders = leaderAddrs in \n\t\tlet is_party = in_list(pt, parties) in \n\t\tlet is_leader = in_list(ld, leaders) in \n\t\tlet res = compute_longest_path(pt, ld) in \n\t\tassert (is_party);\n\t\tassert (is_leader);\n\t\tres \n\n}\n\nobject signature SwapContractInterface = {\n\n\tinitialize : uint * addr * timeunit * timeunit -> unit;\n\tunlock : addr * uint -> unit; \n\tclaim : unit -> unit; \n\trefund : unit -> unit; \n}\n\n(* contract interface *)\nobject SwapContract (digraph: DiGraphInterface, evm: EVMOpcodeInterface): SwapContractInterface {\n\t\n\tlet _assetAmount : uint := 0u0 \n\t(* idk what's a good way to initialze these two arrays *)\n\tlet _timelocks : array[numLeadersInt] timeunit := array_init \n\tlet _hashlocks : array[numLeadersInt] hashvalue := array_init \n\tlet _party : addr := 0u0 \n\tlet _counterparty : addr := 0u0 \n\tlet _start : timeunit := 0u0 \n\tlet _delta : timeunit := 0u0 \n\tlet _unlocked : (array[numLeadersInt] bool) := array_init  \n\t(* after the asset has been claimed, halt *)\n\tlet _ended : bool := false \n\t(* refund hack for dealing with any *)\n\tlet _canrefund : bool := false \n\n\t(* initialize the contract, party (msg_sender) publishes contract *)\n\tlet initialize (amount, counterparty, start, delta) = \n\t\t(* start time is at least delta into the future *)\n\t\tassert(start >= block_timestamp + delta);\n\t\t_counterparty := counterparty; \n\t\t_assetAmount := amount; \n\t\t_party := msg_sender;\n\t\t_start := start; \n\t\t_delta := delta; \n\t\t(*_timelocks := timelocks;*)\n\t\t(*_hashlocks := hashlocks; *)\n\t\t_canrefund := false; \n\t\tbegin \n\t\tfor i = 0 to numLeadersInt do \n\t\t\t_unlocked[i] := false\n\t    end;\n\t\t()\n\n\t(* In general, we can't do unlock(secret), because secret can be learned by everyone else\n\t\tbut in the protocol, by our design, the path verification hopefully can ensure that \n\t\tthis is correct. i.e., secret won't help if they can't forge events due to permission. *)\n\tlet unlock (leader_addr, secret) = \n\t\t(* first check all conditions are satisfied *)\n\t\tlet is_leader = digraph.is_leader(leader_addr) in \n\t\tlet party = _party in \n\t\tlet counterparty = _counterparty in \n\t\tlet ld_ind = digraph.get_leader_ind(leader_addr) in \n\t\tlet hashlock = _hashlocks[ld_ind] in \n\t\t\tassert (is_leader); \n\t\t\tassert (msg_sender = counterparty); \n\t\t\tassert (hashlock = keccak256(secret)); \n\t\tlet path_verified = digraph.valid_path(party, counterparty, leader_addr) in \n\t\tlet path_len = digraph.get_path_len(party, counterparty, leader_addr) in \n\t\tlet start = _start in \n\t\tlet delta = _delta in \n\t\t\tassert (block_timestamp < start+(diam+path_len)*delta);\n\t\t\tassert (path_verified); \n\t\t\t(* finally, unlock *)\n\t\t\t_unlocked[ld_ind] := true;\n\t\t\t()\n\n\tlet claim () = \n\t\tlet counterparty = _counterparty in \n\t\tlet assetAmount = _assetAmount in \n\t\tlet ended = _ended in \n\t\t\tassert (!ended); \n\t\t\tassert (counterparty = msg_sender);\n\t\t\tfor i = 0 to numLeadersInt do \n\t\t\tbegin \n\t\t\t\tlet unlock_status = _unlocked[i] in \n\t\t\t\t\tassert (unlock_status = true) \n\t\t\tend ; \n\t\t\tevm.transfer (counterparty, assetAmount); \n\t\t\t_ended := true; \n\t\t\t()\n\n\tlet refund () =\n\t\tlet party = _party in \n\t\tlet assetAmount = _assetAmount in \n\t\tlet ended = _ended in \n\t\tlet start = _start in\n\t\t\t_canrefund := false; \n\t\t\tassert (!ended);\n\t\t\tassert (party = msg_sender);\n\t\t\tfor i = 0 to numLeadersInt do \n\t\t\tbegin \n\t\t\t\tlet isunlocked = _unlocked[i] in \n\t\t\t\tlet timeout = _timelocks[i] in \n\t\t\t\tif ((isunlocked = false) /\\ (block_timestamp >= start + timeout))\n\t\t\t\tthen _canrefund := true else ()\n\t\t\tend;\n\t\t\tlet canrefund = _canrefund in \n\t\t\t\tassert (canrefund);\n\t\t\tevm.transfer (party, assetAmount); \n\t\t\t_ended := true;\n\t\t\t() \n}\n\n\nlayer signature SWAPCONTRACTSig = {\n\tswapcontract : SwapContractInterface\n}\n\nlayer signature EVMOPCODESig = {\n    evm : EVMOpcodeInterface;\n    digraph : DiGraphInterface;\n}\n\nlayer EVMOPCODE : [{}] EVMOPCODESig = {\n    evm = EVMOpcode; \n    digraph = DiGraph\n}\n\nlayer SWAPCONTRACT : [EVMOPCODESig] SWAPCONTRACTSig = {\n  swapcontract = SwapContract\n}\n\nlayer COMPLETE = SWAPCONTRACT @ EVMOPCODE \n\n"
  },
  {
    "path": "contracts/swaps/swaps_threeway/extraction/Makefile",
    "content": "lastfiles = HyperType.mli HyperTypeInst.mli DataTypeOps.mli EdsgerIdents.mli LayerEVMOPCODE.mli LSrcEVMOPCODE.mli  LayerSWAPCONTRACT.mli LSrcSWAPCONTRACT.mli "
  },
  {
    "path": "contracts/swaps/swaps_threeway/subdir.mk",
    "content": "# WARNING: This file is generated by Edsger, the DeepSEA compiler.\n#          All modification will be lost when regenerating.\nswaps_threeway_FILES = \\\nswaps_threeway/CertiKOS.v \\\nswaps_threeway/DataTypeOps.v \\\nswaps_threeway/DataTypeProofs.v \\\nswaps_threeway/DataTypes.v \\\nswaps_threeway/EdsgerIdents.v \\\nswaps_threeway/LSimEVMOPCODE.v \\\nswaps_threeway/LSimSWAPCONTRACT.v \\\nswaps_threeway/LSrcEVMOPCODE.v \\\nswaps_threeway/LSrcSWAPCONTRACT.v \\\nswaps_threeway/LayerEVMOPCODE.v \\\nswaps_threeway/LayerSWAPCONTRACT.v \\\nswaps_threeway/ObjSimEVMOpcode.v \\\nswaps_threeway/ObjSimSwapContract.v \\\nswaps_threeway/ObjSwapContractCode.v \\\nswaps_threeway/ObjSwapContractCodeProofs.v \\\nswaps_threeway/RefineSWAPCONTRACT.v \\\nswaps_threeway/Symbols.v\n"
  },
  {
    "path": "contracts/swaps/swaps_threeway.ds",
    "content": "(* atomic cross-chain swaps - 3-way swap\n\t\t\t A    one leader only, form a cycle. \n\t\t\t/ \\\n\t\t B - C \n*) \ntype Transfer = {\n\t_amount : uint;\n\t_to : address; \n}\n\nexternal let transfer_nil [[unfold always]] : list Transfer = \"nil\"\nexternal let transfer_cons [[unfold always]] : Transfer * (list Transfer) -> (list Transfer) = \"(fun a b => (cons a b))\"\nexternal let transfer_length [[unfold always]] : (list Transfer) -> uint = \"(fun l => Z_of_nat (length l))\"\nexternal let transfer_cons_unzip [[unfold always]] : address * uint * (list Transfer) -> (list Transfer) = \n\t\t\"(fun toaddr much e => {|_amount := much; _to := toaddr |} :: e)\"\n\n\nobject signature EVMOpcodeInterface = {\n\t(* environment handles the transfer as an append operation to a list \n\t\tof events *) \n  transfer : address * uint -> unit;\n}\n\ntrusted object EVMOpcode : EVMOpcodeInterface {\n    let _events : list Transfer := transfer_nil\n\n    let transfer (toaddr, much) =\n        let e = _events in\n        _events := transfer_cons_unzip (toaddr, much, e);\n        ()\n}\n\n(* place holder for digraph related methods *)\nobject signature DiGraphInterface = {\n\tinitialize : address * address * address * uint -> unit; \n\tconst diam : unit -> uint;\n\tconst maxpathlen : address * address -> uint; \n}\n\nobject signature SwapContractInterface = {\n\n\tinitialize : address * address * address * hashvalue * uint * uint -> unit;\n\tunlock : uint -> unit; \n\tclaim : unit -> unit; \n\trefund : unit -> unit; \n}\n\n(* not really used in here *)\nobject DiGraph () : DiGraphInterface {\n\tlet _graphLeader : address := address(0u0) (* A *)\n\tlet _partyB : address := address(0u0) (* B *)\n\tlet _partyC : address := address(0u0) (* C *)\n\tlet _numParties : uint := 0u0 \n\n\t(* needs to verify that the max_timeout is max length of all possible routes \n\t\tfrom leader to counterparty *)\n\tlet initialize (graphLeader, partyB, partyC, numParties) = \n\t\t_graphLeader := graphLeader; \n\t\t_partyB := partyB; \n\t\t_partyC := partyC;\n\t\t_numParties := numParties; \n\t\t()\n\n\t(* in general, a crude upper bound *)\n\tlet diam () = \n\t\tlet numParties = _numParties in \n\t\tnumParties\n\n\tlet maxpathlen (ld, party) = \n\t\t(* in our example for now, ld is ⟼not used *)\n\t\tlet partyB = _partyB in \n\t\tlet partyC = _partyC in \n\t\tlet leader = _graphLeader in \n\t\t\tif party = leader then 0u1\n\t\t\telse begin if party = partyB then 0u3 else 0u2 end\n\n}\n\n(* contract interface *)\nobject SwapContract ((* digraph: DiGraphInterface, *)evm: EVMOpcodeInterface): SwapContractInterface {\n\tlet _assetAmount : uint := 0u0 \n  let _leader : address := address(0u0)\n\tlet _hashlock : hashvalue := null_hash\n\tlet _timelock : uint := 0u0\n\tlet _party : address := address(0u0)\n\tlet _counterparty : address := address(0u0)\n\tlet _otherparty : address := address(0u0) (* only for the 3 way swap case! *)\n\tlet _start : uint := 0u0 \n\tlet _delta : uint := 0u0 \n\tlet _unlocked : bool := false \n\t(* after the asset has been claimed, halt *)\n\tlet _ended : bool := false \n\n\n\t(* initialize the contract, party (msg_sender) publishes contract *)\n\tlet initialize (leader, otherparty, counterparty, hashlock, start, delta) = \n\t\t(* start time is at least delta into the future *)\n\t\tassert(start >= block_timestamp + delta);\n\t\t(* three distinct parties *)\n\t\tassert(msg_sender <> counterparty /\\ msg_sender <> otherparty /\\ otherparty <> counterparty);\n\t\t_assetAmount := msg_value; \n\t\t_leader := leader;\n\t\t_otherparty := otherparty; \n\t\t_party := msg_sender;\n\t\t_counterparty := counterparty; \n\t\t_hashlock := hashlock;\n\t\t_start := start; \n\t\t_delta := delta; \n\t\t_ended := false;\n\t\t_unlocked := false;\n\t\tlet timelock = \n\t\t\tif msg_sender = leader then 0u6*delta (* A -> B *)\n\t\t\telse \n\t\t\t\tif otherparty = leader \n\t\t\t\tthen 0u5*delta (* B -> C*) else 0u4*delta (* C -> A *)\n\t\t\tin\n\t\t_timelock := timelock;\n\t\t()\n\n\t(* In general, we can't do unlock(secret), because secret can be learned by everyone else\n\t\tbut in the protocol, hashkey consists of path+signatures too. We assume that \n\t\tsignatures can't be faked, hence exposing secret in this way is fine. \n\n\t\tHere, we didn't have signature, but in the proof, we model the observation of secrets \n\t\trevealed as a sequence of events and make sure that they must be in order *)\n\tlet unlock (secret) = \n\t\tlet counterparty = _counterparty in \n\t\tlet hashlock = _hashlock in \n\t\tlet start = _start in \n\t\tlet timelock = _timelock in \n\t\tlet secret_hash = keccak256(secret) in \n\t\t\tassert (msg_sender = counterparty); \n\t\t\tassert (block_timestamp < start+timelock);\n\t\t\tassert (secret_hash = hashlock); \n\t\t\t_unlocked := true; \n\t\t\t()\n\n\tlet claim () = \n\t\tlet counterparty = _counterparty in \n\t\tlet isUnlocked = _unlocked in \n\t\tlet assetAmount = _assetAmount in \n\t\tlet ended = _ended in \n\t\t\tassert (!ended); \n\t\t\tassert (counterparty = msg_sender);\n\t\t\tassert (isUnlocked); \n\t\t\tevm.transfer (counterparty, assetAmount); \n\t\t\t_ended := true; \n\t\t\t()\n\n\tlet refund () =\n\t\tlet party = _party in\n\t\tlet assetAmount = _assetAmount in \n\t\tlet ended = _ended in \n\t\tlet start = _start in\n\t\tlet timelock = _timelock in \n\t\t\tassert (!ended);\n\t\t\tassert (party = msg_sender); \n\t\t\t(* note that we only care about time, doesn't matter whether it's locked or unlocked *)\n\t\t\tassert ((* (!isUnlocked) /\\ *)\n\t\t\t\t\t(block_timestamp >= start+timelock)); \n\t\t\tevm.transfer (party, assetAmount); \n\t\t\t_ended := true;\n\t\t\t() \n}\n\n(*layer signature DIGRAPHSig = {\n\tdigraph : DiGraphInterface\n}\n*)\nlayer signature SWAPCONTRACTSig = {\n\tswapcontract : SwapContractInterface\n}\n\nlayer signature EVMOPCODESig = {\n    evm : EVMOpcodeInterface;\n    (*digraph : DiGraphInterface;*)\n}\n\nlayer EVMOPCODE : [{}] EVMOPCODESig = {\n    evm = EVMOpcode; \n    (*digraph = DiGraph*)\n}\n\n(*layer DIGRAPH : [EVMOPCODESig] DIGRAPHSig = {\n\tdigraph = DiGraph\n}*)\n\nlayer SWAPCONTRACT : [EVMOPCODESig] SWAPCONTRACTSig = {\n  swapcontract = SwapContract\n}\n\nlayer COMPLETE = SWAPCONTRACT @ EVMOPCODE \n\n"
  },
  {
    "path": "contracts/swaps/threeway_prf.v",
    "content": "Require Import prf_setup.\nRequire Import List.\nImport ListNotations.\nRequire Import lib.Monad.RunStateTInv.\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import SymbolicKeccak.\n\nRequire Import lib.Monad.Monad.\nImport MonadNotation.\n\n  (* The following variables don't meaningfully affect the transaction. *)\n  Context (initial_balances: player_addr -> Z)\n          (contract_address_AB contract_address_BC contract_address_CA : int256)\n          (coinbase_AB coinbase_BC coinbase_CA : int256)\n          (number_AB number_BC number_CA : int256)\n          (blockhash_AB blockhash_BC blockhash_CA : int256 -> int256).\n\n  (************************************************************)\n  (*       context setup: machine_env and initial state       *)\n  (************************************************************)\n\n  Context (A_to_B B_to_C C_to_A: int256).\n\n  (* we will bind these two with desired properties and init_global_abstract_data *)\n  Context (pre_init_state init_state : state).\n\n  (* The following variables matter, and we set these to specific values\n     so that the assertions in .ds will succeed.\n\n     While we only care the general properties they satisfy rather than what\n     exact values they take, it is not possible to just bound them by predicates, \n     since the actual methods in `LayerSWAPCONTRACT.v` only do computations over\n     the actual values, and we don't want to modify these methods. *)\n\n  Definition delta : int256 := Int256.repr 2.\n\n  Definition init_timestamp_AB : int256 := Int256.repr 0.\n\n  Definition init_timestamp_BC : int256 := Int256.repr 5.\n\n  Definition init_timestamp_CA : int256 := Int256.repr 10.\n\n\n  (* FIXME: generalize to just three distinct addresses *)\n  Definition A_address : int256 := Int256.repr 0. (* A *)\n  Definition B_address : int256 := Int256.repr 1. (* B *)\n  Definition C_address : int256 := Int256.repr 2. (* C *)\n\n  Definition A_secret := Int256.repr 10.\n  Definition B_secret := Int256.repr 30.\n  Definition C_secret := Int256.repr 60.\n\n  Definition player_A : player :=\n  Build_player A_address A_secret [(C_address, C_to_A)] [(B_address, A_to_B)].\n\n  Definition player_B : player :=\n  Build_player B_address B_secret [(A_address, A_to_B)] [(C_address, B_to_C)].\n\n  Definition player_C : player :=\n  Build_player C_address C_secret [(B_address, B_to_C)] [(A_address, C_to_A)].\n\n  (* single hashlock in the 3-way swap case *)\n  Definition hashlock : hashvalue := hashval_hash1 (hashval_int256 A_secret).\n\n  (************************************************************)\n  (*                definitions, lemmas, ltacs                *)\n  (************************************************************)\n\n  Definition filled_init_AB\n  :=\n  (lifted_init initial_balances contract_address_AB\n   coinbase_AB init_timestamp_AB number_AB blockhash_AB\n   A_address (Int256.intval A_to_B) (* callvalue *)).\n\n  (* they are published, hence, use lifted_init_id *)\n  Definition filled_init_BC\n  :=\n  (lifted_init_id initial_balances contract_address_BC\n   coinbase_BC init_timestamp_BC number_BC blockhash_BC\n   B_address (Int256.intval B_to_C) (* callvalue *)).\n\n  Definition filled_init_CA\n  :=\n  (lifted_init_id initial_balances contract_address_CA\n   coinbase_CA init_timestamp_CA number_CA blockhash_CA\n   C_address (Int256.intval C_to_A) (* callvalue *)).\n\n\n  Definition runstate_unlock\n  con_addr cb ts num bh (p: player_addr)\n  :=\n  (lifted_unlock initial_balances con_addr cb ts num bh\n    p 0%Z).\n\n  Definition runstate_claim\n  con_addr cb ts num bh (p: player_addr)\n  :=\n  (lifted_claim initial_balances con_addr cb ts num bh\n    p 0%Z).\n\n  (* all three players use this strategy *)\n  Definition strategies (p: player) : strategy :=\n  protocol_implementation p.\n\n  Definition use_stg (p: player) (s: player -> strategy)\n    (ss: strategy_tuple): Prop :=\n  ss p = s p.\n\n  Definition is_preinit_state (st : state): Prop :=\n  (* states external to contract state conditions *)\n  is_nil st.(secrets_revealed) = true\n  /\\ is_nil st.(player_transfers) = true\n  /\\ is_nil st.(contracts_published) = true.\n\n  Axiom player_exclusivity :\n  forall (p: player),\n  p = player_A \\/ p = player_B \\/ p = player_C.\n\n  Axiom player_congruence :\n  forall (p: player),\n  (p.(addr) = A_address\n    -> p.(secret) = player_A.(secret)\n       /\\ p.(neighbors_incoming) = player_A.(neighbors_incoming)\n       /\\ p.(neighbors_outgoing) = player_A.(neighbors_outgoing)\n       /\\ p = player_A)\n  /\\\n  (p.(addr) = B_address\n    -> p.(secret) = player_B.(secret)\n       /\\ p.(neighbors_incoming) = player_B.(neighbors_incoming)\n       /\\ p.(neighbors_outgoing) = player_B.(neighbors_outgoing)\n       /\\ p = player_B)\n  /\\\n  (p.(addr) = C_address\n    -> p.(secret) = player_C.(secret)\n       /\\ p.(neighbors_incoming) = player_C.(neighbors_incoming)\n       /\\ p.(neighbors_outgoing) = player_C.(neighbors_outgoing)\n       /\\ p = player_C).\n\n\n  Remark match_osT_bind {A S: Type} {e: option (A*S)} {d s: S} {v: A} {k: A -> S -> osT S A}:\n  runStateT\n    match e with\n    | Some (a, st) => k a st\n    | None => mzero\n    end d = Some (v, s) ->\n  exists a st, e = Some (a, st) /\\ (k a st).(runStateT) d = Some (v, s).\n  Proof.\n  destruct e.\n  - destruct p. intro.\n    exists a, s0. split; auto.\n  - simpl. intro. discriminate.\n  Qed.\n\n  (* helper functions that serve as `remember` or `destruct` *)\n  Remark runstate_extract: forall A S (e: osT S A) s r,\n    runStateT e s = r -> exists e', e = e' /\\ runStateT e' s = r.\n  Proof.\n  intros. exists e. auto.\n  Qed.\n\n  Remark runstate_inj: forall A S (f: S -> option (A * S)) g,\n    {| runStateT := f |} = {| runStateT := g |} -> f = g.\n  Proof.\n  intros. injection H. auto.\n  Qed.\n\n  Remark runstate_match_extract {A S S'}\n  (e: option (A*S)) (s_1 s_2: osT S' A) (v: A) (st: S) v' (x: S') (prev_st: S')\n  : runStateT\n  match e with \n  | Some (v, st) => s_1\n  | None => s_2\n  end prev_st = Some (v', x)\n  -> exists e', e = e' /\\ \n  runStateT\n  match e' with \n  | Some (v, st) => s_1\n  | None => s_2\n  end prev_st = Some (v', x).\n  Proof.\n  intros. exists e. auto.\n  Qed.\n\n  Definition bounded_int256 (v: int256) : Prop :=\n    Z.le 0%Z (Int256.intval v) /\\ Z.le (Int256.intval v) Int256.max_unsigned.\n\n  Remark intval_to_repr :\n    forall v, bounded_int256 v ->\n    exists d, Int256.intval v = d /\\ Int256.repr d = v.\n  Proof.\n  intros.\n  exists (Int256.intval v). split; try reflexivity.\n  unfold bounded_int256 in H.\n  remember (Int256.intval v) as z.\n  apply Int256.unsigned_repr in H.\n  rewrite Heqz. apply Int256.repr_unsigned.\n  Qed.\n\n  Remark preinit_equiv : forall st, \n  is_pre_initialization_phase st = true\n  <-> is_preinit_state st.\n  Proof.\n  intros. unfold is_pre_initialization_phase.\n  unfold is_preinit_state. split.\n  - intro. apply andb_prop in H. destruct H. \n    apply andb_prop in H0. destruct H0.\n    repeat split; assumption.\n  - intro. destruct H. destruct H0.\n    rewrite H. rewrite H0. rewrite H1. auto.\n  Qed.\n\n  Remark eq_eq : forall (x y :int256), \n  Int256.eq x y = true -> x = y.\n  Proof.\n  intros.\n  assert (A := Int256.eq_spec x y).\n  rewrite H in A. assumption.\n  Qed.\n\n  Remark nil_nil : forall {A} (x: list A),\n  is_nil x = true <-> x = [].\n  Proof.\n  intros. split.\n  - unfold is_nil. destruct x; auto.\n    intro. discriminate.\n  - intro. unfold is_nil. rewrite H. auto.\n  Qed.\n\n  Ltac match_runStateT :=\n  match goal with\n    [H: @runStateT ?st ?m ?a match @runStateT ?s ?m ?a ?x ?y \n        with | Some _ => _ | None => _ end _ = _ |- _]\n    => remember (@runStateT s m a x y) as t\n  end.\n\n  Ltac if_runStateT :=\n  match goal with\n    [H: @runStateT ?s ?m ?a (if ?e then _ else _) _ = _ |- _]\n    => destruct e eqn:?\n  end.\n\n  Ltac split_conj :=\n  repeat match goal with\n    [H : ?a /\\ ?b |- _] => destruct H as [? ?]\n  end.\n\n  Ltac forward_replace :=\n  repeat match goal with\n    | [H1: ?a = ?b, H2 : ?b = ?c |- _] => rewrite H2 in H1; clear H2\n    | [H1: ?a = _ :: ?b, H2 : ?b = ?c |- _] => rewrite H2 in H1; clear H2\n  end.\n\n  Ltac unfold_updates H :=\n  unfold update__assetAmount in H; simpl in H;\n  unfold update__leader in H; simpl in H;\n  unfold update__hashlock in H; simpl in H;\n  unfold update__timelock in H; simpl in H;\n  unfold update__counterparty in H; simpl in H;\n  unfold update__otherparty in H; simpl in H;\n  unfold update__party in H; simpl in H;\n  unfold update__start in H; simpl in H;\n  unfold update__delta in H; simpl in H;\n  unfold update__ended in H; simpl in H;\n  unfold update__events in H; simpl in H.\n\n  Ltac unfold_updates_goal :=\n  unfold update__assetAmount; simpl;\n  unfold update__leader; simpl;\n  unfold update__hashlock; simpl;\n  unfold update__timelock; simpl;\n  unfold update__counterparty; simpl;\n  unfold update__otherparty; simpl;\n  unfold update__party; simpl;\n  unfold update__start; simpl;\n  unfold update__delta; simpl;\n  unfold update__ended; simpl;\n  unfold update__events; simpl.\n\n\n  (************************************************************)\n  (*        Properties of methods acting on the state         *)\n  (************************************************************)\n\n  (* append doesn't change contract state *)\n  Lemma append_contract_invariant :\n  forall pt c_pt amt prev_st st,\n  append_contract pt c_pt amt prev_st = st\n  -> (contract_state prev_st) = (contract_state st).\n  Proof.\n  intros. unfold contract_state.\n  unfold append_contract in H. subst. \n  reflexivity.\n  Qed.\n\n  (* lif + append doesn't change contract state *)\n  Lemma lif_lifsimpl_invariant :\n  forall A bal con_addr cbase ts num bh a_addr amt cmd addr_1 addr_2 amt'\n      prev_state (v1: A) st1,\n  runStateT (lif bal con_addr cbase ts num bh a_addr amt\n        cmd\n       (append_contract addr_1 addr_2 amt')) prev_state = \n  Some (v1, st1)\n  -> exists (v2:A) st2, runStateT (lif_simpl bal con_addr cbase ts num bh a_addr amt\n        cmd) prev_state = \n  Some (v2, st2) /\\ (contract_state st1) = (contract_state st2).\n  Proof.\n  intros. simpl in *.\n  destruct (runStateT\n          (cmd\n             (make_machine_env bal con_addr cbase ts num bh\n                a_addr amt\n                ((a_addr, amt) :: player_transfers prev_state)\n                (_events (contract_state prev_state))))\n          (contract_state prev_state)) eqn:?; try congruence.\n  - destruct p.\n    exists a.\n    exists {| contract_state := g;\n              blocktimestamp := blocktimestamp\n                                   prev_state;\n              player_transfers := (a_addr, amt) :: player_transfers\n                                   prev_state;\n              contracts_published := contracts_published\n                                   prev_state;\n              secrets_revealed := secrets_revealed\n                                   prev_state |}.\n    split; try reflexivity.\n    simpl in H. injection H. intros. subst. reflexivity.\n  - simpl in H. discriminate.\n  Qed.\n\n\n  Definition start_AB : int256 := Int256.repr 3. (* ts: 0 *)\n  Definition start_BC : int256 := Int256.repr 8. (* ts: 5 *)\n  Definition start_CA : int256 := Int256.repr 13. (* ts: 10 *)\n\n\n  Definition init_state_AB (o: state) : Prop :=\n  o.(contracts_published) = \n    [(Build_contract A_address B_address A_to_B)]\n  /\\ o.(player_transfers) = [(A_address, (Int256.intval A_to_B))]\n  /\\ o.(secrets_revealed) = nil.\n\n  Definition init_state_BC (o: state) : Prop :=\n  o.(contracts_published) = nil\n  /\\ o.(player_transfers) = nil\n  /\\ o.(secrets_revealed) = nil.\n\n  Definition init_state_CA (o: state) : Prop :=\n  o.(contracts_published) = nil\n  /\\ o.(player_transfers) = nil\n  /\\ o.(secrets_revealed) = nil.\n\n  Definition init_constate_AB (st: global_abstract_data_type) : Prop :=\n  st.(_assetAmount) = A_to_B\n    /\\ st.(_leader) = A_address\n    /\\ st.(_hashlock) = hashlock\n    /\\ st.(_party) = A_address\n    /\\ st.(_counterparty) = B_address\n    /\\ st.(_otherparty) = C_address\n    /\\ st.(_start) = start_AB\n    /\\ st.(_delta) = delta\n    /\\ st.(_unlocked) = false\n    /\\ st.(_ended) = false\n    /\\ st.(_events) = nil\n    /\\ st.(_timelock) = (Int256.mul (Int256.repr 6) delta).\n\n  Definition init_constate_BC (st: global_abstract_data_type) : Prop :=\n  st.(_assetAmount) = B_to_C\n    /\\ st.(_leader) = A_address\n    /\\ st.(_hashlock) = hashlock\n    /\\ st.(_party) = B_address\n    /\\ st.(_counterparty) = C_address\n    /\\ st.(_otherparty) = A_address\n    /\\ st.(_start) = start_BC\n    /\\ st.(_delta) = delta\n    /\\ st.(_unlocked) = false\n    /\\ st.(_ended) = false\n    /\\ st.(_events) = nil\n    /\\ st.(_timelock) = (Int256.mul (Int256.repr 5) delta).\n\n  Definition init_constate_CA (st: global_abstract_data_type) : Prop :=\n  st.(_assetAmount) = C_to_A\n    /\\ st.(_leader) = A_address\n    /\\ st.(_hashlock) = hashlock\n    /\\ st.(_party) = C_address\n    /\\ st.(_counterparty) = A_address\n    /\\ st.(_otherparty) = B_address\n    /\\ st.(_start) = start_CA\n    /\\ st.(_delta) = delta\n    /\\ st.(_unlocked) = false\n    /\\ st.(_ended) = false\n    /\\ st.(_events) = nil\n    /\\ st.(_timelock) = (Int256.mul (Int256.repr 4) delta).\n\n  Lemma initialize_properties :\n  forall prev_state b new_state,\n  bounded_int256 A_to_B\n  -> init_global_abstract_data = prev_state.(contract_state)\n  -> runStateT\n      (SwapContract_initialize_opt A_address C_address B_address\n             hashlock start_AB delta\n      (make_machine_env initial_balances contract_address_AB coinbase_AB\n      init_timestamp_AB number_AB blockhash_AB (* caller address, which is party *)\n      A_address (Int256.intval A_to_B)\n      ((A_address, (Int256.intval A_to_B))::(player_transfers prev_state))\n      (_events (contract_state prev_state))))\n      (contract_state prev_state) = Some (b, new_state)\n  -> init_constate_AB new_state.\n  Proof.\n  intros.\n  Transparent SwapContract_initialize_opt.\n  remember (Int256.intval A_to_B) as z.\n  assert (A_to_B = Int256.repr z).\n  { rewrite Heqz. unfold bounded_int256 in H.\n    symmetry. apply Int256.repr_unsigned. }\n  rewrite H2 in *.\n  unfold SwapContract_initialize_opt in H1.\n  rewrite <- H0 in H1.\n  inv_runStateT.\n  repeat split; subst; try auto.\n  Qed.\n\nSection outcome_proof.\n  (************************************************************)\n  (*      Init(0th) step: Initialize AB, BC, CA               *)\n  (* prove on *AB*: contract state and external state correct *)\n  (* prove for all: all contract state correctly initialized  *)\n  (************************************************************)\n\n  (* Important existence lemma.\n     runStateT _ _ = Some means that the method call didn't fail. *)\n\n  Lemma init_constate_exists_AB :\n  forall amt (* A_to_B *) (prev_state: state),\n  bounded_int256 amt\n  -> init_global_abstract_data = prev_state.(contract_state)\n  -> exists b (new_state : global_abstract_data_type), \n      runStateT\n      (SwapContract_initialize_opt\n             A_address (* leader *) C_address (* otherparty *) B_address (* counterparty *)\n             hashlock start_AB delta\n      (make_machine_env initial_balances contract_address_AB coinbase_AB\n      init_timestamp_AB number_AB blockhash_AB\n      A_address (* party *) (Int256.intval amt)\n      ((A_address, (Int256.intval amt))::(player_transfers prev_state))\n      (_events (contract_state prev_state))))\n      (contract_state prev_state) = Some (b, new_state).\n  Proof.\n  intros. exists tt.\n  remember (Int256.mul (Int256.repr 6) delta) as timelock.\n  exists {| _assetAmount := amt;\n            _leader := A_address;\n            _hashlock := hashlock;\n            _party := A_address;\n            _counterparty := B_address;\n            _otherparty := C_address;\n            _start := start_AB;\n            _delta := delta;\n            _timelock := timelock;\n            _unlocked := false;\n            _ended := false;\n            _events := nil; |}.\n  rewrite <- H0. \n  Transparent SwapContract_initialize_opt.\n  unfold SwapContract_initialize_opt.\n  simpl.\n    Transparent _assetAmount update__assetAmount _leader update__leader _hashlock update__hashlock _timelock update__timelock _party update__party _counterparty update__counterparty _otherparty update__otherparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _events update__events.\n\n    unfold_updates_goal.\n    replace ({|\n       Int256.intval := 6;\n       Int256.intrange := Int256.Z_mod_modulus_range' 6 |}) with (Int256.repr 6)\n       by reflexivity.\n    replace (Int256.repr (Int256.intval amt)) with amt by (symmetry;  apply Int256.repr_unsigned).\n    subst timelock.\n    auto.\n  Qed.\n\n  (* contract correctly initialized *)\n  Lemma init_constate_correct_AB :\n  bounded_int256 A_to_B\n  -> is_true (is_pre_initialization_phase pre_init_state)\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_AB A_address C_address B_address hashlock start_AB delta)\n               pre_init_state = Some (tt, init_state)\n  -> init_constate_AB (contract_state init_state).\n  Proof.\n  intros.\n  unfold filled_init_AB in H2. unfold lifted_init in H2.\n  unfold init_constate_AB.\n  apply lif_lifsimpl_invariant in H2.\n  destruct H2. destruct H2. destruct H2.\n  rewrite H3.\n  unfold lif_simpl in H2.\n  Opaque SwapContract_initialize_opt.\n  simpl in H2.\n  match_runStateT.\n  destruct t eqn:?.\n  - (* assertion succeeds, stuff happens *)\n    destruct p.\n    rewrite <- H1 in *.\n    Transparent SwapContract_initialize_opt.\n    symmetry in Heqt.\n    unfold SwapContract_initialize_opt in Heqt.\n    (* inv_runStateT. *)  (* This part didn't work -- probably it matches the wrong hyptohesis. *)\n    inv_runStateT1 Heqt.\n    subst.\n    unfold_updates H2.\n    inversion H2. simpl.\n    repeat split; try auto.\n    apply Int256.repr_unsigned.\n  - (* assertion fails, nothing happens *)\n    simpl in H2. discriminate.\n  Qed.\n\n  (* external state - \"observations\" - correctly initialized *)\n  Lemma init_state_correct_AB : \n  bounded_int256 A_to_B\n  -> is_preinit_state pre_init_state\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_AB A_address C_address B_address hashlock start_AB delta)\n               pre_init_state = Some (tt, init_state)\n  -> init_state_AB init_state.\n  Proof.\n  intros.\n  unfold init_state_AB.\n  unfold filled_init_AB in H2.\n  unfold lifted_init in H2.\n  unfold append_contract in H2.\n  unfold lif in H2.\n  simpl in H2.\n  unfold is_preinit_state in H0.\n  split_conj.\n  inversion H2. simpl.\n  apply nil_nil in H4; rewrite H4 in *.\n  apply nil_nil in H0; rewrite H0 in *.\n  apply nil_nil in H3; rewrite H3 in *.\n  repeat split; try assumption; try reflexivity.\n  replace (Int256.repr (Int256.intval A_to_B)) with (A_to_B).\n  reflexivity.\n  symmetry; apply Int256.repr_unsigned.\n  Qed.\n\n\n  Lemma init_constate_exists_BC :\n  forall amt (* B_to_C *) (prev_state: state),\n  bounded_int256 amt\n  -> init_global_abstract_data = prev_state.(contract_state)\n  -> exists b (new_state : global_abstract_data_type), \n      runStateT\n      (SwapContract_initialize_opt\n             A_address (* leader *) A_address (* otherparty *) C_address (* counterparty *)\n             hashlock start_BC delta\n      (make_machine_env initial_balances contract_address_BC coinbase_BC\n      init_timestamp_BC number_BC blockhash_BC (* caller address, which is party *)\n      B_address (Int256.intval amt)\n      ((B_address, (Int256.intval amt))::(player_transfers prev_state))\n      (_events (contract_state prev_state))))\n      (contract_state prev_state) = Some (b, new_state).\n  Proof.\n  intros. exists tt.\n  remember (Int256.mul (Int256.repr 5) delta) as timelock.\n  exists {| _assetAmount := amt;\n            _leader := A_address;\n            _hashlock := hashlock;\n            _party := B_address;\n            _counterparty := C_address;\n            _otherparty := A_address;\n            _start := start_BC;\n            _delta := delta;\n            _timelock := timelock;\n            _unlocked := false;\n            _ended := false;\n            _events := nil; |}.\n  rewrite <- H0.\n  Transparent SwapContract_initialize_opt.\n  unfold SwapContract_initialize_opt.\n  Transparent _assetAmount update__assetAmount _leader update__leader _hashlock update__hashlock _timelock update__timelock _party update__party _counterparty update__counterparty _otherparty update__otherparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _events update__events.\n  unfold_updates_goal.\n  replace ({|\n       Int256.intval := 5;\n       Int256.intrange := Int256.Z_mod_modulus_range' 5 |}) with (Int256.repr 5)\n       by reflexivity.\n  replace (Int256.repr (Int256.intval amt)) with amt\n    by (symmetry; apply Int256.repr_unsigned).\n  subst timelock.\n  reflexivity.\n  Qed.\n\n  Lemma init_constate_correct_BC :\n  bounded_int256 B_to_C\n  -> is_true (is_pre_initialization_phase pre_init_state)\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_BC A_address A_address C_address hashlock start_BC delta)\n               pre_init_state = Some (tt, init_state)\n  -> init_constate_BC (contract_state init_state).\n  Proof.\n  intros.\n  unfold init_constate_BC.\n  unfold filled_init_BC in H2;\n  unfold lifted_init_id in H2.\n  unfold f_id in H2. simpl in H2.\n  inversion H2. simpl.\n  repeat split; try auto.\n  apply Int256.repr_unsigned.\n  unfold_updates H4.\n  rewrite <- H1. auto.\n  Qed.\n\n  Lemma init_constate_exists_CA :\n  forall amt (* C_to_A *) (prev_state: state),\n  bounded_int256 amt\n  -> init_global_abstract_data = prev_state.(contract_state)\n  -> exists b (new_state : global_abstract_data_type), \n      runStateT\n      (SwapContract_initialize_opt\n             A_address (* leader *) B_address (* otherparty *) A_address (* counterparty *)\n             hashlock start_CA delta\n      (make_machine_env initial_balances contract_address_CA coinbase_CA\n      init_timestamp_CA number_CA blockhash_CA (* caller address, which is party *)\n      C_address (Int256.intval amt)\n      ((C_address, (Int256.intval amt))::(player_transfers prev_state))\n      (_events (contract_state prev_state))))\n      (contract_state prev_state) = Some (b, new_state).\n  Proof.\n  intros. exists tt.\n  remember (Int256.mul (Int256.repr 4) delta) as timelock.\n  exists {| _assetAmount := amt;\n            _leader := A_address;\n            _hashlock := hashlock;\n            _party := C_address;\n            _counterparty := A_address;\n            _otherparty := B_address;\n            _start := start_CA;\n            _delta := delta;\n            _timelock := timelock;\n            _unlocked := false;\n            _ended := false;\n            _events := nil; |}.\n  rewrite <- H0.\n  Transparent SwapContract_initialize_opt.\n  unfold SwapContract_initialize_opt.\n  Transparent _assetAmount update__assetAmount _leader update__leader _hashlock update__hashlock _timelock update__timelock _party update__party _counterparty update__counterparty _otherparty update__otherparty _start update__start _delta update__delta _unlocked update__unlocked _ended update__ended _events update__events.\n  unfold_updates_goal.\n  replace ({|\n       Int256.intval := 4;\n       Int256.intrange := Int256.Z_mod_modulus_range' 4 |}) with (Int256.repr 4).\n    replace (Int256.repr (Int256.intval amt)) with amt.\n  subst timelock.\n  reflexivity.\n  symmetry. apply Int256.repr_unsigned.\n  unfold Int256.repr. reflexivity.\n  Qed.\n\n\n  Lemma init_constate_correct_CA :\n  bounded_int256 C_to_A\n  -> is_true (is_pre_initialization_phase pre_init_state)\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_CA A_address B_address A_address hashlock start_CA delta)\n               pre_init_state = Some (tt, init_state)\n  -> init_constate_CA (contract_state init_state).\n  Proof.\n  intros.\n  unfold init_constate_CA.\n  unfold filled_init_CA in H2; unfold lifted_init_id in H2.\n  unfold f_id in H2. simpl in H2.\n  inversion H2. simpl.\n  repeat split; try auto.\n  apply Int256.repr_unsigned.\n  unfold_updates H4.\n  rewrite <- H1. auto.\n  Qed.\n\n\n  (************************************************************)\n  (*                First step: AB live                       *)\n  (*        prove on contract *AB*: B publishes BC            *)\n  (************************************************************)\n\n  (* the external fields of state is what all three contracts would agree on,\n     since they correspond to observations and event log. *)\n\n  (* State changes after first step: \n   * contract state of AB doesn't change, contract BC gets published, \n   * so that now both contracts are live.\n   *)\n  Definition mstep1_state (o i: state) : Prop :=\n  o.(contracts_published) =\n    (Build_contract B_address C_address B_to_C) :: (contracts_published i)\n  /\\ o.(player_transfers) = (B_address, Int256.intval B_to_C) :: (player_transfers i)\n  /\\ o.(secrets_revealed) = (secrets_revealed i).\n\n  Definition mstep1_constate (c_st init_st: global_abstract_data_type) : Prop :=\n  c_st.(_assetAmount) = init_st.(_assetAmount)\n  /\\ c_st.(_leader) = init_st.(_leader)\n  /\\ c_st.(_hashlock) = init_st.(_hashlock)\n  /\\ c_st.(_timelock) = init_st.(_timelock)\n  /\\ c_st.(_party) = init_st.(_party)\n  /\\ c_st.(_counterparty) = init_st.(_counterparty)\n  /\\ c_st.(_otherparty) = init_st.(_otherparty)\n  /\\ c_st.(_start) = init_st.(_start)\n  /\\ c_st.(_delta) = init_st.(_delta)\n  /\\ c_st.(_unlocked) = init_st.(_unlocked)\n  /\\ c_st.(_ended) = init_st.(_ended)\n  /\\ c_st.(_events) = init_st.(_events).\n\n\n  (* after init_state, next step is publish contract B -> C *)\n  Lemma mstep1_correct_AB (o: state) : \n  bounded_int256 A_to_B\n  -> is_preinit_state pre_init_state\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_AB A_address C_address B_address hashlock start_AB delta) (* determines the machine env. *)\n               pre_init_state = Some (tt, init_state)\n  (* after init_state *)\n  -> mstep strategies initial_balances contract_address_AB\n           coinbase_AB init_timestamp_AB number_AB blockhash_AB\n     (* prev contract state *)\n     init_state init_state o\n  -> o = init_state\n     \\/\n     ((mstep1_state o init_state)\n     /\\ (mstep1_constate o.(contract_state) init_state.(contract_state))).\n  Proof.\n  intros. simpl in *.\n  pose (Hi_state := init_state_correct_AB H H0 H1 H2);\n    clearbody Hi_state.\n  destruct Hi_state as [H4 [H5 H6]].\n  assert (is_true (is_pre_initialization_phase pre_init_state)).\n  { apply preinit_equiv. assumption. }\n  pose (Hi_constate := init_constate_correct_AB H H7 H1 H2);\n    clearbody Hi_constate.\n  unfold init_constate_AB in Hi_constate.\n  split_conj.\n  inversion H3.\n  unfold mstep1_state.\n  unfold mstep1_constate.\n  unfold strategies in H20.\n  unfold protocol_implementation in H20.\n  destruct (is_pre_initialization_phase init_state) eqn:?.\n  - (* preinit phase - contradiction *)\n    apply preinit_equiv in Heqb. unfold is_preinit_state in Heqb.\n    split_conj.  rewrite H4 in *. inversion H25.\n  - (* not preinit phase *)\n    destruct (is_leader init_state p) eqn:?.\n    + (* leader *)\n      unfold is_leader in Heqb0.\n      apply eq_eq in Heqb0. rewrite H9 in Heqb0. \n      destruct (negb (outgoing_contracts_complete init_state p)) eqn:?.\n      * (* outgoing not complete: contradiction *)\n        unfold outgoing_contracts_complete in Heqb1.\n        unfold edge_contract_valid in Heqb1.\n        assert (neighbors_outgoing p = neighbors_outgoing player_A).\n        { apply player_congruence. auto. }\n        rewrite H4 in Heqb1. rewrite H23 in Heqb1.\n        simpl in Heqb1. rewrite <- Heqb0 in Heqb1.\n        replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n        replace (Int256.eq A_address A_address) with true in Heqb1.\n        inversion Heqb1.\n        symmetry; apply Int256.eq_true.\n        symmetry; apply Int256.eq_true.\n      * (* outgoing complete *)\n        destruct (incoming_contracts_complete init_state p) eqn:?.\n        -- (* incoming complete: contradiction *)\n          unfold incoming_contracts_complete in Heqb2.\n          unfold edge_contract_valid in Heqb2.\n          assert (neighbors_incoming p = neighbors_incoming player_A).\n          { apply player_congruence. auto. }\n          rewrite H4 in Heqb2. rewrite H23 in Heqb2.\n          simpl in Heqb2. inversion Heqb2.\n        -- (* incoming incomplete : NO ACTION *)\n          left. simpl in H20. inversion H20. auto.\n    + (* follower *)\n      pose (He := player_exclusivity p); clearbody He.\n      inversion He. rewrite H23 in Heqb0.\n      unfold is_leader in Heqb0. simpl in Heqb0.\n      replace (_leader (contract_state init_state)) with A_address in Heqb0.\n      inversion Heqb0. clear He.\n      destruct H23.\n      * (* player B *)\n        rewrite H23 in *. subst.\n        destruct (incoming_contracts_complete init_state player_B &&\n          negb (outgoing_contracts_complete init_state player_B)) eqn:?.\n        -- (* can publish: ACTION *)\n          right.\n          repeat split;\n          unfold unpublished_contracts in H20;\n          rewrite H4 in *; simpl in H20; inversion H20; try reflexivity.\n          (* that gets rid of all but contracts_published case *)\n          rewrite H4. reflexivity.\n        -- (* can't publish: contradiction *)\n          clear H20.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold incoming_contracts_complete in Heqb1.\n          rewrite H4 in *. simpl in Heqb1.\n          replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n          inversion Heqb1.\n          symmetry. apply Int256.eq_true.\n      * (* player C *)\n        rewrite H23 in *. subst.\n        destruct (incoming_contracts_complete init_state player_C &&\n          negb (outgoing_contracts_complete init_state player_C)) eqn:?.\n        -- (* can publish: contradiction *)\n          clear H20.\n          unfold incoming_contracts_complete in Heqb1.\n          simpl in Heqb1.\n          rewrite H4 in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          inversion Heqb1.\n        -- (* can't publish: NO ACTION *)\n          left.\n          replace (has_learned_secret init_state player_C) with false in H20.\n          simpl in H20. inversion H20. \n          auto.\n          unfold has_learned_secret.\n          rewrite H6.\n          reflexivity.\n  Qed.\n\n  (************************************************************)\n  (*               Second step: AB, BC live                   *)\n  (*      prove on contract *AB*: C publishes contract CA     *)\n  (*     (prove on contract *BC*: C publishes contract CA)    *)\n  (************************************************************)\n\n  (* same for AB and BC -> new contract and transfer by C *)\n  Definition mstep2_state (o i: state) : Prop :=\n  o.(contracts_published) =\n    (Build_contract C_address A_address C_to_A) :: (contracts_published i)\n  /\\ o.(player_transfers) = (C_address, Int256.intval C_to_A) :: (player_transfers i)\n  /\\ o.(secrets_revealed) = (secrets_revealed i).\n\n  (* same for AB and BC -> no change in contract state. *)\n  Definition mstep2_constate (next_st st: global_abstract_data_type) : Prop :=\n  next_st.(_assetAmount) = st.(_assetAmount)\n  /\\ next_st.(_leader) = st.(_leader)\n  /\\ next_st.(_hashlock) = st.(_hashlock)\n  /\\ next_st.(_timelock) = st.(_timelock)\n  /\\ next_st.(_party) = st.(_party)\n  /\\ next_st.(_counterparty) = st.(_counterparty)\n  /\\ next_st.(_otherparty) = st.(_otherparty)\n  /\\ next_st.(_start) = st.(_start)\n  /\\ next_st.(_delta) = st.(_delta)\n  /\\ next_st.(_unlocked) = st.(_unlocked)\n  /\\ next_st.(_ended) = st.(_ended)\n  /\\ next_st.(_events) = st.(_events).\n\n\n  Definition mstep1_since_init_AB (o i: state) :Prop :=\n  (* external state changed since init_state *)\n  (contracts_published o) =\n      [(Build_contract B_address C_address B_to_C)]\n      ++ (contracts_published i)\n  /\\\n  (player_transfers o) = \n      [(B_address, Int256.intval B_to_C)]\n      ++ (player_transfers i)\n  (* /\\ (blocktimestamp o) = (blocktimestamp i) *)\n  /\\ (secrets_revealed o) = (secrets_revealed i)\n  (* contract state is not changed since init_state *)\n  /\\ (contract_state o) = (contract_state i).\n\n  Definition mstep1_since_init_BC (o i: state) :Prop :=\n  (* external state changed since init_state *)\n  (contracts_published o) =\n      [(Build_contract B_address C_address B_to_C);\n       (Build_contract A_address B_address A_to_B)]\n      ++ (contracts_published i)\n  /\\\n  (player_transfers o) = \n      [(B_address, Int256.intval B_to_C);\n       (A_address, Int256.intval A_to_B)]\n      ++ (player_transfers i)\n  /\\ (secrets_revealed o) = (secrets_revealed i)\n  (* contract state is not changed since init_state *)\n  /\\ (contract_state o) = (contract_state i).\n\n\n  Lemma mstep2_correct_AB (st_1 st_2: state) : \n  bounded_int256 A_to_B\n  -> is_preinit_state pre_init_state\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_AB A_address C_address B_address hashlock start_AB delta) (* determines the me. *)\n               pre_init_state = Some (tt, init_state)\n  -> mstep1_since_init_AB st_1 init_state\n  -> mstep strategies initial_balances contract_address_AB\n           coinbase_AB init_timestamp_AB number_AB blockhash_AB\n     st_1 st_1 st_2\n  -> st_2 = st_1\n     \\/\n     ((mstep2_state st_2 st_1)\n     /\\ (mstep2_constate st_2.(contract_state) st_1.(contract_state))).\n  Proof.\n  intros.\n  unfold mstep1_since_init_AB in H3.\n  assert (is_true (is_pre_initialization_phase pre_init_state)).\n  { apply preinit_equiv. assumption. }\n  unfold is_preinit_state in H0.\n  split_conj.\n  apply nil_nil in H0;\n  apply nil_nil in H9;\n  apply nil_nil in H10.\n  pose (Hi_constate := init_constate_correct_AB H H5 H1 H2);\n    clearbody Hi_constate.\n  unfold init_constate_AB in Hi_constate.\n  unfold mstep2_state; unfold mstep2_constate.\n  inversion H2.\n  unfold append_contract in H12;\n    simpl in H12.\n  split_conj. forward_replace.\n  unfold_updates H13. (* now, we've brought init_state to the env *)\n  inversion H4. (* main proof starts here *)\n  unfold strategies in *.\n  unfold protocol_implementation in *.\n  destruct (is_pre_initialization_phase st_1) eqn:?.\n  subst st st'.\n  - (* preinit phase: contradiction *)\n    apply preinit_equiv in Heqb.\n    unfold is_preinit_state in Heqb.\n    split_conj.\n    rewrite H3 in H27. unfold is_nil in H27.\n    discriminate.\n  - (* not preinit phase *)\n    destruct (is_leader st_1 p) eqn:?.\n    + (* leader *)\n      unfold is_leader in Heqb0.\n      apply eq_eq in Heqb0.\n      rewrite H8 in Heqb0; rewrite <- H12 in Heqb0;\n        simpl in Heqb0.\n      assert (p = player_A).\n      { apply player_congruence. auto. }\n      subst p.\n      destruct (negb (outgoing_contracts_complete st_1 player_A)) eqn:?.\n      * (* outgoing not complete: contradiction *)\n        unfold outgoing_contracts_complete in Heqb1.\n        unfold edge_contract_valid in Heqb1.\n        rewrite H3 in Heqb1; rewrite <- H12 in Heqb1;\n          simpl in Heqb1.\n        replace (Int256.repr (Int256.intval A_to_B)) with A_to_B in Heqb1.\n        replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n        inversion Heqb1.\n        symmetry; apply Int256.eq_true.\n        symmetry; apply Int256.repr_unsigned.\n      * (* outgoing complete *)\n        destruct (incoming_contracts_complete st_1 player_A) eqn:?.\n        -- (* incoming complete: contradiction *)\n          unfold incoming_contracts_complete in Heqb2.\n          unfold edge_contract_valid in Heqb2.\n          rewrite H3 in Heqb2; rewrite <- H12 in Heqb2;\n            rewrite H10 in Heqb2;\n            simpl in Heqb2.\n         inversion Heqb2.\n        -- (* incoming incomplete : NO ACTION *)\n          left.\n          simpl in H24. inversion H24. auto.\n    + (* follower *)\n      pose (He := player_exclusivity p); clearbody He.\n      inversion He.\n      unfold is_leader in Heqb0. simpl in Heqb0.\n      rewrite H8 in Heqb0; rewrite  H13 in Heqb0.\n      subst p. simpl in Heqb0.\n      inversion Heqb0. clear He.\n      destruct H27.\n      * (* player B *)\n        destruct (incoming_contracts_complete st_1 p &&\n         negb (outgoing_contracts_complete st_1 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1; rewrite <- H12 in Heqb1;\n            rewrite H10 in Heqb1;\n            simpl in Heqb1.\n          replace (Int256.repr (Int256.intval A_to_B)) with A_to_B in Heqb1.\n          replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          inversion Heqb1.\n          symmetry; apply Int256.eq_true.\n          symmetry; apply Int256.eq_true.\n          symmetry; apply Int256.repr_unsigned.\n        -- (* can't publish: NO ACTION *)\n          left.\n          subst p.\n          replace (has_learned_secret st_1 player_B) with false in H24.\n          simpl in H24. inversion H24. auto.\n          unfold has_learned_secret.\n          rewrite H7; rewrite <- H12; rewrite H0;\n            reflexivity.\n      * (* player C *)\n        destruct (incoming_contracts_complete st_1 p &&\n         negb (outgoing_contracts_complete st_1 p)) eqn:?.\n        -- (* can publish: ACTION *)\n          right.\n          subst.\n          simpl in H24.\n          inversion H24. simpl.\n          (* gets rid of all but the meaningful publish contract case *)\n          repeat split; try reflexivity.\n          unfold unpublished_contracts.\n          rewrite H3; rewrite <- H12; rewrite H10;\n            reflexivity.\n          unfold unpublished_contracts.\n          rewrite H3; rewrite <- H12; rewrite H10;\n            reflexivity.\n        -- (* can't publish: contradiction *)\n          subst p.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold incoming_contracts_complete in Heqb1.\n          rewrite H3 in Heqb1; rewrite <- H12 in Heqb1;\n            rewrite H10 in Heqb1;\n            simpl in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          inversion Heqb1.\n          symmetry; apply Int256.eq_true.\n  Qed.\n\n  Lemma mstep2_correct_BC (st_1 st_2: state) : \n  bounded_int256 B_to_C\n  -> is_preinit_state pre_init_state\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_BC A_address A_address C_address hashlock start_BC delta) (* determines the me. *)\n               pre_init_state = Some (tt, init_state)\n  -> mstep1_since_init_BC st_1 init_state\n  -> mstep strategies initial_balances contract_address_BC\n           coinbase_BC init_timestamp_BC number_BC blockhash_BC\n     st_1 st_1 st_2\n  -> st_2 = st_1\n     \\/\n     ((mstep2_state st_2 st_1)\n     /\\ (mstep2_constate st_2.(contract_state) st_1.(contract_state))).\n  Proof.\n  intros.\n  unfold mstep1_since_init_BC in H3.\n  assert (is_true (is_pre_initialization_phase pre_init_state)).\n  { apply preinit_equiv. assumption. }\n  unfold is_preinit_state in H0.\n  split_conj.\n  apply nil_nil in H0;\n  apply nil_nil in H9;\n  apply nil_nil in H10.\n  pose (Hi_constate := init_constate_correct_BC H H5 H1 H2);\n    clearbody Hi_constate.\n  unfold init_constate_BC in Hi_constate.\n  unfold mstep2_state; unfold mstep2_constate.\n  inversion H2.\n  unfold append_contract in H12;\n    simpl in H12.\n  split_conj. forward_replace.\n  unfold_updates H13. (* now, we've brought init_state to the env *)\n  inversion H4. (* main proof starts here *)\n  unfold strategies in *.\n  unfold protocol_implementation in *.\n  destruct (is_pre_initialization_phase st_1) eqn:?.\n  subst st st'.\n  - (* preinit phase: contradiction *)\n    apply preinit_equiv in Heqb.\n    unfold is_preinit_state in Heqb.\n    split_conj.\n    rewrite H3 in H27. unfold is_nil in H27.\n    discriminate.\n  - (* not preinit phase *)\n    destruct (is_leader st_1 p) eqn:?.\n    + (* leader *)\n      unfold is_leader in Heqb0.\n      apply eq_eq in Heqb0.\n      rewrite H8 in Heqb0; rewrite <- H12 in Heqb0;\n        simpl in Heqb0.\n      assert (p = player_A).\n      { apply player_congruence. auto. }\n      subst p.\n      destruct (negb (outgoing_contracts_complete st_1 player_A)) eqn:?.\n      * (* outgoing not complete: contradiction *)\n        unfold outgoing_contracts_complete in Heqb1.\n        unfold edge_contract_valid in Heqb1.\n        rewrite H3 in Heqb1; rewrite <- H12 in Heqb1;\n          simpl in Heqb1.\n        replace (Int256.repr (Int256.intval A_to_B)) with A_to_B in Heqb1.\n        replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n        inversion Heqb1.\n        symmetry; apply Int256.eq_true.\n        symmetry; apply Int256.repr_unsigned.\n      * (* outgoing complete *)\n        destruct (incoming_contracts_complete st_1 player_A) eqn:?.\n        -- (* incoming complete: contradiction *)\n          unfold incoming_contracts_complete in Heqb2.\n          unfold edge_contract_valid in Heqb2.\n          rewrite H3 in Heqb2; rewrite <- H12 in Heqb2;\n            rewrite H10 in Heqb2;\n            simpl in Heqb2.\n         inversion Heqb2.\n        -- (* incoming incomplete : NO ACTION *)\n          left.\n          simpl in H24. inversion H24. auto.\n    + (* follower *)\n      pose (He := player_exclusivity p); clearbody He.\n      inversion He.\n      unfold is_leader in Heqb0. simpl in Heqb0.\n      rewrite H8 in Heqb0; rewrite  H13 in Heqb0.\n      subst p. simpl in Heqb0.\n      inversion Heqb0. clear He.\n      destruct H27.\n      * (* player B *)\n        destruct (incoming_contracts_complete st_1 p &&\n         negb (outgoing_contracts_complete st_1 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1; rewrite <- H12 in Heqb1;\n            rewrite H10 in Heqb1;\n            simpl in Heqb1.\n          replace (Int256.repr (Int256.intval A_to_B)) with A_to_B in Heqb1.\n          replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          inversion Heqb1.\n          symmetry; apply Int256.eq_true.\n          symmetry; apply Int256.eq_true.\n          symmetry; apply Int256.repr_unsigned.\n        -- (* can't publish: NO ACTION *)\n          left.\n          subst p.\n          replace (has_learned_secret st_1 player_B) with false in H24.\n          simpl in H24. inversion H24. auto.\n          unfold has_learned_secret.\n          rewrite H7; rewrite <- H12; rewrite H0;\n            reflexivity.\n      * (* player C *)\n        destruct (incoming_contracts_complete st_1 p &&\n         negb (outgoing_contracts_complete st_1 p)) eqn:?.\n        -- (* can publish: ACTION *)\n          right.\n          subst.\n          simpl in H24.\n          inversion H24. simpl.\n          (* gets rid of all but the meaningful publish contract case *)\n          repeat split; try reflexivity.\n          unfold unpublished_contracts.\n          rewrite H3; rewrite <- H12; rewrite H10;\n            reflexivity.\n          unfold unpublished_contracts.\n          rewrite H3; rewrite <- H12; rewrite H10;\n            reflexivity.\n        -- (* can't publish: contradiction *)\n          subst p.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold incoming_contracts_complete in Heqb1.\n          rewrite H3 in Heqb1; rewrite <- H12 in Heqb1;\n            rewrite H10 in Heqb1;\n            simpl in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          inversion Heqb1.\n          symmetry; apply Int256.eq_true.\n  Qed.\n\n  (************************************************************)\n  (*              Third step: AB, BC, CA live,                *)\n  (*   prove on contract *CA*: A reveals secret + unlocks CA  *)\n  (************************************************************)\n\n\n  Definition mstep3_state (o i: state) : Prop :=\n  o.(contracts_published) = (contracts_published i)\n  /\\ o.(player_transfers) = (A_address, 0%Z) :: (player_transfers i)\n  /\\ o.(secrets_revealed) = (A_address, A_secret) :: (secrets_revealed i).\n\n  (* this is in regards to contract CA state; others unchanged *)\n  Definition mstep3_constate (next_st st: global_abstract_data_type) : Prop :=\n  next_st.(_assetAmount) = st.(_assetAmount)\n  /\\ next_st.(_leader) = st.(_leader)\n  /\\ next_st.(_hashlock) = st.(_hashlock)\n  /\\ next_st.(_timelock) = st.(_timelock)\n  /\\ next_st.(_party) = st.(_party)\n  /\\ next_st.(_counterparty) = st.(_counterparty)\n  /\\ next_st.(_otherparty) = st.(_otherparty)\n  /\\ next_st.(_start) = st.(_start)\n  /\\ next_st.(_delta) = st.(_delta)\n  /\\ next_st.(_unlocked) = true (* unlocked *)\n  /\\ next_st.(_ended) = st.(_ended)\n  /\\ next_st.(_events) = st.(_events).\n\n  Definition mstep2_since_init_CA (o i: state) :Prop :=\n  (* external state changed since init_state *)\n  (contracts_published o) =\n      [(Build_contract C_address A_address C_to_A);\n       (Build_contract B_address C_address B_to_C);\n       (Build_contract A_address B_address A_to_B)]\n      ++ (contracts_published i)\n  /\\\n  (player_transfers o) = \n      [(C_address, Int256.intval C_to_A);\n       (B_address, Int256.intval B_to_C);\n       (A_address, Int256.intval A_to_B)]\n      ++ (player_transfers i)\n  /\\ (secrets_revealed o) = (secrets_revealed i)\n  (* contract state is not changed since init_state *)\n  /\\ (contract_state o) = (contract_state i).\n\n\n  Lemma mstep3_correct_CA (st_2 st_3: state) : \n  bounded_int256 C_to_A\n  -> is_preinit_state pre_init_state\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_CA A_address B_address A_address hashlock start_CA delta)\n               pre_init_state = Some (tt, init_state)\n  (* after init_state *)\n  -> mstep2_since_init_CA st_2 init_state\n  -> mstep strategies initial_balances contract_address_CA\n           coinbase_CA init_timestamp_CA number_CA blockhash_CA\n     st_2 st_2 st_3\n  -> st_3 = st_2\n     \\/\n     ((mstep3_state st_3 st_2)\n     /\\ (mstep3_constate st_3.(contract_state) st_2.(contract_state))).\n  Proof.\n  intros.\n  unfold mstep2_since_init_CA in H3.\n  assert (is_true (is_pre_initialization_phase pre_init_state)).\n  { apply preinit_equiv. assumption. }\n  unfold is_preinit_state in H0.\n  split_conj.\n  apply nil_nil in H10; apply nil_nil in H9;\n  apply nil_nil in H0.\n  pose (H_1constate := init_constate_correct_CA H H5 H1 H2);\n    clearbody H_1constate.\n  unfold init_constate_CA in H_1constate.\n  unfold mstep3_state. unfold mstep3_constate.\n  inversion H2. \n  split_conj. forward_replace.\n  unfold f_id in H12; simpl in H12.\n  (* now all the desired properties from st_2 are in the env. *)\n  inversion H4. (* main proof starts here, where we go into cases *)\n  unfold strategies in *.\n  unfold protocol_implementation in *.\n  destruct (is_pre_initialization_phase st_2) eqn:?.\n  subst st. subst st'.\n  - (* preinit phase: contradiction *)\n    apply preinit_equiv in Heqb.\n    unfold is_preinit_state in Heqb.\n    split_conj. rewrite H3 in H27.\n    unfold is_nil in H27.\n    discriminate.\n  - (* not preinit phase *)\n    subst st. subst st'.\n    destruct (is_leader st_2 p) eqn:?.\n    + (* leader *)\n      unfold is_leader in Heqb0.\n      apply eq_eq in Heqb0. rewrite H8 in *.\n      rewrite H13 in Heqb0.\n      assert (p = player_A).\n        { apply player_congruence. auto. }\n      subst.\n      destruct (negb (outgoing_contracts_complete st_2 player_A)) eqn:?.\n      * (* outgoing not complete: contradiction *)\n        unfold outgoing_contracts_complete in Heqb1.\n        unfold edge_contract_valid in Heqb1.\n        rewrite <- H12 in H3; rewrite H10 in H3; simpl in H3.\n        rewrite H3 in Heqb1.\n        simpl in Heqb1.\n        replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n        inversion Heqb1.\n        symmetry. apply Int256.eq_true.\n      * (* outgoing complete *)\n        destruct (incoming_contracts_complete st_2 player_A) eqn:?.\n        -- (* incoming complete: ACTION *)\n          right.\n          rewrite H7 in H24.\n          assert (secrets_revealed init_state = nil).\n          { rewrite <- H12. simpl. assumption. }\n          rewrite H25 in H24.\n          simpl in H24.\n          rewrite H8 in H24.\n          rewrite <- H12 in H24.\n          Transparent SwapContract_unlock_opt Hquery0 builtin0_timestamp_impl\n                      builtin0_caller_impl.\n          simpl in H24.\n          inversion H24. simpl.\n          repeat split; try auto.\n          rewrite H11. apply Int256.repr_unsigned.\n          rewrite <- H12; simpl.\n          reflexivity. (* success! state successfully gets updated!! *)\n        -- (* incoming incomplete : contradiction *)\n          unfold incoming_contracts_complete in Heqb2.\n          rewrite H3 in Heqb2.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H12. simpl. assumption. }\n          rewrite H25 in Heqb2.\n          simpl in Heqb2.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb2.\n          inversion Heqb2.\n          symmetry. apply Int256.eq_true.\n    + (* follower *)\n      pose (He := player_exclusivity p); clearbody He.\n      inversion He.\n      unfold is_leader in Heqb0. simpl in Heqb0.\n      rewrite H8 in Heqb0. rewrite H13 in Heqb0.\n      rewrite H25 in Heqb0.\n      inversion Heqb0. clear He.\n      destruct H25.\n      * (* player B *)\n        destruct (incoming_contracts_complete st_2 p &&\n         negb (outgoing_contracts_complete st_2 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H12. simpl. assumption. }\n          rewrite H25 in Heqb1. simpl in Heqb1.\n          replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          inversion Heqb1.\n          symmetry; apply Int256.eq_true.\n          symmetry; apply Int256.eq_true.\n        -- (* can't publish + no secrets revealed : NO ACTION *)\n          left.\n          subst p.\n          replace (has_learned_secret st_2 player_B) with false in H24.\n          simpl in H24. inversion H24. auto.\n          unfold has_learned_secret.\n          rewrite H7. rewrite <- H12.\n          simpl. rewrite H0. reflexivity.\n      * (* player C *)\n        destruct (incoming_contracts_complete st_2 p &&\n         negb (outgoing_contracts_complete st_2 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H12. simpl. assumption. }\n          rewrite H25 in Heqb1. simpl in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb1.\n          inversion Heqb1.\n          symmetry; apply Int256.eq_true.\n          symmetry; apply Int256.eq_true.\n        -- (* can't publish + no secrets revealed : NO ACTION *)\n          left.\n          subst p.\n          replace (has_learned_secret st_2 player_C) with false in H24.\n          simpl in H24. inversion H24. auto.\n          unfold has_learned_secret.\n          rewrite H7. rewrite <- H12.\n          simpl. rewrite H0. reflexivity.\n  Qed.\n\n\n  (************************************************************)\n  (*              Fourth step: AB, BC, CA live,               *)\n  (*   prove on contract *CA*: A claims `C_to_A` from CA      *)\n  (*   prove on contract *BC*: C unlocks BC + reveals secret  *)\n  (************************************************************)\n\n  Definition mstep4_state_CA (o i: state) : Prop :=\n  o.(contracts_published) = (contracts_published i)\n  /\\ o.(player_transfers) = (A_address, 0%Z) :: (player_transfers i)\n  /\\ o.(secrets_revealed) = (secrets_revealed i).\n\n  Definition mstep4_state_BC (o i: state) : Prop :=\n  o.(contracts_published) = (contracts_published i)\n  /\\ o.(player_transfers) = (C_address, 0%Z) :: (player_transfers i)\n  /\\ o.(secrets_revealed) = (C_address, A_secret) :: (secrets_revealed i).\n\n  Definition mstep4_constate_CA (next_st st: global_abstract_data_type) : Prop :=\n  next_st.(_assetAmount) = st.(_assetAmount)\n  /\\ next_st.(_leader) = st.(_leader)\n  /\\ next_st.(_hashlock) = st.(_hashlock)\n  /\\ next_st.(_timelock) = st.(_timelock)\n  /\\ next_st.(_party) = st.(_party)\n  /\\ next_st.(_counterparty) = st.(_counterparty)\n  /\\ next_st.(_otherparty) = st.(_otherparty)\n  /\\ next_st.(_start) = st.(_start)\n  /\\ next_st.(_delta) = st.(_delta)\n  /\\ next_st.(_unlocked) = st.(_unlocked)\n  /\\ next_st.(_ended) = true (* ended *)\n  /\\ next_st.(_events) = (Build_Transfer C_to_A A_address) :: (_events st).\n\n  Definition mstep4_constate_BC (next_st st: global_abstract_data_type) : Prop :=\n  next_st.(_assetAmount) = st.(_assetAmount)\n  /\\ next_st.(_leader) = st.(_leader)\n  /\\ next_st.(_hashlock) = st.(_hashlock)\n  /\\ next_st.(_timelock) = st.(_timelock)\n  /\\ next_st.(_party) = st.(_party)\n  /\\ next_st.(_counterparty) = st.(_counterparty)\n  /\\ next_st.(_otherparty) = st.(_otherparty)\n  /\\ next_st.(_start) = st.(_start)\n  /\\ next_st.(_delta) = st.(_delta)\n  /\\ next_st.(_unlocked) = true (* unlocked *)\n  /\\ next_st.(_ended) = st.(_ended)\n  /\\ next_st.(_events) = (_events st).\n\n  Definition mstep3_since_init_CA (o i: state) :Prop :=\n  (* external state changed since init_state *)\n  (contracts_published o) =\n      [(Build_contract C_address A_address C_to_A);\n       (Build_contract B_address C_address B_to_C);\n       (Build_contract A_address B_address A_to_B)]\n      ++ (contracts_published i)\n  /\\\n  (player_transfers o) = \n      [(A_address, 0%Z);\n       (C_address, Int256.intval C_to_A);\n       (B_address, Int256.intval B_to_C);\n       (A_address, Int256.intval A_to_B)]\n      ++ (player_transfers i)\n  /\\ (secrets_revealed o) = (A_address, A_secret) :: (secrets_revealed i)\n  (* convenient way to decouple contract state and general state. *)\n  /\\ mstep3_constate (contract_state o) (contract_state i).\n\n  Definition mstep3_since_init_BC (o i: state) :Prop :=\n    (* external state changed since init_state *)\n  (contracts_published o) =\n      [(Build_contract C_address A_address C_to_A);\n       (Build_contract B_address C_address B_to_C);\n       (Build_contract A_address B_address A_to_B)]\n      ++ (contracts_published i)\n  /\\\n  (player_transfers o) = \n      [(A_address, 0%Z); (* claim *)\n       (A_address, 0%Z); (* unlock *)\n       (C_address, Int256.intval C_to_A);\n       (B_address, Int256.intval B_to_C);\n       (A_address, Int256.intval A_to_B)]\n      ++ (player_transfers i)\n  /\\ (secrets_revealed o) = (A_address, A_secret) :: (secrets_revealed i)\n  (* convenient way to decouple contract state and general state. *)\n  /\\ (contract_state o)  = (contract_state i).\n\n  Lemma mstep4_correct_CA (st_3 st_4: state) : \n  bounded_int256 C_to_A\n  -> is_preinit_state pre_init_state\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_CA A_address B_address A_address hashlock start_CA delta)\n               pre_init_state = Some (tt, init_state)\n  (* after init_state *)\n  -> mstep3_since_init_CA st_3 init_state\n  -> mstep strategies initial_balances contract_address_CA\n           coinbase_CA init_timestamp_CA number_CA blockhash_CA\n     st_3 st_3 st_4\n  -> st_4 = st_3\n     \\/\n     ((mstep4_state_CA st_4 st_3)\n     /\\ (mstep4_constate_CA st_4.(contract_state) st_3.(contract_state))).\n  Proof.\n  intros.\n  unfold mstep3_since_init_CA in H3.\n  unfold mstep3_constate in H3.\n  assert (is_true (is_pre_initialization_phase pre_init_state)).\n  { apply preinit_equiv. assumption. }\n  unfold is_preinit_state in H0.\n  split_conj.\n  apply nil_nil in H20;\n  apply nil_nil in H21;\n  apply nil_nil in H0.\n  pose (H_1constate := init_constate_correct_CA H H5 H1 H2);\n    clearbody H_1constate.\n  unfold init_constate_CA in H_1constate.\n  unfold mstep4_state_CA. unfold mstep4_constate_CA.\n  inversion H2.\n  split_conj. forward_replace.\n  unfold f_id in H23; simpl in H23.\n  (* now all the desired properties from st_2 are in the env. *)\n  inversion H4. (* main proof starts here, where we go into cases *)\n  unfold strategies in *.\n  unfold protocol_implementation in *.\n  destruct (is_pre_initialization_phase st_3) eqn:?.\n  subst st. subst st'.\n  - (* preinit phase: contradiction *)\n    apply preinit_equiv in Heqb.\n    unfold is_preinit_state in Heqb.\n    split_conj. rewrite H3 in H26.\n    unfold is_nil in H26.\n    discriminate.\n  - (* not preinit phase *)\n    subst st. subst st'.\n    destruct (is_leader st_3 p) eqn:?.\n    + (* leader *)\n      unfold is_leader in Heqb0.\n      apply eq_eq in Heqb0.\n      rewrite H9 in *.\n      assert (p = player_A).\n        { apply player_congruence. auto. }\n\n      destruct (negb (outgoing_contracts_complete st_3 player_A)) eqn:?.\n      * (* outgoing not complete: contradiction *)\n        unfold outgoing_contracts_complete in Heqb1.\n        unfold edge_contract_valid in Heqb1.\n        rewrite <- H23 in H3; rewrite H21 in H3; simpl in H3.\n        rewrite H3 in Heqb1.\n        simpl in Heqb1.\n        replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n        inversion Heqb1.\n        symmetry. apply Int256.eq_true.\n      * (* outgoing complete *)\n        subst p.\n        destruct (incoming_contracts_complete st_3 player_A) eqn:?.\n        -- (* incoming complete: ACTION - claim *)\n          right.\n          replace (negb (outgoing_contracts_complete st_3 player_A)) with false in H22.\n          Transparent SwapContract_claim_opt SwapContract_unlock_opt EVMOpcode_transfer_opt\n                      Hquery0 builtin0_timestamp_impl\n                      builtin0_caller_impl.\n          rewrite H7 in H22 (* secrets revealed *);\n          rewrite <- H23 in H22 (* init_state *);\n          simpl in H22;\n          rewrite H18 in H22 (* ended *);\n          rewrite H13 in H22 (* counterparty *);\n          rewrite H17 in H22 (* unlocked *);\n          simpl in H22.\n          inversion H22. simpl.\n          repeat split; try auto.\n          rewrite H8. reflexivity.  (* success! state successfully gets updated!! *)\n        -- (* incoming incomplete : contradiction *)\n          unfold incoming_contracts_complete in Heqb2.\n          rewrite H3 in Heqb2.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H23. simpl. assumption. }\n          rewrite H24 in Heqb2.\n          simpl in Heqb2.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb2.\n          inversion Heqb2.\n          symmetry. apply Int256.eq_true.\n    + (* follower *)\n      pose (He := player_exclusivity p); clearbody He.\n      inversion He.\n      unfold is_leader in Heqb0. simpl in Heqb0.\n      rewrite H9 in Heqb0. rewrite H24 in Heqb0.\n      simpl in Heqb0.\n      replace (Int256.eq A_address A_address) with true in Heqb0;\n        inversion Heqb0.\n      clear He.\n      destruct H24.\n      * (* player B *)\n        destruct (incoming_contracts_complete st_3 p &&\n         negb (outgoing_contracts_complete st_3 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H23. simpl. assumption. }\n          rewrite H24 in Heqb1. simpl in Heqb1.\n          replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          inversion Heqb1.\n          symmetry. apply Int256.eq_true.\n          symmetry. apply Int256.eq_true.\n        -- (* can't publish + no secrets from C revealed : NO ACTION *)\n          left.\n          subst p.\n          replace (has_learned_secret st_3 player_B) with false in H22.\n          simpl in H22. inversion H22. auto.\n          unfold has_learned_secret.\n          rewrite H7. rewrite <- H23.\n          simpl. rewrite H0. reflexivity.\n      * (* player C *)\n        destruct (incoming_contracts_complete st_3 p &&\n         negb (outgoing_contracts_complete st_3 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H23. simpl. assumption. }\n          rewrite H24 in Heqb1. simpl in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb1.\n          inversion Heqb1.\n          symmetry. apply Int256.eq_true.\n          symmetry. apply Int256.eq_true.\n        -- (* can't publish, with secrets revealed, but WRONG ENVIRONMENT -> FAILED ACTION *)\n          left. (* left due to failed unlock action -> wrong contract environment *)\n          subst p.\n          Transparent SwapContract_claim_opt.\n          replace (has_learned_secret st_3 player_C) with true in H22.\n          replace (hashlock_unlocked st_3) with true in H22.\n          unfold get_secret in H22; simpl in H22.\n          rewrite H13 in H22. (* counterparty address <> C_address *)\n          replace (Int256.eq C_address A_address) with false in H22.\n          simpl in H22.\n          rewrite H7 in H22; (* secrets_revealed *)\n          rewrite <- H23 in H22;\n          rewrite H0 in H22;\n          rewrite H18 in H22; (* _ended *)\n          simpl in H22.\n          inversion H22. auto.\n\n          auto.\n          unfold has_learned_secret.\n          rewrite H7; rewrite <- H23; rewrite H0; reflexivity.\n  Qed.\n\n  Lemma mstep4_correct_BC (st_3 st_4: state) : \n  bounded_int256 B_to_C\n  -> is_preinit_state pre_init_state\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_BC A_address A_address C_address hashlock start_BC delta)\n               pre_init_state = Some (tt, init_state)\n  (* after init_state *)\n  -> mstep3_since_init_BC st_3 init_state\n  -> mstep strategies initial_balances contract_address_BC\n           coinbase_BC init_timestamp_BC number_BC blockhash_BC\n     st_3 st_3 st_4\n  -> st_4 = st_3\n     \\/\n     ((mstep4_state_BC st_4 st_3)\n     /\\ (mstep4_constate_BC st_4.(contract_state) st_3.(contract_state))).\n  Proof.\n  intros.\n  unfold mstep3_since_init_BC in H3.\n  assert (is_true (is_pre_initialization_phase pre_init_state)).\n  { apply preinit_equiv. assumption. }\n  unfold is_preinit_state in H0.\n  split_conj.\n  apply nil_nil in H10;\n  apply nil_nil in H9;\n  apply nil_nil in H0.\n  pose (H_1constate := init_constate_correct_BC H H5 H1 H2);\n    clearbody H_1constate.\n  unfold init_constate_BC in H_1constate.\n  unfold mstep4_state_BC. unfold mstep4_constate_BC.\n  inversion H2.\n  split_conj. forward_replace.\n  unfold f_id in H12; simpl in H12.\n  (* now all the desired properties from st_2 are in the env. *)\n  inversion H4. (* main proof starts here, where we go into cases *)\n  unfold strategies in *.\n  unfold protocol_implementation in *.\n  destruct (is_pre_initialization_phase st_3) eqn:?.\n  subst st. subst st'.\n  - (* preinit phase: contradiction *)\n    apply preinit_equiv in Heqb.\n    unfold is_preinit_state in Heqb.\n    split_conj. rewrite H3 in H27.\n    unfold is_nil in H27.\n    discriminate.\n  - (* not preinit phase *)\n    subst st. subst st'.\n    destruct (is_leader st_3 p) eqn:?.\n    + (* leader *)\n      unfold is_leader in Heqb0.\n      apply eq_eq in Heqb0.\n      rewrite H8 in Heqb0; rewrite H13 in Heqb0.\n      assert (p = player_A).\n        { apply player_congruence. auto. }\n      subst p.\n      destruct (negb (outgoing_contracts_complete st_3 player_A)) eqn:?.\n      * (* outgoing not complete: contradiction *)\n        unfold outgoing_contracts_complete in Heqb1.\n        unfold edge_contract_valid in Heqb1.\n        (* contracts_published st_3 *)\n        rewrite <- H12 in H3; simpl in H3.\n        rewrite H3 in Heqb1.\n        simpl in Heqb1.\n        replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n        inversion Heqb1.\n        symmetry. apply Int256.eq_true.\n      * (* outgoing complete *)\n        destruct (incoming_contracts_complete st_3 player_A) eqn:?.\n        -- (* incoming complete : STATE ENVIRONMENT WRONG -> ACTION FAILS *)\n          left. (* left due to failed claim action -> wrong contract environment *)\n          Transparent SwapContract_claim_opt.\n          rewrite H7 in H24; rewrite <- H12 in H24; rewrite H0 in H24; (* secrets *)\n          simpl in H24;\n          rewrite H8 in H24; (* constate equal *)\n          rewrite H16 in H24; (* counterparty *)\n          rewrite H21 in H24; (* ended *)\n          simpl in H24.\n          inversion H24. auto.\n        -- (* incoming incomplete : contradiction *)\n          unfold incoming_contracts_complete in Heqb2.\n          rewrite H3 in Heqb2.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H12. simpl. assumption. }\n          rewrite H25 in Heqb2.\n          simpl in Heqb2.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb2.\n          inversion Heqb2.\n          symmetry. apply Int256.eq_true.\n    + (* follower *)\n      pose (He := player_exclusivity p); clearbody He.\n      inversion He.\n      unfold is_leader in Heqb0. simpl in Heqb0.\n      rewrite H8 in Heqb0; rewrite H13 in Heqb0; rewrite H25 in Heqb0.\n      simpl in Heqb0.\n      replace (Int256.eq A_address A_address) with true in Heqb0;\n        inversion Heqb0.\n      clear He.\n      destruct H25.\n      * (* player B *)\n        destruct (incoming_contracts_complete st_3 p &&\n         negb (outgoing_contracts_complete st_3 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H12. simpl. assumption. }\n          rewrite H25 in Heqb1. simpl in Heqb1.\n          replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          inversion Heqb1.\n          symmetry. apply Int256.eq_true.\n          symmetry. apply Int256.eq_true.\n        -- (* can't publish + no secrets from C revealed : NO ACTION *)\n          left.\n          subst p.\n          replace (has_learned_secret st_3 player_B) with false in H24.\n          simpl in H24. inversion H24. auto.\n          unfold has_learned_secret.\n          rewrite H7; rewrite <- H12; rewrite H0;\n          reflexivity.\n      * (* player C *)\n        destruct (incoming_contracts_complete st_3 p &&\n         negb (outgoing_contracts_complete st_3 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H12. simpl. assumption. }\n          rewrite H25 in Heqb1. simpl in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb1.\n          inversion Heqb1.\n          symmetry. apply Int256.eq_true.\n          symmetry. apply Int256.eq_true.\n        -- (* can unlock: ACTION *)\n          right. subst p.\n          replace (has_learned_secret st_3 player_C) with true in H24.\n          replace (hashlock_unlocked st_3) with false in H24.\n          unfold get_secret in H24;\n          rewrite H7 in H24;\n          simpl in H24;\n          rewrite H8 in H24; (* con_st equal *)\n          rewrite <- H12 in H24;\n          rewrite <- H1 in H24; (* contract_state of pre_init_state *)\n          unfold f_unlock in H24;\n          simpl in H24.\n          unfold_updates H24. (* process all the updates, magic! *)\n          inversion H24. simpl.\n          repeat split; rewrite H8; try auto.\n          rewrite <- H12; reflexivity.\n          unfold hashlock_unlocked; rewrite H8; rewrite H20;\n            reflexivity.\n          unfold has_learned_secret; rewrite H7;\n            rewrite <- H12; reflexivity.\n  Qed.\n\n\n  (************************************************************)\n  (*          Fifth step: AB, BC live; CA ended               *)\n  (*   prove on contract *BC*: C claims `B_to_C` from BC      *)\n  (*   prove on contract *AB*: B unlocks AB + reveals secret  *)\n  (************************************************************)\n\n\n  Definition mstep5_state_BC (o i: state) : Prop :=\n  o.(contracts_published) = (contracts_published i)\n  /\\ o.(player_transfers) = (C_address, 0%Z) :: (player_transfers i)\n  /\\ o.(secrets_revealed) = (secrets_revealed i).\n\n  Definition mstep5_state_AB (o i: state) : Prop :=\n  o.(contracts_published) = (contracts_published i)\n  /\\ o.(player_transfers) = (B_address, 0%Z) :: (player_transfers i)\n  /\\ o.(secrets_revealed) = (B_address, A_secret) :: (secrets_revealed i).\n\n  Definition mstep5_constate_BC (next_st st : global_abstract_data_type) : Prop :=\n  next_st.(_assetAmount) = st.(_assetAmount)\n  /\\ next_st.(_leader) = st.(_leader)\n  /\\ next_st.(_hashlock) = st.(_hashlock)\n  /\\ next_st.(_timelock) = st.(_timelock)\n  /\\ next_st.(_party) = st.(_party)\n  /\\ next_st.(_counterparty) = st.(_counterparty)\n  /\\ next_st.(_otherparty) = st.(_otherparty)\n  /\\ next_st.(_start) = st.(_start)\n  /\\ next_st.(_delta) = st.(_delta)\n  /\\ next_st.(_unlocked) = st.(_unlocked)\n  /\\ next_st.(_ended) = true (* ended *)\n  /\\ next_st.(_events) = (Build_Transfer B_to_C C_address) :: (_events st).\n\n  Definition mstep5_constate_AB (next_st st: global_abstract_data_type) : Prop :=\n  next_st.(_assetAmount) = st.(_assetAmount)\n  /\\ next_st.(_leader) = st.(_leader)\n  /\\ next_st.(_hashlock) = st.(_hashlock)\n  /\\ next_st.(_timelock) = st.(_timelock)\n  /\\ next_st.(_party) = st.(_party)\n  /\\ next_st.(_counterparty) = st.(_counterparty)\n  /\\ next_st.(_otherparty) = st.(_otherparty)\n  /\\ next_st.(_start) = st.(_start)\n  /\\ next_st.(_delta) = st.(_delta)\n  /\\ next_st.(_unlocked) = true (* unlocked *)\n  /\\ next_st.(_ended) = st.(_ended)\n  /\\ next_st.(_events) = (_events st).\n\n  Definition mstep4_since_init_BC (o i: state) :Prop :=\n    (* external state changed since init_state *)\n  (contracts_published o) =\n      [(Build_contract C_address A_address C_to_A);\n       (Build_contract B_address C_address B_to_C);\n       (Build_contract A_address B_address A_to_B)]\n      ++ (contracts_published i)\n  /\\\n  (player_transfers o) = \n      [(C_address, 0%Z); (* unlock *)\n       (A_address, 0%Z); (* claim *)\n       (A_address, 0%Z); (* unlock *)\n       (C_address, Int256.intval C_to_A);\n       (B_address, Int256.intval B_to_C);\n       (A_address, Int256.intval A_to_B)]\n      ++ (player_transfers i)\n  /\\ (secrets_revealed o) = [(C_address, A_secret);\n                             (A_address, A_secret)] ++ (secrets_revealed i)\n  (* convenient way to decouple contract state and general state. *)\n  /\\ mstep4_constate_BC (contract_state o) (contract_state i).\n\n  Definition mstep4_since_init_AB (o i: state) :Prop :=\n    (* external state changed since init_state *)\n  (contracts_published o) =\n      [(Build_contract C_address A_address C_to_A);\n       (Build_contract B_address C_address B_to_C)\n       (*Build_contract A_address B_address A_to_B <- lifted_init published con *)]\n      ++ (contracts_published i)\n  /\\\n  (player_transfers o) = \n      [(C_address, 0%Z); (* claim *)\n       (C_address, 0%Z); (* unlock *)\n       (A_address, 0%Z); (* claim *)\n       (A_address, 0%Z); (* unlock *)\n       (C_address, Int256.intval C_to_A);\n       (B_address, Int256.intval B_to_C)\n       (* A_address, Int256.intval A_to_B <- init state has transfer *)]\n      ++ (player_transfers i)\n  /\\ (secrets_revealed o) = [(C_address, A_secret);\n                             (A_address, A_secret)] ++ (secrets_revealed i)\n  (* convenient way to decouple contract state and general state. *)\n  /\\ (contract_state o)  = (contract_state i).\n\n\n\n  Lemma mstep5_correct_BC (st_4 st_5: state) :\n  bounded_int256 B_to_C\n  -> is_preinit_state pre_init_state\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_BC A_address A_address C_address hashlock start_BC delta)\n               pre_init_state = Some (tt, init_state)\n  -> mstep4_since_init_BC st_4 init_state\n  -> mstep strategies initial_balances contract_address_BC\n           coinbase_BC init_timestamp_BC number_BC blockhash_BC\n     st_4 st_4 st_5\n  -> st_4 = st_5\n     \\/\n     ((mstep5_state_BC st_5 st_4)\n      /\\ (mstep5_constate_BC st_5.(contract_state) st_4.(contract_state))).\n  Proof.\n  intros. unfold mstep4_since_init_BC in H3.\n  unfold mstep4_constate_BC in H3.\n  assert (is_true (is_pre_initialization_phase pre_init_state)).\n  { apply preinit_equiv. assumption. }\n  unfold is_preinit_state in H0.\n  split_conj.\n  apply nil_nil in H20;\n  apply nil_nil in H21;\n  apply nil_nil in H0.\n  pose (H_1constate := init_constate_correct_BC H H5 H1 H2);\n    clearbody H_1constate.\n  unfold init_constate_BC in H_1constate.\n  unfold mstep4_state_BC. unfold mstep4_constate_BC.\n  inversion H2.\n  split_conj. forward_replace.\n  unfold f_id in H23; simpl in H23.\n  (* now all the desired properties from st_2 are in the env. *)\n  inversion H4. (* main proof starts here, where we go into cases *)\n  unfold strategies in *.\n  unfold protocol_implementation in *.\n  destruct (is_pre_initialization_phase st_4) eqn:?.\n  subst st. subst st'.\n  - (* preinit phase: contradiction *)\n    apply preinit_equiv in Heqb.\n    unfold is_preinit_state in Heqb.\n    split_conj. rewrite H3 in H26.\n    unfold is_nil in H26.\n    discriminate.\n  - (* not preinit phase *)\n    subst st. subst st'.\n    destruct (is_leader st_4 p) eqn:?.\n    + (* leader *)\n      unfold is_leader in Heqb0.\n      apply eq_eq in Heqb0.\n      rewrite H9 in *.\n      assert (p = player_A).\n        { apply player_congruence. auto. }\n\n      destruct (negb (outgoing_contracts_complete st_4 player_A)) eqn:?.\n      * (* outgoing not complete: contradiction *)\n        unfold outgoing_contracts_complete in Heqb1.\n        unfold edge_contract_valid in Heqb1.\n        rewrite <- H23 in H3; rewrite H21 in H3; simpl in H3.\n        rewrite H3 in Heqb1.\n        simpl in Heqb1.\n        replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n        inversion Heqb1.\n        symmetry. apply Int256.eq_true.\n      * (* outgoing complete *)\n        subst p.\n        destruct (incoming_contracts_complete st_4 player_A) eqn:?.\n        -- (* incoming complete: wrong environment -> NO ACTION *)\n          left.\n          replace (negb (outgoing_contracts_complete st_4 player_A)) with false in H22.\n          Transparent SwapContract_claim_opt SwapContract_unlock_opt EVMOpcode_transfer_opt\n                      Hquery0 builtin0_timestamp_impl\n                      builtin0_caller_impl.\n          rewrite H7 in H22 (* secrets revealed *);\n          rewrite <- H23 in H22 (* init_state *);\n          simpl in H22;\n          rewrite H18 in H22 (* ended *);\n          rewrite H13 in H22 (* counterparty *);\n          rewrite H17 in H22 (* unlocked *);\n          simpl in H22.\n          inversion H22; reflexivity.\n        -- (* incoming incomplete : contradiction *)\n          unfold incoming_contracts_complete in Heqb2.\n          rewrite H3 in Heqb2.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H23. simpl. assumption. }\n          rewrite H24 in Heqb2.\n          simpl in Heqb2.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb2.\n          inversion Heqb2.\n          symmetry. apply Int256.eq_true.\n    + (* follower *)\n      pose (He := player_exclusivity p); clearbody He.\n      inversion He.\n      unfold is_leader in Heqb0. simpl in Heqb0.\n      rewrite H9 in Heqb0. rewrite H24 in Heqb0.\n      simpl in Heqb0.\n      replace (Int256.eq A_address A_address) with true in Heqb0;\n        inversion Heqb0.\n      clear He.\n      destruct H24.\n      * (* player B *)\n        destruct (incoming_contracts_complete st_4 p &&\n         negb (outgoing_contracts_complete st_4 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H23. simpl. assumption. }\n          rewrite H24 in Heqb1. simpl in Heqb1.\n          replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          inversion Heqb1.\n          symmetry. apply Int256.eq_true.\n          symmetry. apply Int256.eq_true.\n        -- (* can't publish, can unlock, but wrong contract env -> FAILED ACTION *)\n          left.\n          subst p.\n          replace (has_learned_secret st_4 player_B) with true in H22.\n          replace (hashlock_unlocked st_4) with true in H22.\n          simpl in H22;\n          rewrite H18 in H22; (* ended *)\n          rewrite H13 in H22; (* counterparty *)\n          simpl in H22.\n          inversion H22; auto.\n          unfold has_learned_secret.\n          rewrite H7. rewrite <- H23.\n          simpl. reflexivity.\n      * (* player C *)\n        destruct (incoming_contracts_complete st_4 p &&\n         negb (outgoing_contracts_complete st_4 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          assert (contracts_published init_state = nil).\n          { rewrite <- H23. simpl. assumption. }\n          rewrite H24 in Heqb1. simpl in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb1.\n          inversion Heqb1.\n          symmetry. apply Int256.eq_true.\n          symmetry. apply Int256.eq_true.\n        -- (* claim B_to_C from contract B->C : ACTION *)\n          right.\n          subst p.\n          Transparent SwapContract_claim_opt.\n          replace (has_learned_secret st_4 player_C) with true in H22.\n          replace (hashlock_unlocked st_4) with true in H22.\n          unfold get_secret in H22; simpl in H22.\n          rewrite H13 in H22.\n          replace (Int256.eq C_address C_address) with true in H22.\n          simpl in H22.\n          rewrite H7 in H22; (* secrets_revealed *)\n          rewrite <- H23 in H22;\n          rewrite H0 in H22;\n          rewrite H18 in H22; (* _ended *)\n          rewrite H17 in H22; (* _unlocked *)\n          simpl in H22.\n          unfold mstep5_state_BC. unfold mstep5_constate_BC.\n          inversion H22; simpl.\n          repeat split; try assumption; try auto.\n          rewrite H7; rewrite <- H23; rewrite H0;\n          reflexivity. (* secrets_revealed *)\n          rewrite H8; reflexivity.\n          symmetry; apply Int256.eq_true.\n          unfold has_learned_secret.\n          rewrite H7; rewrite <- H23; rewrite H0;\n          reflexivity.\n  Qed.\n\n\n  Lemma mstep5_correct_AB (st_4 st_5: state) : \n  bounded_int256 A_to_B\n  -> is_preinit_state pre_init_state\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_AB A_address C_address B_address hashlock start_AB delta)\n               pre_init_state = Some (tt, init_state)\n  (* after init_state *)\n  -> mstep4_since_init_AB st_4 init_state\n  -> mstep strategies initial_balances contract_address_AB\n           coinbase_AB init_timestamp_AB number_AB blockhash_AB\n     st_4 st_4 st_5\n  -> st_5 = st_4\n     \\/\n     ((mstep5_state_AB st_5 st_4)\n     /\\ (mstep5_constate_AB st_5.(contract_state) st_4.(contract_state))).\n  Proof.\n  intros.\n  unfold mstep4_since_init_AB in H3.\n  assert (is_true (is_pre_initialization_phase pre_init_state)).\n  { apply preinit_equiv. assumption. }\n  unfold is_preinit_state in H0.\n  split_conj.\n  apply nil_nil in H10;\n  apply nil_nil in H9;\n  apply nil_nil in H0.\n  pose (H_1constate := init_constate_correct_AB H H5 H1 H2);\n    clearbody H_1constate.\n  unfold init_constate_AB in H_1constate.\n  unfold mstep5_state_AB. unfold mstep5_constate_AB.\n  inversion H2.\n  split_conj. forward_replace.\n  unfold f_id in H12; simpl in H12.\n  (* now all the desired properties from st_2 are in the env. *)\n  inversion H4. (* main proof starts here, where we go into cases *)\n  unfold strategies in *.\n  unfold protocol_implementation in *.\n  destruct (is_pre_initialization_phase st_4) eqn:?.\n  subst st. subst st'.\n  - (* preinit phase: contradiction *)\n    apply preinit_equiv in Heqb.\n    unfold is_preinit_state in Heqb.\n    split_conj. rewrite H3 in H27.\n    unfold is_nil in H27.\n    discriminate.\n  - (* not preinit phase *)\n    subst st. subst st'.\n    destruct (is_leader st_4 p) eqn:?.\n    + (* leader *)\n      unfold is_leader in Heqb0.\n      apply eq_eq in Heqb0.\n      rewrite H8 in Heqb0; rewrite H13 in Heqb0.\n      assert (p = player_A).\n        { apply player_congruence. auto. }\n      subst p.\n      destruct (negb (outgoing_contracts_complete st_4 player_A)) eqn:?.\n      * (* outgoing not complete: contradiction *)\n        unfold outgoing_contracts_complete in Heqb1.\n        unfold edge_contract_valid in Heqb1.\n        (* contracts_published st_3 *)\n        rewrite <- H12 in H3; simpl in H3.\n        rewrite H3 in Heqb1; rewrite H10 in Heqb1.\n        simpl in Heqb1.\n        replace (Int256.repr (Int256.intval A_to_B)) with A_to_B in Heqb1.\n        replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n        inversion Heqb1.\n        symmetry; apply Int256.eq_true.\n        symmetry; apply Int256.repr_unsigned.\n      * (* outgoing complete *)\n        destruct (incoming_contracts_complete st_4 player_A) eqn:?.\n        -- (* incoming complete : STATE ENVIRONMENT WRONG -> ACTION FAILS *)\n          left. (* left due to failed claim action -> wrong contract environment *)\n          Transparent SwapContract_claim_opt.\n          rewrite H7 in H24; rewrite <- H12 in H24; rewrite H0 in H24; (* secrets *)\n          simpl in H24;\n          rewrite H8 in H24; (* constate equal *)\n          rewrite H16 in H24; (* counterparty *)\n          rewrite H21 in H24; (* ended *)\n          simpl in H24.\n          inversion H24. auto.\n        -- (* incoming incomplete : contradiction *)\n          unfold incoming_contracts_complete in Heqb2.\n          rewrite H3 in Heqb2.\n          rewrite <- H12 in Heqb2;\n          rewrite H10 in Heqb2;\n          simpl in Heqb2.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb2.\n          inversion Heqb2.\n          symmetry; apply Int256.eq_true.\n    + (* follower *)\n      pose (He := player_exclusivity p); clearbody He.\n      inversion He.\n      unfold is_leader in Heqb0. simpl in Heqb0.\n      rewrite H8 in Heqb0; rewrite H13 in Heqb0; rewrite H25 in Heqb0.\n      simpl in Heqb0.\n      replace (Int256.eq A_address A_address) with true in Heqb0;\n        inversion Heqb0.\n      clear He.\n      destruct H25.\n      * (* player B *)\n        destruct (incoming_contracts_complete st_4 p &&\n         negb (outgoing_contracts_complete st_4 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          rewrite <- H12 in Heqb1;\n          rewrite H10 in Heqb1;\n          simpl in Heqb1.\n          replace (Int256.repr (Int256.intval A_to_B)) with A_to_B in Heqb1.\n          replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          inversion Heqb1.\n          symmetry; apply Int256.eq_true.\n          symmetry; apply Int256.eq_true.\n          symmetry; apply Int256.repr_unsigned.\n        -- (* can unlock : ACTION *)\n          right.\n          subst p.\n          replace (has_learned_secret st_4 player_B) with true in H24.\n          replace (hashlock_unlocked st_4) with false in H24.\n          unfold get_secret in H24;\n          rewrite H7 in H24;\n          simpl in H24;\n          rewrite H8 in H24; (* con_st equal *)\n          rewrite <- H12 in H24;\n          rewrite <- H1 in H24; (* contract_state of pre_init_state *)\n          unfold f_unlock in H24;\n          simpl in H24.\n          unfold_updates H24. (* process all the updates, magic! *)\n          inversion H24. simpl.\n          repeat split; rewrite H8; try auto.\n          rewrite H11; apply Int256.repr_unsigned.\n          unfold hashlock_unlocked; rewrite H8; rewrite H20;\n            reflexivity.\n          unfold has_learned_secret; rewrite H7;\n            rewrite <- H12; reflexivity.\n      * (* player C *)\n        destruct (incoming_contracts_complete st_4 p &&\n         negb (outgoing_contracts_complete st_4 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          rewrite <- H12 in Heqb1;\n          rewrite H10 in Heqb1;\n          simpl in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb1.\n          inversion Heqb1.\n          symmetry. apply Int256.eq_true.\n          symmetry. apply Int256.eq_true.\n        -- (* can claim: wrong environment -> FAILED ACTION *)\n          left.\n          subst p.\n          replace (has_learned_secret st_4 player_C) with true in H24.\n          replace (hashlock_unlocked st_4) with false in H24.\n          unfold get_secret in H24;\n          rewrite H7 in H24;\n          simpl in H24;\n          rewrite H8 in H24; (* con_st equal *)\n          rewrite <- H12 in H24;\n          rewrite <- H1 in H24; (* contract_state of pre_init_state *)\n          unfold f_unlock in H24;\n          simpl in H24.\n          inversion H24; auto.\n          unfold hashlock_unlocked; rewrite H8; rewrite H20;\n            reflexivity.\n          unfold has_learned_secret; rewrite H7;\n            rewrite <- H12; reflexivity.\n  Qed.\n\n\n  (************************************************************)\n  (*           Sixth step: AB live, BC, CA ended              *)\n  (*   prove on contract *AB*: B claims `A_to_B` from AB      *)\n  (************************************************************)\n\n  Definition mstep6_state_AB (o i: state) : Prop :=\n  o.(contracts_published) = (contracts_published i)\n  /\\ o.(player_transfers) = (B_address, 0%Z) :: (player_transfers i)\n  /\\ o.(secrets_revealed) = (secrets_revealed i).\n\n  Definition mstep6_constate_AB (next_st st: global_abstract_data_type) : Prop :=\n  next_st.(_assetAmount) = st.(_assetAmount)\n  /\\ next_st.(_leader) = st.(_leader)\n  /\\ next_st.(_hashlock) = st.(_hashlock)\n  /\\ next_st.(_timelock) = st.(_timelock)\n  /\\ next_st.(_party) = st.(_party)\n  /\\ next_st.(_counterparty) = st.(_counterparty)\n  /\\ next_st.(_otherparty) = st.(_otherparty)\n  /\\ next_st.(_start) = st.(_start)\n  /\\ next_st.(_delta) = st.(_delta)\n  /\\ next_st.(_unlocked) = st.(_unlocked)\n  /\\ next_st.(_ended) = true (* ended *)\n  /\\ next_st.(_events) = (Build_Transfer A_to_B B_address) :: (_events st).\n\n  Definition mstep5_since_init_AB (o i: state) :Prop :=\n  (* external state changed since init_state *)\n  (contracts_published o) =\n      [(Build_contract C_address A_address C_to_A);\n       (Build_contract B_address C_address B_to_C)\n       (*Build_contract A_address B_address A_to_B <- lifted_init published contract *)]\n      ++ (contracts_published i)\n  /\\\n  (player_transfers o) = \n      [(B_address, 0%Z); (* unlock *)\n       (C_address, 0%Z); (* claim *)\n       (C_address, 0%Z); (* unlock *)\n       (A_address, 0%Z); (* claim *)\n       (A_address, 0%Z); (* unlock *)\n       (C_address, Int256.intval C_to_A);\n       (B_address, Int256.intval B_to_C)]\n      ++ (player_transfers i)\n  /\\ (secrets_revealed o) = [(B_address, A_secret);\n                             (C_address, A_secret);\n                             (A_address, A_secret)] ++ (secrets_revealed i)\n  (* convenient way to decouple contract state and general state. *)\n  /\\ mstep5_constate_AB (contract_state o) (contract_state i).\n\n  Lemma mstep6_correct_AB (st_5 st_6 :state) :\n  bounded_int256 A_to_B\n  -> is_preinit_state pre_init_state\n  -> init_global_abstract_data = pre_init_state.(contract_state)\n  -> runStateT (filled_init_AB A_address C_address B_address hashlock start_AB delta)\n               pre_init_state = Some (tt, init_state)\n  -> mstep5_since_init_AB st_5 init_state\n  -> mstep strategies initial_balances contract_address_AB\n           coinbase_AB init_timestamp_AB number_AB blockhash_AB\n     st_5 st_5 st_6\n  -> st_5 = st_6\n     \\/\n     ((mstep6_state_AB st_6 st_5)\n      /\\ (mstep6_constate_AB st_6.(contract_state) st_5.(contract_state))).\n  Proof.\n  intros. unfold mstep5_since_init_AB in H3.\n  unfold mstep5_constate_AB in H3.\n  assert (is_true (is_pre_initialization_phase pre_init_state)).\n  { apply preinit_equiv. assumption. }\n  unfold is_preinit_state in H0.\n  split_conj.\n  apply nil_nil in H20;\n  apply nil_nil in H21;\n  apply nil_nil in H0.\n  pose (H_1constate := init_constate_correct_AB H H5 H1 H2);\n    clearbody H_1constate.\n  unfold init_constate_AB in H_1constate.\n  unfold mstep6_state_AB. unfold mstep6_constate_AB.\n  inversion H2.\n  split_conj. forward_replace.\n  unfold f_id in H23; simpl in H23.\n  (* now all the desired properties from st_2 are in the env. *)\n  inversion H4. (* main proof starts here, where we go into cases *)\n  unfold strategies in *.\n  unfold protocol_implementation in *.\n  destruct (is_pre_initialization_phase st_5) eqn:?.\n  subst st. subst st'.\n  - (* preinit phase: contradiction *)\n    apply preinit_equiv in Heqb.\n    unfold is_preinit_state in Heqb.\n    split_conj. rewrite H3 in H26.\n    unfold is_nil in H26.\n    discriminate.\n  - (* not preinit phase *)\n    subst st. subst st'.\n    destruct (is_leader st_5 p) eqn:?.\n    + (* leader *)\n      unfold is_leader in Heqb0.\n      apply eq_eq in Heqb0.\n      rewrite H9 in *.\n      assert (p = player_A).\n        { apply player_congruence. auto. }\n      subst p.\n      destruct (negb (outgoing_contracts_complete st_5 player_A)) eqn:?.\n      * (* outgoing not complete: contradiction *)\n        unfold outgoing_contracts_complete in Heqb1.\n        unfold edge_contract_valid in Heqb1.\n        rewrite <- H23 in H3; rewrite H21 in H3; simpl in H3.\n        rewrite H3 in Heqb1.\n        simpl in Heqb1.\n        replace (Int256.repr (Int256.intval A_to_B)) with A_to_B in Heqb1.\n        replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n        inversion Heqb1.\n        symmetry; apply Int256.eq_true.\n        symmetry; apply Int256.repr_unsigned.\n      * (* outgoing complete *)\n        destruct (incoming_contracts_complete st_5 player_A) eqn:?.\n        -- (* incoming complete: wrong environment -> NO ACTION *)\n          left.\n          replace (is_nil (secrets_revealed st_5)) with false in H22.\n          simpl in H22.\n          Transparent SwapContract_claim_opt SwapContract_unlock_opt EVMOpcode_transfer_opt\n                      Hquery0 builtin0_timestamp_impl\n                      builtin0_caller_impl.\n          rewrite H7 in H22 (* secrets revealed *);\n          rewrite <- H23 in H22 (* init_state *);\n          simpl in H22;\n          rewrite H18 in H22 (* ended *);\n          rewrite H13 in H22 (* counterparty *);\n          rewrite H17 in H22 (* unlocked *);\n          simpl in H22.\n          inversion H22; reflexivity.\n          rewrite H7; auto.\n        -- (* incoming incomplete : contradiction *)\n          unfold incoming_contracts_complete in Heqb2.\n          rewrite H3 in Heqb2.\n          rewrite <- H23 in Heqb2;\n          rewrite <- H21 in Heqb2;\n          simpl in Heqb2.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb2.\n          inversion Heqb2.\n          symmetry; apply Int256.eq_true.\n    + (* follower *)\n      pose (He := player_exclusivity p); clearbody He.\n      inversion He.\n      unfold is_leader in Heqb0. simpl in Heqb0.\n      rewrite H9 in Heqb0. rewrite H24 in Heqb0.\n      simpl in Heqb0.\n      replace (Int256.eq A_address A_address) with true in Heqb0;\n        inversion Heqb0.\n      clear He.\n      destruct H24.\n      * (* player B *)\n        destruct (incoming_contracts_complete st_5 p &&\n         negb (outgoing_contracts_complete st_5 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          rewrite <- H23 in Heqb1;\n          rewrite H21 in Heqb1;\n          simpl in Heqb1.\n          replace (Int256.repr (Int256.intval A_to_B)) with A_to_B in Heqb1.\n          replace (Int256.eq A_to_B A_to_B) with true in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          inversion Heqb1.\n          symmetry; apply Int256.eq_true.\n          symmetry; apply Int256.eq_true.\n          symmetry; apply Int256.repr_unsigned.\n        -- (* claim: ACTION *)\n          right.\n          subst p.\n          replace (has_learned_secret st_5 player_B) with true in H22.\n          replace (hashlock_unlocked st_5) with true in H22.\n          simpl in H22;\n          rewrite H18 in H22; (* ended *)\n          rewrite H13 in H22; (* counterparty *)\n          rewrite H17 in H22; (* _unlocked *)\n          simpl in H22.\n          inversion H22. simpl.\n          repeat split; try assumption; try auto.\n          rewrite H8; reflexivity.\n          unfold has_learned_secret.\n          rewrite H7; rewrite <- H23; rewrite H0;\n          reflexivity.\n      * (* player C *)\n        destruct (incoming_contracts_complete st_5 p &&\n         negb (outgoing_contracts_complete st_5 p)) eqn:?.\n        -- (* can publish: contradiction *)\n          subst p.\n          unfold incoming_contracts_complete in Heqb1.\n          unfold outgoing_contracts_complete in Heqb1.\n          unfold edge_contract_valid in Heqb1.\n          rewrite H3 in Heqb1.\n          rewrite <- H23 in Heqb1;\n          rewrite H21 in Heqb1;\n          simpl in Heqb1.\n          replace (Int256.eq B_to_C B_to_C) with true in Heqb1.\n          replace (Int256.eq C_to_A C_to_A) with true in Heqb1.\n          inversion Heqb1.\n          symmetry. apply Int256.eq_true.\n          symmetry. apply Int256.eq_true.\n        -- (* wrong contract env -> FAILED ACTION -> SAME STATE *)\n          left.\n          subst p.\n          Transparent SwapContract_claim_opt.\n          replace (has_learned_secret st_5 player_C) with true in H22.\n          replace (hashlock_unlocked st_5) with true in H22.\n          unfold get_secret in H23; simpl in H22.\n          rewrite H13 in H22;\n          rewrite H7 in H22; (* secrets_revealed *)\n          rewrite <- H23 in H22;\n          rewrite H0 in H22;\n          rewrite H18 in H22; (* _ended *)\n          rewrite H17 in H22; (* _unlocked *)\n          simpl in H22.\n          inversion H22; auto.\n          unfold has_learned_secret.\n          rewrite H7; rewrite <- H23; rewrite H0;\n          reflexivity.\n  Qed.\n\n  (* final external state *)\n  Definition final_since_init (o i: state) :Prop :=\n  (* external state changed since init_state *)\n  (contracts_published o) =\n      [(Build_contract C_address A_address C_to_A);\n       (Build_contract B_address C_address B_to_C)\n       (*Build_contract A_address B_address A_to_B <- lifted_init published contract *)]\n      ++ (contracts_published i)\n  /\\\n  (player_transfers o) = \n      [(B_address, 0%Z); (* claim *)\n       (B_address, 0%Z); (* unlock *)\n       (C_address, 0%Z); (* claim *)\n       (C_address, 0%Z); (* unlock *)\n       (A_address, 0%Z); (* claim *)\n       (A_address, 0%Z); (* unlock *)\n       (C_address, Int256.intval C_to_A);\n       (B_address, Int256.intval B_to_C)]\n      ++ (player_transfers i)\n  /\\ (secrets_revealed o) = [(B_address, A_secret);\n                             (C_address, A_secret);\n                             (A_address, A_secret)] ++ (secrets_revealed i).\n\n  Definition final_constate_since_init_AB (o i: global_abstract_data_type): Prop:=\n  exists (st: global_abstract_data_type),\n  mstep5_constate_AB st i\n  /\\ mstep6_constate_AB o st.\n\n  Definition final_constate_since_init_BC (o i: global_abstract_data_type): Prop :=\n  exists (st: global_abstract_data_type),\n  mstep4_constate_BC st i\n  /\\ mstep5_constate_BC o st.\n\n  Definition final_constate_since_init_CA (o i: global_abstract_data_type): Prop :=\n  exists (st: global_abstract_data_type),\n  mstep3_constate st i\n  /\\ mstep4_constate_CA o st.\n\n\n  (************************************************************)\n  (*                State transition proofs                   *)\n  (************************************************************)\n\n  (*  At the start, we have the following: \n     { init_state_AB, init_state_BC, init_state_CA }\n     { init_constate_AB, init_constate_BC, init_constate_CA }\n\n     The main idea is that external state (transfers, published\n      contracts, and secrets revealed) is common knowledge, and\n     it is directly inherited at each step from the previous step,\n     regardless of which contract.\n\n      So that `mstep*_since_init_*` is well defined if it correctly\n      reflects the external state as well as the contract state\n      since initialization.\n   *)\n\n  (* Lemma: mstep1_since_init_AB correctly defined. *)\n  Lemma transition_correct_1 :\n    forall (o i_st: state),\n    mstep1_state o i_st\n    /\\ mstep1_constate (contract_state o) (contract_state i_st)\n    -> mstep1_since_init_AB o i_st.\n  Proof.\n  intros.\n  unfold mstep1_state in H; unfold mstep1_constate in H.\n  unfold mstep1_since_init_AB.\n  split_conj.\n  repeat split; try assumption; try auto.\n  destruct o; destruct i_st; simpl in *.\n  destruct contract_state; destruct contract_state0; simpl in *.\n  subst.\n  reflexivity.\n  Qed.\n\n  (* Lemma: mstep1_since_init_BC correctly defined. *)\n  Lemma transition_correct_2 :\n  forall (o st i_st i_st': state),\n  mstep1_since_init_AB st i_st'\n  (* inherits external state from previous state *)\n  /\\ (contracts_published st) = (contracts_published o)\n  /\\ (player_transfers st) = (player_transfers o)\n  /\\ (secrets_revealed st) = (secrets_revealed o)\n  (* comparing init_state_AB with init_state_BC *)\n  /\\ (contracts_published i_st') = (Build_contract A_address B_address A_to_B) :: (contracts_published i_st)\n  /\\ (player_transfers i_st') = (A_address, Int256.intval A_to_B) :: (player_transfers i_st)\n  /\\ (secrets_revealed i_st) = (secrets_revealed i_st')\n  (* contract state of BC didn't change since it was published *)\n  /\\ (contract_state o) = (contract_state i_st)\n  -> mstep1_since_init_BC o i_st.\n  Proof.\n  intros.\n  unfold mstep1_since_init_AB in H;\n  split_conj.\n  unfold mstep1_since_init_BC.\n  repeat split.\n  - rewrite <- H0; rewrite H; rewrite H3; reflexivity.\n  - rewrite <- H1; rewrite H7; rewrite H4; reflexivity.\n  - rewrite <- H2; rewrite H8; rewrite H5; reflexivity.\n  - assumption.\n  Qed.\n\n  (* Lemma: mstep2_since_init_CA correctly defined. *)\n  Lemma transition_correct_3 :\n  forall (o st i_st i_st' :state),\n  mstep1_since_init_BC st i_st'\n  (* initial state *)\n  /\\ (contracts_published i_st') = (contracts_published i_st)\n  /\\ (player_transfers i_st') = (player_transfers i_st)\n  /\\ (secrets_revealed i_st') = (secrets_revealed i_st)\n  (* contract state of CA didn't change since it was published *)\n  /\\ (contract_state o) = (contract_state i_st)\n  (* external state change *)\n  /\\ mstep2_state o st\n  -> mstep2_since_init_CA o i_st.\n  Proof.\n  intros.\n  unfold mstep1_since_init_BC in H;\n  unfold mstep2_state in H.\n  split_conj.\n  unfold mstep2_since_init_CA.\n  repeat split.\n  - rewrite H4; rewrite H; rewrite H0; reflexivity.\n  - rewrite H5; rewrite H7; rewrite H1; reflexivity.\n  - rewrite H6; rewrite H8; rewrite H2; reflexivity.\n  - rewrite H3; reflexivity.\n  Qed.\n\n  (* Lemma: mstep3_since_init_CA correctly defined. *)\n  Lemma transition_correct_4 :\n  forall (o st i_st: state),\n  mstep2_since_init_CA st i_st\n  (* how state & contract state changed A reveals secret+unlocks contract CA *)\n  /\\ mstep3_state o st\n  /\\ mstep3_constate (contract_state o) (contract_state st)\n  -> mstep3_since_init_CA o i_st.\n  Proof.\n  intros.\n  unfold mstep2_since_init_CA in H;\n  unfold mstep3_state in H;\n  unfold mstep3_constate in H.\n  unfold mstep3_since_init_CA.\n  split_conj.\n  unfold mstep3_constate.\n  rewrite H17 in *.\n  repeat split; try assumption.\n  - rewrite H0; rewrite H; reflexivity.\n  - rewrite H13; rewrite H15; reflexivity.\n  - rewrite H14; rewrite H16; reflexivity.\n  Qed.\n\n  (* Lemma: mstep3_since_init_BC correctly defined. *)\n  Lemma transition_correct_5 :\n  forall (o st i_st i_st': state),\n  mstep3_since_init_CA st i_st'\n  (* initial state *)\n  /\\ (contracts_published i_st') = (contracts_published i_st)\n  /\\ (player_transfers i_st') = (player_transfers i_st)\n  /\\ (secrets_revealed i_st') = (secrets_revealed i_st)\n  (* contract state of BC didn't change since it was published *)\n  /\\ (contract_state o) = (contract_state i_st)\n  (* how state changed after A claims `C_to_A` from CA *)\n  /\\ mstep4_state_CA o st\n  -> mstep3_since_init_BC o i_st.\n  Proof.\n  intros.\n  unfold mstep3_since_init_CA in H;\n  unfold mstep4_state_CA in H.\n  unfold mstep3_since_init_BC.\n  split_conj.\n  repeat split; try assumption.\n  - rewrite H4; rewrite H; rewrite H0; reflexivity.\n  - rewrite H5; rewrite H7; rewrite H1; reflexivity.\n  - rewrite H6; rewrite H8; rewrite H2; reflexivity.\n  Qed.\n\n  (* Lemma: mstep4_since_init_BC correctly defined. *)\n  Lemma transition_correct_6 :\n  forall (o st i_st: state),\n  (* external state at last step *)\n  mstep3_since_init_BC st i_st\n  /\\ mstep4_constate_BC (contract_state o) (contract_state st)\n  /\\ mstep4_state_BC o st\n  -> mstep4_since_init_BC o i_st.\n  Proof.\n  intros.\n  unfold mstep3_since_init_BC in H;\n  unfold mstep4_constate_BC in H;\n  unfold mstep4_state_BC in H.\n  unfold mstep4_since_init_BC;\n  unfold mstep4_constate_BC.\n  split_conj. rewrite H1 in *.\n  repeat split; try (rewrite <- H17; assumption).\n  - rewrite H; reflexivity.\n  - rewrite H2; rewrite H15; reflexivity.\n  - rewrite H3; rewrite H16; reflexivity.\n  - assumption.\n  Qed.\n\n\n  (* Lemma: mstep4_since_init_AB correctly defined. *)\n  Lemma transition_correct_7 :\n  forall (o st i_st i_st' st': state),\n  mstep4_since_init_BC st i_st\n  (* initial state *)\n  /\\ (contracts_published i_st') = (Build_contract A_address B_address A_to_B) :: (contracts_published i_st)\n  /\\ (player_transfers i_st') = (A_address, Int256.intval A_to_B) :: (player_transfers i_st)\n  /\\ (secrets_revealed i_st') = (secrets_revealed i_st)\n  (* lastest contract state for AB *)\n  /\\ mstep1_since_init_AB st' i_st'\n  /\\ (contract_state o) = (contract_state st')\n  (* how external state changes *)\n  /\\ mstep5_state_BC o st\n  -> mstep4_since_init_AB o i_st'.\n  Proof.\n  intros.\n  unfold mstep4_since_init_BC in H;\n  unfold mstep1_since_init_AB in H;\n  unfold mstep5_state_BC in H.\n  unfold mstep4_since_init_AB.\n  split_conj.\n  repeat split.\n  - rewrite H5; rewrite H; rewrite H0; reflexivity.\n  - rewrite H6; rewrite H11; rewrite H1; reflexivity.\n  - rewrite H7; rewrite H12; rewrite H2; reflexivity.\n  - rewrite H4; rewrite H10; reflexivity.\n  Qed.\n\n  (* Lemma: mstep5_since_init_AB correctly defined. *)\n  Lemma transition_correct_8 :\n  forall (o st i_st: state),\n  mstep4_since_init_AB st i_st\n  /\\ mstep5_state_AB o st\n  /\\ mstep5_constate_AB (contract_state o) (contract_state st)\n  -> mstep5_since_init_AB o i_st.\n  Proof.\n  intros.\n  unfold mstep4_since_init_AB in H;\n  unfold mstep5_state_AB in H;\n  unfold mstep5_constate_AB in H.\n  unfold mstep5_since_init_AB.\n  split_conj.\n  unfold mstep5_constate_AB.\n  rewrite H17 in *.\n  repeat split; try assumption.\n  - rewrite H0; rewrite H; reflexivity.\n  - rewrite H13; rewrite H15; reflexivity.\n  - rewrite H14; rewrite H16; reflexivity.\n  Qed.\n\n  (* Lemma: final_since_init correctly defined *)\n  Lemma transition_correct_9 :\n  forall (o st st' i_st: state),\n  mstep5_since_init_AB st i_st\n  /\\ mstep6_state_AB o st\n  /\\ mstep6_constate_AB (contract_state o) (contract_state st)\n  -> final_since_init o i_st\n     /\\ final_constate_since_init_AB (contract_state o) (contract_state i_st).\n  Proof.\n  intros.\n  unfold mstep5_since_init_AB in H;\n  unfold mstep6_state_AB in H.\n  split_conj.\n  unfold final_since_init;\n  unfold final_constate_since_init_AB.\n  repeat split.\n  - rewrite H0; rewrite H; reflexivity.\n  - rewrite H2; rewrite H4; reflexivity.\n  - rewrite H3; rewrite H5; reflexivity.\n  - exists (contract_state st). split; try assumption.\n  Qed.\n\n(* \n  Theorem transaction_success (o: state) :\n    is_true (is_pre_initialization_phase pre_init_state)\n    -> init_global_abstract_data = pre_init_state.(contract_state)\n    (* contract state is given by running initialize_opt *)\n    -> runStateT (filled_init A_to_B A_address C_address B_address init_hashlock init_start init_delta)\n       pre_init_state = Some (tt, init_state)\n    -> init_state.(player_transfers) = nil\n    -> init_state.(contract_state).(_events) = nil\n    -> init_state.(secrets_revealed) = nil\n    -> is_true (contract_ended o)\n    -> multi_bstep strategies initial_balances contract_address init_state o\n    (* transactions go as planned *)\n    -> player_bestpayoff player_A = player_netgain player_A o.\n  Admitted.\n*)\n\nEnd outcome_proof.\n"
  },
  {
    "path": "contracts/token/test.js",
    "content": "#!/usr/bin/env node\n\n// const net = require('net');\n// const solc = require('solc');\nconst fs = require('fs');\nconst ethers = require(\"ethers\");\n\nif (process.argv.length != 3) {\n    console.log(\"invalid args\");\n    process.exit(1);\n}\n\nconst endpoint = \"http://localhost:8545\";\nconst provider = new ethers.providers.JsonRpcProvider(endpoint);\n\n// const abi = [\n//   \"constructor()\",\n//   \"function initialize () public returns (uint)\",\n//   \"function totalSupply() view returns (uint)\",\n//   \"function balanceOf(uint) view returns (uint)\",\n//   \"function transfer(uint, int) returns (bool)\"\n// ];\n\nconst abi =\n[ {\"type\":\"constructor\",\n   \"name\":\"constructor\",\n   \"inputs\":[],\n   \"outputs\":[],\n   \"payable\":false,\n   \"constant\":false,\n   \"stateMutability\":\"nonpayable\"},\n {\"type\":\"function\",\n   \"name\":\"totalSupply\",\n   \"inputs\":[],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"balanceOf\",\n   \"inputs\":[{\"name\":\"tokenOwner\", \"type\":\"address\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"transfer\",\n   \"inputs\":[{\"name\":\"toA\", \"type\":\"address\"},{\"name\":\"tokens\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n  \"stateMutability\":\"payable\"}];\n\nconst bytecode = fs.readFileSync(process.argv[2]).toString().replace(/\\n|\\t|\\r| /g, \"\");\nconst signer = provider.getSigner(0);\nconst creator = signer.getAddress();\n\nasync function deploy() {\n  console.log(\"sending creation transaction...\")\n  let factory = new ethers.ContractFactory(abi, bytecode, signer);\n  let contract = await factory.deploy();\n  await contract.deployed();\n  console.log(\"contract address: \" + contract.address);\n  console.log(\"transaction hash: \" + contract.deployTransaction.hash);\n  let deployedBytecode = await provider.getCode(contract.address);\n  // console.log(\"deployed bytecode: \" + deployedBytecode);\n\n  // console.log(\"calling initalize...\");\n  // let tx = await contract.initialize();\n  // console.log(\"transaction hash: \" + tx.hash);\n  let alice = ethers.utils.getAddress(\"0x0000000000000000000000000000000000000024\"); // arbitrary address\n  console.log(\"calling transfer...\");\n  let tx = await contract.transfer(alice, 100);\n  console.log(\"transaction hash: \" + tx.hash);\n  let supply = await contract.totalSupply();\n  let aliceBalance = await contract.balanceOf(alice);\n  let creatorBalance = await contract.balanceOf(creator);\n  console.log(\"total supply: \" + supply);\n  console.log(\"creator balance: \" + creatorBalance);\n  console.log(\"alice balance: \" + aliceBalance);\n}\n\ndeploy();\n"
  },
  {
    "path": "contracts/token/token/FunctionalCorrectness.v",
    "content": "Require Import token.DataTypeOps.\nRequire Import token.LayerFIXEDSUPPLYTOKEN.\nRequire Import token.Invariant.\n\nRequire Import DeepSpec.lib.Monad.StateMonadOption.\nRequire Import DeepSpec.lib.Monad.RunStateTInv.\nRequire Import lib.ArithInv.\nImport DeepSpec.lib.Monad.Monad.MonadNotation.\n\nRequire Import ZArith.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\n\nSection WithMem.\n\nImport core.MemoryModel.\n\n(*\n(* Todo: move this lemma to inv_arith. *)\nLemma cmpu_Cne_true : forall x y, Int256.cmpu Cne x y = true -> x<>y.\nProof.\n  intros.\n  unfold Int256.cmpu in H.\n  rewrite Bool.negb_true_iff in H.\n  apply Int256eq_false in H.\n  assumption.\nQed. *)\n  \n(* We have now loaded the specification of the transfer method. *)\n(* Print FixedSupplyToken_transfer_opt. *)\n\nTransparent balances_sum.\n\nContext {memModelOps : MemoryModelOps mem}.\n\n(* We can now prove that the transfer method does not create or destroy tokens. *)\nTheorem transfer_constant_balances_sum : forall toA n d d' me b,\n    runStateT (FixedSupplyToken_transfer_opt toA n me) d = Some (b, d')\n    -> balances_sum d' = balances_sum d.\nProof.\n  intros.\n  Transparent FixedSupplyToken_transfer_opt.\n  unfold FixedSupplyToken_transfer_opt in H.\n  inv_runStateT.\n  subst.  \n  inv_arith.\n  unfold balances_sum.\n  subst.\n  autorewrite with updates.\n  remember (balances m2) as m.\n  rewrite Int256Tree_Properties.sum_swap by congruence.\n  apply Int256Tree_Properties.constant_sum'.\n    + reflexivity.\n    + reflexivity.\n    + congruence.\nQed.\n\n(* And similar for the transferFrom method. (The proof is actually\n   identical.) *)\nTheorem transferFrom_constant_balances_sum : forall fromA toA n d d' me b,\n    runStateT (FixedSupplyToken_transferFrom_opt fromA toA n me) d = Some (b, d')\n    -> balances_sum d' = balances_sum d.\nProof.\n  intros.\n  Transparent FixedSupplyToken_transferFrom_opt.\n  unfold FixedSupplyToken_transferFrom_opt in H.\n  inv_runStateT.\n  subst.  \n  inv_arith.\n  unfold balances_sum.\n  subst.\n  autorewrite with updates.\n  remember (balances m2) as m.\n  rewrite Int256Tree_Properties.sum_swap by congruence.\n  apply Int256Tree_Properties.constant_sum'.\n    + reflexivity.\n    + reflexivity.\n    + congruence.\nQed.\n\nEnd WithMem.\n"
  },
  {
    "path": "contracts/token/token/Invariant.v",
    "content": "Require Import ZArith.\n\nRequire Import cclib.Maps.\nRequire Import token.DataTypeOps.\n\n(* This must match the constant defined in the token.ds file, it would be\n   better if the frontend generated this definition. *)\nDefinition _totalSupply : Z := 100000 %Z.\n\nDefinition balances_sum (d : global_abstract_data_type) : Z :=\n  Int256Tree_Properties.sum (FixedSupplyToken_balances d).\n\nDefinition balances_nonnegative d :=\n  forall i n,\n    Int256Tree.get i (FixedSupplyToken_balances d) = Some n\n    -> (0 <= n)%Z.\n\n(* Additionally we need that all the balance entries are non-negative,\n   but we will get that from the hashmap ft_cond. *)\n\nDefinition inv d :=\n  balances_nonnegative d /\\\n  balances_sum d = _totalSupply.\n\nGlobal Opaque balances_nonnegative balances_sum. (* to prevent it from being expanded when defining the VC. *)"
  },
  {
    "path": "contracts/token/token/Makefile",
    "content": "###############################################################################\n##  v      #                   The Coq Proof Assistant                       ##\n## <O___,, #                INRIA - CNRS - LIX - LRI - PPS                   ##\n##   \\VV/  #                                                                 ##\n##    //   #                                                                 ##\n###############################################################################\n## GNUMakefile for Coq 8.9.1\n\n# For debugging purposes (must stay here, don't move below)\nINITIAL_VARS := $(.VARIABLES)\n# To implement recursion we save the name of the main Makefile\nSELF := $(lastword $(MAKEFILE_LIST))\nPARENT := $(firstword $(MAKEFILE_LIST))\n\n# This file is generated by coq_makefile and contains many variable\n# definitions, like the list of .v files or the path to Coq\ninclude Makefile.conf\n\n# Put in place old names\nVFILES            := $(COQMF_VFILES)\nMLIFILES          := $(COQMF_MLIFILES)\nMLFILES           := $(COQMF_MLFILES)\nML4FILES          := $(COQMF_ML4FILES)\nMLPACKFILES       := $(COQMF_MLPACKFILES)\nMLLIBFILES        := $(COQMF_MLLIBFILES)\nCMDLINE_VFILES    := $(COQMF_CMDLINE_VFILES)\nINSTALLCOQDOCROOT := $(COQMF_INSTALLCOQDOCROOT)\nOTHERFLAGS        := $(COQMF_OTHERFLAGS)\nCOQ_SRC_SUBDIRS   := $(COQMF_COQ_SRC_SUBDIRS)\nOCAMLLIBS         := $(COQMF_OCAMLLIBS)\nSRC_SUBDIRS       := $(COQMF_SRC_SUBDIRS)\nCOQLIBS           := $(COQMF_COQLIBS)\nCOQLIBS_NOML      := $(COQMF_COQLIBS_NOML)\nCMDLINE_COQLIBS   := $(COQMF_CMDLINE_COQLIBS)\nLOCAL             := $(COQMF_LOCAL)\nCOQLIB            := $(COQMF_COQLIB)\nDOCDIR            := $(COQMF_DOCDIR)\nOCAMLFIND         := $(COQMF_OCAMLFIND)\nCAMLP5O           := $(COQMF_CAMLP5O)\nCAMLP5BIN         := $(COQMF_CAMLP5BIN)\nCAMLP5LIB         := $(COQMF_CAMLP5LIB)\nCAMLP5OPTIONS     := $(COQMF_CAMLP5OPTIONS)\nCAMLFLAGS         := $(COQMF_CAMLFLAGS)\nHASNATDYNLINK     := $(COQMF_HASNATDYNLINK)\n\nMakefile.conf: _CoqProject\n\tcoq_makefile -f _CoqProject -o Makefile\n\n# This file can be created by the user to hook into double colon rules or\n# add any other Makefile code he may need\n-include Makefile.local\n\n# Parameters ##################################################################\n#\n# Parameters are make variable assignments.\n# They can be passed to (each call to) make on the command line.\n# They can also be put in Makefile.local once an for all.\n# For retro-compatibility reasons they can be put in the _CoqProject, but this\n# practice is discouraged since _CoqProject better not contain make specific\n# code (be nice to user interfaces).\n\n# Print shell commands (set to non empty)\nVERBOSE ?=\n\n# Time the Coq process (set to non empty), and how (see default value)\nTIMED?=\nTIMECMD?=\n# Use command time on linux, gtime on Mac OS\nTIMEFMT?=\"$* (real: %e, user: %U, sys: %S, mem: %M ko)\"\nifneq (,$(TIMED))\nifeq (0,$(shell command time -f $(TIMEFMT) true >/dev/null 2>/dev/null; echo $$?))\nSTDTIME?=command time -f $(TIMEFMT)\nelse\nifeq (0,$(shell gtime -f $(TIMEFMT) true >/dev/null 2>/dev/null; echo $$?))\nSTDTIME?=gtime -f $(TIMEFMT)\nelse\nSTDTIME?=command time\nendif\nendif\nelse\nSTDTIME?=command time -f $(TIMEFMT)\nendif\n\n# Coq binaries\nCOQC     ?= \"$(COQBIN)coqc\"\nCOQTOP   ?= \"$(COQBIN)coqtop\"\nCOQCHK   ?= \"$(COQBIN)coqchk\"\nCOQDEP   ?= \"$(COQBIN)coqdep\"\nCOQDOC   ?= \"$(COQBIN)coqdoc\"\nCOQMKFILE ?= \"$(COQBIN)coq_makefile\"\n\n# Timing scripts\nCOQMAKE_ONE_TIME_FILE ?= \"$(COQLIB)/tools/make-one-time-file.py\"\nCOQMAKE_BOTH_TIME_FILES ?= \"$(COQLIB)/tools/make-both-time-files.py\"\nCOQMAKE_BOTH_SINGLE_TIMING_FILES ?= \"$(COQLIB)/tools/make-both-single-timing-files.py\"\nBEFORE ?=\nAFTER ?=\n\n# FIXME this should be generated by Coq (modules already linked by Coq)\nCAMLDONTLINK=camlp5.gramlib,unix,str\n\n# OCaml binaries\nCAMLC       ?= \"$(OCAMLFIND)\" ocamlc   -c\nCAMLOPTC    ?= \"$(OCAMLFIND)\" opt      -c\nCAMLLINK    ?= \"$(OCAMLFIND)\" ocamlc   -linkpkg -dontlink $(CAMLDONTLINK)\nCAMLOPTLINK ?= \"$(OCAMLFIND)\" opt      -linkpkg -dontlink $(CAMLDONTLINK)\nCAMLDOC     ?= \"$(OCAMLFIND)\" ocamldoc\nCAMLDEP     ?= \"$(OCAMLFIND)\" ocamldep -slash -ml-synonym .ml4 -ml-synonym .mlpack\n\n# DESTDIR is prepended to all installation paths\nDESTDIR ?=\n\n# Debug builds, typically -g to OCaml, -debug to Coq.\nCAMLDEBUG ?=\nCOQDEBUG ?=\n\n# Extra packages to be linked in (as in findlib -package)\nCAMLPKGS ?=\n\n# Option for making timing files\nTIMING?=\n# Option for changing sorting of timing output file\nTIMING_SORT_BY ?= auto\n# Output file names for timed builds\nTIME_OF_BUILD_FILE               ?= time-of-build.log\nTIME_OF_BUILD_BEFORE_FILE        ?= time-of-build-before.log\nTIME_OF_BUILD_AFTER_FILE         ?= time-of-build-after.log\nTIME_OF_PRETTY_BUILD_FILE        ?= time-of-build-pretty.log\nTIME_OF_PRETTY_BOTH_BUILD_FILE   ?= time-of-build-both.log\nTIME_OF_PRETTY_BUILD_EXTRA_FILES ?= - # also output to the command line\n\n########## End of parameters ##################################################\n# What follows may be relevant to you only if you need to\n# extend this Makefile.  If so, look for 'Extension point' here and\n# put in Makefile.local double colon rules accordingly.\n# E.g. to perform some work after the all target completes you can write\n#\n# post-all::\n# \techo \"All done!\"\n#\n# in Makefile.local\n#\n###############################################################################\n\n\n\n\n# Flags #######################################################################\n#\n# We define a bunch of variables combining the parameters.\n# To add additional flags to coq, coqchk or coqdoc, set the\n# {COQ,COQCHK,COQDOC}EXTRAFLAGS variable to whatever you want to add.\n# To overwrite the default choice and set your own flags entirely, set the\n# {COQ,COQCHK,COQDOC}FLAGS variable.\n\nSHOW := $(if $(VERBOSE),@true \"\",@echo \"\")\nHIDE := $(if $(VERBOSE),,@)\n\nTIMER=$(if $(TIMED), $(STDTIME), $(TIMECMD))\n\nOPT?=\n\n# The DYNOBJ and DYNLIB variables are used by \"coqdep -dyndep var\" in .v.d\nifeq '$(OPT)' '-byte'\nUSEBYTE:=true\nDYNOBJ:=.cma\nDYNLIB:=.cma\nelse\nUSEBYTE:=\nDYNOBJ:=.cmxs\nDYNLIB:=.cmxs\nendif\n\n# these variables are meant to be overriden if you want to add *extra* flags\nCOQEXTRAFLAGS?=\nCOQCHKEXTRAFLAGS?=\nCOQDOCEXTRAFLAGS?=\n\n# these flags do NOT contain the libraries, to make them easier to overwrite\nCOQFLAGS?=-q $(OPT) $(OTHERFLAGS) $(COQEXTRAFLAGS)\nCOQCHKFLAGS?=-silent -o $(COQCHKEXTRAFLAGS)\nCOQDOCFLAGS?=-interpolate -utf8 $(COQDOCEXTRAFLAGS)\n\nCOQDOCLIBS?=$(COQLIBS_NOML)\n\n# The version of Coq being run and the version of coq_makefile that\n# generated this makefile\nCOQ_VERSION:=$(shell $(COQC) --print-version | cut -d \" \" -f 1)\nCOQMAKEFILE_VERSION:=8.9.1\n\nCOQSRCLIBS?= $(foreach d,$(COQ_SRC_SUBDIRS), -I \"$(COQLIB)$(d)\")\n\nCAMLFLAGS+=$(OCAMLLIBS) $(COQSRCLIBS) -I $(CAMLP5LIB)\n\n# ocamldoc fails with unknown argument otherwise\nCAMLDOCFLAGS=$(filter-out -annot, $(filter-out -bin-annot, $(CAMLFLAGS)))\n\n# FIXME This should be generated by Coq\nGRAMMARS:=grammar.cma\nCAMLP5EXTEND=pa_extend.cmo q_MLast.cmo pa_macro.cmo\n\nCAMLLIB:=$(shell \"$(OCAMLFIND)\" printconf stdlib 2> /dev/null)\nifeq (,$(CAMLLIB))\nPP=$(error \"Cannot find the 'ocamlfind' binary used to build Coq ($(OCAMLFIND)). Pre-compiled binary packages of Coq do not support compiling plugins this way. Please download the sources of Coq and run the Windows build script.\")\nelse\nPP:=-pp '$(CAMLP5O) -I $(CAMLLIB) -I \"$(COQLIB)/grammar\" $(CAMLP5EXTEND) $(GRAMMARS) $(CAMLP5OPTIONS) -impl'\nendif\n\nifneq (,$(TIMING))\nTIMING_ARG=-time\nifeq (after,$(TIMING))\nTIMING_EXT=after-timing\nelse\nifeq (before,$(TIMING))\nTIMING_EXT=before-timing\nelse\nTIMING_EXT=timing\nendif\nendif\nelse\nTIMING_ARG=\nendif\n\n# Retro compatibility (DESTDIR is standard on Unix, DSTROOT is not)\nifdef DSTROOT\nDESTDIR := $(DSTROOT)\nendif\n\nconcat_path = $(if $(1),$(1)/$(if $(COQMF_WINDRIVE),$(subst $(COQMF_WINDRIVE),/,$(2)),$(2)),$(2))\n\nCOQLIBINSTALL = $(call concat_path,$(DESTDIR),$(COQLIB)user-contrib)\nCOQDOCINSTALL = $(call concat_path,$(DESTDIR),$(DOCDIR)user-contrib)\nCOQTOPINSTALL = $(call concat_path,$(DESTDIR),$(COQLIB)toploop)\n\n# Files #######################################################################\n#\n# We here define a bunch of variables about the files being part of the\n# Coq project in order to ease the writing of build target and build rules\n\nVDFILE := .coqdeps\n\nALLSRCFILES := \\\n\t$(ML4FILES) \\\n\t$(MLFILES) \\\n\t$(MLPACKFILES) \\\n\t$(MLLIBFILES) \\\n\t$(MLIFILES)\n\n# helpers\nvo_to_obj = $(addsuffix .o,\\\n  $(filter-out Warning: Error:,\\\n  $(shell $(COQTOP) -q -noinit -batch -quiet -print-mod-uid $(1))))\nstrip_dotslash = $(patsubst ./%,%,$(1))\nVO = vo\n\nVOFILES = $(VFILES:.v=.$(VO))\nGLOBFILES = $(VFILES:.v=.glob)\nHTMLFILES = $(VFILES:.v=.html)\nGHTMLFILES = $(VFILES:.v=.g.html)\nBEAUTYFILES = $(addsuffix .beautified,$(VFILES))\nTEXFILES = $(VFILES:.v=.tex)\nGTEXFILES = $(VFILES:.v=.g.tex)\nCMOFILES = \\\n\t$(ML4FILES:.ml4=.cmo) \\\n\t$(MLFILES:.ml=.cmo) \\\n\t$(MLPACKFILES:.mlpack=.cmo)\nCMXFILES = $(CMOFILES:.cmo=.cmx)\nOFILES = $(CMXFILES:.cmx=.o)\nCMAFILES = $(MLLIBFILES:.mllib=.cma) $(MLPACKFILES:.mlpack=.cma)\nCMXAFILES = $(CMAFILES:.cma=.cmxa)\nCMIFILES = \\\n\t$(CMOFILES:.cmo=.cmi) \\\n\t$(MLIFILES:.mli=.cmi)\n# the /if/ is because old _CoqProject did not list a .ml(pack|lib) but just\n# a .ml4 file\nCMXSFILES = \\\n\t$(MLPACKFILES:.mlpack=.cmxs) \\\n\t$(CMXAFILES:.cmxa=.cmxs) \\\n\t$(if $(MLPACKFILES)$(CMXAFILES),,\\\n\t\t$(ML4FILES:.ml4=.cmxs) $(MLFILES:.ml=.cmxs))\n\n# files that are packed into a plugin (no extension)\nPACKEDFILES = \\\n\t$(call strip_dotslash, \\\n\t  $(foreach lib, \\\n            $(call strip_dotslash, \\\n\t       $(MLPACKFILES:.mlpack=_MLPACK_DEPENDENCIES)),$($(lib))))\n# files that are archived into a .cma (mllib)\nLIBEDFILES = \\\n\t$(call strip_dotslash, \\\n\t  $(foreach lib, \\\n            $(call strip_dotslash, \\\n\t       $(MLLIBFILES:.mllib=_MLLIB_DEPENDENCIES)),$($(lib))))\nCMIFILESTOINSTALL = $(filter-out $(addsuffix .cmi,$(PACKEDFILES)),$(CMIFILES))\nCMOFILESTOINSTALL = $(filter-out $(addsuffix .cmo,$(PACKEDFILES)),$(CMOFILES))\nOBJFILES = $(call vo_to_obj,$(VOFILES))\nALLNATIVEFILES = \\\n\t$(OBJFILES:.o=.cmi) \\\n\t$(OBJFILES:.o=.cmx) \\\n\t$(OBJFILES:.o=.cmxs)\n# trick: wildcard filters out non-existing files, so that `install` doesn't show\n# warnings and `clean` doesn't pass to rm a list of files that is too long for\n# the shell.\nNATIVEFILES = $(wildcard $(ALLNATIVEFILES))\nFILESTOINSTALL = \\\n\t$(VOFILES) \\\n\t$(VFILES) \\\n\t$(GLOBFILES) \\\n\t$(NATIVEFILES) \\\n\t$(CMIFILESTOINSTALL)\nBYTEFILESTOINSTALL = \\\n\t$(CMOFILESTOINSTALL) \\\n\t$(CMAFILES)\nifeq '$(HASNATDYNLINK)' 'true'\nDO_NATDYNLINK = yes\nFILESTOINSTALL += $(CMXSFILES) $(CMXAFILES) $(CMOFILESTOINSTALL:.cmo=.cmx)\nelse\nDO_NATDYNLINK =\nendif\n\nALLDFILES = $(addsuffix .d,$(ALLSRCFILES) $(VDFILE))\n\n# Compilation targets #########################################################\n\nall:\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" pre-all\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" real-all\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" post-all\n.PHONY: all\n\nall.timing.diff:\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" pre-all\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" real-all.timing.diff TIME_OF_PRETTY_BUILD_EXTRA_FILES=\"\"\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" post-all\n.PHONY: all.timing.diff\n\nmake-pretty-timed-before:: TIME_OF_BUILD_FILE=$(TIME_OF_BUILD_BEFORE_FILE)\nmake-pretty-timed-after:: TIME_OF_BUILD_FILE=$(TIME_OF_BUILD_AFTER_FILE)\nmake-pretty-timed make-pretty-timed-before make-pretty-timed-after::\n\t$(HIDE)rm -f pretty-timed-success.ok\n\t$(HIDE)($(MAKE) --no-print-directory -f \"$(PARENT)\" $(TGTS) TIMED=1 2>&1 && touch pretty-timed-success.ok) | tee -a $(TIME_OF_BUILD_FILE)\n\t$(HIDE)rm pretty-timed-success.ok # must not be -f; must fail if the touch failed\nprint-pretty-timed::\n\t$(HIDE)$(COQMAKE_ONE_TIME_FILE) $(TIME_OF_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)\nprint-pretty-timed-diff::\n\t$(HIDE)$(COQMAKE_BOTH_TIME_FILES) --sort-by=$(TIMING_SORT_BY) $(TIME_OF_BUILD_AFTER_FILE) $(TIME_OF_BUILD_BEFORE_FILE) $(TIME_OF_PRETTY_BOTH_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)\nifeq (,$(BEFORE))\nprint-pretty-single-time-diff::\n\t@echo 'Error: Usage: $(MAKE) print-pretty-single-time-diff AFTER=path/to/file.v.after-timing BEFORE=path/to/file.v.before-timing'\n\t$(HIDE)false\nelse\nifeq (,$(AFTER))\nprint-pretty-single-time-diff::\n\t@echo 'Error: Usage: $(MAKE) print-pretty-single-time-diff AFTER=path/to/file.v.after-timing BEFORE=path/to/file.v.before-timing'\n\t$(HIDE)false\nelse\nprint-pretty-single-time-diff::\n\t$(HIDE)$(COQMAKE_BOTH_SINGLE_TIMING_FILES) --sort-by=$(TIMING_SORT_BY) $(AFTER) $(BEFORE) $(TIME_OF_PRETTY_BUILD_FILE) $(TIME_OF_PRETTY_BUILD_EXTRA_FILES)\nendif\nendif\npretty-timed:\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(PARENT)\" make-pretty-timed\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" print-pretty-timed\n.PHONY: pretty-timed make-pretty-timed make-pretty-timed-before make-pretty-timed-after print-pretty-timed print-pretty-timed-diff print-pretty-single-time-diff\n\n# Extension points for actions to be performed before/after the all target\npre-all::\n\t@# Extension point\n\t$(HIDE)if [ \"$(COQMAKEFILE_VERSION)\" != \"$(COQ_VERSION)\" ]; then\\\n\t  echo \"W: This Makefile was generated by Coq $(COQMAKEFILE_VERSION)\";\\\n\t  echo \"W: while the current Coq version is $(COQ_VERSION)\";\\\n\tfi\n.PHONY: pre-all\n\npost-all::\n\t@# Extension point\n.PHONY: post-all\n\nreal-all: $(VOFILES) $(if $(USEBYTE),bytefiles,optfiles)\n.PHONY: real-all\n\nreal-all.timing.diff: $(VOFILES:.vo=.v.timing.diff)\n.PHONY: real-all.timing.diff\n\nbytefiles: $(CMOFILES) $(CMAFILES)\n.PHONY: bytefiles\n\noptfiles: $(if $(DO_NATDYNLINK),$(CMXSFILES))\n.PHONY: optfiles\n\n# FIXME, see Ralf's bugreport\nquick: $(VOFILES:.vo=.vio)\n.PHONY: quick\n\nvio2vo:\n\t$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) \\\n\t\t-schedule-vio2vo $(J) $(VOFILES:%.vo=%.vio)\n.PHONY: vio2vo\n\nquick2vo:\n\t$(HIDE)make -j $(J) quick\n\t$(HIDE)VIOFILES=$$(for vofile in $(VOFILES); do \\\n\t  viofile=\"$$(echo \"$$vofile\" | sed \"s/\\.vo$$/.vio/\")\"; \\\n\t  if [ \"$$vofile\" -ot \"$$viofile\" -o ! -e \"$$vofile\" ]; then printf \"$$viofile \"; fi; \\\n\tdone); \\\n\techo \"VIO2VO: $$VIOFILES\"; \\\n\tif [ -n \"$$VIOFILES\" ]; then \\\n\t  $(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) -schedule-vio2vo $(J) $$VIOFILES; \\\n\tfi\n.PHONY: quick2vo\n\ncheckproofs:\n\t$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) \\\n\t\t-schedule-vio-checking $(J) $(VOFILES:%.vo=%.vio)\n.PHONY: checkproofs\n\nvalidate: $(VOFILES)\n\t$(TIMER) $(COQCHK) $(COQCHKFLAGS) $(COQLIBS) $^\n.PHONY: validate\n\nonly: $(TGTS)\n.PHONY: only\n\n# Documentation targets #######################################################\n\nhtml: $(GLOBFILES) $(VFILES)\n\t$(SHOW)'COQDOC -d html $(GAL)'\n\t$(HIDE)mkdir -p html\n\t$(HIDE)$(COQDOC) \\\n\t\t-toc $(COQDOCFLAGS) -html $(GAL) $(COQDOCLIBS) -d html $(VFILES)\n\nmlihtml: $(MLIFILES:.mli=.cmi)\n\t$(SHOW)'CAMLDOC -d $@'\n\t$(HIDE)mkdir $@ || rm -rf $@/*\n\t$(HIDE)$(CAMLDOC) -html \\\n\t\t-d $@ -m A $(CAMLDEBUG) $(CAMLDOCFLAGS) $(MLIFILES)\n\nall-mli.tex: $(MLIFILES:.mli=.cmi)\n\t$(SHOW)'CAMLDOC -latex $@'\n\t$(HIDE)$(CAMLDOC) -latex \\\n\t\t-o $@ -m A $(CAMLDEBUG) $(CAMLDOCFLAGS) $(MLIFILES)\n\nall.ps: $(VFILES)\n\t$(SHOW)'COQDOC -ps $(GAL)'\n\t$(HIDE)$(COQDOC) \\\n\t\t-toc $(COQDOCFLAGS) -ps $(GAL) $(COQDOCLIBS) \\\n\t\t-o $@ `$(COQDEP) -sort -suffix .v $(VFILES)`\n\nall.pdf: $(VFILES)\n\t$(SHOW)'COQDOC -pdf $(GAL)'\n\t$(HIDE)$(COQDOC) \\\n\t\t-toc $(COQDOCFLAGS) -pdf $(GAL) $(COQDOCLIBS) \\\n\t\t-o $@ `$(COQDEP) -sort -suffix .v $(VFILES)`\n\n# FIXME: not quite right, since the output name is different\ngallinahtml: GAL=-g\ngallinahtml: html\n\nall-gal.ps: GAL=-g\nall-gal.ps: all.ps\n\nall-gal.pdf: GAL=-g\nall-gal.pdf: all.pdf\n\n# ?\nbeautify: $(BEAUTYFILES)\n\tfor file in $^; do mv $${file%.beautified} $${file%beautified}old && mv $${file} $${file%.beautified}; done\n\t@echo 'Do not do \"make clean\" until you are sure that everything went well!'\n\t@echo 'If there were a problem, execute \"for file in $$(find . -name \\*.v.old -print); do mv $${file} $${file%.old}; done\" in your shell/'\n.PHONY: beautify\n\n# Installation targets ########################################################\n#\n# There rules can be extended in Makefile.local\n# Extensions can't assume when they run.\n\ninstall:\n\t$(HIDE)for f in $(FILESTOINSTALL); do\\\n\t df=\"`$(COQMKFILE) -destination-of \"$$f\" $(COQLIBS)`\";\\\n\t if [ \"$$?\" != \"0\" -o -z \"$$df\" ]; then\\\n\t   echo SKIP \"$$f\" since it has no logical path;\\\n\t else\\\n\t   install -d \"$(COQLIBINSTALL)/$$df\" &&\\\n\t   install -m 0644 \"$$f\" \"$(COQLIBINSTALL)/$$df\" &&\\\n\t   echo INSTALL \"$$f\" \"$(COQLIBINSTALL)/$$df\";\\\n\t fi;\\\n\tdone\n\t$(HIDE)$(MAKE) install-extra -f \"$(SELF)\"\ninstall-extra::\n\t@# Extension point\n.PHONY: install install-extra\n\ninstall-byte:\n\t$(HIDE)for f in $(BYTEFILESTOINSTALL); do\\\n\t df=\"`$(COQMKFILE) -destination-of \"$$f\" $(COQLIBS)`\";\\\n\t if [ \"$$?\" != \"0\" -o -z \"$$df\" ]; then\\\n\t   echo SKIP \"$$f\" since it has no logical path;\\\n\t else\\\n\t   install -d \"$(COQLIBINSTALL)/$$df\" &&\\\n\t   install -m 0644 \"$$f\" \"$(COQLIBINSTALL)/$$df\" &&\\\n\t   echo INSTALL \"$$f\" \"$(COQLIBINSTALL)/$$df\";\\\n\t fi;\\\n\tdone\n\ninstall-doc:: html mlihtml\n\t@# Extension point\n\t$(HIDE)install -d \"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/html\"\n\t$(HIDE)for i in html/*; do \\\n\t dest=\"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/$$i\";\\\n\t install -m 0644 \"$$i\" \"$$dest\";\\\n\t echo INSTALL \"$$i\" \"$$dest\";\\\n\tdone\n\t$(HIDE)install -d \\\n\t\t\"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/mlihtml\"\n\t$(HIDE)for i in mlihtml/*; do \\\n\t dest=\"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/$$i\";\\\n\t install -m 0644 \"$$i\" \"$$dest\";\\\n\t echo INSTALL \"$$i\" \"$$dest\";\\\n\tdone\n.PHONY: install-doc\n\nuninstall::\n\t@# Extension point\n\t$(HIDE)for f in $(FILESTOINSTALL); do \\\n\t df=\"`$(COQMKFILE) -destination-of \"$$f\" $(COQLIBS)`\" &&\\\n\t instf=\"$(COQLIBINSTALL)/$$df/`basename $$f`\" &&\\\n\t rm -f \"$$instf\" &&\\\n\t echo RM \"$$instf\" &&\\\n\t (rmdir \"$(call concat_path,,$(COQLIBINSTALL)/$$df/)\" 2>/dev/null || true); \\\n\tdone\n.PHONY: uninstall\n\nuninstall-doc::\n\t@# Extension point\n\t$(SHOW)'RM $(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/html'\n\t$(HIDE)rm -rf \"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/html\"\n\t$(SHOW)'RM $(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/mlihtml'\n\t$(HIDE)rm -rf \"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/mlihtml\"\n\t$(HIDE) rmdir \"$(COQDOCINSTALL)/$(INSTALLCOQDOCROOT)/\" || true\n.PHONY: uninstall-doc\n\n# Cleaning ####################################################################\n#\n# There rules can be extended in Makefile.local\n# Extensions can't assume when they run.\n\nclean::\n\t@# Extension point\n\t$(SHOW)'CLEAN'\n\t$(HIDE)rm -f $(CMOFILES)\n\t$(HIDE)rm -f $(CMIFILES)\n\t$(HIDE)rm -f $(CMAFILES)\n\t$(HIDE)rm -f $(CMOFILES:.cmo=.cmx)\n\t$(HIDE)rm -f $(CMXAFILES)\n\t$(HIDE)rm -f $(CMXSFILES)\n\t$(HIDE)rm -f $(CMOFILES:.cmo=.o)\n\t$(HIDE)rm -f $(CMXAFILES:.cmxa=.a)\n\t$(HIDE)rm -f $(ALLDFILES)\n\t$(HIDE)rm -f $(NATIVEFILES)\n\t$(HIDE)find . -name .coq-native -type d -empty -delete\n\t$(HIDE)rm -f $(VOFILES)\n\t$(HIDE)rm -f $(VOFILES:.vo=.vio)\n\t$(HIDE)rm -f $(BEAUTYFILES) $(VFILES:=.old)\n\t$(HIDE)rm -f all.ps all-gal.ps all.pdf all-gal.pdf all.glob all-mli.tex\n\t$(HIDE)rm -f $(VFILES:.v=.glob)\n\t$(HIDE)rm -f $(VFILES:.v=.tex)\n\t$(HIDE)rm -f $(VFILES:.v=.g.tex)\n\t$(HIDE)rm -f pretty-timed-success.ok\n\t$(HIDE)rm -rf html mlihtml\n.PHONY: clean\n\ncleanall:: clean\n\t@# Extension point\n\t$(SHOW)'CLEAN *.aux *.timing'\n\t$(HIDE)rm -f $(foreach f,$(VFILES:.v=),$(dir $(f)).$(notdir $(f)).aux)\n\t$(HIDE)rm -f $(TIME_OF_BUILD_FILE) $(TIME_OF_BUILD_BEFORE_FILE) $(TIME_OF_BUILD_AFTER_FILE) $(TIME_OF_PRETTY_BUILD_FILE) $(TIME_OF_PRETTY_BOTH_BUILD_FILE)\n\t$(HIDE)rm -f $(VOFILES:.vo=.v.timing)\n\t$(HIDE)rm -f $(VOFILES:.vo=.v.before-timing)\n\t$(HIDE)rm -f $(VOFILES:.vo=.v.after-timing)\n\t$(HIDE)rm -f $(VOFILES:.vo=.v.timing.diff)\n.PHONY: cleanall\n\narchclean::\n\t@# Extension point\n\t$(SHOW)'CLEAN *.cmx *.o'\n\t$(HIDE)rm -f $(NATIVEFILES)\n\t$(HIDE)rm -f $(CMOFILES:%.cmo=%.cmx)\n.PHONY: archclean\n\n\n# Compilation rules ###########################################################\n\n$(MLIFILES:.mli=.cmi): %.cmi: %.mli\n\t$(SHOW)'CAMLC -c $<'\n\t$(HIDE)$(CAMLC) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) $<\n\n$(ML4FILES:.ml4=.cmo): %.cmo: %.ml4\n\t$(SHOW)'CAMLC -pp -c $<'\n\t$(HIDE)$(CAMLC) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) $(PP) -impl $<\n\n$(ML4FILES:.ml4=.cmx): %.cmx: %.ml4\n\t$(SHOW)'CAMLOPT -pp -c $(FOR_PACK) $<'\n\t$(HIDE)$(CAMLOPTC) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) $(PP) $(FOR_PACK) -impl $<\n\n$(MLFILES:.ml=.cmo): %.cmo: %.ml\n\t$(SHOW)'CAMLC -c $<'\n\t$(HIDE)$(CAMLC) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) $<\n\n$(MLFILES:.ml=.cmx): %.cmx: %.ml\n\t$(SHOW)'CAMLOPT -c $(FOR_PACK) $<'\n\t$(HIDE)$(CAMLOPTC) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) $(FOR_PACK) $<\n\n\n$(MLLIBFILES:.mllib=.cmxs): %.cmxs: %.cmxa\n\t$(SHOW)'CAMLOPT -shared -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) \\\n\t\t-linkall -shared -o $@ $<\n\n$(MLLIBFILES:.mllib=.cma): %.cma: | %.mllib\n\t$(SHOW)'CAMLC -a -o $@'\n\t$(HIDE)$(CAMLLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) -a -o $@ $^\n\n$(MLLIBFILES:.mllib=.cmxa): %.cmxa: | %.mllib\n\t$(SHOW)'CAMLOPT -a -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) -a -o $@ $^\n\n\n$(MLPACKFILES:.mlpack=.cmxs): %.cmxs: %.cmxa\n\t$(SHOW)'CAMLOPT -shared -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) \\\n\t\t-shared -linkall -o $@ $<\n\n$(MLPACKFILES:.mlpack=.cmxa): %.cmxa: %.cmx\n\t$(SHOW)'CAMLOPT -a -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) -a -o $@ $<\n\n$(MLPACKFILES:.mlpack=.cma): %.cma: %.cmo | %.mlpack\n\t$(SHOW)'CAMLC -a -o $@'\n\t$(HIDE)$(CAMLLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) -a -o $@ $^\n\n$(MLPACKFILES:.mlpack=.cmo): %.cmo: | %.mlpack\n\t$(SHOW)'CAMLC -pack -o $@'\n\t$(HIDE)$(CAMLLINK) $(CAMLDEBUG) $(CAMLFLAGS) -pack -o $@ $^\n\n$(MLPACKFILES:.mlpack=.cmx): %.cmx: | %.mlpack\n\t$(SHOW)'CAMLOPT -pack -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) -pack -o $@ $^\n\n# This rule is for _CoqProject with no .mllib nor .mlpack\n$(filter-out $(MLLIBFILES:.mllib=.cmxs) $(MLPACKFILES:.mlpack=.cmxs) $(addsuffix .cmxs,$(PACKEDFILES)) $(addsuffix .cmxs,$(LIBEDFILES)),$(MLFILES:.ml=.cmxs) $(ML4FILES:.ml4=.cmxs)): %.cmxs: %.cmx\n\t$(SHOW)'[deprecated,use-mllib-or-mlpack] CAMLOPT -shared -o $@'\n\t$(HIDE)$(CAMLOPTLINK) $(CAMLDEBUG) $(CAMLFLAGS) $(CAMLPKGS) \\\n\t\t-shared -o $@ $<\n\nifneq (,$(TIMING))\nTIMING_EXTRA = > $<.$(TIMING_EXT)\nelse\nTIMING_EXTRA =\nendif\n\n$(VOFILES): %.vo: %.v\n\t$(SHOW)COQC $<\n\t$(HIDE)$(TIMER) $(COQC) $(COQDEBUG) $(TIMING_ARG) $(COQFLAGS) $(COQLIBS) $< $(TIMING_EXTRA)\n\n# FIXME ?merge with .vo / .vio ?\n$(GLOBFILES): %.glob: %.v\n\t$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) $<\n\n$(VFILES:.v=.vio): %.vio: %.v\n\t$(SHOW)COQC -quick $<\n\t$(HIDE)$(TIMER) $(COQC) -quick $(COQDEBUG) $(COQFLAGS) $(COQLIBS) $<\n\n$(addsuffix .timing.diff,$(VFILES)): %.timing.diff : %.before-timing %.after-timing\n\t$(SHOW)PYTHON TIMING-DIFF $<\n\t$(HIDE)$(MAKE) --no-print-directory -f \"$(SELF)\" print-pretty-single-time-diff BEFORE=$*.before-timing AFTER=$*.after-timing TIME_OF_PRETTY_BUILD_FILE=\"$@\"\n\n$(BEAUTYFILES): %.v.beautified: %.v\n\t$(SHOW)'BEAUTIFY $<'\n\t$(HIDE)$(TIMER) $(COQC) $(COQDEBUG) $(COQFLAGS) $(COQLIBS) -beautify $<\n\n$(TEXFILES): %.tex: %.v\n\t$(SHOW)'COQDOC -latex $<'\n\t$(HIDE)$(COQDOC) $(COQDOCFLAGS) -latex $< -o $@\n\n$(GTEXFILES): %.g.tex: %.v\n\t$(SHOW)'COQDOC -latex -g $<'\n\t$(HIDE)$(COQDOC) $(COQDOCFLAGS) -latex -g $< -o $@\n\n$(HTMLFILES): %.html: %.v %.glob\n\t$(SHOW)'COQDOC -html $<'\n\t$(HIDE)$(COQDOC) $(COQDOCFLAGS) -html $< -o $@\n\n$(GHTMLFILES): %.g.html: %.v %.glob\n\t$(SHOW)'COQDOC -html -g $<'\n\t$(HIDE)$(COQDOC) $(COQDOCFLAGS)  -html -g $< -o $@\n\n# Dependency files ############################################################\n\nifneq ($(filter-out archclean clean cleanall printenv make-pretty-timed make-pretty-timed-before make-pretty-timed-after print-pretty-timed print-pretty-timed-diff print-pretty-single-time-diff,$(MAKECMDGOALS)),)\n -include $(ALLDFILES)\nelse\n ifeq ($(MAKECMDGOALS),)\n  -include $(ALLDFILES)\n endif\nendif\n\n.SECONDARY: $(ALLDFILES)\n\nredir_if_ok = > \"$@\" || ( RV=$$?; rm -f \"$@\"; exit $$RV )\n\n$(addsuffix .d,$(MLIFILES)): %.mli.d: %.mli\n\t$(SHOW)'CAMLDEP $<'\n\t$(HIDE)$(CAMLDEP) $(OCAMLLIBS) \"$<\" $(redir_if_ok)\n\n$(addsuffix .d,$(ML4FILES)): %.ml4.d: %.ml4\n\t$(SHOW)'CAMLDEP -pp $<'\n\t$(HIDE)$(CAMLDEP) $(OCAMLLIBS) $(PP) -impl \"$<\" $(redir_if_ok)\n\n$(addsuffix .d,$(MLFILES)): %.ml.d: %.ml\n\t$(SHOW)'CAMLDEP $<'\n\t$(HIDE)$(CAMLDEP) $(OCAMLLIBS) \"$<\" $(redir_if_ok)\n\n$(addsuffix .d,$(MLLIBFILES)): %.mllib.d: %.mllib\n\t$(SHOW)'COQDEP $<'\n\t$(HIDE)$(COQDEP) $(OCAMLLIBS) -c \"$<\" $(redir_if_ok)\n\n$(addsuffix .d,$(MLPACKFILES)): %.mlpack.d: %.mlpack\n\t$(SHOW)'COQDEP $<'\n\t$(HIDE)$(COQDEP) $(OCAMLLIBS) -c \"$<\" $(redir_if_ok)\n\n# If this makefile is created using a _CoqProject we have coqdep get\n# options from it. This avoids argument length limits for pathological\n# projects. Note that extra options might be on the command line.\nVDFILE_FLAGS:=$(if _CoqProject,-f _CoqProject,) $(CMDLINE_COQLIBS) $(CMDLINE_VFILES)\n\n$(VDFILE).d: $(VFILES)\n\t$(SHOW)'COQDEP VFILES'\n\t$(HIDE)$(COQDEP) -dyndep var $(VDFILE_FLAGS) $(redir_if_ok)\n\n# Misc ########################################################################\n\nbyte:\n\t$(HIDE)$(MAKE) all \"OPT:=-byte\" -f \"$(SELF)\"\n.PHONY: byte\n\nopt:\n\t$(HIDE)$(MAKE) all \"OPT:=-opt\" -f \"$(SELF)\"\n.PHONY:\topt\n\n# This is deprecated.  To extend this makefile use\n# extension points and Makefile.local\nprintenv::\n\t$(warning printenv is deprecated)\n\t$(warning write extensions in Makefile.local or include Makefile.conf)\n\t@echo 'LOCAL = $(LOCAL)'\n\t@echo 'COQLIB = $(COQLIB)'\n\t@echo 'DOCDIR = $(DOCDIR)'\n\t@echo 'OCAMLFIND = $(OCAMLFIND)'\n\t@echo 'CAMLP5O = $(CAMLP5O)'\n\t@echo 'CAMLP5BIN = $(CAMLP5BIN)'\n\t@echo 'CAMLP5LIB = $(CAMLP5LIB)'\n\t@echo 'CAMLP5OPTIONS = $(CAMLP5OPTIONS)'\n\t@echo 'HASNATDYNLINK = $(HASNATDYNLINK)'\n\t@echo 'SRC_SUBDIRS = $(SRC_SUBDIRS)'\n\t@echo 'COQ_SRC_SUBDIRS = $(COQ_SRC_SUBDIRS)'\n\t@echo 'OCAMLFIND = $(OCAMLFIND)'\n\t@echo 'PP = $(PP)'\n\t@echo 'COQFLAGS = $(COQFLAGS)'\n\t@echo 'COQLIB = $(COQLIBS)'\n\t@echo 'COQLIBINSTALL = $(COQLIBINSTALL)'\n\t@echo 'COQDOCINSTALL = $(COQDOCINSTALL)'\n.PHONY:\tprintenv\n\n# Generate a .merlin file.  If you need to append directives to this\n# file you can extend the merlin-hook target in Makefile.local\n.merlin:\n\t$(SHOW)'FILL .merlin'\n\t$(HIDE)echo 'FLG $(COQMF_CAMLFLAGS)' > .merlin\n\t$(HIDE)echo 'B $(COQLIB)' >> .merlin\n\t$(HIDE)echo 'S $(COQLIB)' >> .merlin\n\t$(HIDE)$(foreach d,$(COQ_SRC_SUBDIRS), \\\n\t\techo 'B $(COQLIB)$(d)' >> .merlin;)\n\t$(HIDE)$(foreach d,$(COQ_SRC_SUBDIRS), \\\n\t\techo 'S $(COQLIB)$(d)' >> .merlin;)\n\t$(HIDE)$(foreach d,$(SRC_SUBDIRS), echo 'B $(d)' >> .merlin;)\n\t$(HIDE)$(foreach d,$(SRC_SUBDIRS), echo 'S $(d)' >> .merlin;)\n\t$(HIDE)$(MAKE) merlin-hook -f \"$(SELF)\"\n.PHONY: merlin\n\nmerlin-hook::\n\t@# Extension point\n.PHONY: merlin-hook\n\n# prints all variables\ndebug:\n\t$(foreach v,\\\n\t\t$(sort $(filter-out $(INITIAL_VARS) INITIAL_VARS,\\\n\t       \t\t$(.VARIABLES))),\\\n\t       \t$(info $(v) = $($(v))))\n.PHONY: debug\n\n.DEFAULT_GOAL := all\n"
  },
  {
    "path": "contracts/token/token/Makefile.conf",
    "content": "# This configuration file was generated by running:\n# coq_makefile -f _CoqProject -o Makefile\n\n\n###############################################################################\n#                                                                             #\n# Project files.                                                              #\n#                                                                             #\n###############################################################################\n\nCOQMF_VFILES = EdsgerIdents.v DataTypeOps.v DataTypeProofs.v DataTypes.v LayerFIXEDSUPPLYTOKEN.v RefineFIXEDSUPPLYTOKEN.v ObjFixedSupplyTokenCodeProofs.v FunctionalCorrectness.v Invariant.v\nCOQMF_MLIFILES = \nCOQMF_MLFILES = \nCOQMF_ML4FILES = \nCOQMF_MLPACKFILES = \nCOQMF_MLLIBFILES = \nCOQMF_CMDLINE_VFILES = \n\n###############################################################################\n#                                                                             #\n# Path directives (-I, -R, -Q).                                               #\n#                                                                             #\n###############################################################################\n\nCOQMF_OCAMLLIBS = \nCOQMF_SRC_SUBDIRS = \nCOQMF_COQLIBS =   -R ../../.. DeepSpec -R . token\nCOQMF_COQLIBS_NOML =  -R ../../.. DeepSpec -R . token\nCOQMF_CMDLINE_COQLIBS =   \n\n###############################################################################\n#                                                                             #\n# Coq configuration.                                                          #\n#                                                                             #\n###############################################################################\n\nCOQMF_LOCAL=0\nCOQMF_COQLIB=/Users/xs/.opam/4.09.0/lib/coq/\nCOQMF_DOCDIR=/Users/xs/.opam/4.09.0/doc/\nCOQMF_OCAMLFIND=/Users/xs/.opam/4.09.0/bin/ocamlfind\nCOQMF_CAMLP5O=/Users/xs/.opam/4.09.0/bin/camlp5o\nCOQMF_CAMLP5BIN=/Users/xs/.opam/4.09.0/bin/\nCOQMF_CAMLP5LIB=/Users/xs/.opam/4.09.0/lib/camlp5\nCOQMF_CAMLP5OPTIONS=-loc loc\nCOQMF_CAMLFLAGS=-thread -rectypes -w +a-4-9-27-41-42-44-45-48-50-58-59   -safe-string -strict-sequence\nCOQMF_HASNATDYNLINK=true\nCOQMF_COQ_SRC_SUBDIRS=config dev lib clib kernel library engine pretyping interp parsing proofs tactics toplevel printing grammar ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/micromega plugins/nsatz plugins/omega plugins/quote plugins/romega plugins/rtauto plugins/setoid_ring plugins/ssr plugins/ssrmatching plugins/syntax plugins/xml\nCOQMF_WINDRIVE=\n\n###############################################################################\n#                                                                             #\n# Extra variables.                                                            #\n#                                                                             #\n###############################################################################\n\nCOQMF_OTHERFLAGS = \nCOQMF_INSTALLCOQDOCROOT = orphan_DeepSpec_token\n"
  },
  {
    "path": "contracts/token/token/ManualRefinement.v",
    "content": "Require Import backend.phase.MiniC.Language.\nRequire Import backend.phase.MiniC.BigstepSemantics.\nRequire Import backend.phase.MiniC.Semantics.\nRequire Import backend.Values.\nRequire Import backend.MemoryModel.\nRequire Import core.MemoryModel.\n\nSection STMT_FUNC.\n\nContext `{HM : HyperMem}.\n    \n(* -----------------stuff that should go in core.SynthesisStmt  ------------------ *)\n\nRequire Import cclib.Maps.\nRequire Import core.HyperType.\nRequire Import DeepSpec.core.SEnv.\nRequire Import DeepSpec.core.Syntax.\n\n (* todo: move this: *)\n  Definition empty_temp_env := PTree.empty val.\n\n  Let env := empty_temp_env.\n\n  (*Variable m0 : MemLow.*)\n  (* --------------------- actual refinement proof ------------------ *)\n\nRequire Import DeepSpec.Runtime.\nRequire Import token.EdsgerIdents.\nRequire Import token.DataTypes.\nRequire Import token.DataTypeOps.\nRequire Import token.DataTypeProofs.\nRequire Import token.LayerFIXEDSUPPLYTOKEN.\nRequire Import token.Invariant.\nRequire Import token.ObjFixedSupplyTokenCodeProofs.\nRequire Import token.RefineFIXEDSUPPLYTOKEN.\n\n\nRequire Import lib.Monad.StateMonad.\n\nContext (ge : genv) (me : MachineModel.machine_env).\n\n(* Note, later we should fix the the (fst ml) by making the operational \n   semantics thread through an abstract datatype also. *)\n\n(* Context`{LayerSpec : LayerSpecClass}.  (* TODO: this line will go away when we fix the type of HyperMem. *) *)\nSet TypeClasses Debug.\n\n(*Context {memModelOps : MemoryModelOps storage_env}. *)\nContext`{CTXT_prf : !Layer_FIXEDSUPPLYTOKEN_Context_prf}.\n\nExisting Instances RefineFIXEDSUPPLYTOKEN.memModelOps RefineFIXEDSUPPLYTOKEN.CTXT_prf FIXEDSUPPLYTOKEN_hypermem GlobalLayerSpec FIXEDSUPPLYTOKEN_overlay_spec FIXEDSUPPLYTOKEN_underlay_spec.\n\nRequire Import lib.Monad.RunStateTInv.\n\n\n(* This should go in a generated file somewhere, \n   probably ObjFixedSupplyTokenCode.v. *)\nInstance FixedSupplyToken_balances_var_hyperltype :\n  HyperLType FixedSupplyToken_balances_var.\nProof.\n  constructor.\n  constructor.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    + apply mm.\n    + apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq same_d match_indirect.\n    constructor.\n    + destruct mm as [Hrelate _]. (* relate_AbData *)\n      rewrite same_d in *.\n      destruct Hrelate.\n      constructor; auto.\n    + constructor. (* match_AbData *)\n      split.\n      * exact match_indirect.\n      * exact fc.\nQed.\n\n(* This ad-hoc lemma will probably not be needed in the generic proofs. *)\nLemma match_indirect_basic: forall m ty i cv,\n    is_immediate_type ty ->\n    cval_match_indirect m ty i cv ->\n    cval_match (IdentExtMap.get i m) cv.\nProof.\n  intros m ty i cv H mm.\n  inversion mm; subst; try (now inversion H).\n  assumption.\nQed.\n\n      \nTheorem totalSupply_correctness :\n(*    forall wf ge M, MakeProgram.make_globalenv GetLowDataX (M, GetLowLayer) = Errors.OK ge -> *)\n    forall f d d',\n    runStateT (FixedSupplyToken_totalSupply_opt me) d = Some (f, d') ->\n    forall j ml (mcond : mem_match j d ml) lg,\n    synth_func_cond FixedSupplyToken_totalSupply FixedSupplyToken_totalSupply_wf me d ->\n    exists ml' lg' g' vres,\n      mem_match j d' ml' /\\\n      ht_rel (tp:=tint_Z32) f vres /\\\n      eval_funcall  ge me (fst ml) lg\n                    FixedSupplyToken_totalSupply_cfun (nil (*<-args*))\n                    (fst ml') lg' g' vres.\nProof.\n  intros f d d' Hrun j ml mcond lg Hvc.\n  assert (mcond_copy := mcond).\n  destruct mcond_copy as [? [[Hmatch_balances]]].\n  Transparent  FixedSupplyToken_totalSupply_opt.\n  unfold FixedSupplyToken_totalSupply_opt in Hrun.\n  inv_runStateT.\n  subst.\n\n  unfold FixedSupplyToken_totalSupply_cfun.\n\n(* We first want to build a lens corresponding to the hashtable itself, \n   and then to one particular dereferenced location in it.\n      (LChash tint_Z32\n        (LCvar FixedSupplyToken_balances_var)\n        (ECconst_int256 tint_U (Int256.repr 0) (Int256.repr 0)))\n*)\n    pose (l_balance := inthash_ltype_pair FixedSupplyToken_balances_var (Int256.zero)).\ng    pose (balance0 := l_balance.(ltype_get) d').\n\n    assert (ht_ft_cond balance0 /\\\n            cval_match_indirect (fst ml) (unpair_ty tint_Z32)\n                                (Ihash (Iident var_FixedSupplyToken_balances_ident) Int256.zero)\n                                (ht_cval (balance0)))\n           as H_balance_get.\n    {\n      assert (balance0_hyperltype : HyperLType (inthash_ltype_pair FixedSupplyToken_balances_var Int256.zero)).\n      { eapply inthash_ltype.\n        eapply FixedSupplyToken_balances_var_hyperltype.\n        apply thash_int_HASH_Z_Z32_hash.  \n      }\n\n      destruct balance0_hyperltype as [balance0_hyperltype_dir].\n      specialize (balance0_hyperltype_dir eq_refl).\n      destruct (ltype_get_match j d' ml mcond) as [balance0_fc balance0_match].\n      { simpl. exact I. }\n      simpl in balance0_fc, balance0_match.\n      split; [exact balance0_fc | exact balance0_match].\n    }\n    destruct H_balance_get as [balance0_fc balance0_match].\n\n (* Next, for the arithmetic operation we want to prove something like \n      exists v,\n        (forall m, eval_expr ge env le m (synth_expr_expr tmp e) v) /\\\n        ht_rel (synth_expr_spec tmp e wf se) v\n  *)\n    assert (bin_cond : @Hbinary_cond Osub tint_Z32 tint_Z32 tint_Z32\n                                     int_Z32_sub_impl _totalSupply balance0).\n    { simpl.\n\n      cbv -[Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.cmpu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Ziteri Z.of_nat List.length\n             (*ret bind mzero get put gets guard modify runStateT evalStateT execStateT *)\n             is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set hlist_hd\n             \n             balances update_balances]\n        in Hvc.\n      destruct Hvc as [[_ Hvc] _].\n      specialize (Hvc balance0 d').\n      destruct Hvc as [_ Hvc].\n      {\n        reflexivity.\n      }\n      apply Hvc.\n      auto.\n    }\n\n    apply match_indirect_basic in balance0_match; [|constructor].\n\n\n    assert (fc_totalSupply : ht_ft_cond (tp:=tint_Z32) _totalSupply).\n    {\n      split; reflexivity.\n    } \n    assert (bin_correct := Hbinary_correct _ _\n                                           (ht_cval (tp:=tint_Z32) _totalSupply)\n                                           (ht_cval (tp:=tint_Z32) balance0)\n                                           fc_totalSupply balance0_fc\n                                           bin_cond eq_refl eq_refl).\n    unfold ht_cval_some in bin_correct.\n    assert (bin_correct' :\n              Some (ht_cval (tp:=tint_Z32) (Hbinary (HyperBinaryImpl:=int_Z32_sub_impl) (tpl:=tint_Z32) _totalSupply  balance0)) =\n              (cval_binary_operation Osub (ht_cval (tp:=tint_Z32) _totalSupply)\n                                     (unpair_ty tint_Z32) (ht_cval balance0) \n                                     (unpair_ty tint_Z32))).\n    { remember _totalSupply as _totalSupply'.\n      inversion bin_correct.\n      simpl.\n      f_equal.\n      subst.\n      exact H3.\n    }\n    clear bin_correct.\n    symmetry in bin_correct'.\n\n    assert (Hmatch_totalSupply : cval_match (Vint (Int256.repr _totalSupply)) (ht_cval (tp:=tint_Z32)  _totalSupply)).\n    {\n      apply CVMval.\n    }\n    eapply (cval_sem_binary_operation _ _ _ _ _ _ _ _  Hmatch_totalSupply balance0_match) in bin_correct'.\n    destruct bin_correct' as [v [bin_correct_step bin_correct_match]].\n\n\n  destruct (TempModel.function_initial_temps_defined 12%positive tint ftype FixedSupplyToken_totalSupply_cfun (@PTree.empty _ : temp_env)) as [v12 Hv12] ;[simpl; auto | simpl;tauto | ].\n\n  destruct (TempModel.function_initial_temps_defined 10%positive tint ftype FixedSupplyToken_totalSupply_cfun (@PTree.empty _ : temp_env)) as [v10 Hv10] ;[simpl; auto | simpl;tauto | ].\n                                            \n  \n  (* Yay, that's all the setup we need, now we can run the operational \n     semantics. *)\n    \n  eexists.\n  eexists.\n  eexists.\n  eexists.\n  split; [|split].\n  - exact mcond.\n  - (* The return value. *)\n    exact bin_correct_match.\n  - eapply eval_funcall_internal.\n    + reflexivity.\n    + match goal with\n        [|- exec_stmt _ _ ?TEMPS _ _ _ _ _ _ _ _] =>\n        set (the_temps := TEMPS)\n      end.\n      simpl.\n\n     eapply exec_Sseq_1. \n     eapply exec_Sseq_1.\n     eapply exec_Sset.\n       { exact Hv12. }\n     eapply eval_Elvalue.\n     eapply eval_Ehashderef.\n     eapply eval_Evar.\n     eapply eval_Econst_int256.\n\n     (* eapply exec_Sseq_1. *)\n     eapply exec_Sset.\n       { exact Hv10. }\n     eapply eval_Ebinop.\n     eapply eval_Econst_int256.\n     eapply eval_Etempvar. rewrite PTree.gss. reflexivity.\n\n     exact bin_correct_step.\n\n     eapply  exec_Sreturn_some.\n     eapply  eval_Etempvar.\n     rewrite PTree.gss.\n     reflexivity.\nQed.     \n\n(*\n\nTheorem transfer_correctness :\n(*    forall wf ge M, MakeProgram.make_globalenv GetLowDataX (M, GetLowLayer) = Errors.OK ge -> *)\n  forall toA toA_val tokens tokens_val f d d',\n    (* These things come from \"good_values\" in SynthesisFunc.v *)\n      ht_ft_cond (tp:=tint_U) toA      -> ht_rel (tp:=tint_U) toA toA_val ->\n      ht_ft_cond (tp:=tint_Z32) tokens -> ht_rel (tp:=tint_Z32) tokens tokens_val ->  \n    runStateT (FixedSupplyToken_transfer_opt toA tokens me) d = Some (f, d') ->\n    forall j ml (mcond : mem_match j d ml) lg,\n    synth_func_cond FixedSupplyToken_transfer FixedSupplyToken_transfer_wf toA tokens me d ->\n    exists ml' lg' g' vres,\n      mem_match j d' ml' /\\\n      ht_rel (tp:=tint_bool) f vres /\\\n      eval_funcall  ge me (fst ml) lg\n                    FixedSupplyToken_transfer_cfun (toA_val :: tokens_val :: nil (*<-args*))\n                    (fst ml') lg' g' vres.\nProof.\n  intros toA toA_val tokens tokens_val f d d'\n         Hft_cond_toA Hrel_toA Hft_cond_tokens Hrel_tokens\n         Hrun j ml mcond lg Hvc.\n  assert (mcond_copy := mcond).\n  destruct mcond_copy as [? [[Hmatch_balances]]].\n  Transparent  FixedSupplyToken_transfer_opt.\n  unfold FixedSupplyToken_transfer_opt in Hrun.\n  remember (Hquery0 me) as fromA.\n\n  assert (fromA_rel : ht_cval fromA = (CVval (MachineModel.me_query me (MachineModel.Qcall0 Hbuiltin0)))).\n  {\n    subst.\n    apply Hbuiltin_correct.\n  }\n  (* hide the HeqfromA equation from `subst`. *)\n  change (fromA = Hquery0 me) with ((fun x=>x) (fromA = Hquery0 me)) in HeqfromA.\n  \n  inv_runStateT.    \n  destruct (Integers.Int256.cmpu Cne fromA toA)%Z eqn:?.\n  match goal with [H: runStateT (if ?X then _ else _) _ = _ |-_] =>\n    destruct X eqn:? end.\n  inv_runStateT;subst.\n  (* There are three goals, corresponding to each path through the if-statements.\n     The proof for each one is similar.\n   *)\n  {\n    \n  unfold FixedSupplyToken_transfer_cfun.  \n  rename x into fromA.\n  rename x4 into d.\n  \n    pose (l_balance_fromA := inthash_ltype_pair FixedSupplyToken_balances_var fromA).\n    pose (balance_fromA := l_balance_fromA.(ltype_get) d).\n    assert (ht_ft_cond balance_fromA /\\\n            cval_match_indirect (fst ml) (unpair_ty tint_Z32)\n                                (Ihash (Iident var_FixedSupplyToken_balances_ident) fromA)\n                                (ht_cval (balance_fromA)))\n           as H_balance_get.\n    {\n      assert (balance_fromA_hyperltype : HyperLType (inthash_ltype_pair FixedSupplyToken_balances_var fromA)).\n      { eapply inthash_ltype.\n        eapply FixedSupplyToken_balances_var_hyperltype.\n        apply thash_int_HASH_Z_Z32_hash.  \n      }\n\n      destruct balance_fromA_hyperltype as [balance_fromA_hyperltype_dir].\n      specialize (balance_fromA_hyperltype_dir eq_refl).\n      destruct (ltype_get_match j d ml mcond) as [balance_fromA_fc balance_fromA_match].\n      { simpl. exact I. }\n      simpl in balance_fromA_fc, balance_fromA_match.\n      split; [exact balance_fromA_fc | exact balance_fromA_match].\n    }\n    destruct H_balance_get as [balance_fromA_fc balance_fromA_match].\n\n    \n(*    destruct (TempModel.function_initial_temps_defined2 ftype FixedSupplyToken_transfer_cfun (tokens_val :: toA_val :: nil) 11%positive tint\n      (PTree.set 15 (Vint Int256.zero)          \n       (PTree.set 14\n          (Vint Int256.zero)             \n          (PTree.set 13\n             (Vint Int256.zero)\n             (PTree.set 10\n                (Vint Int256.zero)\n                (PTree.set 11 tokens_val (PTree.set 12 toA_val (@PTree.empty val))))))))\n      as [v11 Hv11];\n      [simpl; auto | reflexivity | ]. *)\n  \n    destruct (TempModel.function_initial_temps_defined2 ftype FixedSupplyToken_transfer_cfun (toA_val :: tokens_val::nil) 11%positive tint\n      (PTree.set 15 (Vint Int256.zero)          \n       (PTree.set 14\n          (Vint Int256.zero)             \n          (PTree.set 13\n             (Vint Int256.zero)\n             (PTree.set 10\n                (Vint Int256.zero)\n                (PTree.set 11 toA_val (PTree.set 12 tokens_val (@PTree.empty val))))))))\n      as [v11 Hv11];\n      [simpl; auto | reflexivity | ].\n    \n  (* Fixme: this should not actually be PTree.empty, it should be init_args. *)    \n    destruct (TempModel.function_initial_temps_defined 13%positive tint ftype FixedSupplyToken_transfer_cfun (@PTree.empty _ : temp_env)) as [v13 Hv13]; [simpl; tauto | simpl;intuition;congruence | ].\n    destruct (TempModel.function_initial_temps_defined 14%positive tint ftype FixedSupplyToken_transfer_cfun (@PTree.empty _ : temp_env)) as [v14 Hv14]; [simpl; tauto | simpl;intuition;congruence | ].\n    destruct (TempModel.function_initial_temps_defined 15%positive tint ftype FixedSupplyToken_transfer_cfun (@PTree.empty _ : temp_env)) as [v15 Hv15]; [simpl; tauto | simpl;intuition;congruence | ].\n          \n    assert (Hft_cond_fromA : ht_ft_cond (tp:=tint_U) fromA).\n    {\n      split; reflexivity.\n    }\n    assert (bin_correct_ne := Hbinary_correct (op := One) _ _\n                                           (ht_cval (tp:=tint_U) fromA)\n                                           (ht_cval (tp:=tint_U) toA)\n                                           Hft_cond_fromA Hft_cond_toA\n                                           I eq_refl eq_refl).\n    unfold ht_cval_some in bin_correct_ne.\n    assert (bin_correct_ne' :\n              Some (ht_cval (tp:=tint_bool) (Hbinary (HyperBinaryImpl:=int_U_ne_impl) (tpl:=tint_U) fromA toA)) =\n              (cval_binary_operation One (ht_cval (tp:=tint_U) fromA)\n                                     (unpair_ty tint_U) (ht_cval toA) \n                                     (unpair_ty tint_bool))).\n    { inversion bin_correct_ne.\n      simpl.\n      f_equal.\n    }\n    clear bin_correct_ne.\n    symmetry in bin_correct_ne'.\n\n    unfold tint_U in bin_correct_ne'.\n    unfold addr in bin_correct_ne'.\n    rewrite fromA_rel in bin_correct_ne'.\n\n    assert (Hmatch_fromA : cval_match (Vint fromA) (CVval (MachineModel.me_query me (MachineModel.Qcall0 Hbuiltin0)))).\n    {\n      rewrite <- fromA_rel.\n      apply CVMval.\n    } \n    \n    eapply (cval_sem_binary_operation _ _ _ _ _ _ _ _  Hmatch_fromA Hrel_toA) in bin_correct_ne'.\n    destruct bin_correct_ne' as [v_ne [bin_correct_ne_step bin_correct_ne_match]].\n\n    assert (bin_cond_ge : @Hbinary_cond Oge tint_Z32 tint_Z32 tint_bool\n                                     int_Z32_ge_impl balance_fromA tokens)\n     by exact I.    \n    \n    apply match_indirect_basic in balance_fromA_match; [|constructor].\n    assert (bin_correct_ge := Hbinary_correct _ _\n                                           (ht_cval (tp:=tint_Z32) balance_fromA)\n                                           (ht_cval (tp:=tint_Z32) tokens)\n                                           balance_fromA_fc\n                                           Hft_cond_tokens \n                                           bin_cond_ge eq_refl eq_refl).\n    unfold ht_cval_some in bin_correct_ge.\n    assert (bin_correct_ge' :\n              Some (ht_cval (tp:=tint_bool) (Hbinary (HyperBinaryImpl:=int_Z32_ge_impl) (tpl:=tint_Z32)  balance_fromA tokens )) =\n              (cval_binary_operation Oge\n                                     (ht_cval balance_fromA) (unpair_ty tint_Z32) \n                                     (ht_cval (tp:=tint_Z32) tokens)\n                                     (unpair_ty tint_bool))).\n    { \n      inversion bin_correct_ge.\n      simpl.\n      f_equal.\n      subst.\n      exact H3.\n    }\n    clear bin_correct_ge.\n    symmetry in bin_correct_ge'.\n    apply (cval_sem_binary_operation _ _ _ _ _ _ _ _   balance_fromA_match Hrel_tokens) in bin_correct_ge'.    \n    destruct bin_correct_ge' as [v_ge [bin_correct_ge_step bin_correct_ge_match]].    \n\n    pose (ne_result := Hbinary (HyperBinaryImpl:=int_U_ne_impl) fromA toA).\n    pose (ge_result := Hbinary (HyperBinaryImpl:=int_Z32_ge_impl) balance_fromA tokens).\n    \n    assert (bin_cond_and : @Hbinary_cond Oand tint_bool tint_bool tint_bool\n                                         int_bool_and_impl ne_result ge_result)\n           by exact I.\n\n    assert (bin_correct_and := Hbinary_correct (HyperBinaryImpl0:=int_bool_and_impl)\n                                           _ _\n                                           (ht_cval (tp:=tint_bool) ne_result)\n                                           (ht_cval (tp:=tint_bool) ge_result)\n                                           (Hbinary_returns _ _ Hft_cond_fromA Hft_cond_toA I)\n                                           (Hbinary_returns _ _ balance_fromA_fc Hft_cond_tokens bin_cond_ge)\n                                           bin_cond_and eq_refl eq_refl).\n    unfold ht_cval_some in bin_correct_and.\n    assert (bin_correct_and' :\n              Some (ht_cval (tp:=tint_bool) (Hbinary (HyperBinaryImpl:=int_bool_and_impl) (tpl:=tint_bool)  ne_result ge_result )) =\n              (cval_binary_operation Oand\n                                     (ht_cval ne_result) (unpair_ty tint_bool) \n                                     (ht_cval (tp:=tint_bool) ge_result)\n                                     (unpair_ty tint_bool))).\n    { \n      inversion bin_correct_and.\n      simpl.\n      f_equal.\n      subst.\n      exact H3.\n    }\n    clear bin_correct_and.\n    symmetry in bin_correct_and'.\n    apply (cval_sem_binary_operation _ _ _ _ _ _ _ _   bin_correct_ne_match bin_correct_ge_match) in bin_correct_and'.    \n    destruct bin_correct_and' as [v_and [bin_correct_and_step bin_correct_and_match]].    \n    \n    \n    eexists.\n    eexists.\n    eexists.\n    eexists.\n    split; [|split].\n\n    - admit. (* exact mcond *)\n    - (* the return value *)\n      unfold ht_rel.\n      simpl.\n      apply   CVMval.        \n    - eapply eval_funcall_internal.\n      + reflexivity.\n      + match goal with\n          [|- exec_stmt _ _ ?TEMPS _ _ _ _ _ _ _ _] =>\n          set (the_temps := TEMPS)\n        end.\n        simpl.\n    \n     eapply exec_Sseq_1. \n     eapply exec_Sseq_1.\n     eapply exec_Sset.\n     { exact Hv13. }\n     eapply eval_Ecall0.\n      reflexivity.\n    eapply exec_Sseq_1.\n    eapply exec_Sset.\n    { rewrite PTree.gso.\n      exact Hv14.\n      congruence.\n    }\n    eapply eval_Elvalue.\n    eapply eval_Ehashderef.\n    eapply eval_Evar.\n    eapply eval_Etempvar.\n    { unfold ht_cval in fromA_rel.\n      simpl in fromA_rel.\n      inversion fromA_rel as [fromA_rel'].\n      symmetry.\n      rewrite PTree.gss.\n      f_equal.\n      exact fromA_rel'.\n    }\n    eapply exec_Sseq_1.\n    eapply exec_Sset.\n    { repeat rewrite PTree.gso by congruence.\n      exact Hv15.\n    }\n\n    eapply eval_Elvalue.\n    eapply eval_Ehashderef.\n    eapply eval_Evar.\n    eapply eval_Etempvar.\n    {\n      repeat rewrite PTree.gso by congruence.\n      unfold the_temps.\n      (* stuck here  exact Hv11. *) admit.\n    }\n\n    (* We are in the \"then\" branch of the if statement. *)\n    eapply exec_Sifthenelse.\n    { eapply eval_Ebinop. (* and *)\n      - eapply eval_Ebinop. (* <> *)\n        + eapply eval_Etempvar.\n          rewrite !PTree.gso by congruence.\n          rewrite PTree.gss.\n          reflexivity.\n        + eapply eval_Etempvar.\n          simpl in the_temps.\n          unfold the_temps.\n          simpl. \n          reflexivity.\n        + match goal with [|- sem_binary_operation One ?X _ _ _ = _] =>\n                    replace X with (Vint fromA)\n                                     by (inversion fromA_rel as [fromA_rel_eq]; rewrite fromA_rel_eq; reflexivity)\n          end.\n          exact bin_correct_ne_step.\n      - eapply eval_Ebinop. (* >= *)\n        + eapply eval_Etempvar.\n          rewrite !PTree.gso by congruence.\n          rewrite PTree.gss.\n          reflexivity.\n        + eapply eval_Etempvar.\n          simpl in the_temps.\n          unfold the_temps.\n          simpl. \n          reflexivity.\n        + exact bin_correct_ge_step.\n      - exact bin_correct_and_step.\n*)\n\n\nEnd STMT_FUNC.\n\n\n"
  },
  {
    "path": "contracts/token/token/ObjFixedSupplyTokenCodeProofs.v",
    "content": "(* Skeleton by Edgser for token.ds *)\nRequire Import BinPos.\nRequire Import DeepSpec.Runtime.\nRequire Import DeepSpec.core.SynthesisFunc.\nRequire Import token.EdsgerIdents.\nRequire Import token.DataTypes.\nRequire Import token.DataTypeOps.\nRequire Import token.DataTypeProofs.\n(*Require Import liblayers.compcertx.MakeProgram.\nRequire Import liblayers.compcertx.MemWithData.*)\n\nRequire Import token.LayerFIXEDSUPPLYTOKEN.\nRequire Import lib.ArithInv.\nRequire Import lib.Monad.RunStateTInv.\nRequire Import token.Invariant.\nTransparent balances_sum balances_nonnegative.\n\nSection EdsgerGen.\n\nExisting Instance GlobalLayerSpec.\n  \nExisting Instances FIXEDSUPPLYTOKEN_overlay_spec\n                   FIXEDSUPPLYTOKEN_data_ops\n                   FIXEDSUPPLYTOKEN_data.\n\nContext {memModelOps : MemoryModelOps mem}.\n                     \nLemma FixedSupplyToken_constructor_vc me d :\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_constructor FixedSupplyToken_constructor_wf\n                    me d.\nProof.\n  intros.\n  apply FixedSupplyToken_constructor_cond_eq; auto.\n  unfold FixedSupplyToken_constructor_cond.\n  intuition.\nQed.\n\nLemma FixedSupplyToken_constructor_oblg me d :\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_constructor FixedSupplyToken_constructor_wf\n                          me d.\nProof.\n  intros.\n  apply FixedSupplyToken_constructor_obligation_eq; auto.\n  unfold FixedSupplyToken_constructor_obligation.\n  intuition.\nQed.\n\n\nLemma FixedSupplyToken_totalSupply_vc me d :\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_totalSupply FixedSupplyToken_totalSupply_wf\n                    me d.\nProof.\n  intros.\n  apply FixedSupplyToken_totalSupply_cond_eq; auto.\n  unfold FixedSupplyToken_totalSupply_cond.\n  intuition.\n  inv_runStateT.\n  subst.\n  apply Zle_ge.  \n  apply Int256Tree_Properties.sum_bound1.\n  + intros.\n    apply Zle_ge.\n    unfold balances_nonnegative in H1.\n    eauto.\n  + unfold balances_sum in H2.\n    omega.\nQed.\n\nLemma FixedSupplyToken_totalSupply_oblg me d :\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_totalSupply FixedSupplyToken_totalSupply_wf\n                          me d.\nProof.\n  intros.\n  apply FixedSupplyToken_totalSupply_obligation_eq; auto.\n  unfold FixedSupplyToken_totalSupply_obligation.\n  intuition.\nQed.\n\nLemma FixedSupplyToken_balanceOf_vc a0 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_balanceOf FixedSupplyToken_balanceOf_wf\n                    a0 me d.\nProof.\n  intros.\n  apply FixedSupplyToken_balanceOf_cond_eq; auto.\n  unfold FixedSupplyToken_balanceOf_cond.\n  intuition.\nQed.\n\nLemma FixedSupplyToken_balanceOf_oblg a0 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_balanceOf FixedSupplyToken_balanceOf_wf\n                          a0 me d.\nProof.\n  intros.\n  apply FixedSupplyToken_balanceOf_obligation_eq; auto.\n  unfold FixedSupplyToken_balanceOf_obligation.\n  intuition.\nQed.\n\n\nLemma FixedSupplyToken_transfer_vc a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_transfer FixedSupplyToken_transfer_wf\n                    a0 a1 me d.\nProof.\n  intros.\n  apply FixedSupplyToken_transfer_cond_eq; auto.\n  unfold FixedSupplyToken_transfer_cond.\n  intuition.\n  +\n    inv_runStateT.    \n    subst.\n    inv_arith.\n    auto.\n  + inv_runStateT.\n    subst.\n    inv_arith.\n    assert (100000 <  Int256.modulus) by reflexivity.\n\n    assert (Hbound: Int256Tree_Properties.sum (balances g0) <= 100000).\n    { unfold balances_sum in H11.\n      omega.\n    }\n\n    assert (Hnonnegative : forall k v, Int256Tree.get k (balances g0) = Some v -> v >= 0).\n    {\n      unfold balances_nonnegative in H6.\n      intros k v Hlookup.\n      specialize (H6 k v Hlookup).\n      omega.\n    }\n\n    assert (l := Int256Tree_Properties.sum_bound2 H8 Hnonnegative Hbound).    \n    apply Zle_lt_trans with (Int256Tree.get_default 0 a0 (balances g0) + Int256Tree.get_default 0 (MachineModel.me_caller me) (balances g0)).\n    omega.\n    apply Zle_lt_trans with 100000.\n    rewrite Zplus_comm.\n    exact l.\n    omega.\nQed.\n\nLemma FixedSupplyToken_transfer_oblg a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_transfer FixedSupplyToken_transfer_wf\n                          a0 a1 me d.\nProof.\n  intros.\n  apply FixedSupplyToken_transfer_obligation_eq; auto.\n  unfold FixedSupplyToken_transfer_obligation.\n  intuition.\nQed.\n\nLemma FixedSupplyToken_approve_vc a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_approve FixedSupplyToken_approve_wf\n                    a0 a1 me d.\nProof.\n  intros.\n  apply FixedSupplyToken_approve_cond_eq; auto.\n  unfold FixedSupplyToken_approve_cond.\n  intuition.\nQed.\n\nLemma FixedSupplyToken_approve_oblg a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_approve FixedSupplyToken_approve_wf\n                          a0 a1 me d.\nProof.\n  intros.\n  apply FixedSupplyToken_approve_obligation_eq; auto.\n  unfold FixedSupplyToken_approve_obligation.\n  intuition.\nQed.\n\nLemma FixedSupplyToken_transferFrom_vc a0 a1 a2 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_transferFrom FixedSupplyToken_transferFrom_wf\n                    a0 a1 a2 me d.\nProof.\n  intros.\n  apply FixedSupplyToken_transferFrom_cond_eq; auto.\n  unfold FixedSupplyToken_transferFrom_cond.\n  intuition.\n  + inv_runStateT.\n    subst.\n    inv_arith.\n    auto.\n  + inv_runStateT.\n    subst.\n    unfold  Int256.cmpu in *.\n    inv_arith.\n    clear H17. (* temp. *)\n    assert (100000 <  Int256.modulus) by reflexivity.\n\n    assert (Hbound: Int256Tree_Properties.sum (balances g0) <= 100000).\n    { unfold balances_sum in H15.\n      omega.\n    }\n\n    assert (Hnonnegative : forall k v, Int256Tree.get k (balances g0) = Some v -> v >= 0).\n    {\n      unfold balances_nonnegative in H10.\n      intros k v Hlookup.\n      specialize (H10 k v Hlookup).\n      omega.\n    }\n    assert (l := Int256Tree_Properties.sum_bound2 H12 Hnonnegative Hbound).\n\n\n    apply Zle_lt_trans with (Int256Tree.get_default 0 a0 (balances g0) + Int256Tree.get_default 0 a1 (balances g0)).\n    omega.\n    apply Zle_lt_trans with 100000.\n    exact l.\n    omega.\nQed.\n\nLemma FixedSupplyToken_transferFrom_oblg a0 a1 a2 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_transferFrom FixedSupplyToken_transferFrom_wf\n                          a0 a1 a2 me d.\nProof.\n  intros.\n  apply FixedSupplyToken_transferFrom_obligation_eq; auto.\n  unfold FixedSupplyToken_transferFrom_obligation.\n  intuition.\nQed.\n\nLemma FixedSupplyToken_constructor_vc me d :\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_constructor FixedSupplyToken_constructor_wf\n                    me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_constructor_oblg me d :\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_constructor FixedSupplyToken_constructor_wf\n                          me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_totalSupply_vc me d :\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_totalSupply FixedSupplyToken_totalSupply_wf\n                    me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_totalSupply_oblg me d :\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_totalSupply FixedSupplyToken_totalSupply_wf\n                          me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_balanceOf_vc a0 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_balanceOf FixedSupplyToken_balanceOf_wf\n                    a0 me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_balanceOf_oblg a0 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_balanceOf FixedSupplyToken_balanceOf_wf\n                          a0 me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_transfer_vc a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_transfer FixedSupplyToken_transfer_wf\n                    a0 a1 me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_transfer_oblg a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_transfer FixedSupplyToken_transfer_wf\n                          a0 a1 me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_approve_vc a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_approve FixedSupplyToken_approve_wf\n                    a0 a1 me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_approve_oblg a0 a1 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_approve FixedSupplyToken_approve_wf\n                          a0 a1 me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_transferFrom_vc a0 a1 a2 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_cond FixedSupplyToken_transferFrom FixedSupplyToken_transferFrom_wf\n                    a0 a1 a2 me d.\nProof.\n  admit.\nQed.\n\nLemma FixedSupplyToken_transferFrom_oblg a0 a1 a2 me d :\n    ht_ft_cond a0 -> ht_valid_ft_cond a0 ->\n    ht_ft_cond a1 -> ht_valid_ft_cond a1 ->\n    ht_ft_cond a2 -> ht_valid_ft_cond a2 ->\n    high_level_invariant d ->\n    synth_func_obligation FixedSupplyToken_transferFrom FixedSupplyToken_transferFrom_wf\n                          a0 a1 a2 me d.\nProof.\n  admit.\nQed.\n\nEnd EdsgerGen.\n"
  },
  {
    "path": "contracts/token/token/RefineFIXEDSUPPLYTOKEN.v",
    "content": "(* This should be automatically generated, but I put in a manually written version for now. *)\n\nRequire Import BinNums.\nRequire Import DeepSpec.core.HyperTypeInst.\nRequire Import DeepSpec.Runtime.\nRequire Import DeepSpec.Linking.\nRequire Import token.EdsgerIdents.\nRequire Import token.DataTypes.\nRequire Import token.DataTypeOps.\nRequire Import token.DataTypeProofs.\n\nRequire Import token.LayerFIXEDSUPPLYTOKEN.\n\n\n(*\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\n\nContext {memModelOps : MemoryModelOps mem}.\n *)\n\nExisting Instances GlobalLayerSpec FIXEDSUPPLYTOKEN_overlay_spec FIXEDSUPPLYTOKEN_underlay_spec.\n\nContext`{CTXT_prf : !Layer_FIXEDSUPPLYTOKEN_Context_prf}.\n\n(*\nRecord relate_RData (j : meminj) (habd : GetHighData) (labd : GetLowData) : Prop\n    := mkrelate_RData {\n}.*)\n\nRecord match_RData (habd : GetHighData) (m : mem) (j : MemoryModel.meminj) : Prop\n    := MATCH_RDATA {\n  balances_ma : variable_match FixedSupplyToken_balances_var habd m\n}.\n\nLocal Hint Resolve MATCH_RDATA.\n\nGlobal Instance rel_ops: CompatRelOps GetHighDataX GetLowDataX :=\n{\n  relate_AbData f d1 d2 := True;\n  match_AbData d1 m f := match_RData d1 m f;\n  new_glbl := var_FixedSupplyToken_balances_ident :: nil\n}.\n\n\nGlobal Instance rel_prf: CompatRel GetHighDataX GetLowDataX.\n\n\nExisting Instance GlobalLayerSpec.\n\nInstance FIXEDSUPPLYTOKEN_hypermem : MemoryModel.HyperMem\n  := { Hcompatrel := {| crel_prf := rel_prf |} }.\n\n"
  },
  {
    "path": "contracts/token/token/_CoqProject",
    "content": "-R ../../.. DeepSpec\n-R . token\nEdsgerIdents.v\nDataTypeOps.v\nDataTypeProofs.v\nDataTypes.v\nLayerFIXEDSUPPLYTOKEN.v\nRefineFIXEDSUPPLYTOKEN.v\nObjFixedSupplyTokenCodeProofs.v\nFunctionalCorrectness.v\nInvariant.v  "
  },
  {
    "path": "contracts/token/token/prf.v",
    "content": "Require Import token.DataTypes.\nRequire Import token.DataTypeOps.\nRequire Import lib.Monad.StateMonadOption.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import ZArith.\nRequire Import core.HyperTypeInst.\nRequire Import backend.MachineModel.\nRequire Import token.LayerFIXEDSUPPLYTOKEN.\n\nDefinition state := global_abstract_data_type.\n\nDefinition init_state := init_global_abstract_data.\n\nDefinition wei := Z.\n\nDefinition addr := int256.\n\nDefinition blocknumber := int256.\n\nExisting Instance GlobalLayerSpec.\n\nSection step.\n\n  Context (contract_address : addr).\n\n  Section mstep.\n  (* These are the parameters which are constant within a given block. *)\n  Context (coinbase : int256)\n          (timestamp : int256)\n          (number : int256)\n          (balance : int256 -> int256)\n          (blockhash : int256 -> int256)\n          (prev_contract_state : state).\n\n  Definition make_machine_env (caller: addr)\n                              : machine_env state\n    := {| me_address := contract_address;\n          me_origin := caller;\n          me_caller := caller; (* need update after every control-flow transfer *)\n          me_callvalue := Int256.repr (0);\n          me_coinbase := coinbase; \n          me_timestamp := timestamp;\n          me_number := number;\n          me_balance := balance;\n          me_blockhash := blockhash;\n          (* not implemented *)\n          me_transfer _ _ _ _ _ := False;\n          me_callmethod _ _ _ _ _ _ _ _ _ _ := False;\n          me_log _ _ _ := prev_contract_state;\n        |}.\n\n  Import MonadNotation.\n\n  Definition lif {A:Type}\n                 (caller : addr)\n                 (cmd : machine_env state -> osT global_abstract_data_type A)\n    : osT state A :=\n    st  <- get;;\n    let me := make_machine_env caller in\n    match runStateT (cmd me) st with\n    | None => mzero\n    | Some (v, st') => put st' ;; ret v\n    end.\n\n  (* osT state int256 = \n    state transformer with option monad, state is state, and value is int256 *)\n  Print osT. (* = fun D : Type => stateT D option *)\n  Print stateT. (* (S : Type) (m : Type -> Type) (t : Type) : Type := mkStateT\n  { runStateT : S -> m (t * S)%type } *)\n\n  Print runStateT. (* takes monad transformer, state, returns m (t * S) *)\n\n  (* How the state of the system changes in a single method call made by player p. *)\n  Inductive mstep u (st st' : state) : Prop :=\n  | FixedSupplyToken_constructor_step : forall r , runStateT (FixedSupplyToken_constructor_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken_totalSupply_step : forall r , runStateT (FixedSupplyToken_totalSupply_opt  (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken_balanceOf_step : forall r tokenOwner, runStateT (FixedSupplyToken_balanceOf_opt tokenOwner (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken_transfer_step : forall r toA tokens, runStateT (FixedSupplyToken_transfer_opt toA tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken_approve_step : forall r spender tokens, runStateT (FixedSupplyToken_approve_opt spender tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n  | FixedSupplyToken_transferFrom_step : forall r fromA toA tokens, runStateT (FixedSupplyToken_transferFrom_opt fromA toA tokens (make_machine_env u)) st = Some (r, st') -> mstep u st st' \n.\n\n  (* We can compute a new block by letting the players call the contract \n     in some arbitrary order. *)\n     Inductive multi_mstep : state -> state -> Prop := \n     | multi_mstep_reflexive : forall (st : state), multi_mstep st st\n     | multi_mstep_transitive : forall (st st' st'' : state) u,\n         multi_mstep st st' -> mstep u st' st'' -> multi_mstep st st''.\n\n\n     (* A block is sufficiently synchronous if every player got a chance to submit a \n        transaction to to. *)\n     (* TODO, I think this definition is fine for now, but it seems little too clever,\n        should probably re-state this using some straightforward tracking of the states\n        we pass through. *)\n     Definition multi_mstep_synchronous st1 st2 :=\n       forall u, exists st st',\n                   multi_mstep st1 st /\\ mstep u st st' /\\ multi_mstep st' st2.\n\n     (* Here are a bunch of induction principles inspired by linear temporal logic. *)\n\n     (* Prove that some property P holds \"globally\", i.e. for each state along a \n        path.\n        You can also specify a property Pprev which is known to hold for the\n        prev_contract_state. If not needed, it can just be True.\n    *)\n     Lemma multi_mstep_Global_ind : forall (Pprev P : state -> Prop),\n         (forall u st st', Pprev prev_contract_state -> P st -> mstep u st st' -> P st') ->\n          Pprev prev_contract_state -> forall st st', P st -> multi_mstep st st' -> P st'.\n     Proof.\n       induction 4; eauto.\n     Qed.\n\n     (*\n     (* Prove that P holds \"until\" Q  along a path. \n        \"Until\" is a liveness assertion, so we need the synchronicity assumption. *)\n     Lemma multi_mstep_Until_ind : forall (Pprev P Q : state -> Prop),\n         (forall p st st', Pprev prev_contract_state -> P st -> In p players\n                           -> mstep p st st' -> (P st' \\/ Q st')) ->\n                           Pprev prev_contract_state ->\n                           forall st,\n                             P st -> exists st',  multi_mstep st st' -> (P st' \\/ Q st').\n     Proof.\n       induction 4; eauto *)\n\n     End mstep.\n\n\n     Definition Int256_incr x := Int256.add x Int256.one.\n\n     Inductive bstep (n : blocknumber) : state -> state -> Prop :=\n     | bstep_step : forall coinbase timestamp balance blockhash st st',\n         multi_mstep coinbase timestamp n balance blockhash st st st' ->\n         bstep n st st'.\n\n     Inductive multi_bstep : blocknumber -> state -> blocknumber -> state -> Prop := \n     | multi_bstep_reflexive : forall n (st : state), multi_bstep n st n st\n     | multi_bstep_transitive : forall n n'  (st st' st'' : state),\n       multi_bstep n st n' st' -> bstep (Int256_incr n') st' st'' -> multi_bstep n st (Int256_incr n') st''.\n\n     (* multi_bstep is the step relation without any synchronicity assumption.\n        This is sufficient to prove some safety properties, but for most interesting \n        theorems we instead need to use this synchronous version: *)\n\n     Inductive bstep_synch (n : blocknumber) : state -> state -> Prop :=\n     | bstep_synch_step : forall coinbase timestamp balance blockhash st st',\n         multi_mstep_synchronous coinbase timestamp n balance blockhash st st st' ->\n         bstep_synch n st st'.\n\n     Inductive multi_bstep_synch : blocknumber -> state -> blocknumber -> state -> Prop := \n     | multi_bstep_synch_reflexive : forall n (st : state), multi_bstep_synch n st n st\n     | multi_bstep_synch_transitive : forall n n'  (st st' st'' : state),\n       multi_bstep_synch n st n' st' -> bstep_synch (Int256_incr n') st' st'' -> multi_bstep_synch n st (Int256_incr n') st''.\n\n     Lemma multi_bstep_Global_ind : forall (P : state -> Prop),\n         (forall coinbase timestamp number balance blockhash prev_block u st st',\n             P prev_block\n             -> P st\n             -> mstep coinbase timestamp number balance blockhash prev_block u st st'\n             -> P st')\n         -> forall n st n' st',\n           P st -> multi_bstep n st n' st' -> P st'.\n     Proof.\n       induction 3.\n       - auto.\n       - inversion H2; subst.\n         eapply multi_mstep_Global_ind with (st:=st') (prev_contract_state := st').\n         + intros.\n           refine (H _ _ _ _ _ _ _ _ _ _ _ H6); auto.\n         + apply IHmulti_bstep; assumption.\n         + apply IHmulti_bstep; assumption.\n         + exact H3.\n     Qed.\n   End step.\n\n   Section DeepSEAGenericProof.\n\n     Lemma Int256Tree_reduce : forall (i: int256) (v: Z) (t: Int256Tree.t Z), Int256Tree.get_default 0%Z i (Int256Tree.set i v t) = v.\n     Proof.\n       intros.\n       unfold Int256Tree.get_default.\n       rewrite Int256Tree.gss .\n       reflexivity.\n     Qed.\n\n     Lemma Int256Tree_mreduce : forall (i j : int256) (v v': Z) (t: Int256Tree.t Z), \n       i <> j ->\n       Int256Tree.get_default 0%Z i (Int256Tree.set j v' (Int256Tree.set i v t)) = v.\n     Proof.\n       intros.\n       unfold Int256Tree.get_default.\n       rewrite Int256Tree.gso.\n       rewrite Int256Tree.gss.\n       reflexivity.\n       exact H.\n     Qed.\n\n     Lemma Int256Tree_mireduce : forall (i j k : int256) (v v': Z) (t: Int256Tree.t Z), \n       i <> j ->\n       i <> k ->\n       j <> k ->\n       Int256Tree.get_default 0%Z i (Int256Tree.set j v' (Int256Tree.set k v t)) = \n       Int256Tree.get_default 0%Z i t.\n     Proof.\n       intros.\n       unfold Int256Tree.get_default.\n       rewrite Int256Tree.gso.\n       rewrite Int256Tree.gso.\n       reflexivity.\n       exact H0.\n       exact H.\n     Qed.\n\n     Lemma add_sub_inv : forall (i j : Z32), (i + j - i)%Z = j.\n     Proof.\n       intros.\n       omega.\n     Qed.\n   End DeepSEAGenericProof.\n\n   Section Proof.   \n     Context (* (strategies : strategy_tuple) *)\n             (initial_balances : addr -> Z)\n             (contract_address : int256).\n\n     Context (init_bt init_rt : int256)\n             (init_coinbase : int256)\n             (init_timestamp : int256)\n             (init_number : int256)\n             (init_blockhash : int256 -> int256)\n             (pre_init_state init_state : state).\n\n     (* These are the parameters which are constant within a given block. *)\n     Context (coinbase : int256)\n             (timestamp : int256)\n             (number : int256)\n             (balance : int256 -> int256)\n             (blockhash : int256 -> int256)\n             (prev_contract_state : state).\n\n     Require Import lib.Monad.RunStateTInv.\n     Require Import lib.ArithInv.\n\n     Definition make_machine_env_wrapped prev_st user :=\n      make_machine_env contract_address coinbase timestamp number balance blockhash prev_st user.\n\n     Lemma make_machine_env_caller_eq : forall st caller, me_caller (make_machine_env_wrapped st caller) = caller.\n      Proof. auto. Qed.\n\n     Lemma make_machine_env_address_eq : forall st caller, me_address (make_machine_env_wrapped st caller) = contract_address.\n      Proof. auto. Qed.\n     \nTransparent FixedSupplyToken_constructor_opt.\nTransparent FixedSupplyToken_totalSupply_opt.\nTransparent FixedSupplyToken_balanceOf_opt.\nTransparent FixedSupplyToken_transfer_opt.\nTransparent FixedSupplyToken_approve_opt.\nTransparent FixedSupplyToken_transferFrom_opt.\n\nLtac rds :=\nunfold FixedSupplyToken_constructor_opt in *;\nunfold FixedSupplyToken_totalSupply_opt in *;\nunfold FixedSupplyToken_balanceOf_opt in *;\nunfold FixedSupplyToken_transfer_opt in *;\nunfold FixedSupplyToken_approve_opt in *;\nunfold FixedSupplyToken_transferFrom_opt in *;\ninv_runStateT;\nsubst;\ninv_arith;\nsimpl;\ntry rewrite make_machine_env_caller_eq in *;\ntry rewrite make_machine_env_address_eq in *;\ntry rewrite Int256Tree_reduce in *;\ntry rewrite Int256Tree_mreduce in *;\ntry rewrite Int256Tree_mireduce in *;\nauto.\n\nTheorem sample : forall n, n = n.\n\nEnd Proof.\n"
  },
  {
    "path": "contracts/token/token/subdir.mk",
    "content": "# WARNING: This file is generated by Edsger, the DeepSEA compiler.\n#          All modification will be lost when regenerating.\ntoken_FILES = \\\ntoken/CertiKOS.v \\\ntoken/DataTypeOps.v \\\ntoken/DataTypeProofs.v \\\ntoken/DataTypes.v \\\ntoken/EdsgerIdents.v \\\ntoken/LSimFIXEDSUPPLYTOKEN.v \\\ntoken/LSrcFIXEDSUPPLYTOKEN.v \\\ntoken/LayerFIXEDSUPPLYTOKEN.v \\\ntoken/ObjFixedSupplyTokenCode.v \\\ntoken/ObjFixedSupplyTokenCodeProofs.v \\\ntoken/ObjSimFixedSupplyToken.v \\\ntoken/Symbols.v\n"
  },
  {
    "path": "contracts/token/token.ds",
    "content": "(* Loosely based on the \"sample fixed supply token contract\" from https://theethereum.wiki/w/index.php/ERC20_Token_Standard#Sample_Fixed_Supply_Token_Contract *)\n\nexternal [[except DataTypeOps]] with \"Require token.Invariant.\\n\"\n\nconst _totalSupply = 100000\n\nobject signature ERC20Interface = {\n  constructor : unit -> unit;\n  const totalSupply : unit -> int;\n  const balanceOf : address -> int;\n  transfer : address * int -> bool;\n  approve : address * int -> bool;\n  transferFrom : address * address * int -> bool\n}\n\nobject FixedSupplyToken : ERC20Interface {\n  let balances : mapping[address] int := mapping_init\n  let allowances : mapping[address] mapping[address] int := mapping_init\n\n  let constructor () =\n    balances[msg_sender] := 100000\n\n  let totalSupply () =\n    let bal0 = balances[address(0)] in\n    _totalSupply - bal0 \n\n  let balanceOf tokenOwner =\n    let bal = balances[tokenOwner] in\n    bal\n     \n  let transfer(toA, tokens) =\n    let fromA = msg_sender in\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    true\n\n  let approve (spender, tokens) =\n    allowances[msg_sender][spender] := tokens;\n    true\n\n  let transferFrom (fromA, toA, tokens) =\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    let allowed = allowances[fromA][toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens /\\ allowed >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    true\n\n}\n    \nlayer signature FIXEDSUPPLYTOKENSig = {\n  fixedSupplyToken : ERC20Interface\n}\n\nlayer FIXEDSUPPLYTOKEN : [{}] FIXEDSUPPLYTOKENSig = {\n  fixedSupplyToken = FixedSupplyToken\n} assert \"Invariant.inv\"\n"
  },
  {
    "path": "contracts/token/token.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param ) (result i32)))\n  (type (;2;) (func (param i32) (result i32)))\n  (type (;3;) (func (param i32 i32) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"returnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (data (i32.const 2304) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f131 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0x18160ddd\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x70a08231\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 221 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f258)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xa9059cbb\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 222 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f259)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n      end\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    i32.const 0x00\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 100\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    global.get 0\n    global.get 1\n    select\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x0186a0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    i32.const 0x00\n    local.set 0\n    local.get 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x00\n    i32.const 0x00\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 100\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    global.get 0\n    global.get 1\n    select\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    i32.const 0x0186a0\n    local.get 1\n    i32.sub\n    local.set 0\n    local.get 0\n    return\n  )\n  (func $f258 (type 2)\n    (local $l1 i32)\n    (local $l2 i32)\n    i32.const 0x00\n    local.get 0\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 100\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    global.get 0\n    global.get 1\n    select\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    local.get 2\n    local.set 1\n    local.get 1\n    return\n  )\n  (func $f259 (type 3)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    local.set 3\n    i32.const 0x00\n    local.get 3\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 100\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    global.get 0\n    global.get 1\n    select\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 4\n    i32.const 0x00\n    local.get 0\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 100\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    global.get 0\n    global.get 1\n    select\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 5\n    local.get 3\n    local.get 0\n    i32.ne\n    local.get 4\n    local.get 1\n    i32.ge_u\n    i32.and\n    if \n      i32.const 0x00\n      local.get 3\n      global.set 0\n      global.set 1\n      i32.const 0\n      i32.const 9\n      i32.store\n      i32.const 512\n      i32.const 0\n      i32.store\n      i32.const 256\n      global.get 0\n      i32.store\n      i32.const 260\n      global.get 1\n      i32.store\n      i32.const 100\n      i64.extend_i32_u\n      i32.const 0\n      i32.const 512\n      i32.const 256\n      i32.const 8\n      call $f3\n      i32.const 768\n      i32.const 0\n      call $f29\n      call $f30\n      i32.const 768\n      i32.load\n      global.set 0\n      global.set 1\n      i32.const 0\n      global.get 0\n      global.get 1\n      select\n      global.set 0\n      i32.const 1024\n      global.get 0\n      i32.store\n      local.get 4\n      local.get 1\n      i32.sub\n      global.set 0\n      i32.const 512\n      global.get 0\n      i32.store\n      i32.const 1024\n      i32.const 512\n      call $f8\n      i32.const 0x00\n      local.get 0\n      global.set 0\n      global.set 1\n      i32.const 0\n      i32.const 9\n      i32.store\n      i32.const 512\n      i32.const 0\n      i32.store\n      i32.const 256\n      global.get 0\n      i32.store\n      i32.const 260\n      global.get 1\n      i32.store\n      i32.const 100\n      i64.extend_i32_u\n      i32.const 0\n      i32.const 512\n      i32.const 256\n      i32.const 8\n      call $f3\n      i32.const 768\n      i32.const 0\n      call $f29\n      call $f30\n      i32.const 768\n      i32.load\n      global.set 0\n      global.set 1\n      i32.const 0\n      global.get 0\n      global.get 1\n      select\n      global.set 0\n      i32.const 1024\n      global.get 0\n      i32.store\n      local.get 5\n      local.get 1\n      i32.add\n      global.set 0\n      i32.const 512\n      global.get 0\n      i32.store\n      i32.const 1024\n      i32.const 512\n      call $f8\n      i32.const 0x01\n      local.set 2\n    else \n      i32.const 0x00\n      local.set 2\n    end\n    local.get 2\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/address/address-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\53\\0f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\01\\7f\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\05\\03\\0d\\0c\\0d\\0d\\0d\\03\\04\\0e\\03\\0e\\00\\01\\02\\03\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\ab\\17\\0c\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\f4\\01\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\aa\\f2\\9c\\8e\\7e\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\bc\\cc\\b3\\ea\\06\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dd\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\23\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\fe\\c2\\85\\c0\\02\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\de\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\24\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\0b\\0b\\90\\04\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\ca\\df\\03\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\92\\04\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\ca\\df\\03\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\00\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\ee\\07\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\f8\\ac\\d1\\91\\01\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\8c\\04\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const     3803))\n  )\n)"
  },
  {
    "path": "contracts/wasmtest/address/address-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param ) (result i32)))\n  (type (;2;) (func (param ) (result i32)))\n  (type (;3;) (func (param i32) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0xe1c7392a\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x6d4ce63c\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 221 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f258)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x2801617e\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 222 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f259)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n      end\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0xefca\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0xefca\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x00\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f258 (type 2)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x12345678\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f259 (type 3)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/address/address.ds",
    "content": "object signature SimpleAddressInterface = {\n  init : unit -> unit;\n  get : unit -> address;\n  set : address -> unit\n}\n\nobject SimpleAddress : SimpleAddressInterface {\n  let _val : address := address(0xefca)\n\n  let init () =  \n    _val := address(0xefca);\n    ()\n\n  let get () =\n    _val := address(0x12345678);\n    let val = _val in\n    val\n\n  let set x =\n    _val := x\n}\n    \nlayer signature SIMPLEADDRESSCONTRACTSig = {\n  simpleAddress : SimpleAddressInterface\n}\n\nlayer SIMPLEADDRESSCONTRACT : [{}] SIMPLEADDRESSCONTRACTSig = {\n  simpleAddress = SimpleAddress\n}\n"
  },
  {
    "path": "contracts/wasmtest/address/address.js",
    "content": "#!/usr/bin/env node\n'strict';\nlet main = require('../index');\n\nif (process.argv.length < 4) {\n    console.log(`usage: ${process.argv[1]} ewasm-file func  [args..]`);\n    process.exit(0);\n}\n\nfunction generate(funcSig, arg1, arg2) {\n    let callData = ''\n    switch (funcSig) {\n        case 'init':\n            callData += 'e1c7392a';\n            break;\n        case 'get':\n            callData += '6d4ce63c';\n            break;\n        // case 'shl':\n        //     callData += '9da760ef';\n        //     break;\n        // case 'shr':\n        //     callData += '75f4479a';\n        //     break;\n        default:\n            console.log(`unknown func: ${funcSig}`);\n            process.exit(0);\n    }\n    // if (arg1 !== undefined) {\n    //     arg1 = BigInt(arg1);\n    //     callData += arg1.toString(16).padStart(64, '0');\n    // }\n    // arg1 = BigInt(arg1);\n    // callData += arg1.toString(16).padStart(64, '0');\n    // arg2 = BigInt(arg2);\n    // callData += arg2.toString(16).padStart(64, '0');\n    return callData;\n}\nlet callData = generate(...process.argv.slice(3, 4));\nmain(process.argv[2], callData).then(console.log).catch(console.log);\n"
  },
  {
    "path": "contracts/wasmtest/address/address_test.js",
    "content": "#!/usr/bin/env node\n\n// const net = require('net');\n// const solc = require('solc');\n\nconst bytecodeFilename = \"address.bytecode\";\n\nconst fs = require('fs');\nconst ethers = require(\"ethers\");\n\nconst endpoint = \"http://localhost:8545\";\nconst provider = new ethers.providers.JsonRpcProvider(endpoint);\n\n// const abi = [\n//   \"constructor()\",\n//   \"function initialize () public returns (uint)\",\n//   \"function totalSupply() view returns (uint)\",\n//   \"function balanceOf(uint) view returns (uint)\",\n//   \"function transfer(uint, int) returns (bool)\"\n// ];\n\nconst abi = [ {\"type\":\"function\",\n  \"name\":\"init\",\n  \"inputs\":[],\n  \"outputs\":[],\n  \"payable\":true,\n  \"constant\":false,\n  \"stateMutability\":\"payable\"},\n  {\"type\":\"function\",\n  \"name\":\"get\",\n  \"inputs\":[],\n  \"outputs\":[{\"name\":\"\", \"type\":\"address\"}],\n  \"payable\":true,\n  \"constant\":true,\n  \"stateMutability\":\"payable\"},\n  {\"type\":\"function\",\n  \"name\":\"set\",\n  \"inputs\":[{\"name\":\"x\", \"type\":\"address\"}],\n  \"outputs\":[],\n  \"payable\":true,\n  \"constant\":false,\n  \"stateMutability\":\"payable\"}];\n\nconst bytecode = fs.readFileSync(bytecodeFilename).toString().replace(/\\n|\\t|\\r| /g, \"\");\nconst signer = provider.getSigner(0);\nconst creator = signer.getAddress();\n\nfunction printTest(name, success) {\n  console.log(name +\": \" + (success? \"pass\" : \"fail\"));\n}\n\nasync function deploy() {\n  //console.log(\"sending creation transaction...\")\n  let factory = new ethers.ContractFactory(abi, bytecode, signer);\n  let contract = await factory.deploy();\n  await contract.deployed();\n  // console.log(\"contract address: \" + contract.address);\n  // console.log(\"transaction hash: \" + contract.deployTransaction.hash);\n  // let deployedBytecode = await provider.getCode(contract.address);\n  // console.log(\"deployed bytecode: \" + deployedBytecode);\n\n  \n  await contract.init();\n\n  let getval = await contract.get();\n  printTest(\"init value: \", getval == \"0x000000000000000000000000000000000000efca\");\n\n  let setv = \"0xd115bffabbdd893a6f7cea402e7338643ced44a6\"; // 160-bit address format\n  await contract.set(setv);\n\n  getval = await contract.get();\n  printTest(\"set value: \", getval == ethers.utils.getAddress(setv));\n\n}\n\ndeploy();\n"
  },
  {
    "path": "contracts/wasmtest/arith/arith-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\5d\\10\\60\\00\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\0d\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\0e\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\06\\03\\0e\\0d\\01\\01\\01\\0a\\05\\0f\\0a\\0f\\00\\01\\02\\03\\04\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\e9\\07\\0d\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\d6\\03\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\f7\\85\\d8\\b8\\07\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\c5\\ef\\f5\\b3\\7b\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\dd\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\23\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\9c\\d9\\92\\c5\\7c\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\de\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\24\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\db\\82\\c7\\9c\\7a\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\df\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\25\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\0b\\0b\\0b\\30\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\51\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\20\\00\\20\\01\\6a\\21\\03\\20\\03\\20\\00\\4f\\21\\02\\20\\02\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\00\\20\\01\\6a\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\4a\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\20\\01\\20\\00\\4d\\21\\02\\20\\02\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\00\\20\\01\\6b\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\62\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\20\\00\\41\\00\\46\\04\\40\\41\\00\\21\\02\\05\\20\\00\\20\\01\\6c\\21\\03\\20\\03\\20\\00\\6e\\21\\04\\20\\04\\20\\01\\46\\21\\02\\20\\02\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\03\\21\\02\\0b\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\4e\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\20\\01\\41\\00\\4b\\21\\02\\20\\02\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\00\\20\\01\\6e\\21\\03\\20\\03\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const     1828))\n  )\n)"
  },
  {
    "path": "contracts/wasmtest/arith/arith-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param i32 i32) (result i32)))\n  (type (;2;) (func (param i32 i32) (result i32)))\n  (type (;3;) (func (param i32 i32) (result i32)))\n  (type (;4;) (func (param i32 i32) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0x771602f7\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xb67d77c5\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 221 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f258)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xc8a4ac9c\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 222 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f259)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xa391c15b\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 223 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f260)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n      end\n      end\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    nop\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l2 i32)\n    (local $l3 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    local.get 0\n    local.get 1\n    i32.add\n    local.set 3\n    local.get 3\n    local.get 0\n    i32.ge_u\n    local.set 2\n    local.get 2\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 0\n    local.get 1\n    i32.add\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f258 (type 2)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    local.get 1\n    local.get 0\n    i32.le_u\n    local.set 2\n    local.get 2\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 0\n    local.get 1\n    i32.sub\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f259 (type 3)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    local.get 0\n    i32.const 0x00\n    i32.eq\n    if \n      i32.const 0x00\n      local.set 2\n    else \n      local.get 0\n      local.get 1\n      i32.mul\n      local.set 3\n      local.get 3\n      local.get 0\n      i32.div_u\n      local.set 4\n      local.get 4\n      local.get 1\n      i32.eq\n      local.set 2\n      local.get 2\n      if \n        nop\n      else \n        i32.const 256\n        i32.const 0\n        call $f28\n      end\n      local.get 3\n      local.set 2\n    end\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f260 (type 4)\n    (local $l2 i32)\n    (local $l3 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    local.get 1\n    i32.const 0x00\n    i32.gt_u\n    local.set 2\n    local.get 2\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 0\n    local.get 1\n    i32.div_u\n    local.set 3\n    local.get 3\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/arith/arith.ds",
    "content": "object signature ArithInterface = {\n  add : uint * uint -> uint;\n  sub : uint * uint -> uint;\n  mul : uint * uint -> uint;\n  div : uint * uint -> uint;\n  (* mod : uint * uint -> uint; *)\n}\n\nobject Arith : ArithInterface {\n  let add (n, m) = \n    let c = n + m in\n    assert (c >= n);\n    n + m\n\n  let sub (n, m) = \n    assert (m <= n);\n    n - m\n\n  let mul (n, m) = \n    if n = 0u0 then\n      0u0\n    else \n      let c = n * m in\n      let d = c / n in\n      assert (d = m);\n      c\n\n  let div (n, m) = \n    assert (m > 0u0);\n    let c = n / m in \n    c\n\n  (* let mod (n, m) = \n    assert (m != 0);\n    n mod m *)\n}\n    \nlayer signature ARITHSig = {\n  arith : ArithInterface\n}\n\nlayer ARITH : [{}] ARITHSig = {\n  arith = Arith\n}"
  },
  {
    "path": "contracts/wasmtest/arith/arith.js",
    "content": "#!/usr/bin/env node\n'strict';\nlet main = require('../index');\n\nif (process.argv.length != 6) {\n    console.log(`usage: ${process.argv[1]} ewasm-file func arg1 arg2`);\n    process.exit(0);\n}\n\nfunction generate(funcSig, arg1, arg2) {\n    let callData = ''\n    switch (funcSig) {\n        case 'add':\n            callData += '771602f7';\n            break;\n        case 'sub':\n            callData += 'b67d77c5';\n            break;\n        case 'mul':\n            callData += 'c8a4ac9c';\n            break;\n        case 'div':\n            callData += 'a391c15b';\n            break;\n        // case 'mod':\n        //     callData += 'f43f523a';\n        //     break;\n        // case 'shl':\n        //     callData += '9da760ef';\n        //     break;\n        // case 'shr':\n        //     callData += '75f4479a';\n        //     break;\n        default:\n            console.log(`unknown func: ${funcSig}`);\n            process.exit(0);\n    }\n    arg1 = BigInt(arg1);\n    callData += arg1.toString(16).padStart(64, '0');\n    arg2 = BigInt(arg2);\n    callData += arg2.toString(16).padStart(64, '0');\n    return callData;\n}\nlet callData = generate(...process.argv.slice(3, 6));\nmain(process.argv[2], callData).then(console.log).catch(console.log);\n"
  },
  {
    "path": "contracts/wasmtest/asserts/asserts-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\5f\\12\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\0d\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\0e\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\0f\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\07\\03\\0f\\0e\\10\\10\\10\\0b\\06\\11\\0b\\11\\00\\01\\02\\03\\04\\05\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\de\\06\\0e\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\c8\\02\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\f0\\bf\\c8\\b0\\02\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\8e\\b7\\de\\90\\7e\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dd\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\23\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\e5\\a6\\a7\\c6\\7b\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\de\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\24\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\d8\\fa\\a8\\ad\\7e\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\df\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\25\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\df\\d8\\8b\\ac\\7b\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\e0\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\26\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\0b\\0b\\0b\\0b\\30\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\46\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\41\\02\\41\\02\\6a\\41\\04\\46\\21\\00\\20\\00\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\46\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\41\\02\\41\\02\\6a\\41\\05\\46\\21\\00\\20\\00\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\46\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\41\\02\\41\\02\\6a\\41\\04\\46\\21\\00\\20\\00\\04\\40\\41\\80\\02\\41\\00\\10\\14\\05\\01\\0b\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\46\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\41\\02\\41\\02\\6a\\41\\05\\46\\21\\00\\20\\00\\04\\40\\41\\80\\02\\41\\00\\10\\14\\05\\01\\0b\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\35\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\41\\80\\02\\41\\00\\10\\14\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const     1692))\n  )\n)"
  },
  {
    "path": "contracts/wasmtest/asserts/asserts-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param ) (result i32)))\n  (type (;2;) (func (param ) (result i32)))\n  (type (;3;) (func (param ) (result i32)))\n  (type (;4;) (func (param ) (result i32)))\n  (type (;5;) (func (param ) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0x26121ff0\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xe2179b8e\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 221 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f258)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xb8c9d365\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 222 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f259)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xe5aa3d58\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 223 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f260)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xb582ec5f\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 224 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f261)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n      end\n      end\n      end\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    nop\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    i32.const 0x02\n    i32.const 0x02\n    i32.add\n    i32.const 0x04\n    i32.eq\n    local.set 0\n    local.get 0\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f258 (type 2)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    i32.const 0x02\n    i32.const 0x02\n    i32.add\n    i32.const 0x05\n    i32.eq\n    local.set 0\n    local.get 0\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f259 (type 3)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    i32.const 0x02\n    i32.const 0x02\n    i32.add\n    i32.const 0x04\n    i32.eq\n    local.set 0\n    local.get 0\n    if \n      i32.const 256\n      i32.const 0\n      call $f28\n    else \n      nop\n    end\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f260 (type 4)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    i32.const 0x02\n    i32.const 0x02\n    i32.add\n    i32.const 0x05\n    i32.eq\n    local.set 0\n    local.get 0\n    if \n      i32.const 256\n      i32.const 0\n      call $f28\n    else \n      nop\n    end\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f261 (type 5)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    i32.const 256\n    i32.const 0\n    call $f28\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/asserts/asserts.ds",
    "content": "object signature OS = {\n  f : unit -> unit;\n  g : unit -> unit;\n  h : unit -> unit;\n  i : unit -> unit;\n  j : unit -> unit\n}\n\nobject O : OS {\n  (* should succeed *)\n  let f () =\n    assert (2+2 = 4)\n\n  (* should revert *)\n  let g () =\n    assert (2+2 = 5)\n\n  (* should revert *)\n  let h () =\n    deny (2+2 = 4)\n    \n  (* should succeed *)\n  let i () =\n    deny (2+2 = 5)\n\n  (* should revert *)\n  let j () =\n    fail\n\n}\n\nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "contracts/wasmtest/asserts/asserts.js",
    "content": "#!/usr/bin/env node\n'strict';\nlet main = require('../index');\n\nif (process.argv.length != 4) {\n    console.log(`usage: ${process.argv[1]} ewasm-file func arg1 arg2`);\n    process.exit(0);\n}\n\nfunction generate(funcSig, arg1, arg2) {\n    let callData = ''\n    switch (funcSig) {\n        case 'f':\n            callData += '26121ff0';\n            break;\n        case 'g':\n            callData += 'e2179b8e';\n            break;\n        case 'h':\n            callData += 'b8c9d365';\n            break;\n        case 'i':\n            callData += 'e5aa3d58';\n            break;\n        case 'j':\n            callData += 'b582ec5f';\n            break;\n        // case 'mod':\n        //     callData += 'f43f523a';\n        //     break;\n        // case 'shl':\n        //     callData += '9da760ef';\n        //     break;\n        // case 'shr':\n        //     callData += '75f4479a';\n        //     break;\n        default:\n            console.log(`unknown func: ${funcSig}`);\n            process.exit(0);\n    }\n    // arg1 = BigInt(arg1);\n    // callData += arg1.toString(16).padStart(64, '0');\n    // arg2 = BigInt(arg2);\n    // callData += arg2.toString(16).padStart(64, '0');\n    return callData;\n}\nlet callData = generate(...process.argv.slice(3, 4));\nmain(process.argv[2], callData).then(console.log).catch(console.log);\n"
  },
  {
    "path": "contracts/wasmtest/builtins/builtins-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\6f\\16\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\01\\7f\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\0d\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\0e\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\0f\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\10\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\10\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\11\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\10\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\12\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\10\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\0e\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\13\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\0c\\03\\14\\13\\14\\14\\14\\0a\\0b\\15\\0a\\15\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\c7\\73\\13\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\ed\\04\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\af\\c4\\c4\\09\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\d4\\fd\\ee\\b6\\7f\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dd\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\23\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\aa\\fb\\bf\\e2\\05\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\de\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\24\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\f5\\e8\\80\\a1\\05\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\df\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\25\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\d4\\a1\\9a\\c1\\01\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\e0\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\26\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\c3\\b7\\cb\\90\\02\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\e1\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\27\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\e7\\c6\\d3\\f5\\7e\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\e2\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\28\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\85\\bb\\84\\93\\7e\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\e3\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\29\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\be\\b5\\f7\\96\\06\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\e4\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\2a\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\8b\\c9\\f9\\9e\\7b\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\e5\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\2b\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\fe\\21\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ad\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ac\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ab\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\aa\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a8\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\8c\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\8c\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ad\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\8c\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ac\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\8c\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ab\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\8c\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\aa\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\8c\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\8c\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a8\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\8c\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\8c\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\c7\\26\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ae\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ad\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\06\\10\\11\\41\\80\\06\\28\\02\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ac\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\06\\10\\08\\41\\80\\06\\28\\02\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\ab\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\06\\10\\09\\41\\80\\06\\28\\02\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\aa\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\06\\10\\0a\\41\\80\\06\\28\\02\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\10\\13\\a7\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a8\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\10\\10\\a7\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\06\\10\\00\\41\\80\\06\\28\\02\\00\\24\\00\\41\\00\\23\\00\\36\\02\\00\\41\\00\\41\\80\\06\\10\\01\\41\\80\\06\\28\\02\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\10\\10\\a7\\41\\01\\6b\\ad\\41\\80\\06\\10\\02\\45\\24\\00\\41\\80\\06\\28\\02\\00\\41\\00\\23\\00\\1b\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\20\\02\\20\\00\\6a\\21\\03\\20\\03\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\01\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const    15642))\n  )\n)"
  },
  {
    "path": "contracts/wasmtest/builtins/builtins-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param ) (result i32)))\n  (type (;2;) (func (param ) (result i32)))\n  (type (;3;) (func (param ) (result i32)))\n  (type (;4;) (func (param ) (result i32)))\n  (type (;5;) (func (param ) (result i32)))\n  (type (;6;) (func (param ) (result i32)))\n  (type (;7;) (func (param ) (result i32)))\n  (type (;8;) (func (param ) (result i32)))\n  (type (;9;) (func (param ) (result i32)))\n  (type (;10;) (func (param i32) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0x0131222f\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xf6dbbed4\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 221 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f258)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x5c4ffdaa\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 222 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f259)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x54203475\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 223 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f260)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x182690d4\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 224 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f261)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x2212dbc3\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 225 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f262)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xeeb4e367\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 226 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f263)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xe2611d85\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 227 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f264)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x62dddabe\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 228 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f265)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xb3de648b\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 229 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f266)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n      end\n      end\n      end\n      end\n      end\n      end\n      end\n      end\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022d\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022c\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022b\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022a\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0228\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f258 (type 2)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022d\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f259 (type 3)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022c\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f260 (type 4)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022b\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f261 (type 5)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022a\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f262 (type 6)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f263 (type 7)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0228\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f264 (type 8)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f265 (type 9)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f266 (type 10)\n    (local $l1 i32)\n    (local $l2 i32)\n    (local $l3 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022e\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022d\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 768\n    call $f24\n    i32.const 768\n    i32.load\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022c\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 768\n    call $f10\n    i32.const 768\n    i32.load\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022b\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 768\n    call $f11\n    i32.const 768\n    i32.load\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x022a\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 768\n    call $f14\n    i32.const 768\n    i32.load\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    call $f27\n    i32.wrap_i64\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0228\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    call $f23\n    i32.wrap_i64\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 768\n    call $f0\n    i32.const 768\n    i32.load\n    global.set 0\n    i32.const 0\n    global.get 0\n    i32.store\n    i32.const 0\n    i32.const 768\n    call $f1\n    i32.const 768\n    i32.load\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    call $f23\n    i32.wrap_i64\n    i32.const 0x01\n    i32.sub\n    i64.extend_i32_u\n    i32.const 768\n    call $f2\n    i32.eqz\n    global.set 0\n    i32.const 768\n    i32.load\n    i32.const 0\n    global.get 0\n    select\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    local.get 2\n    local.get 0\n    i32.add\n    local.set 3\n    local.get 3\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/builtins/builtins.ds",
    "content": "object signature OS = {\n  f : uint -> uint;\n    \n  const get_address : unit -> address;\n  const get_origin : unit -> address;\n  const get_caller : unit -> address;\n  const get_callvalue : unit -> uint;\n  const get_coinbase : unit -> uint;\n  const get_timestamp : unit -> uint;\n  const get_number : unit -> uint;\n  const get_balance_this : unit -> uint;\n  const get_blockhash_prev : unit -> uint\n}\n\nobject O : OS {\n  let _address : address := address(0)\n  let _origin : address := address(0)\n  let _caller : address := address(0)\n  let _callvalue : uint := 0u0\n  let _coinbase : uint := 0u0\n  let _timestamp : uint := 0u0\n  let _number : uint := 0u0\n  let _balance_this : uint := 0u0\n  let _blockhash_prev : uint := 0u0\n  \n    \n  let get_address () = let x = _address in x\n  let get_origin () = let x = _origin in x\n  let get_caller () = let x = _caller in x\n  let get_callvalue () = let x = _callvalue in x\n  let get_coinbase () = let x = _coinbase in x\n  let get_timestamp () = let x = _timestamp in x\n  let get_number () = let x = _number in x\n  let get_balance_this () = let x = _balance_this in x\n  let get_blockhash_prev () = let x = _blockhash_prev in x\n    \n  let f (v) =\n    _address := this_address; \n    _origin := tx_origin;\n    _caller := msg_sender;\n    _callvalue := msg_value;\n    _coinbase := block_coinbase; \n    _timestamp := block_timestamp;\n    _number := block_number;\n    _balance_this := balance(this_address);\n    _blockhash_prev := blockhash(block_number-0u1);\n    let addr = _timestamp in\n    let addr = addr + v in\n    addr\n }\n\nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "contracts/wasmtest/builtins/builtins.js",
    "content": "#!/usr/bin/env node\n'strict';\nlet main = require('../index');\n\nif (process.argv.length != 5) {\n    console.log(`usage: ${process.argv[1]} ewasm-file func`);\n    process.exit(0);\n}\n\nfunction generate(funcSig, arg1, arg2) {\n    let callData = ''\n    switch (funcSig) {\n        case 'f':\n            callData += 'b3de648b';\n            break;\n        // case 'mod':\n        //     callData += 'f43f523a';\n        //     break;\n        // case 'shl':\n        //     callData += '9da760ef';\n        //     break;\n        // case 'shr':\n        //     callData += '75f4479a';\n        //     break;\n        default:\n            console.log(`unknown func: ${funcSig}`);\n            process.exit(0);\n    }\n    arg1 = BigInt(arg1);\n    callData += arg1.toString(16).padStart(64, '0');\n    // arg2 = BigInt(arg2);\n    // callData += arg2.toString(16).padStart(64, '0');\n    return callData;\n}\nlet callData = generate(...process.argv.slice(3, 5));\nmain(process.argv[2], callData).then(console.log).catch(console.log);\n"
  },
  {
    "path": "contracts/wasmtest/events/events-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\4f\\0e\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\03\\03\\0b\\0a\\0c\\0c\\0c\\07\\02\\0d\\07\\0d\\00\\01\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\e9\\0e\\0a\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\70\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\f0\\bf\\c8\\b0\\02\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\30\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\b4\\0c\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\41\\2a\\24\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\d0\\c8\\99\\ed\\7b\\41\\cb\\8d\\c8\\3d\\41\\9c\\97\\f5\\e8\\03\\41\\bb\\f0\\8b\\78\\41\\9d\\f4\\c2\\e0\\7e\\41\\de\\f4\\f3\\be\\7f\\41\\97\\9d\\c5\\9f\\04\\41\\97\\d1\\89\\bf\\04\\24\\00\\41\\9c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0a\\23\\00\\36\\02\\00\\41\\80\\02\\41\\04\\41\\01\\41\\80\\0a\\41\\80\\0c\\41\\80\\0e\\41\\80\\10\\10\\0f\\41\\01\\41\\00\\24\\00\\41\\84\\02\\23\\00\\36\\02\\00\\24\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\dc\\f2\\eb\\d7\\00\\41\\9f\\e9\\f9\\ef\\7b\\41\\ed\\b4\\e2\\91\\7f\\41\\f0\\c1\\ef\\fb\\03\\41\\d8\\c7\\e2\\8b\\02\\41\\e6\\ab\\86\\e2\\07\\41\\e2\\f5\\df\\d7\\00\\41\\df\\a5\\fd\\e0\\7a\\24\\00\\41\\9c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0a\\23\\00\\36\\02\\00\\41\\80\\02\\41\\08\\41\\01\\41\\80\\0a\\41\\80\\0c\\41\\80\\0e\\41\\80\\10\\10\\0f\\41\\cf\\e3\\d8\\85\\7f\\41\\d5\\82\\aa\\a9\\02\\41\\f6\\cd\\a5\\d5\\01\\41\\d0\\fd\\a3\\e4\\06\\41\\a0\\bc\\8e\\a2\\06\\41\\f9\\a6\\e6\\9e\\78\\41\\d9\\c3\\d7\\76\\41\\d6\\f6\\b8\\c6\\7b\\41\\0d\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\24\\00\\41\\9c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\9c\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0c\\23\\00\\36\\02\\00\\41\\80\\02\\41\\00\\41\\02\\41\\80\\0a\\41\\80\\0c\\41\\80\\0e\\41\\80\\10\\10\\0f\\41\\02\\24\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\b6\\90\\e2\\80\\05\\41\\be\\f9\\db\\f0\\02\\41\\c3\\a6\\ff\\e2\\7c\\41\\cf\\ca\\a9\\b4\\02\\41\\f8\\a4\\a4\\85\\7d\\41\\a2\\a2\\9d\\e0\\7d\\41\\e0\\84\\91\\93\\78\\41\\e8\\9a\\e7\\bf\\7a\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\24\\00\\41\\9c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\9c\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0c\\23\\00\\36\\02\\00\\41\\80\\02\\41\\04\\41\\02\\41\\80\\0a\\41\\80\\0c\\41\\80\\0e\\41\\80\\10\\10\\0f\\41\\2a\\24\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\f6\\89\\84\\ce\\7e\\41\\cd\\aa\\e1\\97\\03\\41\\f0\\a1\\ea\\f4\\07\\41\\de\\c1\\8b\\cc\\03\\41\\bb\\ba\\80\\bb\\7f\\41\\fb\\bc\\f8\\ab\\7d\\41\\f2\\99\\eb\\c2\\00\\41\\f5\\a3\\85\\fb\\7a\\41\\01\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\02\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\24\\00\\41\\9c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\9c\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\9c\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0e\\23\\00\\36\\02\\00\\41\\80\\02\\41\\04\\41\\03\\41\\80\\0a\\41\\80\\0c\\41\\80\\0e\\41\\80\\10\\10\\0f\\41\\2a\\24\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\9a\\e1\\ba\\22\\41\\d7\\ef\\fc\\c4\\01\\41\\a9\\f1\\d0\\ab\\02\\41\\c3\\ba\\c6\\f0\\07\\41\\bd\\9d\\ed\\d2\\7e\\41\\fd\\8c\\9c\\ff\\7b\\41\\a5\\bf\\eb\\e8\\7d\\41\\f7\\e9\\ab\\c5\\00\\41\\01\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\02\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\41\\00\\24\\00\\41\\9c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0a\\23\\00\\36\\02\\00\\24\\00\\41\\9c\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0c\\23\\00\\36\\02\\00\\24\\00\\41\\9c\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\98\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\94\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\90\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\88\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\84\\0e\\23\\00\\36\\02\\00\\24\\00\\41\\80\\0e\\23\\00\\36\\02\\00\\41\\80\\02\\41\\04\\41\\03\\41\\80\\0a\\41\\80\\0c\\41\\80\\0e\\41\\80\\10\\10\\0f\\41\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\00\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const     2707))\n  )\n)"
  },
  {
    "path": "contracts/wasmtest/events/events-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param ) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0x26121ff0\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    nop\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    i32.const 0x2a\n    global.set 0\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 0xbda66450\n    i32.const 0x07b206cb\n    i32.const 0x3d1d4b9c\n    i32.const 0xff02f83b\n    i32.const 0xec10ba1d\n    i32.const 0xf7dcfa5e\n    i32.const 0x43f14e97\n    i32.const 0x47e26897\n    global.set 0\n    i32.const 1308\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1304\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1300\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1296\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1292\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1288\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1284\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1280\n    global.get 0\n    i32.store\n    i32.const 256\n    i32.const 4\n    i32.const 1\n    i32.const 1280\n    i32.const 1536\n    i32.const 1792\n    i32.const 2048\n    call $f22\n    i32.const 0x01\n    i32.const 0x00\n    global.set 0\n    i32.const 260\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 0x0afaf95c\n    i32.const 0xbdfe749f\n    i32.const 0xf2389a6d\n    i32.const 0x3f7be0f0\n    i32.const 0x2178a3d8\n    i32.const 0x7c4195e6\n    i32.const 0x0af7fae2\n    i32.const 0xac1f52df\n    global.set 0\n    i32.const 1308\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1304\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1300\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1296\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1292\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1288\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1284\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1280\n    global.get 0\n    i32.store\n    i32.const 256\n    i32.const 8\n    i32.const 1\n    i32.const 1280\n    i32.const 1536\n    i32.const 1792\n    i32.const 2048\n    call $f22\n    i32.const 0xf0b631cf\n    i32.const 0x252a8155\n    i32.const 0x1aa966f6\n    i32.const 0x6c88fed0\n    i32.const 0x64439e20\n    i32.const 0x83d99379\n    i32.const 0xfed5e1d9\n    i32.const 0xb8ce3b56\n    i32.const 0x0d\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    global.set 0\n    i32.const 1308\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1304\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1300\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1296\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1292\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1288\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1284\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1280\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1564\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1560\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1556\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1552\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1548\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1544\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1540\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1536\n    global.get 0\n    i32.store\n    i32.const 256\n    i32.const 0\n    i32.const 2\n    i32.const 1280\n    i32.const 1536\n    i32.const 1792\n    i32.const 2048\n    call $f22\n    i32.const 0x02\n    global.set 0\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 0x50188836\n    i32.const 0x2e16fcbe\n    i32.const 0xcc5fd343\n    i32.const 0x268a654f\n    i32.const 0xd0a91278\n    i32.const 0xdc075122\n    i32.const 0x82644260\n    i32.const 0xa7f9cd68\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    global.set 0\n    i32.const 1308\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1304\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1300\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1296\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1292\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1288\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1284\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1280\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1564\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1560\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1556\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1552\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1548\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1544\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1540\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1536\n    global.get 0\n    i32.store\n    i32.const 256\n    i32.const 4\n    i32.const 2\n    i32.const 1280\n    i32.const 1536\n    i32.const 1792\n    i32.const 2048\n    call $f22\n    i32.const 0x2a\n    global.set 0\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 0xe9c104f6\n    i32.const 0x32f8554d\n    i32.const 0x7e9a90f0\n    i32.const 0x3982e0de\n    i32.const 0xf7601d3b\n    i32.const 0xd57e1e7b\n    i32.const 0x085accf2\n    i32.const 0xaf6151f5\n    i32.const 0x01\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x02\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    global.set 0\n    i32.const 1308\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1304\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1300\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1296\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1292\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1288\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1284\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1280\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1564\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1560\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1556\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1552\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1548\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1544\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1540\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1536\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1820\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1816\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1812\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1808\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1804\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1800\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1796\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1792\n    global.get 0\n    i32.store\n    i32.const 256\n    i32.const 4\n    i32.const 3\n    i32.const 1280\n    i32.const 1536\n    i32.const 1792\n    i32.const 2048\n    call $f22\n    i32.const 0x2a\n    global.set 0\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 0x044eb09a\n    i32.const 0x189f37d7\n    i32.const 0x257438a9\n    i32.const 0x7e119d43\n    i32.const 0xea5b4ebd\n    i32.const 0xbfe7067d\n    i32.const 0xdd1adfa5\n    i32.const 0x08aaf4f7\n    i32.const 0x01\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x02\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    i32.const 0x00\n    global.set 0\n    i32.const 1308\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1304\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1300\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1296\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1292\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1288\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1284\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1280\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1564\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1560\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1556\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1552\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1548\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1544\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1540\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1536\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1820\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1816\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1812\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1808\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1804\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1800\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1796\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1792\n    global.get 0\n    i32.store\n    i32.const 256\n    i32.const 4\n    i32.const 3\n    i32.const 1280\n    i32.const 1536\n    i32.const 1792\n    i32.const 2048\n    call $f22\n    i32.const 0x01\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/events/events.ds",
    "content": "event\n  | E1 (v : uint)\n\nevent\n    E2 (v1 : uint) (v2 : bool)\n\nevent\n  | IE1 (v : uint indexed)\n  | IE2 (v1 : uint) (v2 : bool indexed)      \n\nevent\n  | Transfer (fromA : uint indexed) (toA: uint indexed) (value: int)\n  | Approval (owner: uint indexed) (spender: uint indexed) (value: int) \n\nobject signature OS = {\n  f : unit -> bool    \n}\n\nobject O : OS {    \n  let f () =\n    emit E1(0u42);\n    emit E2(0u1, false);\n    emit IE1(0u13);\n    emit IE2(0u2, false);\n    emit Transfer(0u1, 0u2, 42);\n    emit Approval(0u1, 0u2, 42);\n    true\n }\n\nlayer L = {\n  o = O\n}\n    \n"
  },
  {
    "path": "contracts/wasmtest/events/events.js",
    "content": "#!/usr/bin/env node\n'strict';\nlet main = require('../index');\n\nif (process.argv.length < 4) {\n    console.log(`usage: ${process.argv[1]} ewasm-file func  [args..]`);\n    process.exit(0);\n}\n\nfunction generate(funcSig, arg1, arg2) {\n    let callData = ''\n    switch (funcSig) {\n        case 'f':\n            callData += '26121ff0';\n            break;\n        // case 'mod':\n        //     callData += 'f43f523a';\n        //     break;\n        // case 'shl':\n        //     callData += '9da760ef';\n        //     break;\n        // case 'shr':\n        //     callData += '75f4479a';\n        //     break;\n        default:\n            console.log(`unknown func: ${funcSig}`);\n            process.exit(0);\n    }\n    if (arg1 !== undefined) {\n        arg1 = BigInt(arg1);\n        callData += arg1.toString(16).padStart(64, '0');\n    }\n    // arg1 = BigInt(arg1);\n    // callData += arg1.toString(16).padStart(64, '0');\n    // arg2 = BigInt(arg2);\n    // callData += arg2.toString(16).padStart(64, '0');\n    return callData;\n}\nlet callData = generate(...process.argv.slice(3, 4));\nmain(process.argv[2], callData).then(console.log).catch(console.log);\n"
  },
  {
    "path": "contracts/wasmtest/for/for-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\4b\\0d\\60\\00\\01\\7f\\60\\01\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\01\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\04\\03\\0c\\0b\\02\\02\\02\\01\\03\\0c\\01\\0c\\00\\01\\02\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\e9\\1a\\0b\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\ef\\01\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\95\\f7\\e9\\c3\\7a\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\96\\94\\f1\\b2\\01\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\dd\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\23\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\0b\\8e\\04\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\ea\\07\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\20\\02\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\01\\0f\\0b\\e9\\0b\\01\\05\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\20\\01\\21\\04\\41\\00\\21\\03\\02\\40\\03\\40\\20\\03\\20\\04\\49\\04\\40\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\05\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\05\\20\\00\\6a\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\20\\03\\41\\01\\6a\\21\\03\\05\\0c\\02\\0b\\0c\\00\\0b\\0b\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\06\\01\\20\\06\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\02\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const     4240))\n  )\n)"
  },
  {
    "path": "contracts/wasmtest/for/for-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param i32) (result i32)))\n  (type (;2;) (func (param i32 i32) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0xa87a7b95\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x165c4a16\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 221 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f258)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l1 i32)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    local.get 2\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n  (func $f258 (type 2)\n    (local $l2 i32)\n    (local $l3 i32)\n    (local $l4 i32)\n    (local $l5 i32)\n    (local $l6 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    local.get 1\n    local.set 4\n    i32.const 0x00\n    local.set 3\n    (block loop \n      local.get 3\n      local.get 4\n      i32.lt_u\n      if \n        i32.const 0x0920\n        i32.load\n        i32.const 0x20\n        i32.sub\n        i32.const 0x00\n        i32.add\n        i32.const 0x0226\n        i32.store\n        i32.const 0x0920\n        i32.load\n        i32.const 0x20\n        i32.sub\n        i32.const 0x00\n        i32.add\n        i32.load\n        i32.const 0x0920\n        i32.load\n        i32.const 0x20\n        i32.sub\n        i32.const 0x00\n        i32.add\n        i32.load\n        global.set 0\n        global.set 1\n        i32.const 0\n        i32.const 9\n        i32.store\n        i32.const 4\n        i32.const 0\n        i32.store\n        i32.const 8\n        i32.const 0\n        i32.store\n        i32.const 12\n        i32.const 0\n        i32.store\n        i32.const 16\n        i32.const 0\n        i32.store\n        i32.const 512\n        i32.const 0\n        i32.store\n        i32.const 256\n        global.get 0\n        i32.store\n        i32.const 260\n        global.get 1\n        i32.store\n        i32.const 10000\n        i64.extend_i32_u\n        i32.const 0\n        i32.const 512\n        i32.const 256\n        i32.const 8\n        call $f3\n        drop\n        i32.const 768\n        i32.const 0\n        call $f29\n        call $f30\n        i32.const 768\n        i32.load\n        i32.const 772\n        i32.load\n        i32.const 776\n        i32.load\n        i32.const 780\n        i32.load\n        i32.const 784\n        i32.load\n        i32.const 788\n        i32.load\n        i32.const 792\n        i32.load\n        i32.const 796\n        i32.load\n        i32.const 0x0920\n        i32.load\n        i32.const 0x20\n        i32.sub\n        i32.const 0x00\n        i32.add\n        global.set 2\n        global.set 0\n        global.get 2\n        i32.const 28\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 24\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 20\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 16\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 12\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 8\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 4\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 0\n        i32.add\n        global.get 0\n        i32.store\n        i32.const 0x0920\n        i32.load\n        i32.const 0x20\n        i32.sub\n        i32.const 0x00\n        i32.add\n        i32.const 32\n        i32.add\n        global.set 2\n        global.get 2\n        i32.const 32\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 28\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 24\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 20\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 16\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 12\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 8\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 4\n        i32.sub\n        i32.load\n        global.set 0\n        i32.const 1052\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1048\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1044\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1040\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1036\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1032\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1028\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1024\n        global.get 0\n        i32.store\n        i32.const 1024\n        i32.const 768\n        call $f9\n        i32.const 768\n        i32.load\n        local.set 5\n        nop\n        i32.const 0x0920\n        i32.load\n        i32.const 0x20\n        i32.sub\n        i32.const 0x00\n        i32.add\n        i32.const 0x0226\n        i32.store\n        i32.const 0x0920\n        i32.load\n        i32.const 0x20\n        i32.sub\n        i32.const 0x00\n        i32.add\n        i32.load\n        i32.const 0x0920\n        i32.load\n        i32.const 0x20\n        i32.sub\n        i32.const 0x00\n        i32.add\n        i32.load\n        global.set 0\n        global.set 1\n        i32.const 0\n        i32.const 9\n        i32.store\n        i32.const 4\n        i32.const 0\n        i32.store\n        i32.const 8\n        i32.const 0\n        i32.store\n        i32.const 12\n        i32.const 0\n        i32.store\n        i32.const 16\n        i32.const 0\n        i32.store\n        i32.const 512\n        i32.const 0\n        i32.store\n        i32.const 256\n        global.get 0\n        i32.store\n        i32.const 260\n        global.get 1\n        i32.store\n        i32.const 10000\n        i64.extend_i32_u\n        i32.const 0\n        i32.const 512\n        i32.const 256\n        i32.const 8\n        call $f3\n        drop\n        i32.const 768\n        i32.const 0\n        call $f29\n        call $f30\n        i32.const 768\n        i32.load\n        i32.const 772\n        i32.load\n        i32.const 776\n        i32.load\n        i32.const 780\n        i32.load\n        i32.const 784\n        i32.load\n        i32.const 788\n        i32.load\n        i32.const 792\n        i32.load\n        i32.const 796\n        i32.load\n        i32.const 0x0920\n        i32.load\n        i32.const 0x20\n        i32.sub\n        i32.const 0x00\n        i32.add\n        global.set 2\n        global.set 0\n        global.get 2\n        i32.const 28\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 24\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 20\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 16\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 12\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 8\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 4\n        i32.add\n        global.get 0\n        i32.store\n        global.set 0\n        global.get 2\n        i32.const 0\n        i32.add\n        global.get 0\n        i32.store\n        i32.const 0x0920\n        i32.load\n        i32.const 0x20\n        i32.sub\n        i32.const 0x00\n        i32.add\n        i32.const 32\n        i32.add\n        global.set 2\n        global.get 2\n        i32.const 32\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 28\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 24\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 20\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 16\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 12\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 8\n        i32.sub\n        i32.load\n        global.get 2\n        i32.const 4\n        i32.sub\n        i32.load\n        global.set 0\n        i32.const 1052\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1048\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1044\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1040\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1036\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1032\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1028\n        global.get 0\n        i32.store\n        global.set 0\n        i32.const 1024\n        global.get 0\n        i32.store\n        local.get 5\n        local.get 0\n        i32.add\n        global.set 0\n        i32.const 512\n        global.get 0\n        i32.store\n        i32.const 1024\n        i32.const 512\n        call $f8\n        nop\n        local.get 3\n        i32.const 0x01\n        i32.add\n        local.set 3\n      else \n        br 2\n      end\n      br 0\n    end)\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 6\n    nop\n    local.get 6\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/for/for.ds",
    "content": "object signature OS = {\n  setThenGet : int -> int;\n  multiply : int * int -> int;\n}\n\nobject O : OS {\n\n  let _val : int := 0\n\n  let setThenGet a = \n    _val := a;\n    let val = _val in\n    val\n  \n  (* a can be negative;\n     b must be positive *)\n  let multiply (a, b) =\n    for i = 0 to b do\n      begin\n        let val = _val in\n        _val := val + a\n      end;\n    let val = _val in \n    val\n\n}\n\nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "contracts/wasmtest/for/for.js",
    "content": "#!/usr/bin/env node\n'strict';\nlet main = require('../index');\n\nif (process.argv.length < 4) {\n    console.log(`usage: ${process.argv[1]} ewasm-file func  [args..]`);\n    process.exit(0);\n}\n\nfunction generate(funcSig, arg1, arg2) {\n    let callData = ''\n    switch (funcSig) {\n        case 'multiply':\n            callData += '165c4a16';\n            break;\n        default:\n            console.log(`unknown func: ${funcSig}`);\n            process.exit(0);\n    }\n    arg1 = BigInt(arg1);\n    callData += arg1.toString(16).padStart(64, '0');\n    if (arg2 !== undefined) {\n        arg2 = BigInt(arg2);\n        callData += arg2.toString(16).padStart(64, '0');\n    }\n    return callData;\n}\nlet callData = generate(...process.argv.slice(3, 6));\nmain(process.argv[2], callData).then(console.log).catch(console.log);\n"
  },
  {
    "path": "contracts/wasmtest/index.js",
    "content": "#!/usr/bin/env node\n\n'strict';\nlet fs = require('fs');\nlet utils = require('./utils');\nlet precompiled = {\n    keccak256: null\n};\n// const ethers = require(\"ethers\");\n\nclass Environment {\n    constructor() {\n        this.storage = {};\n        this.transactionReceipt = {};\n        this.gasLeft = 65536;\n        this.callData = new Uint8Array(0);\n        this.returnData = new Uint8Array(0);\n        this.caller = '1234567890123456789012345678901234567890';\n        this.callValue = '00000000000000000000000000000000';\n        this.txGasPrice = '1f3f33ff5fabc5fdff67890feff12345';\n        this.txOrigin = '1234567890123456789012345678901234567890';\n        this.blockCoinbase = '1234567890123456789012345678901234567890';\n        this.blockDifficulty = '0000000000000000000000000000000000000000000000000000405BBD86CA28';\n        this.blockGasLimit = 21000;\n        this.blockNumber = 3456;\n        this.blockTimestamp = 6666;\n        this.blockhash = '1234567890123456789012345678901234567890123456789012345678901234';\n        this.address_balance = '12345678901234567890123456789012';\n        this.this_address = '5E72914535f202659083Db3a02C984188Fa26e9f';\n    }\n    setCallData(callData) {\n        if (!/(^[0-9a-f]+)?/i.test(callData)) {\n            console.log(`except hex encoded calldata, got: ${callData}`);\n            return false;\n        }\n        if (callData.length > 0) {\n            if (callData.length % 2)\n                callData = \"0\" + callData;\n            this.callData = new Uint8Array(callData.length / 2).fill(0x00);;\n            callData.match(/.{2}/g).forEach((value, i) => {\n                this.callData[i] = parseInt(value, 16);\n            });\n        }\n        return true;\n    }\n    getStorage(storage) {\n        return JSON.stringify(this.storage);\n    }\n    setStorage(storage) {\n        this.storage = JSON.parse(storage);\n        return true;\n    }\n}\n\nclass Interface {\n    get exports() {\n        let ret = {\n            ethereum: {},\n            debug: {},\n        };\n\n        // binding EEI functions\n        this.eei.forEach((method) => {\n            ret.ethereum[method] = this[method].bind(this);\n        });\n\n        // javascript doesn't support EEI with i64 parameter/return value, so binding to wrapper wasm function\n        this.hooks.forEach((method) => {\n            ret.ethereum[method] = this.eei_wrapper.instance.exports[method];\n        });\n\n        [\n            'print32',\n        ].forEach((method) => {\n            ret.debug[method] = this[method].bind(this);\n        });\n\n        return ret;\n    }\n    constructor(env) {\n        this.env = env;\n        this.eei = [\n            'useGas',\n            'getCallDataSize',\n            'callDataCopy',\n            'storageStore',\n            'storageLoad',\n            'log',\n            'finish',\n            'revert',\n            'returnDataCopy',\n            'getCaller',\n            'getCallValue',\n            'getTxGasPrice',\n            'getTxOrigin',\n            'getBlockCoinbase',\n            'getBlockDifficulty',\n            'getReturnDataSize',\n            'getExternalBalance',\n            'getAddress',\n        ];\n        this.hooks = [\n            'getGasLeft',\n            'callStatic',\n            'call',\n            'callDelegate',\n            'getBlockGasLimit',\n            'getBlockNumber',\n            'getBlockHash',\n            'getBlockTimestamp',\n        ];\n    }\n    async connect() {\n        let hooks = {};\n        this.hooks.forEach((method) => {\n            hooks[method] = this[method].bind(this);\n        });\n        // EEI hook function injection\n        this.eei_wrapper = await WebAssembly.instantiate(fs.readFileSync(\"lib/wrapper.wasm\"), {\n            ethereum: hooks\n        });\n    }\n    getMemory(offset, length) {\n        return new Uint8Array(this.mem.buffer, offset, length);\n    }\n    setMemory(offset, length, value) {\n        const memory = new Uint8Array(this.mem.buffer, offset, length);\n        memory.set(value);\n    }\n    takeGas(amount) {\n        if (this.env.gasLeft < amount) {\n            throw new Error('Ran out of gas')\n        }\n        this.env.gasLeft -= amount\n    }\n    useGas(gas) {\n        console.log(`useGas(${gas})`);\n        //takeGas(gas);\n    }\n    getCallDataSize() {\n        console.log(`getCallDataSize()`);\n        this.takeGas(2);\n        console.log(`{ size: ${this.env.callData.length} }`);\n        return this.env.callData.length;\n    }\n    callDataCopy(resultOffset, dataOffset, length) {\n        console.log(`callDataCopy(${resultOffset}, ${dataOffset}, ${length})`);\n        this.takeGas(3 + Math.ceil(length / 32) * 3)\n        if (length) {\n            const callData = this.env.callData.slice(dataOffset, dataOffset + length);\n            this.setMemory(resultOffset, length, callData);\n            console.log(`{ data: ${utils.toHex(callData)} }`);\n        }\n    }\n    storageStore(pathOffset, valueOffset) {\n        console.log(`storageStore(${pathOffset}, ${valueOffset})`);\n        const path = utils.toBigInt('0x' + utils.toHex(this.getMemory(pathOffset, 32))).toString(16);\n        const value = utils.toBigInt('0x' + utils.toHex(this.getMemory(valueOffset, 32))).toString(16);\n        this.env.storage[path] = value;\n        console.log(`{ key: ${path}, value: ${value} }`);\n    }\n    storageLoad(pathOffset, valueOffset) {\n        console.log(`storageLoad(${pathOffset}, ${valueOffset})`);\n        const path = utils.toBigInt('0x' + utils.toHex(this.getMemory(pathOffset, 32))).toString(16);\n        if (path in this.env.storage) {\n            let value = this.env.storage[path];\n            const data = value.padStart(64, '0').match(/.{2}/g).map(value => parseInt(value, 16));\n            this.setMemory(valueOffset, 32, data);\n            console.log(`{ key: ${path}, value: ${value} }`);\n        } else {\n            const data = Array(32).fill(0);\n            this.setMemory(valueOffset, 32, data);\n            console.log(`{ key: ${path}, value: 0 }`);\n        }\n    }\n    log(dataOffset, dataLength, numberOfTopics, topic1, topic2, topic3, topic4) {\n        console.log(`log(${dataOffset}, ${dataLength}, ${numberOfTopics}, ${topic1}, ${topic2}, ${topic3}, ${topic4})`);\n        this.takeGas(375 + (375 * numberOfTopics) + (8 * dataLength));\n        if (dataLength >= 1) {\n            const data = utils.toHex(this.getMemory(dataOffset, dataLength));\n            this.env.transactionReceipt.data = data;\n            console.log(`{ data: ${data} }`);\n        }\n        if (numberOfTopics >= 1) {\n            this.env.transactionReceipt.topics = [];\n            const t1 = utils.toHex(this.getMemory(topic1, 32));\n            this.env.transactionReceipt.topics.push(t1);\n            console.log(`{ t1/signature: ${t1} }`);\n        }\n        if (numberOfTopics >= 2) {\n            const t2 = utils.toHex(this.getMemory(topic2, 32));\n            this.env.transactionReceipt.topics.push(t2);\n            console.log(`{ t2: ${t2} }`);\n        }\n        if (numberOfTopics >= 3) {\n            const t3 = utils.toHex(this.getMemory(topic3, 32));\n            this.env.transactionReceipt.topics.push(t3);\n            console.log(`{ t3: ${t3} }`);\n        }\n        if (numberOfTopics >= 4) {\n            const t4 = utils.toHex(this.getMemory(topic4, 32));\n            this.env.transactionReceipt.topics.push(t4);\n            console.log(`{ t4: ${t4} }`);\n        }\n    }\n    finish(dataOffset, dataLength) {\n        console.log(`finish(${dataOffset}, ${dataLength})`);\n        const data = this.getMemory(dataOffset, dataLength)\n        this.env.returnData = data;\n        throw new Error('finish');\n    }\n    revert(dataOffset, dataLength) {\n        console.log(`revert(${dataOffset}, ${dataLength})`);\n        const data = this.getMemory(dataOffset, dataLength)\n        this.env.returnData = data;\n        const message = String.fromCharCode.apply(null, data);\n        this.env.transactionReceipt.revertReason = message;\n        console.log(`{ message: ${message} }`);\n        throw new Error('revert');\n        process.exit(0);\n    }\n    callStatic(gas, addressOffset, dataOffset, dataLength) {\n        console.log(`callStatic(${gas}, ${addressOffset}, ${dataOffset}, ${dataLength})`);\n        const addressInHex = '0x' + utils.toHex(this.getMemory(addressOffset, 20));\n        const address = utils.toBigInt(addressInHex);\n        const data = this.getMemory(dataOffset, dataLength);\n        console.log(`{ address: ${addressInHex}, data: ${utils.toHex(data)} }`);\n\n        let vm;\n        switch (address) {\n            case BigInt(2): // Sha256\n            case BigInt(9): // Keccak256\n                vm = precompiled.keccak256;\n                break;\n            default:\n                return 1;\n        }\n        vm.run(utils.toHex(data));\n\n        this.env.returnData = vm.env.returnData;\n        return 0;\n    }\n    call(gas, addressOffset, valueOffset, dataOffset, dataLength) {\n        console.log(`call(${gas}, ${addressOffset}, ${valueOffset}, ${dataOffset}, ${dataLength})`);\n        const addressInHex = '0x' + utils.toLEHex(this.getMemory(addressOffset, 20));\n        const address = utils.toBigInt(addressInHex);\n        const value = utils.toBigInt('0x' + utils.toHex(this.getMemory(valueOffset, 16))).toString(16);\n        const data = this.getMemory(dataOffset, dataLength);\n        console.log(`{ address: ${addressInHex}, value: ${value}, data: ${utils.toHex(data)} }`);\n\n        let vm;\n        switch (address) {\n            case BigInt(2): // Sha256\n            case BigInt(9): // Keccak256\n                // console.log(`{ address: ${addressInHex}, yayyyyy`);\n                vm = precompiled.keccak256;\n                // ethers.utils.keccak256()\n                break;\n            default:\n                return 1;\n        }\n        vm.run(utils.toHex(data));\n\n        this.env.returnData = vm.env.returnData;\n        return 0;\n    }\n    callDelegate(gas, addressOffset, dataOffset, dataLength) {\n        console.log(`callDelegate(${gas}, ${addressOffset}, ${dataOffset}, ${dataLength})`);\n        const addressInHex = '0x' + utils.toHex(this.getMemory(addressOffset, 20));\n        const address = utils.toBigInt(addressInHex);\n        const data = this.getMemory(dataOffset, dataLength);\n        console.log(`{ address: ${addressInHex}, data: ${utils.toHex(data)} }`);\n\n        let vm;\n        switch (address) {\n            case BigInt(2): // Sha256\n            case BigInt(9): // Keccak256\n                vm = precompiled.keccak256;\n                break;\n            default:\n                return 1;\n        }\n        vm.run(utils.toHex(data));\n\n        this.env.returnData = vm.env.returnData;\n        return 0;\n    }\n    getReturnDataSize() {\n        console.log(`getReturnDataSize()`);\n        this.takeGas(2);\n        console.log(`{ size: ${this.env.returnData.length} }`);\n        return this.env.returnData.length;\n    }\n    returnDataCopy(resultOffset, dataOffset, length) {\n        console.log(`returnDataCopy(${resultOffset}, ${dataOffset}, ${length})`);\n        if (length) {\n            const callData = this.env.returnData.slice(dataOffset, dataOffset + length);\n            this.setMemory(resultOffset, length, callData);\n            console.log(`{ data: ${utils.toHex(callData)} }`)\n        }\n    }\n    getCaller(resultOffset) {\n        console.log(`getCaller(${resultOffset})`);\n        const data = this.env.caller.padStart(40, '0').match(/.{2}/g).map(value => parseInt(value, 16));\n        this.setMemory(resultOffset, 20, data);\n        console.log(`{ caller: ${utils.toHex(data)} }`);\n    }\n    getCallValue(resultOffset) {\n        console.log(`getCallValue(${resultOffset})`);\n        const data = this.env.callValue.padStart(32, '0').match(/.{2}/g).map(value => parseInt(value, 16));\n        this.setMemory(resultOffset, 16, data);\n        console.log(`{ value: ${utils.toHex(data)} }`);\n    }\n    getGasLeft() {\n        console.log(`getGasLeft()`);\n        console.log(`{ gas: ${this.env.gasLeft} }`);\n        return this.env.gasLeft;\n    }\n\n    getTxGasPrice(valueOffset) {\n        console.log(`getTxGasPrice(${valueOffset})`);\n        const data = this.env.txGasPrice.padStart(32, '0').match(/.{2}/g).reverse().map(value => parseInt(value, 16));\n        this.setMemory(valueOffset, 16, data);\n        console.log(`{ price: ${utils.toHex(data)} }`);\n    }\n\n    getTxOrigin(resultOffset) {\n        console.log(`getTxOrigin(${resultOffset})`);\n        const data = this.env.txOrigin.padStart(40, '0').match(/.{2}/g).map(value => parseInt(value, 16));\n        this.setMemory(resultOffset, 20, data);\n        console.log(`{ orig: ${utils.toHex(data)} }`);\n    }\n\n    getBlockCoinbase(resultOffset) {\n        console.log(`getBlockCoinbase(${resultOffset})`);\n        const data = this.env.blockCoinbase.padStart(40, '0').match(/.{2}/g).map(value => parseInt(value, 16));\n        this.setMemory(resultOffset, 20, data);\n        console.log(`{ coinbase: ${utils.toHex(data)} }`);\n    }\n\n    getBlockDifficulty(resultOffset) {\n        console.log(`getBlockDifficulty(${resultOffset})`);\n        const data = this.env.blockDifficulty.padStart(64, '0').match(/.{2}/g).reverse().map(value => parseInt(value, 16));\n        this.setMemory(resultOffset, 32, data);\n        console.log(`{ difficulty: ${utils.toHex(data)} }`);\n    }\n\n    getBlockGasLimit() {\n        console.log(`getBlockGasLimit()`);\n        console.log(`{ gas: ${this.env.blockGasLimit} }`);\n        return this.env.blockGasLimit;\n    }\n\n    getBlockNumber() {\n        console.log(`getBlockNumber()`);\n        console.log(`{ block: ${this.env.blockNumber} }`);\n        return this.env.blockNumber;\n    }\n\n    getBlockTimestamp() {\n        console.log(`getBlockTimestamp()`);\n        console.log(`{ timestamp: ${this.env.blockTimestamp} }`);\n        return this.env.blockTimestamp;\n    }\n\n    getBlockHash(number, resultOffset) {\n        console.log(`getBlockHash(${resultOffset})`);\n        const data = this.env.blockhash.padStart(64, '0').match(/.{2}/g).map(value => parseInt(value, 16));\n        this.setMemory(resultOffset, 32, data);\n        console.log(`{ blockhash: ${utils.toHex(data)} }`);\n        return 0;\n    }\n\n    getExternalBalance(addressOffset, resultOffset) {\n        console.log(`getExternalBalance(${addressOffset}, ${resultOffset})`);\n        const addressInHex = '0x' + utils.toHex(this.getMemory(addressOffset, 20));\n        const address = utils.toBigInt(addressInHex);\n        const data = this.env.address_balance.padStart(32, '0').match(/.{2}/g).reverse().map(value => parseInt(value, 16));\n        this.setMemory(resultOffset, 16, data);\n        console.log(`{ address: ${addressInHex}, value: ${utils.toHex(data)} }`);\n    }\n\n    getAddress(resultOffset) {\n        console.log(`getAddress(${resultOffset})`);\n        const data = this.env.this_address.padStart(40, '0').match(/.{2}/g).map(value => parseInt(value, 16));\n        this.setMemory(resultOffset, 20, data);\n        console.log(`{ orig: ${utils.toHex(data)} }`);\n    }\n\n    print32(value) {\n        console.log(`print32(${(new Uint32Array([value]))[0]})`);\n    }\n}\n\nclass VM {\n    constructor(path) {\n        this.env = new Environment();\n        this.int = new Interface(this.env);\n        this.path = path;\n    }\n    async instantiate() {\n        await this.int.connect();\n        this.vm = await WebAssembly.instantiate(fs.readFileSync(this.path), this.int.exports);\n        this.int.mem = this.vm.instance.exports.memory;\n    }\n    run(callData, storage, env) {\n        if (!this.env.setCallData(callData)) {\n            return false;\n        }\n        if (storage && !this.env.setStorage(storage)) {\n            return false;\n        }\n        if (env) {\n            this.env = Object.assign(this.env, env);\n        }\n        try {\n            this.vm.instance.exports.main();\n        } catch (error) {\n            if (error.message !== \"finish\") {\n                console.log(error);\n            }\n        }\n        return true;\n    }\n}\n\nasync function main(path, callData, storage, env) {\n    for (let name in precompiled) {\n        let vm = new VM(`lib/${name}.wasm`);\n        await vm.instantiate();\n        precompiled[name] = vm;\n    }\n    let vm = new VM(path);\n    await vm.instantiate();\n    vm.run(callData, storage, env);\n    return {\n        returnData: utils.toLEHex(vm.env.returnData),\n        storage: vm.env.getStorage(),\n        transactionReceipt: vm.env.transactionReceipt\n    };\n};\n\nif (require.main === module) {\n    if (4 > process.argv.length || process.argv.length > 5) {\n        console.log(`usage: ${process.argv[1]} ewasm-file calldata [storage]`);\n        process.exit(0);\n    }\n    main(process.argv[2], process.argv[3], process.argv[4]).then(console.log).catch(console.log);\n} else {\n    module.exports = main;\n}"
  },
  {
    "path": "contracts/wasmtest/init-single.sh",
    "content": "#!/bin/bash\n\nset -xe\n\ncertikd unsafe-reset-all\nrm -rf ~/.certikd\nrm -rf ~/.certikcli\n\n# mkdir -p ~/.certikcli/config\n# cp toolsets/oracle-operator/oracle-operator.toml ~/.certikcli/config/\n\ncertikd init testnode0 --chain-id shentu\n\ncertikcli config chain-id shentu\ncertikcli config keyring-backend test\ncertikcli keys add node0 --keyring-backend test\n\ncertikd add-genesis-account $(certikcli keys show node0 --keyring-backend test -a) 2000000000000uctk\ncertikd add-genesis-certifier $(certikcli keys show node0 --keyring-backend test -a)\n\n#echo jkljkljlk | certikd gentx --name node0 --amount 1000000000000uctk\ncertikd gentx --name node0 --amount 1000000000000uctk --keyring-backend test\ncertikd collect-gentxs\n\ncertikd start\n"
  },
  {
    "path": "contracts/wasmtest/keccak256/keccak256-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\6e\\13\\60\\00\\01\\7f\\60\\01\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\0d\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\01\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\0e\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\0e\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\0f\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\0e\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\10\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\0e\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\11\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\0a\\03\\12\\11\\02\\02\\02\\01\\09\\12\\01\\12\\00\\01\\02\\03\\04\\05\\06\\07\\08\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\e3\\1f\\11\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\c0\\06\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\9e\\90\\9c\\a9\\7f\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\ff\\a7\\f1\\88\\05\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\dd\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\23\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\aa\\d7\\e4\\88\\04\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\de\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\24\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\eb\\a1\\a0\\f7\\7c\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\df\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\25\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\ea\\fb\\87\\99\\7f\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\e0\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\26\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\c4\\85\\f8\\c2\\03\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\e1\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\27\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\c7\\f5\\f5\\96\\01\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\e2\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\28\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\e0\\92\\94\\90\\03\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\e3\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\29\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\0b\\31\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\01\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\e7\\02\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\21\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\01\\0f\\0b\\80\\03\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\80\\03\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\80\\03\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\80\\03\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\e7\\02\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\21\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\01\\0f\\0b\\80\\03\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\80\\03\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\20\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\20\\01\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\41\\20\\6a\\28\\02\\00\\21\\02\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\c0\\00\\6b\\36\\02\\00\\20\\02\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const     4915))\n  )\n)"
  },
  {
    "path": "contracts/wasmtest/keccak256/keccak256-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param i32) (result i32)))\n  (type (;2;) (func (param i32 i32) (result i32)))\n  (type (;3;) (func (param i32 i32) (result i32)))\n  (type (;4;) (func (param i32 i32) (result i32)))\n  (type (;5;) (func (param i32 i32) (result i32)))\n  (type (;6;) (func (param i32) (result i32)))\n  (type (;7;) (func (param i32 i32) (result i32)))\n  (type (;8;) (func (param i32 i32) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0xf527081e\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x511c53ff\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 221 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f258)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x41192baa\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 222 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f259)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xcee810eb\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 223 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f260)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xf321fdea\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 224 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f261)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x385e02c4\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 225 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f262)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x12dd7ac7\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 226 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f263)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x32050960\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 227 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f264)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n      end\n      end\n      end\n      end\n      end\n      end\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    nop\n    nop\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    local.set 1\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n  (func $f258 (type 2)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f259 (type 3)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f260 (type 4)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f261 (type 5)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f262 (type 6)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    local.set 1\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n  (func $f263 (type 7)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n  (func $f264 (type 8)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    local.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    local.get 1\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    local.set 2\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x40\n    i32.sub\n    i32.store\n    local.get 2\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/keccak256/keccak256.ds",
    "content": "object signature OS = {\n  const hash1 : uint -> hashvalue;\n  const hash2 : uint * uint -> hashvalue;\n  const hash2_1 : uint * hashvalue -> hashvalue;\n  const hash2_2 : hashvalue * uint -> hashvalue;\n  const hash2_3 : hashvalue * hashvalue -> hashvalue;\n\n  const hash1a : address -> hashvalue;\n  const hash2a : address * address -> hashvalue;\n  const hash2_1a : address * hashvalue -> hashvalue;      \n}\n\nobject O : OS {\n\n  let blah : hashvalue := null_hash\n    \n  let hash1 x =\n    keccak256(x)\n\n  let hash2 (x, y) =\n    keccak256 (x, y)\n\n  let hash2_1 (x, y) =\n    keccak256 (x, y)\n\n  let hash2_2 (x, y) =\n    keccak256 (x, y)\n\n  let hash2_3 (x, y) =\n    keccak256 (x, y)\n\n  let hash1a x =\n    keccak256(x)\n\n  let hash2a (x, y) =\n    keccak256 (x, y)\n\n  let hash2_1a (x, y) =\n    keccak256 (x, y)\n      \n }\n\n\n    \nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "contracts/wasmtest/keccak256/keccak256.js",
    "content": "#!/usr/bin/env node\n'strict';\nlet main = require('../index');\n\nif (process.argv.length < 4) {\n    console.log(`usage: ${process.argv[1]} ewasm-file func arg1`);\n    process.exit(0);\n}\n\nfunction generate(funcSig, arg1, arg2) {\n    let callData = ''\n    switch (funcSig) {\n        case 'hash1':\n            callData += '385e02c4';\n            break;\n        // case 'mod':\n        //     callData += 'f43f523a';\n        //     break;\n        // case 'shl':\n        //     callData += '9da760ef';\n        //     break;\n        // case 'shr':\n        //     callData += '75f4479a';\n        //     break;\n        default:\n            console.log(`unknown func: ${funcSig}`);\n            process.exit(0);\n    }\n    // if (arg1 !== undefined) {\n    //     arg1 = BigInt(arg1);\n    //     callData += arg1.toString(16).padStart(64, '0');\n    // }\n    arg1 = BigInt(arg1);\n    callData += arg1.toString(16).padStart(64, '0');\n    // arg2 = BigInt(arg2);\n    // callData += arg2.toString(16).padStart(64, '0');\n    return callData;\n}\nlet callData = generate(...process.argv.slice(3, 5));\nmain(process.argv[2], callData).then(console.log).catch(console.log);\n"
  },
  {
    "path": "contracts/wasmtest/layers1/layers1-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\5b\\11\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\0d\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\0e\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\06\\03\\0e\\0d\\0f\\0f\\0f\\0a\\05\\10\\0a\\10\\00\\01\\02\\03\\04\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\c9\\13\\0d\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\a6\\01\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\f0\\bf\\c8\\b0\\02\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\bc\\cc\\b3\\ea\\06\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dd\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\23\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\0b\\90\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\51\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\10\\25\\1a\\10\\25\\1a\\10\\24\\21\\01\\20\\01\\41\\02\\46\\21\\00\\20\\00\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\00\\0f\\0b\\32\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\10\\24\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\00\\0f\\0b\\8c\\04\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\20\\00\\0f\\0b\\e9\\07\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\41\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\01\\41\\01\\6a\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\20\\6b\\36\\02\\00\\41\\00\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const     3330))\n  )\n)"
  },
  {
    "path": "contracts/wasmtest/layers1/layers1-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param ) (result i32)))\n  (type (;2;) (func (param ) (result i32)))\n  (type (;3;) (func (param ) (result i32)))\n  (type (;4;) (func (param ) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0x26121ff0\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x6d4ce63c\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 221 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f258)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    nop\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    call $f260\n    drop\n    call $f260\n    drop\n    call $f259\n    local.set 1\n    local.get 1\n    i32.const 0x02\n    i32.eq\n    local.set 0\n    local.get 0\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f258 (type 2)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    call $f259\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f259 (type 3)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f260 (type 4)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 1\n    i32.const 0x01\n    i32.add\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x20\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/layers1/layers1.ds",
    "content": "object signature LowerInterface = {\n  incr : unit -> unit; \n  const get : unit -> int\n}\n\nobject Lower : LowerInterface {\n  let n : int := 0 \n\n  let incr () =\n    let _n = n in\n    n := _n + 1 \n\n  let get () =\n    let _n = n in\n    _n\n\n}\n\nlayer LOWER : [ { } ] { lower : LowerInterface }  = {\n  lower = Lower\n}\n\nobject signature UpperInterface = {\n  f : unit -> int;\n  const get : unit -> int\n}\n\nobject Upper (lower : LowerInterface) : UpperInterface  {\n  let f () =\n    lower.incr();\n    lower.incr(); \n    let n = lower.get() in\n    assert (n = 2);\n    n\n\n  let get() =\n    lower.get()\n\n}\n\nlayer UPPER : [{ lower : LowerInterface }]\n    { upper : UpperInterface    }\n= {\n  upper = Upper\n}\n\nlayer CONTRACT = UPPER @ LOWER\n"
  },
  {
    "path": "contracts/wasmtest/layers1/layers1.js",
    "content": "#!/usr/bin/env node\n'strict';\nlet main = require('../index');\n\nif (process.argv.length < 4) {\n    console.log(`usage: ${process.argv[1]} ewasm-file func arg1`);\n    process.exit(0);\n}\n\nfunction generate(funcSig, arg1, arg2) {\n    let callData = ''\n    switch (funcSig) {\n        case 'f':\n            callData += '26121ff0';\n            break;\n        case 'get':\n            callData += '6d4ce63c';\n            break;\n        // case 'shl':\n        //     callData += '9da760ef';\n        //     break;\n        // case 'shr':\n        //     callData += '75f4479a';\n        //     break;\n        default:\n            console.log(`unknown func: ${funcSig}`);\n            process.exit(0);\n    }\n    // if (arg1 !== undefined) {\n    //     arg1 = BigInt(arg1);\n    //     callData += arg1.toString(16).padStart(64, '0');\n    // }\n    // arg1 = BigInt(arg1);\n    // callData += arg1.toString(16).padStart(64, '0');\n    // arg2 = BigInt(arg2);\n    // callData += arg2.toString(16).padStart(64, '0');\n    return callData;\n}\nlet callData = generate(...process.argv.slice(3, 4));\nmain(process.argv[2], callData).then(console.log).catch(console.log);\n"
  },
  {
    "path": "contracts/wasmtest/lib/keccak256.wat",
    "content": "(module\n  (type (;0;) (func (param i32 i32)))\n  (type (;1;) (func (param i32 i32 i32) (result i32)))\n  (type (;2;) (func (param i32 i32) (result i32)))\n  (type (;3;) (func (param i32 i32 i32 i32)))\n  (type (;4;) (func (result i32)))\n  (type (;5;) (func (param i32 i32 i32)))\n  (type (;6;) (func))\n  (type (;7;) (func (param i32)))\n  (type (;8;) (func (param i32 i32 i32 i32 i32)))\n  (type (;9;) (func (param i32 i32 i32 i32 i32) (result i32)))\n  (type (;10;) (func (param i32) (result i32)))\n  (type (;11;) (func (param i64 i32) (result i32)))\n  (type (;12;) (func (param i32) (result i64)))\n  (type (;13;) (func (param i32 i32 i32 i32) (result i32)))\n  (type (;14;) (func (param i32) (result i32)))\n  (import \"ethereum\" \"useGas\" (func (;0;) (type 7)))\n  (import \"ethereum\" \"getCallDataSize\" (func (;1;) (type 4)))\n  (import \"ethereum\" \"callDataCopy\" (func (;2;) (type 5)))\n  (import \"ethereum\" \"finish\" (func (;3;) (type 0)))\n  (func (;4;) (type 6)\n    (local i32)\n    global.get 0\n    i32.const 48\n    i32.sub\n    local.tee 0\n    global.set 0\n    call 1\n    i32.const 31\n    i32.add\n    i32.const 5\n    i32.shr_u\n    i32.const 12\n    i32.mul\n    i32.const 60\n    i32.add\n    call 0\n    local.get 0\n    call 5\n    local.get 0\n    i32.const 40\n    i32.add\n    i64.const 0\n    i64.store\n    local.get 0\n    i32.const 32\n    i32.add\n    i64.const 0\n    i64.store\n    local.get 0\n    i32.const 24\n    i32.add\n    i64.const 0\n    i64.store\n    local.get 0\n    i64.const 0\n    i64.store offset=16\n    local.get 0\n    i32.load\n    local.get 0\n    i32.load offset=8\n    local.get 0\n    i32.const 16\n    i32.add\n    local.tee 0\n    call 6\n    local.get 0\n    i32.const 32\n    call 3\n    unreachable)\n  (func (;5;) (type 7) (param i32)\n    (local i32 i32)\n    block  ;; label = @1\n      call 1\n      local.tee 1\n      i32.const -1\n      i32.gt_s\n      if  ;; label = @2\n        block  ;; label = @3\n          local.get 1\n          i32.eqz\n          if  ;; label = @4\n            i32.const 1\n            local.set 2\n            br 1 (;@3;)\n          end\n          local.get 1\n          call 23\n          local.tee 2\n          i32.eqz\n          br_if 2 (;@1;)\n        end\n        local.get 2\n        i32.const 0\n        local.get 1\n        call 2\n        local.get 0\n        local.get 1\n        i32.store offset=8\n        local.get 0\n        local.get 1\n        i32.store offset=4\n        local.get 0\n        local.get 2\n        i32.store\n        return\n      end\n      i32.const 1049288\n      call 17\n      unreachable\n    end\n    local.get 1\n    i32.const 1\n    i32.const 1051004\n    i32.load\n    local.tee 0\n    i32.const 1\n    local.get 0\n    select\n    call_indirect (type 0)\n    unreachable)\n  (func (;6;) (type 5) (param i32 i32 i32)\n    (local i32 i32 i32 i32 i32 i32 i32)\n    global.get 0\n    i32.const 480\n    i32.sub\n    local.tee 3\n    global.set 0\n    local.get 3\n    i32.const 48\n    i32.add\n    call 40\n    drop\n    local.get 3\n    i32.const 1\n    i32.store8 offset=256\n    i32.const 136\n    local.set 5\n    local.get 3\n    i32.const 136\n    i32.store offset=252\n    local.get 1\n    local.set 6\n    block  ;; label = @1\n      block  ;; label = @2\n        block  ;; label = @3\n          loop  ;; label = @4\n            local.get 4\n            local.get 1\n            i32.gt_u\n            br_if 1 (;@3;)\n            local.get 1\n            local.get 4\n            i32.sub\n            local.set 7\n            local.get 0\n            local.get 4\n            i32.add\n            local.set 8\n            local.get 6\n            local.get 5\n            i32.ge_u\n            if  ;; label = @5\n              local.get 3\n              i32.const 48\n              i32.add\n              local.tee 9\n              local.get 8\n              local.get 7\n              local.get 5\n              call 16\n              local.get 6\n              local.get 5\n              i32.sub\n              local.set 6\n              local.get 4\n              local.get 5\n              i32.add\n              local.set 4\n              local.get 9\n              call 18\n              local.get 3\n              i32.load offset=252\n              local.set 5\n              br 1 (;@4;)\n            end\n          end\n          local.get 3\n          i32.const 48\n          i32.add\n          local.tee 0\n          local.get 8\n          local.get 7\n          local.get 6\n          call 16\n          local.get 3\n          local.get 6\n          i32.store offset=248\n          local.get 3\n          i32.const 264\n          i32.add\n          local.tee 1\n          local.get 0\n          i32.const 216\n          call 41\n          drop\n          local.get 3\n          i32.load offset=468\n          local.set 4\n          local.get 3\n          i32.load8_u offset=472\n          local.set 5\n          local.get 3\n          i32.const 40\n          i32.add\n          local.get 1\n          i32.const 200\n          local.get 3\n          i32.load offset=464\n          call 7\n          local.get 3\n          i32.const 32\n          i32.add\n          local.get 3\n          i32.load offset=40\n          local.get 3\n          i32.load offset=44\n          i32.const 1\n          call 11\n          local.get 3\n          i32.load offset=36\n          i32.eqz\n          br_if 1 (;@2;)\n          local.get 3\n          i32.load offset=32\n          local.tee 6\n          local.get 6\n          i32.load8_u\n          local.get 5\n          i32.xor\n          i32.store8\n          local.get 3\n          i32.const 24\n          i32.add\n          local.get 3\n          i32.const 264\n          i32.add\n          i32.const 200\n          local.get 4\n          i32.const -1\n          i32.add\n          call 7\n          local.get 3\n          i32.const 16\n          i32.add\n          local.get 3\n          i32.load offset=24\n          local.get 3\n          i32.load offset=28\n          i32.const 1\n          call 11\n          local.get 3\n          i32.load offset=20\n          i32.eqz\n          br_if 2 (;@1;)\n          local.get 3\n          i32.load offset=16\n          local.tee 4\n          local.get 4\n          i32.load8_u\n          i32.const 128\n          i32.xor\n          i32.store8\n          local.get 3\n          i32.const 264\n          i32.add\n          call 18\n          i32.const 0\n          local.set 5\n          local.get 3\n          i32.load offset=468\n          local.set 6\n          i32.const 32\n          local.set 4\n          loop  ;; label = @4\n            local.get 3\n            i32.const 8\n            i32.add\n            local.get 2\n            i32.const 32\n            local.get 5\n            call 7\n            local.get 3\n            i32.load offset=12\n            local.set 1\n            local.get 3\n            i32.load offset=8\n            local.set 7\n            local.get 4\n            local.get 6\n            i32.ge_u\n            if  ;; label = @5\n              local.get 3\n              i32.const 264\n              i32.add\n              local.tee 0\n              local.get 7\n              local.get 1\n              local.get 3\n              i32.load offset=468\n              call 12\n              local.get 0\n              call 18\n              local.get 4\n              local.get 3\n              i32.load offset=468\n              local.tee 6\n              i32.sub\n              local.set 4\n              local.get 5\n              local.get 6\n              i32.add\n              local.set 5\n              br 1 (;@4;)\n            end\n          end\n          local.get 3\n          i32.const 264\n          i32.add\n          local.get 7\n          local.get 1\n          local.get 4\n          call 12\n          local.get 3\n          i32.const 480\n          i32.add\n          global.set 0\n          return\n        end\n        local.get 4\n        local.get 1\n        call 10\n        unreachable\n      end\n      i32.const 1048732\n      i32.const 0\n      i32.const 0\n      call 19\n      unreachable\n    end\n    i32.const 1048844\n    i32.const 0\n    i32.const 0\n    call 19\n    unreachable)\n  (func (;7;) (type 3) (param i32 i32 i32 i32)\n    (local i32)\n    global.get 0\n    i32.const 16\n    i32.sub\n    local.tee 4\n    global.set 0\n    local.get 4\n    i32.const 8\n    i32.add\n    local.get 3\n    local.get 2\n    local.get 1\n    local.get 2\n    call 8\n    local.get 0\n    local.get 4\n    i64.load offset=8\n    i64.store align=4\n    local.get 4\n    i32.const 16\n    i32.add\n    global.set 0)\n  (func (;8;) (type 8) (param i32 i32 i32 i32 i32)\n    block  ;; label = @1\n      local.get 2\n      local.get 1\n      i32.ge_u\n      if  ;; label = @2\n        local.get 4\n        local.get 2\n        i32.ge_u\n        br_if 1 (;@1;)\n        local.get 2\n        local.get 4\n        call 9\n        unreachable\n      end\n      local.get 1\n      local.get 2\n      call 10\n      unreachable\n    end\n    local.get 0\n    local.get 2\n    local.get 1\n    i32.sub\n    i32.store offset=4\n    local.get 0\n    local.get 1\n    local.get 3\n    i32.add\n    i32.store)\n  (func (;9;) (type 0) (param i32 i32)\n    (local i32)\n    global.get 0\n    i32.const 48\n    i32.sub\n    local.tee 2\n    global.set 0\n    local.get 2\n    local.get 1\n    i32.store offset=4\n    local.get 2\n    local.get 0\n    i32.store\n    local.get 2\n    i32.const 28\n    i32.add\n    i32.const 2\n    i32.store\n    local.get 2\n    i32.const 44\n    i32.add\n    i32.const 2\n    i32.store\n    local.get 2\n    i64.const 2\n    i64.store offset=12 align=4\n    local.get 2\n    i32.const 1049636\n    i32.store offset=8\n    local.get 2\n    i32.const 2\n    i32.store offset=36\n    local.get 2\n    local.get 2\n    i32.const 32\n    i32.add\n    i32.store offset=24\n    local.get 2\n    local.get 2\n    i32.const 4\n    i32.add\n    i32.store offset=40\n    local.get 2\n    local.get 2\n    i32.store offset=32\n    local.get 2\n    i32.const 8\n    i32.add\n    i32.const 1049652\n    call 15\n    unreachable)\n  (func (;10;) (type 0) (param i32 i32)\n    (local i32)\n    global.get 0\n    i32.const 48\n    i32.sub\n    local.tee 2\n    global.set 0\n    local.get 2\n    local.get 1\n    i32.store offset=4\n    local.get 2\n    local.get 0\n    i32.store\n    local.get 2\n    i32.const 28\n    i32.add\n    i32.const 2\n    i32.store\n    local.get 2\n    i32.const 44\n    i32.add\n    i32.const 2\n    i32.store\n    local.get 2\n    i64.const 2\n    i64.store offset=12 align=4\n    local.get 2\n    i32.const 1049732\n    i32.store offset=8\n    local.get 2\n    i32.const 2\n    i32.store offset=36\n    local.get 2\n    local.get 2\n    i32.const 32\n    i32.add\n    i32.store offset=24\n    local.get 2\n    local.get 2\n    i32.const 4\n    i32.add\n    i32.store offset=40\n    local.get 2\n    local.get 2\n    i32.store offset=32\n    local.get 2\n    i32.const 8\n    i32.add\n    i32.const 1049748\n    call 15\n    unreachable)\n  (func (;11;) (type 3) (param i32 i32 i32 i32)\n    (local i32)\n    global.get 0\n    i32.const 16\n    i32.sub\n    local.tee 4\n    global.set 0\n    local.get 4\n    i32.const 8\n    i32.add\n    i32.const 0\n    local.get 3\n    local.get 1\n    local.get 2\n    call 8\n    local.get 0\n    local.get 4\n    i64.load offset=8\n    i64.store align=4\n    local.get 4\n    i32.const 16\n    i32.add\n    global.set 0)\n  (func (;12;) (type 3) (param i32 i32 i32 i32)\n    (local i32 i32)\n    global.get 0\n    i32.const 112\n    i32.sub\n    local.tee 4\n    global.set 0\n    local.get 4\n    i32.const 16\n    i32.add\n    local.get 0\n    i32.const 200\n    i32.const 0\n    call 7\n    local.get 4\n    i32.const 8\n    i32.add\n    local.get 4\n    i32.load offset=16\n    local.get 4\n    i32.load offset=20\n    local.get 3\n    call 11\n    local.get 4\n    i32.load offset=8\n    local.set 5\n    local.get 4\n    i32.load offset=12\n    local.set 0\n    local.get 4\n    local.get 1\n    local.get 2\n    local.get 3\n    call 11\n    local.get 4\n    i32.load\n    local.get 4\n    local.get 4\n    i32.load offset=4\n    local.tee 1\n    i32.store offset=24\n    local.get 4\n    local.get 0\n    i32.store offset=28\n    local.get 0\n    local.get 1\n    i32.ne\n    if  ;; label = @1\n      local.get 4\n      i32.const 56\n      i32.add\n      local.tee 0\n      i32.const 20\n      i32.add\n      i32.const 3\n      i32.store\n      local.get 4\n      i32.const 68\n      i32.add\n      i32.const 4\n      i32.store\n      local.get 4\n      i32.const 32\n      i32.add\n      local.tee 1\n      i32.const 20\n      i32.add\n      i32.const 3\n      i32.store\n      local.get 4\n      i64.const 3\n      i64.store offset=36 align=4\n      local.get 4\n      i32.const 1049056\n      i32.store offset=32\n      local.get 4\n      i32.const 4\n      i32.store offset=60\n      local.get 4\n      local.get 4\n      i32.const 24\n      i32.add\n      i32.store offset=80\n      local.get 4\n      local.get 4\n      i32.const 28\n      i32.add\n      i32.store offset=84\n      local.get 4\n      i64.const 4\n      i64.store offset=104\n      local.get 4\n      i64.const 1\n      i64.store offset=92 align=4\n      local.get 4\n      i32.const 1049140\n      i32.store offset=88\n      local.get 4\n      local.get 0\n      i32.store offset=48\n      local.get 4\n      local.get 4\n      i32.const 88\n      i32.add\n      i32.store offset=72\n      local.get 4\n      local.get 4\n      i32.const 84\n      i32.add\n      i32.store offset=64\n      local.get 4\n      local.get 4\n      i32.const 80\n      i32.add\n      i32.store offset=56\n      local.get 1\n      i32.const 1049200\n      call 15\n      unreachable\n    end\n    local.get 5\n    local.get 0\n    call 41\n    drop\n    local.get 4\n    i32.const 112\n    i32.add\n    global.set 0)\n  (func (;13;) (type 2) (param i32 i32) (result i32)\n    (local i32 i32 i32)\n    global.get 0\n    i32.const 32\n    i32.sub\n    local.tee 2\n    global.set 0\n    local.get 1\n    i32.const 28\n    i32.add\n    i32.load\n    local.set 3\n    local.get 1\n    i32.load offset=24\n    local.get 2\n    i32.const 8\n    i32.add\n    local.tee 1\n    i32.const 16\n    i32.add\n    local.get 0\n    i32.const 16\n    i32.add\n    i64.load align=4\n    i64.store\n    local.get 1\n    i32.const 8\n    i32.add\n    local.get 0\n    i32.const 8\n    i32.add\n    i64.load align=4\n    i64.store\n    local.get 2\n    local.get 0\n    i64.load align=4\n    i64.store offset=8\n    local.get 3\n    local.get 1\n    call 39\n    local.get 2\n    i32.const 32\n    i32.add\n    global.set 0)\n  (func (;14;) (type 2) (param i32 i32) (result i32)\n    (local i32 i32 i32)\n    global.get 0\n    i32.const 128\n    i32.sub\n    local.tee 3\n    global.set 0\n    local.get 0\n    i32.load\n    local.set 0\n    block  ;; label = @1\n      block  ;; label = @2\n        block (result i32)  ;; label = @3\n          block  ;; label = @4\n            local.get 1\n            i32.load\n            local.tee 2\n            i32.const 16\n            i32.and\n            i32.eqz\n            if  ;; label = @5\n              local.get 2\n              i32.const 32\n              i32.and\n              br_if 1 (;@4;)\n              local.get 0\n              local.get 1\n              call 20\n              br 2 (;@3;)\n            end\n            local.get 0\n            i32.load\n            local.set 2\n            i32.const 0\n            local.set 0\n            loop  ;; label = @5\n              local.get 0\n              local.get 3\n              i32.add\n              i32.const 127\n              i32.add\n              local.get 2\n              i32.const 15\n              i32.and\n              local.tee 4\n              i32.const 48\n              i32.or\n              local.get 4\n              i32.const 87\n              i32.add\n              local.get 4\n              i32.const 10\n              i32.lt_u\n              select\n              i32.store8\n              local.get 0\n              i32.const -1\n              i32.add\n              local.set 0\n              local.get 2\n              i32.const 4\n              i32.shr_u\n              local.tee 2\n              br_if 0 (;@5;)\n            end\n            local.get 0\n            i32.const 128\n            i32.add\n            local.tee 2\n            i32.const 129\n            i32.ge_u\n            br_if 2 (;@2;)\n            local.get 1\n            i32.const 1049799\n            i32.const 2\n            local.get 0\n            local.get 3\n            i32.add\n            i32.const 128\n            i32.add\n            i32.const 0\n            local.get 0\n            i32.sub\n            call 21\n            br 1 (;@3;)\n          end\n          local.get 0\n          i32.load\n          local.set 2\n          i32.const 0\n          local.set 0\n          loop  ;; label = @4\n            local.get 0\n            local.get 3\n            i32.add\n            i32.const 127\n            i32.add\n            local.get 2\n            i32.const 15\n            i32.and\n            local.tee 4\n            i32.const 48\n            i32.or\n            local.get 4\n            i32.const 55\n            i32.add\n            local.get 4\n            i32.const 10\n            i32.lt_u\n            select\n            i32.store8\n            local.get 0\n            i32.const -1\n            i32.add\n            local.set 0\n            local.get 2\n            i32.const 4\n            i32.shr_u\n            local.tee 2\n            br_if 0 (;@4;)\n          end\n          local.get 0\n          i32.const 128\n          i32.add\n          local.tee 2\n          i32.const 129\n          i32.ge_u\n          br_if 2 (;@1;)\n          local.get 1\n          i32.const 1049799\n          i32.const 2\n          local.get 0\n          local.get 3\n          i32.add\n          i32.const 128\n          i32.add\n          i32.const 0\n          local.get 0\n          i32.sub\n          call 21\n        end\n        local.get 3\n        i32.const 128\n        i32.add\n        global.set 0\n        return\n      end\n      local.get 2\n      i32.const 128\n      call 10\n      unreachable\n    end\n    local.get 2\n    i32.const 128\n    call 10\n    unreachable)\n  (func (;15;) (type 0) (param i32 i32)\n    (local i32 i64)\n    global.get 0\n    i32.const 32\n    i32.sub\n    local.tee 2\n    global.set 0\n    local.get 1\n    i64.load align=4\n    local.set 3\n    local.get 2\n    i32.const 20\n    i32.add\n    local.get 1\n    i64.load offset=8 align=4\n    i64.store align=4\n    local.get 2\n    local.get 3\n    i64.store offset=12 align=4\n    local.get 2\n    local.get 0\n    i32.store offset=8\n    local.get 2\n    i32.const 1049368\n    i32.store offset=4\n    local.get 2\n    i32.const 1\n    i32.store\n    local.get 2\n    call 35\n    unreachable)\n  (func (;16;) (type 3) (param i32 i32 i32 i32)\n    (local i32)\n    global.get 0\n    i32.const 16\n    i32.sub\n    local.tee 4\n    global.set 0\n    local.get 4\n    i32.const 8\n    i32.add\n    local.get 0\n    i32.const 200\n    i32.const 0\n    call 7\n    local.get 4\n    local.get 4\n    i32.load offset=8\n    local.get 4\n    i32.load offset=12\n    local.get 3\n    call 11\n    local.get 4\n    i32.load offset=4\n    local.tee 3\n    local.get 2\n    i32.le_u\n    if  ;; label = @1\n      local.get 4\n      i32.load\n      local.set 2\n      loop  ;; label = @2\n        local.get 3\n        if  ;; label = @3\n          local.get 2\n          local.get 2\n          i32.load8_u\n          local.get 1\n          i32.load8_u\n          i32.xor\n          i32.store8\n          local.get 3\n          i32.const -1\n          i32.add\n          local.set 3\n          local.get 2\n          i32.const 1\n          i32.add\n          local.set 2\n          local.get 1\n          i32.const 1\n          i32.add\n          local.set 1\n          br 1 (;@2;)\n        end\n      end\n      local.get 4\n      i32.const 16\n      i32.add\n      global.set 0\n      return\n    end\n    i32.const 1048576\n    call 17\n    unreachable)\n  (func (;17;) (type 7) (param i32)\n    (local i32 i64 i64 i64)\n    global.get 0\n    i32.const 48\n    i32.sub\n    local.tee 1\n    global.set 0\n    local.get 0\n    i64.load offset=8 align=4\n    local.set 2\n    local.get 0\n    i64.load offset=16 align=4\n    local.set 3\n    local.get 0\n    i64.load align=4\n    local.set 4\n    local.get 1\n    i64.const 4\n    i64.store offset=16\n    local.get 1\n    i64.const 1\n    i64.store offset=4 align=4\n    local.get 1\n    local.get 4\n    i64.store offset=24\n    local.get 1\n    local.get 1\n    i32.const 24\n    i32.add\n    i32.store\n    local.get 1\n    local.get 3\n    i64.store offset=40\n    local.get 1\n    local.get 2\n    i64.store offset=32\n    local.get 1\n    local.get 1\n    i32.const 32\n    i32.add\n    call 15\n    unreachable)\n  (func (;18;) (type 7) (param i32)\n    (local i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64)\n    local.get 0\n    i64.load offset=192\n    local.set 12\n    local.get 0\n    i64.load offset=152\n    local.set 4\n    local.get 0\n    i64.load offset=112\n    local.set 13\n    local.get 0\n    i64.load offset=72\n    local.set 14\n    local.get 0\n    i64.load offset=32\n    local.set 8\n    local.get 0\n    i64.load offset=184\n    local.set 9\n    local.get 0\n    i64.load offset=144\n    local.set 15\n    local.get 0\n    i64.load offset=104\n    local.set 16\n    local.get 0\n    i64.load offset=64\n    local.set 11\n    local.get 0\n    i64.load offset=24\n    local.set 17\n    local.get 0\n    i64.load offset=176\n    local.set 18\n    local.get 0\n    i64.load offset=136\n    local.set 19\n    local.get 0\n    i64.load offset=96\n    local.set 20\n    local.get 0\n    i64.load offset=56\n    local.set 21\n    local.get 0\n    i64.load offset=16\n    local.set 5\n    local.get 0\n    i64.load offset=168\n    local.set 22\n    local.get 0\n    i64.load offset=128\n    local.set 23\n    local.get 0\n    i64.load offset=88\n    local.set 24\n    local.get 0\n    i64.load offset=48\n    local.set 25\n    local.get 0\n    i64.load offset=8\n    local.set 26\n    local.get 0\n    i64.load offset=160\n    local.set 10\n    local.get 0\n    i64.load offset=120\n    local.set 27\n    local.get 0\n    i64.load offset=80\n    local.set 28\n    local.get 0\n    i64.load offset=40\n    local.set 29\n    local.get 0\n    i64.load\n    local.set 30\n    i32.const -192\n    local.set 1\n    loop  ;; label = @1\n      local.get 1\n      if  ;; label = @2\n        local.get 25\n        local.get 29\n        local.get 30\n        i64.xor\n        local.get 28\n        i64.xor\n        local.get 27\n        i64.xor\n        local.get 10\n        i64.xor\n        local.tee 3\n        local.get 5\n        local.get 21\n        i64.xor\n        local.get 20\n        i64.xor\n        local.get 19\n        i64.xor\n        local.get 18\n        i64.xor\n        local.tee 6\n        i64.const 1\n        i64.rotl\n        i64.xor\n        local.tee 2\n        i64.xor\n        local.set 45\n        local.get 12\n        local.get 11\n        local.get 17\n        i64.xor\n        local.get 16\n        i64.xor\n        local.get 15\n        i64.xor\n        local.get 9\n        i64.xor\n        local.tee 7\n        local.get 3\n        i64.const 1\n        i64.rotl\n        i64.xor\n        local.tee 3\n        i64.xor\n        local.set 46\n        local.get 2\n        local.get 22\n        i64.xor\n        i64.const 2\n        i64.rotl\n        local.tee 32\n        local.get 11\n        local.get 8\n        local.get 14\n        i64.xor\n        local.get 13\n        i64.xor\n        local.get 4\n        i64.xor\n        local.get 12\n        i64.xor\n        local.tee 31\n        i64.const 1\n        i64.rotl\n        local.get 6\n        i64.xor\n        local.tee 6\n        i64.xor\n        i64.const 55\n        i64.rotl\n        local.tee 33\n        local.get 25\n        local.get 26\n        i64.xor\n        local.get 24\n        i64.xor\n        local.get 23\n        i64.xor\n        local.get 22\n        i64.xor\n        local.tee 11\n        local.get 7\n        i64.const 1\n        i64.rotl\n        i64.xor\n        local.tee 7\n        local.get 5\n        i64.xor\n        i64.const 62\n        i64.rotl\n        local.tee 34\n        i64.const -1\n        i64.xor\n        i64.and\n        i64.xor\n        local.set 12\n        local.get 27\n        local.get 11\n        i64.const 1\n        i64.rotl\n        local.get 31\n        i64.xor\n        local.tee 5\n        i64.xor\n        i64.const 41\n        i64.rotl\n        local.tee 31\n        local.get 3\n        local.get 13\n        i64.xor\n        i64.const 39\n        i64.rotl\n        local.tee 35\n        i64.const -1\n        i64.xor\n        i64.and\n        local.get 33\n        i64.xor\n        local.set 22\n        local.get 2\n        local.get 24\n        i64.xor\n        i64.const 10\n        i64.rotl\n        local.tee 36\n        local.get 6\n        local.get 9\n        i64.xor\n        i64.const 56\n        i64.rotl\n        local.tee 37\n        local.get 7\n        local.get 19\n        i64.xor\n        i64.const 15\n        i64.rotl\n        local.tee 38\n        i64.const -1\n        i64.xor\n        i64.and\n        i64.xor\n        local.set 19\n        local.get 3\n        local.get 8\n        i64.xor\n        i64.const 27\n        i64.rotl\n        local.tee 39\n        local.get 5\n        local.get 29\n        i64.xor\n        i64.const 36\n        i64.rotl\n        local.tee 40\n        i64.const -1\n        i64.xor\n        local.get 36\n        i64.and\n        i64.xor\n        local.set 27\n        local.get 5\n        local.get 10\n        i64.xor\n        i64.const 18\n        i64.rotl\n        local.tee 10\n        local.get 7\n        local.get 21\n        i64.xor\n        i64.const 6\n        i64.rotl\n        local.tee 41\n        local.get 2\n        local.get 26\n        i64.xor\n        i64.const 1\n        i64.rotl\n        local.tee 42\n        i64.const -1\n        i64.xor\n        i64.and\n        i64.xor\n        local.set 13\n        local.get 3\n        local.get 4\n        i64.xor\n        i64.const 8\n        i64.rotl\n        local.tee 43\n        local.get 6\n        local.get 16\n        i64.xor\n        i64.const 25\n        i64.rotl\n        local.tee 44\n        i64.const -1\n        i64.xor\n        i64.and\n        local.get 41\n        i64.xor\n        local.set 24\n        local.get 7\n        local.get 18\n        i64.xor\n        i64.const 61\n        i64.rotl\n        local.tee 8\n        local.get 3\n        local.get 14\n        i64.xor\n        i64.const 20\n        i64.rotl\n        local.tee 3\n        local.get 6\n        local.get 17\n        i64.xor\n        i64.const 28\n        i64.rotl\n        local.tee 4\n        i64.const -1\n        i64.xor\n        i64.and\n        i64.xor\n        local.set 14\n        local.get 2\n        local.get 23\n        i64.xor\n        i64.const 45\n        i64.rotl\n        local.tee 2\n        local.get 8\n        i64.const -1\n        i64.xor\n        local.get 4\n        i64.and\n        i64.xor\n        local.set 11\n        local.get 5\n        local.get 28\n        i64.xor\n        i64.const 3\n        i64.rotl\n        local.tee 9\n        local.get 2\n        i64.const -1\n        i64.xor\n        local.get 8\n        i64.and\n        i64.xor\n        local.set 21\n        local.get 9\n        i64.const -1\n        i64.xor\n        local.get 2\n        i64.and\n        local.get 3\n        i64.xor\n        local.set 25\n        local.get 3\n        i64.const -1\n        i64.xor\n        local.get 9\n        i64.and\n        local.get 4\n        i64.xor\n        local.set 29\n        local.get 6\n        local.get 15\n        i64.xor\n        i64.const 21\n        i64.rotl\n        local.tee 2\n        local.get 5\n        local.get 30\n        i64.xor\n        local.tee 3\n        local.get 46\n        i64.const 14\n        i64.rotl\n        local.tee 6\n        i64.const -1\n        i64.xor\n        i64.and\n        i64.xor\n        local.set 17\n        local.get 7\n        local.get 20\n        i64.xor\n        i64.const 43\n        i64.rotl\n        local.tee 7\n        local.get 2\n        i64.const -1\n        i64.xor\n        local.get 6\n        i64.and\n        i64.xor\n        local.set 5\n        local.get 7\n        i64.const -1\n        i64.xor\n        local.get 2\n        i64.and\n        local.get 45\n        i64.const 44\n        i64.rotl\n        local.tee 2\n        i64.xor\n        local.set 26\n        local.get 1\n        i32.const 1049056\n        i32.add\n        i64.load\n        local.get 2\n        i64.const -1\n        i64.xor\n        local.get 7\n        i64.and\n        local.get 3\n        i64.xor\n        i64.xor\n        local.set 30\n        local.get 1\n        i32.const 8\n        i32.add\n        local.set 1\n        local.get 39\n        i64.const -1\n        i64.xor\n        local.get 40\n        i64.and\n        local.get 37\n        i64.xor\n        local.set 4\n        local.get 3\n        i64.const -1\n        i64.xor\n        local.get 2\n        i64.and\n        local.get 6\n        i64.xor\n        local.set 8\n        local.get 32\n        i64.const -1\n        i64.xor\n        local.get 34\n        i64.and\n        local.get 31\n        i64.xor\n        local.set 9\n        local.get 37\n        i64.const -1\n        i64.xor\n        local.get 39\n        i64.and\n        local.get 38\n        i64.xor\n        local.set 15\n        local.get 10\n        i64.const -1\n        i64.xor\n        local.get 42\n        i64.and\n        local.get 43\n        i64.xor\n        local.set 16\n        local.get 31\n        i64.const -1\n        i64.xor\n        local.get 32\n        i64.and\n        local.get 35\n        i64.xor\n        local.set 18\n        local.get 43\n        i64.const -1\n        i64.xor\n        local.get 10\n        i64.and\n        local.get 44\n        i64.xor\n        local.set 20\n        local.get 36\n        i64.const -1\n        i64.xor\n        local.get 38\n        i64.and\n        local.get 40\n        i64.xor\n        local.set 23\n        local.get 33\n        i64.const -1\n        i64.xor\n        local.get 35\n        i64.and\n        local.get 34\n        i64.xor\n        local.set 10\n        local.get 41\n        i64.const -1\n        i64.xor\n        local.get 44\n        i64.and\n        local.get 42\n        i64.xor\n        local.set 28\n        br 1 (;@1;)\n      else\n        local.get 0\n        local.get 10\n        i64.store offset=160\n        local.get 0\n        local.get 27\n        i64.store offset=120\n        local.get 0\n        local.get 28\n        i64.store offset=80\n        local.get 0\n        local.get 29\n        i64.store offset=40\n        local.get 0\n        local.get 30\n        i64.store\n        local.get 0\n        local.get 22\n        i64.store offset=168\n        local.get 0\n        local.get 23\n        i64.store offset=128\n        local.get 0\n        local.get 24\n        i64.store offset=88\n        local.get 0\n        local.get 25\n        i64.store offset=48\n        local.get 0\n        local.get 26\n        i64.store offset=8\n        local.get 0\n        local.get 18\n        i64.store offset=176\n        local.get 0\n        local.get 19\n        i64.store offset=136\n        local.get 0\n        local.get 20\n        i64.store offset=96\n        local.get 0\n        local.get 21\n        i64.store offset=56\n        local.get 0\n        local.get 5\n        i64.store offset=16\n        local.get 0\n        local.get 9\n        i64.store offset=184\n        local.get 0\n        local.get 15\n        i64.store offset=144\n        local.get 0\n        local.get 16\n        i64.store offset=104\n        local.get 0\n        local.get 11\n        i64.store offset=64\n        local.get 0\n        local.get 17\n        i64.store offset=24\n        local.get 0\n        local.get 12\n        i64.store offset=192\n        local.get 0\n        local.get 4\n        i64.store offset=152\n        local.get 0\n        local.get 13\n        i64.store offset=112\n        local.get 0\n        local.get 14\n        i64.store offset=72\n        local.get 0\n        local.get 8\n        i64.store offset=32\n      end\n    end)\n  (func (;19;) (type 5) (param i32 i32 i32)\n    (local i32)\n    global.get 0\n    i32.const 48\n    i32.sub\n    local.tee 3\n    global.set 0\n    local.get 3\n    local.get 2\n    i32.store offset=4\n    local.get 3\n    local.get 1\n    i32.store\n    local.get 3\n    i32.const 28\n    i32.add\n    i32.const 2\n    i32.store\n    local.get 3\n    i32.const 44\n    i32.add\n    i32.const 2\n    i32.store\n    local.get 3\n    i64.const 2\n    i64.store offset=12 align=4\n    local.get 3\n    i32.const 1049352\n    i32.store offset=8\n    local.get 3\n    i32.const 2\n    i32.store offset=36\n    local.get 3\n    local.get 3\n    i32.const 32\n    i32.add\n    i32.store offset=24\n    local.get 3\n    local.get 3\n    i32.store offset=40\n    local.get 3\n    local.get 3\n    i32.const 4\n    i32.add\n    i32.store offset=32\n    local.get 3\n    i32.const 8\n    i32.add\n    local.get 0\n    call 15\n    unreachable)\n  (func (;20;) (type 2) (param i32 i32) (result i32)\n    local.get 0\n    i64.load32_u\n    local.get 1\n    call 36)\n  (func (;21;) (type 9) (param i32 i32 i32 i32 i32) (result i32)\n    (local i32 i32 i32 i32 i32 i32)\n    local.get 0\n    i32.load\n    local.tee 9\n    i32.const 1\n    i32.and\n    local.tee 10\n    local.get 4\n    i32.add\n    local.set 8\n    block  ;; label = @1\n      local.get 9\n      i32.const 4\n      i32.and\n      i32.eqz\n      if  ;; label = @2\n        i32.const 0\n        local.set 1\n        br 1 (;@1;)\n      end\n      local.get 2\n      if  ;; label = @2\n        local.get 2\n        local.set 6\n        local.get 1\n        local.set 7\n        loop  ;; label = @3\n          local.get 7\n          i32.load8_u\n          i32.const 192\n          i32.and\n          i32.const 128\n          i32.eq\n          local.get 5\n          i32.add\n          local.set 5\n          local.get 7\n          i32.const 1\n          i32.add\n          local.set 7\n          local.get 6\n          i32.const -1\n          i32.add\n          local.tee 6\n          br_if 0 (;@3;)\n        end\n      end\n      local.get 2\n      local.get 8\n      i32.add\n      local.get 5\n      i32.sub\n      local.set 8\n    end\n    i32.const 43\n    i32.const 1114112\n    local.get 10\n    select\n    local.set 5\n    block  ;; label = @1\n      block  ;; label = @2\n        local.get 0\n        i32.load offset=8\n        i32.const 1\n        i32.ne\n        if  ;; label = @3\n          local.get 0\n          local.get 5\n          local.get 1\n          local.get 2\n          call 38\n          br_if 1 (;@2;)\n          br 2 (;@1;)\n        end\n        local.get 0\n        i32.const 12\n        i32.add\n        i32.load\n        local.tee 6\n        local.get 8\n        i32.le_u\n        if  ;; label = @3\n          local.get 0\n          local.get 5\n          local.get 1\n          local.get 2\n          call 38\n          br_if 1 (;@2;)\n          br 2 (;@1;)\n        end\n        block  ;; label = @3\n          local.get 9\n          i32.const 8\n          i32.and\n          i32.eqz\n          if  ;; label = @4\n            local.get 6\n            local.get 8\n            i32.sub\n            local.set 6\n            i32.const 0\n            local.set 7\n            block  ;; label = @5\n              block  ;; label = @6\n                block  ;; label = @7\n                  i32.const 1\n                  local.get 0\n                  i32.load8_u offset=48\n                  local.tee 8\n                  local.get 8\n                  i32.const 3\n                  i32.eq\n                  select\n                  i32.const 1\n                  i32.sub\n                  br_table 0 (;@7;) 1 (;@6;) 0 (;@7;) 2 (;@5;)\n                end\n                local.get 6\n                local.set 7\n                i32.const 0\n                local.set 6\n                br 1 (;@5;)\n              end\n              local.get 6\n              i32.const 1\n              i32.shr_u\n              local.set 7\n              local.get 6\n              i32.const 1\n              i32.add\n              i32.const 1\n              i32.shr_u\n              local.set 6\n            end\n            local.get 7\n            i32.const 1\n            i32.add\n            local.set 7\n            loop  ;; label = @5\n              local.get 7\n              i32.const -1\n              i32.add\n              local.tee 7\n              i32.eqz\n              br_if 2 (;@3;)\n              local.get 0\n              i32.load offset=24\n              local.get 0\n              i32.load offset=4\n              local.get 0\n              i32.load offset=28\n              i32.load offset=16\n              call_indirect (type 2)\n              i32.eqz\n              br_if 0 (;@5;)\n            end\n            i32.const 1\n            return\n          end\n          local.get 0\n          i32.const 1\n          i32.store8 offset=48\n          local.get 0\n          i32.const 48\n          i32.store offset=4\n          local.get 0\n          local.get 5\n          local.get 1\n          local.get 2\n          call 38\n          br_if 1 (;@2;)\n          local.get 6\n          local.get 8\n          i32.sub\n          local.set 5\n          i32.const 0\n          local.set 7\n          block  ;; label = @4\n            block  ;; label = @5\n              block  ;; label = @6\n                i32.const 1\n                local.get 0\n                i32.load8_u offset=48\n                local.tee 6\n                local.get 6\n                i32.const 3\n                i32.eq\n                select\n                i32.const 1\n                i32.sub\n                br_table 0 (;@6;) 1 (;@5;) 0 (;@6;) 2 (;@4;)\n              end\n              local.get 5\n              local.set 7\n              i32.const 0\n              local.set 5\n              br 1 (;@4;)\n            end\n            local.get 5\n            i32.const 1\n            i32.shr_u\n            local.set 7\n            local.get 5\n            i32.const 1\n            i32.add\n            i32.const 1\n            i32.shr_u\n            local.set 5\n          end\n          local.get 7\n          i32.const 1\n          i32.add\n          local.set 7\n          block  ;; label = @4\n            loop  ;; label = @5\n              local.get 7\n              i32.const -1\n              i32.add\n              local.tee 7\n              i32.eqz\n              br_if 1 (;@4;)\n              local.get 0\n              i32.load offset=24\n              local.get 0\n              i32.load offset=4\n              local.get 0\n              i32.load offset=28\n              i32.load offset=16\n              call_indirect (type 2)\n              i32.eqz\n              br_if 0 (;@5;)\n            end\n            i32.const 1\n            return\n          end\n          local.get 0\n          i32.load offset=4\n          local.set 6\n          local.get 0\n          i32.load offset=24\n          local.get 3\n          local.get 4\n          local.get 0\n          i32.load offset=28\n          i32.load offset=12\n          call_indirect (type 1)\n          br_if 1 (;@2;)\n          local.get 5\n          i32.const 1\n          i32.add\n          local.set 5\n          local.get 0\n          i32.load offset=28\n          local.set 2\n          local.get 0\n          i32.load offset=24\n          local.set 0\n          loop  ;; label = @4\n            local.get 5\n            i32.const -1\n            i32.add\n            local.tee 5\n            i32.eqz\n            if  ;; label = @5\n              i32.const 0\n              return\n            end\n            local.get 0\n            local.get 6\n            local.get 2\n            i32.load offset=16\n            call_indirect (type 2)\n            i32.eqz\n            br_if 0 (;@4;)\n          end\n          br 1 (;@2;)\n        end\n        local.get 0\n        i32.load offset=4\n        local.set 8\n        local.get 0\n        local.get 5\n        local.get 1\n        local.get 2\n        call 38\n        br_if 0 (;@2;)\n        local.get 0\n        i32.load offset=24\n        local.get 3\n        local.get 4\n        local.get 0\n        i32.load offset=28\n        i32.load offset=12\n        call_indirect (type 1)\n        br_if 0 (;@2;)\n        local.get 6\n        i32.const 1\n        i32.add\n        local.set 5\n        local.get 0\n        i32.load offset=28\n        local.set 6\n        local.get 0\n        i32.load offset=24\n        local.set 0\n        loop  ;; label = @3\n          local.get 5\n          i32.const -1\n          i32.add\n          local.tee 5\n          i32.eqz\n          if  ;; label = @4\n            i32.const 0\n            return\n          end\n          local.get 0\n          local.get 8\n          local.get 6\n          i32.load offset=16\n          call_indirect (type 2)\n          i32.eqz\n          br_if 0 (;@3;)\n        end\n      end\n      i32.const 1\n      return\n    end\n    local.get 0\n    i32.load offset=24\n    local.get 3\n    local.get 4\n    local.get 0\n    i32.const 28\n    i32.add\n    i32.load\n    i32.load offset=12\n    call_indirect (type 1))\n  (func (;22;) (type 0) (param i32 i32)\n    nop)\n  (func (;23;) (type 14) (param i32) (result i32)\n    (local i32 i32 i32)\n    global.get 0\n    i32.const 16\n    i32.sub\n    local.tee 1\n    global.set 0\n    i32.const 1\n    local.set 2\n    block  ;; label = @1\n      local.get 0\n      i32.eqz\n      br_if 0 (;@1;)\n      local.get 0\n      i32.const 3\n      i32.add\n      i32.const 2\n      i32.shr_u\n      local.tee 0\n      i32.const -1\n      i32.add\n      local.tee 3\n      i32.const 255\n      i32.le_u\n      if  ;; label = @2\n        local.get 1\n        i32.const 1049960\n        i32.store offset=4\n        local.get 1\n        local.get 3\n        i32.const 2\n        i32.shl\n        i32.const 1049964\n        i32.add\n        local.tee 3\n        i32.load\n        i32.store offset=12\n        local.get 0\n        i32.const 1\n        local.get 1\n        i32.const 12\n        i32.add\n        local.get 1\n        i32.const 4\n        i32.add\n        i32.const 1049240\n        call 25\n        local.set 2\n        local.get 3\n        local.get 1\n        i32.load offset=12\n        i32.store\n        br 1 (;@1;)\n      end\n      local.get 1\n      i32.const 1049960\n      i32.load\n      i32.store offset=8\n      local.get 0\n      i32.const 1\n      local.get 1\n      i32.const 8\n      i32.add\n      i32.const 1049634\n      i32.const 1049264\n      call 25\n      local.set 2\n      i32.const 1049960\n      local.get 1\n      i32.load offset=8\n      i32.store\n    end\n    local.get 1\n    i32.const 16\n    i32.add\n    global.set 0\n    local.get 2)\n  (func (;24;) (type 3) (param i32 i32 i32 i32)\n    (local i32 i32)\n    global.get 0\n    i32.const 16\n    i32.sub\n    local.tee 3\n    global.set 0\n    local.get 3\n    local.get 1\n    i32.load\n    local.tee 4\n    i32.load\n    i32.store offset=12\n    i32.const 1\n    local.set 1\n    local.get 2\n    i32.const 2\n    i32.add\n    local.tee 2\n    local.get 2\n    i32.mul\n    local.tee 2\n    i32.const 2048\n    local.get 2\n    i32.const 2048\n    i32.gt_u\n    select\n    local.tee 5\n    i32.const 4\n    local.get 3\n    i32.const 12\n    i32.add\n    i32.const 1\n    i32.const 1049216\n    call 25\n    local.set 2\n    local.get 4\n    local.get 3\n    i32.load offset=12\n    i32.store\n    local.get 2\n    if  ;; label = @1\n      local.get 2\n      i64.const 0\n      i64.store offset=4 align=4\n      local.get 2\n      local.get 5\n      i32.const 2\n      i32.shl\n      local.get 2\n      i32.add\n      i32.const 2\n      i32.or\n      i32.store\n      i32.const 0\n      local.set 1\n    end\n    local.get 0\n    local.get 2\n    i32.store offset=4\n    local.get 0\n    local.get 1\n    i32.store\n    local.get 3\n    i32.const 16\n    i32.add\n    global.set 0)\n  (func (;25;) (type 9) (param i32 i32 i32 i32 i32) (result i32)\n    (local i32 i32)\n    global.get 0\n    i32.const 16\n    i32.sub\n    local.tee 6\n    global.set 0\n    block  ;; label = @1\n      local.get 0\n      local.get 1\n      local.get 2\n      local.get 3\n      local.get 4\n      call 32\n      local.tee 5\n      br_if 0 (;@1;)\n      local.get 6\n      i32.const 8\n      i32.add\n      local.get 3\n      local.get 0\n      local.get 1\n      local.get 4\n      i32.load offset=12\n      call_indirect (type 3)\n      i32.const 0\n      local.set 5\n      local.get 6\n      i32.load offset=8\n      br_if 0 (;@1;)\n      local.get 6\n      i32.load offset=12\n      local.tee 5\n      local.get 2\n      i32.load\n      i32.store offset=8\n      local.get 2\n      local.get 5\n      i32.store\n      local.get 0\n      local.get 1\n      local.get 2\n      local.get 3\n      local.get 4\n      call 32\n      local.set 5\n    end\n    local.get 6\n    i32.const 16\n    i32.add\n    global.set 0\n    local.get 5)\n  (func (;26;) (type 7) (param i32)\n    nop)\n  (func (;27;) (type 2) (param i32 i32) (result i32)\n    local.get 1)\n  (func (;28;) (type 10) (param i32) (result i32)\n    i32.const 0)\n  (func (;29;) (type 3) (param i32 i32 i32 i32)\n    block (result i32)  ;; label = @1\n      local.get 2\n      i32.const 2\n      i32.shl\n      local.tee 2\n      local.get 3\n      i32.const 3\n      i32.shl\n      i32.const 16384\n      i32.add\n      local.tee 3\n      local.get 3\n      local.get 2\n      i32.lt_u\n      select\n      i32.const 65543\n      i32.add\n      local.tee 1\n      i32.const 16\n      i32.shr_u\n      memory.grow\n      local.tee 3\n      i32.const -1\n      i32.eq\n      if  ;; label = @2\n        i32.const 0\n        local.set 3\n        i32.const 1\n        br 1 (;@1;)\n      end\n      local.get 3\n      i32.const 16\n      i32.shl\n      local.tee 3\n      i64.const 0\n      i64.store\n      local.get 3\n      i32.const 0\n      i32.store offset=8\n      local.get 3\n      local.get 1\n      i32.const -65536\n      i32.and\n      local.get 3\n      i32.add\n      i32.const 2\n      i32.or\n      i32.store\n      i32.const 0\n    end\n    local.set 2\n    local.get 0\n    local.get 3\n    i32.store offset=4\n    local.get 0\n    local.get 2\n    i32.store)\n  (func (;30;) (type 2) (param i32 i32) (result i32)\n    i32.const 512)\n  (func (;31;) (type 10) (param i32) (result i32)\n    i32.const 1)\n  (func (;32;) (type 9) (param i32 i32 i32 i32 i32) (result i32)\n    (local i32 i32 i32 i32 i32 i32 i32)\n    local.get 1\n    i32.const -1\n    i32.add\n    local.set 8\n    local.get 0\n    i32.const 2\n    i32.shl\n    local.set 7\n    i32.const 0\n    local.get 1\n    i32.sub\n    local.set 9\n    local.get 2\n    i32.load\n    local.set 5\n    loop  ;; label = @1\n      block  ;; label = @2\n        local.get 5\n        i32.eqz\n        br_if 0 (;@2;)\n        local.get 5\n        local.set 1\n        loop  ;; label = @3\n          block  ;; label = @4\n            local.get 1\n            i32.load offset=8\n            local.tee 5\n            i32.const 1\n            i32.and\n            i32.eqz\n            if  ;; label = @5\n              local.get 1\n              i32.load\n              i32.const -4\n              i32.and\n              local.tee 10\n              local.get 1\n              i32.const 8\n              i32.add\n              local.tee 6\n              i32.sub\n              local.get 7\n              i32.lt_u\n              br_if 1 (;@4;)\n              block  ;; label = @6\n                local.get 3\n                local.get 0\n                local.get 4\n                i32.load offset=16\n                call_indirect (type 2)\n                i32.const 2\n                i32.shl\n                local.get 6\n                i32.add\n                i32.const 8\n                i32.add\n                local.get 10\n                local.get 7\n                i32.sub\n                local.get 9\n                i32.and\n                local.tee 5\n                i32.gt_u\n                if  ;; label = @7\n                  local.get 6\n                  i32.load\n                  local.set 5\n                  local.get 6\n                  local.get 8\n                  i32.and\n                  br_if 3 (;@4;)\n                  local.get 2\n                  local.get 5\n                  i32.const -4\n                  i32.and\n                  i32.store\n                  local.get 1\n                  local.set 5\n                  br 1 (;@6;)\n                end\n                local.get 5\n                i32.const 0\n                i32.store\n                local.get 5\n                i32.const -8\n                i32.add\n                local.tee 5\n                i64.const 0\n                i64.store align=4\n                local.get 5\n                local.get 1\n                i32.load\n                i32.const -4\n                i32.and\n                i32.store\n                block  ;; label = @7\n                  local.get 1\n                  i32.load\n                  local.tee 6\n                  i32.const -4\n                  i32.and\n                  local.tee 2\n                  i32.eqz\n                  br_if 0 (;@7;)\n                  local.get 6\n                  i32.const 2\n                  i32.and\n                  br_if 0 (;@7;)\n                  local.get 2\n                  local.get 2\n                  i32.load offset=4\n                  i32.const 3\n                  i32.and\n                  local.get 5\n                  i32.or\n                  i32.store offset=4\n                end\n                local.get 5\n                local.get 5\n                i32.load offset=4\n                i32.const 3\n                i32.and\n                local.get 1\n                i32.or\n                i32.store offset=4\n                local.get 1\n                local.get 1\n                i32.load offset=8\n                i32.const -2\n                i32.and\n                i32.store offset=8\n                local.get 1\n                local.get 1\n                i32.load\n                local.tee 2\n                i32.const 3\n                i32.and\n                local.get 5\n                i32.or\n                local.tee 6\n                i32.store\n                local.get 2\n                i32.const 2\n                i32.and\n                i32.eqz\n                br_if 0 (;@6;)\n                local.get 1\n                local.get 6\n                i32.const -3\n                i32.and\n                i32.store\n                local.get 5\n                local.get 5\n                i32.load\n                i32.const 2\n                i32.or\n                i32.store\n              end\n              local.get 5\n              local.get 5\n              i32.load\n              i32.const 1\n              i32.or\n              i32.store\n              local.get 5\n              i32.const 8\n              i32.add\n              local.set 11\n              br 3 (;@2;)\n            end\n            local.get 1\n            local.get 5\n            i32.const -2\n            i32.and\n            i32.store offset=8\n            block (result i32)  ;; label = @5\n              i32.const 0\n              local.get 1\n              i32.load offset=4\n              i32.const -4\n              i32.and\n              local.tee 5\n              i32.eqz\n              br_if 0 (;@5;)\n              drop\n              i32.const 0\n              local.get 5\n              local.get 5\n              i32.load8_u\n              i32.const 1\n              i32.and\n              select\n            end\n            local.set 5\n            local.get 1\n            call 33\n            local.get 1\n            i32.load8_u\n            i32.const 2\n            i32.and\n            if  ;; label = @5\n              local.get 5\n              local.get 5\n              i32.load\n              i32.const 2\n              i32.or\n              i32.store\n            end\n            local.get 2\n            local.get 5\n            i32.store\n            local.get 5\n            local.set 1\n            br 1 (;@3;)\n          end\n        end\n        local.get 2\n        local.get 5\n        i32.store\n        br 1 (;@1;)\n      end\n    end\n    local.get 11)\n  (func (;33;) (type 7) (param i32)\n    (local i32 i32)\n    block  ;; label = @1\n      local.get 0\n      i32.load\n      local.tee 2\n      i32.const -4\n      i32.and\n      local.tee 1\n      i32.eqz\n      br_if 0 (;@1;)\n      local.get 2\n      i32.const 2\n      i32.and\n      br_if 0 (;@1;)\n      local.get 1\n      local.get 1\n      i32.load offset=4\n      i32.const 3\n      i32.and\n      local.get 0\n      i32.load offset=4\n      i32.const -4\n      i32.and\n      i32.or\n      i32.store offset=4\n    end\n    local.get 0\n    i32.load offset=4\n    local.tee 1\n    i32.const -4\n    i32.and\n    local.tee 2\n    if  ;; label = @1\n      local.get 2\n      local.get 2\n      i32.load\n      i32.const 3\n      i32.and\n      local.get 0\n      i32.load\n      i32.const -4\n      i32.and\n      i32.or\n      i32.store\n      local.get 0\n      i32.load offset=4\n      local.set 1\n    end\n    local.get 0\n    local.get 1\n    i32.const 3\n    i32.and\n    i32.store offset=4\n    local.get 0\n    local.get 0\n    i32.load\n    i32.const 3\n    i32.and\n    i32.store)\n  (func (;34;) (type 6)\n    (local i32 i32)\n    i32.const 1\n    local.set 0\n    block  ;; label = @1\n      block  ;; label = @2\n        i32.const 1050992\n        i32.load\n        i32.const 1\n        i32.ne\n        if  ;; label = @3\n          i32.const 1050992\n          i64.const 4294967297\n          i64.store\n          br 1 (;@2;)\n        end\n        i32.const 1050996\n        i32.const 1050996\n        i32.load\n        i32.const 1\n        i32.add\n        local.tee 0\n        i32.store\n        local.get 0\n        i32.const 2\n        i32.gt_u\n        br_if 1 (;@1;)\n      end\n      i32.const 1051000\n      i32.load\n      local.tee 1\n      i32.const -1\n      i32.le_s\n      br_if 0 (;@1;)\n      i32.const 1051000\n      local.get 1\n      i32.store\n      local.get 0\n      i32.const 1\n      i32.gt_u\n      br_if 0 (;@1;)\n      unreachable\n    end\n    unreachable)\n  (func (;35;) (type 7) (param i32)\n    (local i32)\n    global.get 0\n    i32.const 16\n    i32.sub\n    local.tee 1\n    global.set 0\n    local.get 0\n    i32.load offset=8\n    i32.eqz\n    if  ;; label = @1\n      i32.const 1049804\n      call 17\n      unreachable\n    end\n    local.get 1\n    local.get 0\n    i32.const 20\n    i32.add\n    i64.load align=4\n    i64.store offset=8\n    local.get 1\n    local.get 0\n    i64.load offset=12 align=4\n    i64.store\n    call 34\n    unreachable)\n  (func (;36;) (type 11) (param i64 i32) (result i32)\n    (local i32 i32 i32 i32 i32 i64)\n    global.get 0\n    i32.const 48\n    i32.sub\n    local.tee 4\n    global.set 0\n    i32.const 39\n    local.set 2\n    block  ;; label = @1\n      local.get 0\n      i64.const 10000\n      i64.lt_u\n      if  ;; label = @2\n        local.get 0\n        local.set 7\n        br 1 (;@1;)\n      end\n      loop  ;; label = @2\n        local.get 4\n        i32.const 9\n        i32.add\n        local.get 2\n        i32.add\n        local.tee 3\n        i32.const -4\n        i32.add\n        local.get 0\n        i64.const 10000\n        i64.div_u\n        local.tee 7\n        i64.const -10000\n        i64.mul\n        local.get 0\n        i64.add\n        i32.wrap_i64\n        local.tee 5\n        i32.const 65535\n        i32.and\n        i32.const 100\n        i32.div_u\n        local.tee 6\n        i32.const 1\n        i32.shl\n        i32.const 1049434\n        i32.add\n        i32.load16_u align=1\n        i32.store16 align=1\n        local.get 3\n        i32.const -2\n        i32.add\n        local.get 6\n        i32.const -100\n        i32.mul\n        local.get 5\n        i32.add\n        i32.const 65535\n        i32.and\n        i32.const 1\n        i32.shl\n        i32.const 1049434\n        i32.add\n        i32.load16_u align=1\n        i32.store16 align=1\n        local.get 2\n        i32.const -4\n        i32.add\n        local.set 2\n        local.get 0\n        i64.const 99999999\n        i64.gt_u\n        local.get 7\n        local.set 0\n        br_if 0 (;@2;)\n      end\n    end\n    local.get 7\n    i32.wrap_i64\n    local.tee 3\n    i32.const 99\n    i32.gt_s\n    if  ;; label = @1\n      local.get 7\n      i32.wrap_i64\n      local.tee 5\n      i32.const 65535\n      i32.and\n      i32.const 100\n      i32.div_u\n      local.set 3\n      local.get 2\n      i32.const -2\n      i32.add\n      local.tee 2\n      local.get 4\n      i32.const 9\n      i32.add\n      i32.add\n      local.get 3\n      i32.const -100\n      i32.mul\n      local.get 5\n      i32.add\n      i32.const 65535\n      i32.and\n      i32.const 1\n      i32.shl\n      i32.const 1049434\n      i32.add\n      i32.load16_u align=1\n      i32.store16 align=1\n    end\n    block  ;; label = @1\n      local.get 3\n      i32.const 10\n      i32.ge_s\n      if  ;; label = @2\n        local.get 2\n        i32.const -2\n        i32.add\n        local.tee 2\n        local.get 4\n        i32.const 9\n        i32.add\n        i32.add\n        local.get 3\n        i32.const 1\n        i32.shl\n        i32.const 1049434\n        i32.add\n        i32.load16_u align=1\n        i32.store16 align=1\n        br 1 (;@1;)\n      end\n      local.get 2\n      i32.const -1\n      i32.add\n      local.tee 2\n      local.get 4\n      i32.const 9\n      i32.add\n      i32.add\n      local.get 3\n      i32.const 48\n      i32.add\n      i32.store8\n    end\n    local.get 1\n    i32.const 1049634\n    i32.const 0\n    local.get 4\n    i32.const 9\n    i32.add\n    local.get 2\n    i32.add\n    i32.const 39\n    local.get 2\n    i32.sub\n    call 21\n    local.get 4\n    i32.const 48\n    i32.add\n    global.set 0)\n  (func (;37;) (type 12) (param i32) (result i64)\n    i64.const 3105409919041120946)\n  (func (;38;) (type 13) (param i32 i32 i32 i32) (result i32)\n    block (result i32)  ;; label = @1\n      local.get 1\n      i32.const 1114112\n      i32.ne\n      if  ;; label = @2\n        i32.const 1\n        local.get 0\n        i32.load offset=24\n        local.get 1\n        local.get 0\n        i32.const 28\n        i32.add\n        i32.load\n        i32.load offset=16\n        call_indirect (type 2)\n        br_if 1 (;@1;)\n        drop\n      end\n      local.get 2\n      i32.eqz\n      if  ;; label = @2\n        i32.const 0\n        return\n      end\n      local.get 0\n      i32.load offset=24\n      local.get 2\n      local.get 3\n      local.get 0\n      i32.const 28\n      i32.add\n      i32.load\n      i32.load offset=12\n      call_indirect (type 1)\n    end)\n  (func (;39;) (type 1) (param i32 i32 i32) (result i32)\n    (local i32 i32 i32 i32 i32 i32 i32 i32)\n    global.get 0\n    i32.const -64\n    i32.add\n    local.tee 3\n    global.set 0\n    local.get 3\n    i32.const 36\n    i32.add\n    local.get 1\n    i32.store\n    local.get 3\n    i32.const 52\n    i32.add\n    local.get 2\n    i32.const 20\n    i32.add\n    i32.load\n    local.tee 4\n    i32.store\n    local.get 3\n    i32.const 3\n    i32.store8 offset=56\n    local.get 3\n    i32.const 44\n    i32.add\n    local.get 2\n    i32.load offset=16\n    local.tee 5\n    local.get 4\n    i32.const 3\n    i32.shl\n    i32.add\n    i32.store\n    local.get 3\n    i64.const 137438953472\n    i64.store offset=8\n    local.get 3\n    local.get 0\n    i32.store offset=32\n    local.get 3\n    i32.const 0\n    i32.store offset=24\n    local.get 3\n    i32.const 0\n    i32.store offset=16\n    local.get 3\n    local.get 5\n    i32.store offset=48\n    local.get 3\n    local.get 5\n    i32.store offset=40\n    block  ;; label = @1\n      block  ;; label = @2\n        block  ;; label = @3\n          block  ;; label = @4\n            local.get 2\n            i32.load offset=8\n            local.tee 6\n            i32.eqz\n            if  ;; label = @5\n              local.get 2\n              i32.load\n              local.set 8\n              local.get 2\n              i32.load offset=4\n              local.tee 9\n              local.get 4\n              local.get 4\n              local.get 9\n              i32.gt_u\n              select\n              local.tee 10\n              i32.eqz\n              br_if 1 (;@4;)\n              i32.const 1\n              local.set 4\n              local.get 0\n              local.get 8\n              i32.load\n              local.get 8\n              i32.load offset=4\n              local.get 1\n              i32.load offset=12\n              call_indirect (type 1)\n              br_if 4 (;@1;)\n              local.get 8\n              i32.const 8\n              i32.add\n              local.set 2\n              i32.const 1\n              local.set 7\n              loop  ;; label = @6\n                local.get 5\n                i32.load\n                local.get 3\n                i32.const 8\n                i32.add\n                local.get 5\n                i32.const 4\n                i32.add\n                i32.load\n                call_indirect (type 2)\n                br_if 5 (;@1;)\n                local.get 7\n                local.get 10\n                i32.ge_u\n                br_if 2 (;@4;)\n                local.get 2\n                i32.const 4\n                i32.add\n                local.set 0\n                local.get 2\n                i32.load\n                local.set 1\n                local.get 5\n                i32.const 8\n                i32.add\n                local.set 5\n                local.get 2\n                i32.const 8\n                i32.add\n                local.set 2\n                local.get 7\n                i32.const 1\n                i32.add\n                local.set 7\n                local.get 3\n                i32.load offset=32\n                local.get 1\n                local.get 0\n                i32.load\n                local.get 3\n                i32.load offset=36\n                i32.load offset=12\n                call_indirect (type 1)\n                i32.eqz\n                br_if 0 (;@6;)\n              end\n              br 4 (;@1;)\n            end\n            local.get 2\n            i32.load\n            local.set 8\n            local.get 2\n            i32.load offset=4\n            local.tee 9\n            local.get 2\n            i32.const 12\n            i32.add\n            i32.load\n            local.tee 5\n            local.get 5\n            local.get 9\n            i32.gt_u\n            select\n            local.tee 10\n            i32.eqz\n            br_if 0 (;@4;)\n            i32.const 1\n            local.set 4\n            local.get 0\n            local.get 8\n            i32.load\n            local.get 8\n            i32.load offset=4\n            local.get 1\n            i32.load offset=12\n            call_indirect (type 1)\n            br_if 3 (;@1;)\n            local.get 6\n            i32.const 16\n            i32.add\n            local.set 5\n            local.get 8\n            i32.const 8\n            i32.add\n            local.set 2\n            i32.const 1\n            local.set 7\n            loop  ;; label = @5\n              local.get 3\n              local.get 5\n              i32.const -8\n              i32.add\n              i32.load\n              i32.store offset=12\n              local.get 3\n              local.get 5\n              i32.const 16\n              i32.add\n              i32.load8_u\n              i32.store8 offset=56\n              local.get 3\n              local.get 5\n              i32.const -4\n              i32.add\n              i32.load\n              i32.store offset=8\n              i32.const 0\n              local.set 1\n              i32.const 0\n              local.set 4\n              block  ;; label = @6\n                block  ;; label = @7\n                  block  ;; label = @8\n                    block  ;; label = @9\n                      local.get 5\n                      i32.const 8\n                      i32.add\n                      i32.load\n                      i32.const 1\n                      i32.sub\n                      br_table 1 (;@8;) 2 (;@7;) 3 (;@6;) 0 (;@9;)\n                    end\n                    local.get 5\n                    i32.const 12\n                    i32.add\n                    i32.load\n                    local.set 0\n                    i32.const 1\n                    local.set 4\n                    br 2 (;@6;)\n                  end\n                  local.get 5\n                  i32.const 12\n                  i32.add\n                  i32.load\n                  local.tee 6\n                  local.get 3\n                  i32.load offset=52\n                  local.tee 4\n                  i32.lt_u\n                  if  ;; label = @8\n                    i32.const 0\n                    local.set 4\n                    local.get 3\n                    i32.load offset=48\n                    local.get 6\n                    i32.const 3\n                    i32.shl\n                    i32.add\n                    local.tee 6\n                    i32.load offset=4\n                    i32.const 5\n                    i32.ne\n                    br_if 2 (;@6;)\n                    local.get 6\n                    i32.load\n                    i32.load\n                    local.set 0\n                    i32.const 1\n                    local.set 4\n                    br 2 (;@6;)\n                  end\n                  i32.const 1049828\n                  local.get 6\n                  local.get 4\n                  call 19\n                  unreachable\n                end\n                local.get 3\n                i32.load offset=40\n                local.tee 6\n                local.get 3\n                i32.load offset=44\n                i32.eq\n                br_if 0 (;@6;)\n                local.get 3\n                local.get 6\n                i32.const 8\n                i32.add\n                i32.store offset=40\n                local.get 6\n                i32.load offset=4\n                i32.const 5\n                i32.ne\n                br_if 0 (;@6;)\n                local.get 6\n                i32.load\n                i32.load\n                local.set 0\n                i32.const 1\n                local.set 4\n              end\n              local.get 3\n              local.get 0\n              i32.store offset=20\n              local.get 3\n              local.get 4\n              i32.store offset=16\n              block  ;; label = @6\n                block (result i32)  ;; label = @7\n                  block  ;; label = @8\n                    block  ;; label = @9\n                      block  ;; label = @10\n                        block  ;; label = @11\n                          block  ;; label = @12\n                            local.get 5\n                            i32.load\n                            i32.const 1\n                            i32.sub\n                            br_table 1 (;@11;) 0 (;@12;) 6 (;@6;) 4 (;@8;)\n                          end\n                          local.get 3\n                          i32.load offset=40\n                          local.tee 0\n                          local.get 3\n                          i32.load offset=44\n                          i32.ne\n                          br_if 1 (;@10;)\n                          br 5 (;@6;)\n                        end\n                        local.get 5\n                        i32.const 4\n                        i32.add\n                        i32.load\n                        local.tee 0\n                        local.get 3\n                        i32.load offset=52\n                        local.tee 4\n                        i32.ge_u\n                        br_if 1 (;@9;)\n                        local.get 3\n                        i32.load offset=48\n                        local.get 0\n                        i32.const 3\n                        i32.shl\n                        i32.add\n                        local.tee 0\n                        i32.load offset=4\n                        i32.const 5\n                        i32.ne\n                        br_if 4 (;@6;)\n                        local.get 0\n                        i32.load\n                        i32.load\n                        br 3 (;@7;)\n                      end\n                      local.get 3\n                      local.get 0\n                      i32.const 8\n                      i32.add\n                      i32.store offset=40\n                      local.get 0\n                      i32.load offset=4\n                      i32.const 5\n                      i32.ne\n                      br_if 3 (;@6;)\n                      local.get 0\n                      i32.load\n                      i32.load\n                      br 2 (;@7;)\n                    end\n                    i32.const 1049828\n                    local.get 0\n                    local.get 4\n                    call 19\n                    unreachable\n                  end\n                  local.get 5\n                  i32.const 4\n                  i32.add\n                  i32.load\n                end\n                local.set 4\n                i32.const 1\n                local.set 1\n              end\n              local.get 3\n              local.get 4\n              i32.store offset=28\n              local.get 3\n              local.get 1\n              i32.store offset=24\n              block  ;; label = @6\n                local.get 5\n                i32.const -16\n                i32.add\n                i32.load\n                i32.const 1\n                i32.ne\n                if  ;; label = @7\n                  local.get 3\n                  i32.load offset=40\n                  local.tee 4\n                  local.get 3\n                  i32.load offset=44\n                  i32.eq\n                  br_if 4 (;@3;)\n                  local.get 3\n                  local.get 4\n                  i32.const 8\n                  i32.add\n                  i32.store offset=40\n                  br 1 (;@6;)\n                end\n                local.get 5\n                i32.const -12\n                i32.add\n                i32.load\n                local.tee 4\n                local.get 3\n                i32.load offset=52\n                local.tee 0\n                i32.ge_u\n                br_if 4 (;@2;)\n                local.get 3\n                i32.load offset=48\n                local.get 4\n                i32.const 3\n                i32.shl\n                i32.add\n                local.set 4\n              end\n              local.get 4\n              i32.load\n              local.get 3\n              i32.const 8\n              i32.add\n              local.get 4\n              i32.const 4\n              i32.add\n              i32.load\n              call_indirect (type 2)\n              if  ;; label = @6\n                i32.const 1\n                local.set 4\n                br 5 (;@1;)\n              end\n              local.get 7\n              local.get 10\n              i32.ge_u\n              br_if 1 (;@4;)\n              local.get 2\n              i32.const 4\n              i32.add\n              local.set 0\n              local.get 2\n              i32.load\n              local.set 1\n              local.get 5\n              i32.const 36\n              i32.add\n              local.set 5\n              local.get 2\n              i32.const 8\n              i32.add\n              local.set 2\n              i32.const 1\n              local.set 4\n              local.get 7\n              i32.const 1\n              i32.add\n              local.set 7\n              local.get 3\n              i32.load offset=32\n              local.get 1\n              local.get 0\n              i32.load\n              local.get 3\n              i32.load offset=36\n              i32.load offset=12\n              call_indirect (type 1)\n              i32.eqz\n              br_if 0 (;@5;)\n            end\n            br 3 (;@1;)\n          end\n          local.get 9\n          local.get 7\n          i32.gt_u\n          if  ;; label = @4\n            i32.const 1\n            local.set 4\n            local.get 3\n            i32.load offset=32\n            local.get 7\n            i32.const 3\n            i32.shl\n            local.get 8\n            i32.add\n            local.tee 5\n            i32.load\n            local.get 5\n            i32.load offset=4\n            local.get 3\n            i32.load offset=36\n            i32.load offset=12\n            call_indirect (type 1)\n            br_if 3 (;@1;)\n          end\n          i32.const 0\n          local.set 4\n          br 2 (;@1;)\n        end\n        i32.const 1049804\n        call 17\n        unreachable\n      end\n      i32.const 1049844\n      local.get 4\n      local.get 0\n      call 19\n      unreachable\n    end\n    local.get 3\n    i32.const -64\n    i32.sub\n    global.set 0\n    local.get 4)\n  (func (;40;) (type 10) (param i32) (result i32)\n    (local i32 i32)\n    i32.const 204\n    local.set 2\n    local.get 0\n    local.set 1\n    loop  ;; label = @1\n      local.get 1\n      i32.const 0\n      i32.store8\n      local.get 1\n      i32.const 1\n      i32.add\n      local.set 1\n      local.get 2\n      i32.const -1\n      i32.add\n      local.tee 2\n      br_if 0 (;@1;)\n    end\n    local.get 0)\n  (func (;41;) (type 1) (param i32 i32 i32) (result i32)\n    (local i32)\n    local.get 2\n    if  ;; label = @1\n      local.get 0\n      local.set 3\n      loop  ;; label = @2\n        local.get 3\n        local.get 1\n        i32.load8_u\n        i32.store8\n        local.get 3\n        i32.const 1\n        i32.add\n        local.set 3\n        local.get 1\n        i32.const 1\n        i32.add\n        local.set 1\n        local.get 2\n        i32.const -1\n        i32.add\n        local.tee 2\n        br_if 0 (;@2;)\n      end\n    end\n    local.get 0)\n  (table (;0;) 17 17 anyfunc)\n  (memory (;0;) 17)\n  (global (;0;) (mut i32) (i32.const 1048576))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func 4))\n  (elem (;0;) (i32.const 1) 22 20 13 14 20 26 29 30 31 26 24 27 28 26 26 37)\n  (data (;0;) (i32.const 1048576) \"\\18\\00\\10\\00(\\00\\00\\00@\\00\\10\\00Y\\00\\00\\00\\9e\\00\\00\\00\\0d\\00\\00\\00assertion failed: dst.len() <= src.len()/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/tiny-keccak-1.5.0/src/lib.rs\\00\\00\\00\\b0\\00\\10\\00Y\\00\\00\\00\\ad\\00\\00\\00(\\00\\00\\00\\00\\00\\00\\00/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/tiny-keccak-1.5.0/src/lib.rs\\00\\00\\00\\b0\\00\\10\\00Y\\00\\00\\00\\ae\\00\\00\\00*\\00\\00\\00\\00\\00\\00\\00\\01\\00\\00\\00\\00\\00\\00\\00\\82\\80\\00\\00\\00\\00\\00\\00\\8a\\80\\00\\00\\00\\00\\00\\80\\00\\80\\00\\80\\00\\00\\00\\80\\8b\\80\\00\\00\\00\\00\\00\\00\\01\\00\\00\\80\\00\\00\\00\\00\\81\\80\\00\\80\\00\\00\\00\\80\\09\\80\\00\\00\\00\\00\\00\\80\\8a\\00\\00\\00\\00\\00\\00\\00\\88\\00\\00\\00\\00\\00\\00\\00\\09\\80\\00\\80\\00\\00\\00\\00\\0a\\00\\00\\80\\00\\00\\00\\00\\8b\\80\\00\\80\\00\\00\\00\\00\\8b\\00\\00\\00\\00\\00\\00\\80\\89\\80\\00\\00\\00\\00\\00\\80\\03\\80\\00\\00\\00\\00\\00\\80\\02\\80\\00\\00\\00\\00\\00\\80\\80\\00\\00\\00\\00\\00\\00\\80\\0a\\80\\00\\00\\00\\00\\00\\00\\0a\\00\\00\\80\\00\\00\\00\\80\\81\\80\\00\\80\\00\\00\\00\\80\\80\\80\\00\\00\\00\\00\\00\\80\\01\\00\\00\\80\\00\\00\\00\\00\\08\\80\\00\\80\\00\\00\\00\\80\\f8\\01\\10\\00-\\00\\00\\00%\\02\\10\\00\\0c\\00\\00\\001\\02\\10\\00\\03\\00\\00\\00assertion failed: `(left == right)`\\0a  left: ``,\\0a right: ``: <\\02\\10\\004\\00\\00\\00destination and source slices have different lengthsD\\04\\10\\00\\18\\00\\00\\00X\\08\\00\\00\\09\\00\\00\\00\\06\\00\\00\\00\\00\\00\\00\\00\\01\\00\\00\\00\\07\\00\\00\\00\\08\\00\\00\\00\\09\\00\\00\\00\\0a\\00\\00\\00\\04\\00\\00\\00\\04\\00\\00\\00\\0b\\00\\00\\00\\0c\\00\\00\\00\\0d\\00\\00\\00\\0e\\00\\00\\00\\00\\00\\00\\00\\01\\00\\00\\00\\07\\00\\00\\00\\08\\00\\00\\00\\09\\00\\00\\00\\e0\\02\\10\\00\\11\\00\\00\\00\\f1\\02\\10\\00\\17\\00\\00\\00\\f2\\02\\00\\00\\05\\00\\00\\00capacity overflowsrc/liballoc/raw_vec.rs(\\03\\10\\00 \\00\\00\\00H\\03\\10\\00\\12\\00\\00\\00\\0f\\00\\00\\00\\00\\00\\00\\00\\01\\00\\00\\00\\10\\00\\00\\00index out of bounds: the len is  but the index is 00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899\\00\\00\\5c\\04\\10\\00\\06\\00\\00\\00b\\04\\10\\00\\22\\00\\00\\00D\\04\\10\\00\\18\\00\\00\\00\\17\\0a\\00\\00\\05\\00\\00\\00src/libcore/slice/mod.rsindex  out of range for slice of length \\a4\\04\\10\\00\\16\\00\\00\\00\\ba\\04\\10\\00\\0d\\00\\00\\00D\\04\\10\\00\\18\\00\\00\\00\\1d\\0a\\00\\00\\05\\00\\00\\00slice index starts at  but ends at 0x\\00\\00\\00&\\05\\10\\00+\\00\\00\\00Q\\05\\10\\00\\15\\00\\00\\00z\\01\\00\\00\\15\\00\\00\\00\\10\\05\\10\\00\\16\\00\\00\\00a\\04\\00\\00\\11\\00\\00\\00\\10\\05\\10\\00\\16\\00\\00\\00U\\04\\00\\00(\")\n  (data (;1;) (i32.const 1049872) \"src/libcore/fmt/mod.rscalled `Option::unwrap()` on a `None` valuesrc/libcore/option.rs\"))\n"
  },
  {
    "path": "contracts/wasmtest/lib/wrapper.wat",
    "content": "(module\n  (func $callHook (import \"ethereum\" \"call\") (param i32 i32 i32 i32 i32) (result i32))\n  (func $callDelegateHook (import \"ethereum\" \"callDelegate\") (param i32 i32 i32 i32) (result i32))\n  (func $callStaticHook (import \"ethereum\" \"callStatic\") (param i32 i32 i32 i32) (result i32))\n  (func $getGasLeftHook (import \"ethereum\" \"getGasLeft\") (result i32))\n  (func $getBlockGasLimitHook (import \"ethereum\" \"getBlockGasLimit\") (result i32))\n  (func $getBlockNumberHook (import \"ethereum\" \"getBlockNumber\") (result i32))\n  (func $getBlockHashHook (import \"ethereum\" \"getBlockHash\") (param i32 i32)(result i32))\n  (func $getBlockTimestampHook (import \"ethereum\" \"getBlockTimestamp\") (result i32))\n  (func (export \"call\") (param i64 i32 i32 i32 i32) (result i32)\n    get_local 0\n    i32.wrap/i64\n    get_local 1\n    get_local 2\n    get_local 3\n    get_local 4\n    call $callHook)\n  (func (export \"callDelegate\") (param i64 i32 i32 i32) (result i32)\n    get_local 0\n    i32.wrap/i64\n    get_local 1\n    get_local 2\n    get_local 3\n    call $callDelegateHook)\n  (func (export \"callStatic\") (param i64 i32 i32 i32) (result i32)\n    get_local 0\n    i32.wrap/i64\n    get_local 1\n    get_local 2\n    get_local 3\n    call $callStaticHook)\n  (func (export \"getGasLeft\") (result i64)\n    call $getGasLeftHook\n    i64.extend_u/i32\n    )\n  (func (export \"getBlockGasLimit\") (result i64)\n    call $getBlockGasLimitHook\n    i64.extend_u/i32\n    )\n  (func (export \"getBlockNumber\") (result i64)\n    call $getBlockNumberHook\n    i64.extend_u/i32\n    )\n  (func (export \"getBlockHash\") (param i64 i32)(result i32)\n    get_local 0\n    i32.wrap/i64\n    get_local 1\n    call $getBlockHashHook)\n  (func (export \"getBlockTimestamp\") (result i64)\n    call $getBlockTimestampHook\n    i64.extend_u/i32\n    )\n)"
  },
  {
    "path": "contracts/wasmtest/match-int/match-int-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\4f\\0e\\60\\00\\01\\7f\\60\\00\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\01\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\02\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\03\\03\\0b\\0a\\0c\\0c\\0c\\07\\02\\0d\\07\\0d\\00\\01\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\9d\\03\\0a\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\70\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\f0\\bf\\c8\\b0\\02\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\30\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\69\\01\\03\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6a\\36\\02\\00\\41\\00\\21\\01\\20\\01\\41\\00\\46\\04\\40\\41\\28\\21\\02\\05\\20\\01\\41\\01\\46\\04\\40\\41\\29\\21\\02\\05\\41\\2a\\21\\02\\0b\\0b\\20\\02\\41\\28\\46\\21\\00\\20\\00\\04\\40\\01\\05\\41\\80\\02\\41\\00\\10\\14\\0b\\20\\02\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\00\\6b\\36\\02\\00\\20\\00\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const     1223))\n  )\n)"
  },
  {
    "path": "contracts/wasmtest/match-int/match-int-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param ) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0x26121ff0\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    nop\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l0 i32)\n    (local $l1 i32)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.add\n    i32.store\n    i32.const 0x00\n    local.set 1\n    local.get 1\n    i32.const 0x00\n    i32.eq\n    if \n      i32.const 0x28\n      local.set 2\n    else \n      local.get 1\n      i32.const 0x01\n      i32.eq\n      if \n        i32.const 0x29\n        local.set 2\n      else \n        i32.const 0x2a\n        local.set 2\n      end\n    end\n    local.get 2\n    i32.const 0x28\n    i32.eq\n    local.set 0\n    local.get 0\n    if \n      nop\n    else \n      i32.const 256\n      i32.const 0\n      call $f28\n    end\n    local.get 2\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x00\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/match-int/match-int.ds",
    "content": "type Status [[int]] =\n  | Ok        [[= 0]]\n  | Triggered [[= 1]]\n  | Finalized [[= 2]]\n\nobject signature OS = {\n  f : unit -> int\n}\n\nobject O : OS {\n  let f () =\n    let x = Ok in\n    let v = match x with\n    | Ok =>\n       40\n    | Triggered =>\n       41\n    | Finalized =>\n       42 \n    end \n    in\n    begin\n      assert (v = 40);\n      v\n    end\n }\n\nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "contracts/wasmtest/match-int/match-int.js",
    "content": "#!/usr/bin/env node\n'strict';\nlet main = require('../index');\n\nif (process.argv.length != 4) {\n    console.log(`usage: ${process.argv[1]} ewasm-file func`);\n    process.exit(0);\n}\n\nfunction generate(funcSig, arg1, arg2) {\n    let callData = ''\n    switch (funcSig) {\n        case 'f':\n            callData += '26121ff0';\n            break;\n        // case 'mod':\n        //     callData += 'f43f523a';\n        //     break;\n        // case 'shl':\n        //     callData += '9da760ef';\n        //     break;\n        // case 'shr':\n        //     callData += '75f4479a';\n        //     break;\n        default:\n            console.log(`unknown func: ${funcSig}`);\n            process.exit(0);\n    }\n    // arg1 = BigInt(arg1);\n    // callData += arg1.toString(16).padStart(64, '0');\n    // arg2 = BigInt(arg2);\n    // callData += arg2.toString(16).padStart(64, '0');\n    return callData;\n}\nlet callData = generate(...process.argv.slice(3, 4));\nmain(process.argv[2], callData).then(console.log).catch(console.log);\n"
  },
  {
    "path": "contracts/wasmtest/run_test.sh",
    "content": "cd $1\n../../../edsger.bc ./$1.ds ewasm > ./$1.wat\n../../../wasm_init.sh $1\ncd ..\n./$1/$1.js ./$1/$1-r.wasm $2 $3 $4\n"
  },
  {
    "path": "contracts/wasmtest/struct/struct-i.wat",
    "content": "(module\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory 1)\n  (data (i32.const 0) \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\4f\\0e\\60\\00\\01\\7f\\60\\02\\7f\\7f\\01\\7f\\60\\00\\01\\7f\\60\\01\\7f\\01\\7f\\60\\01\\7f\\00\\60\\02\\7f\\7f\\00\\60\\02\\7e\\7f\\01\\7f\\60\\03\\7f\\7f\\7f\\00\\60\\04\\7e\\7f\\7f\\7f\\01\\7f\\60\\00\\01\\7e\\60\\07\\7f\\7f\\7f\\7f\\7f\\7f\\7f\\00\\60\\01\\7e\\00\\60\\05\\7e\\7f\\7f\\7f\\7f\\01\\7f\\60\\00\\00\\02\\d3\\04\\19\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\41\\64\\64\\72\\65\\73\\73\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\45\\78\\74\\65\\72\\6e\\61\\6c\\42\\61\\6c\\61\\6e\\63\\65\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\42\\6c\\6f\\63\\6b\\48\\61\\73\\68\\00\\06\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0f\\67\\65\\74\\43\\61\\6c\\6c\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\63\\61\\6c\\6c\\44\\65\\6c\\65\\67\\61\\74\\65\\00\\08\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\73\\74\\6f\\72\\61\\67\\65\\53\\74\\6f\\72\\65\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\73\\74\\6f\\72\\61\\67\\65\\4c\\6f\\61\\64\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\09\\67\\65\\74\\43\\61\\6c\\6c\\65\\72\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0c\\67\\65\\74\\43\\61\\6c\\6c\\56\\61\\6c\\75\\65\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\43\\6f\\69\\6e\\62\\61\\73\\65\\00\\03\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\12\\67\\65\\74\\42\\6c\\6f\\63\\6b\\44\\69\\66\\66\\69\\63\\75\\6c\\74\\79\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0a\\67\\65\\74\\47\\61\\73\\4c\\65\\66\\74\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\10\\67\\65\\74\\42\\6c\\6f\\63\\6b\\47\\61\\73\\4c\\69\\6d\\69\\74\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0d\\67\\65\\74\\54\\78\\47\\61\\73\\50\\72\\69\\63\\65\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\03\\6c\\6f\\67\\00\\0a\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\67\\65\\74\\42\\6c\\6f\\63\\6b\\4e\\75\\6d\\62\\65\\72\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0b\\67\\65\\74\\54\\78\\4f\\72\\69\\67\\69\\6e\\00\\04\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\75\\73\\65\\47\\61\\73\\00\\0b\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\42\\6c\\6f\\63\\6b\\54\\69\\6d\\65\\73\\74\\61\\6d\\70\\00\\09\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\72\\65\\76\\65\\72\\74\\00\\05\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\11\\67\\65\\74\\52\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\53\\69\\7a\\65\\00\\00\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\0e\\72\\65\\74\\75\\72\\6e\\44\\61\\74\\61\\43\\6f\\70\\79\\00\\07\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\04\\63\\61\\6c\\6c\\00\\0c\\08\\65\\74\\68\\65\\72\\65\\75\\6d\\06\\66\\69\\6e\\69\\73\\68\\00\\05\\03\\0d\\0c\\01\\01\\01\\03\\04\\0d\\03\\0d\\00\\01\\02\\03\\05\\03\\01\\00\\14\\06\\10\\03\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\7f\\01\\41\\00\\0b\\07\\11\\02\\06\\6d\\65\\6d\\6f\\72\\79\\02\\00\\04\\6d\\61\\69\\6e\\00\\20\\0a\\bb\\42\\0c\\43\\01\\02\\7f\\20\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\21\\03\\02\\40\\20\\01\\41\\01\\75\\22\\01\\45\\0d\\00\\03\\40\\20\\00\\20\\00\\6c\\22\\00\\41\\01\\20\\01\\41\\01\\71\\1b\\20\\03\\6c\\21\\03\\20\\01\\41\\01\\75\\22\\02\\21\\01\\20\\02\\0d\\00\\0b\\0b\\20\\03\\0b\\04\\00\\20\\00\\0b\\04\\00\\20\\00\\0b\\07\\00\\20\\00\\41\\7f\\73\\0b\\0a\\00\\41\\80\\02\\20\\00\\36\\02\\00\\0b\\09\\00\\41\\80\\02\\41\\04\\10\\14\\0b\\24\\00\\20\\00\\41\\18\\74\\20\\00\\41\\08\\74\\41\\80\\80\\fc\\07\\71\\72\\20\\00\\41\\08\\76\\41\\80\\fe\\03\\71\\20\\00\\41\\18\\76\\72\\72\\0b\\a5\\02\\00\\10\\04\\24\\00\\23\\00\\41\\03\\4d\\04\\40\\41\\15\\10\\1d\\10\\1e\\05\\01\\0b\\23\\00\\41\\04\\6b\\24\\00\\41\\04\\24\\01\\41\\80\\06\\41\\00\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\24\\02\\23\\02\\41\\96\\82\\8c\\a5\\7e\\46\\04\\40\\23\\00\\41\\c0\\00\\46\\45\\04\\40\\41\\dc\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\22\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\90\\cc\\de\\bc\\78\\46\\04\\40\\23\\00\\41\\00\\46\\45\\04\\40\\41\\dd\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\10\\23\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\23\\02\\41\\81\\8c\\e8\\bd\\7c\\46\\04\\40\\23\\00\\41\\20\\46\\45\\04\\40\\41\\de\\01\\10\\1d\\10\\1e\\05\\01\\0b\\41\\20\\24\\01\\41\\80\\06\\23\\01\\41\\04\\10\\03\\41\\80\\06\\28\\02\\00\\10\\1f\\23\\01\\41\\20\\6a\\24\\01\\10\\24\\24\\01\\41\\80\\02\\23\\01\\36\\02\\00\\41\\80\\02\\41\\04\\10\\18\\05\\41\\16\\10\\1d\\10\\1e\\0b\\0b\\0b\\0b\\df\\0f\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\01\\01\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\e0\\0f\\01\\01\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\00\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\20\\01\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\00\\21\\02\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\41\\00\\0f\\0b\\b3\\17\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\b4\\01\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\12\\24\\00\\41\\80\\04\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\04\\10\\06\\01\\01\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\a6\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\01\\01\\01\\20\\01\\21\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\20\\00\\0f\\0b\\89\\08\\01\\02\\7f\\41\\a0\\12\\41\\c0\\12\\36\\02\\00\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6a\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\a9\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\c0\\00\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\41\\a7\\04\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\00\\6a\\28\\02\\00\\24\\00\\24\\01\\41\\00\\41\\09\\36\\02\\00\\41\\04\\41\\00\\36\\02\\00\\41\\08\\41\\00\\36\\02\\00\\41\\0c\\41\\00\\36\\02\\00\\41\\10\\41\\00\\36\\02\\00\\41\\80\\04\\41\\00\\36\\02\\00\\41\\80\\02\\23\\00\\36\\02\\00\\41\\84\\02\\23\\01\\36\\02\\00\\41\\90\\ce\\00\\ad\\41\\00\\41\\80\\04\\41\\80\\02\\41\\08\\10\\17\\1a\\41\\80\\06\\41\\00\\10\\15\\10\\16\\41\\80\\06\\28\\02\\00\\41\\84\\06\\28\\02\\00\\41\\88\\06\\28\\02\\00\\41\\8c\\06\\28\\02\\00\\41\\90\\06\\28\\02\\00\\41\\94\\06\\28\\02\\00\\41\\98\\06\\28\\02\\00\\41\\9c\\06\\28\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\24\\02\\24\\00\\23\\02\\41\\1c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\18\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\14\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\10\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\0c\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\08\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\04\\6a\\23\\00\\36\\02\\00\\24\\00\\23\\02\\41\\00\\6a\\23\\00\\36\\02\\00\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\41\\20\\6a\\41\\20\\6a\\24\\02\\23\\02\\41\\20\\6b\\28\\02\\00\\23\\02\\41\\1c\\6b\\28\\02\\00\\23\\02\\41\\18\\6b\\28\\02\\00\\23\\02\\41\\14\\6b\\28\\02\\00\\23\\02\\41\\10\\6b\\28\\02\\00\\23\\02\\41\\0c\\6b\\28\\02\\00\\23\\02\\41\\08\\6b\\28\\02\\00\\23\\02\\41\\04\\6b\\28\\02\\00\\24\\00\\41\\9c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\98\\08\\23\\00\\36\\02\\00\\24\\00\\41\\94\\08\\23\\00\\36\\02\\00\\24\\00\\41\\90\\08\\23\\00\\36\\02\\00\\24\\00\\41\\8c\\08\\23\\00\\36\\02\\00\\24\\00\\41\\88\\08\\23\\00\\36\\02\\00\\24\\00\\41\\84\\08\\23\\00\\36\\02\\00\\24\\00\\41\\80\\08\\23\\00\\36\\02\\00\\41\\80\\08\\41\\80\\06\\10\\07\\41\\80\\06\\28\\02\\00\\21\\02\\01\\01\\20\\02\\20\\00\\49\\21\\01\\41\\a0\\12\\41\\a0\\12\\28\\02\\00\\41\\e0\\00\\6b\\36\\02\\00\\20\\01\\0f\\0b\\0b\\3f\\09\\00\\41\\00\\0b\\01\\30\\00\\41\\80\\02\\0b\\01\\30\\00\\41\\80\\04\\0b\\01\\30\\00\\41\\80\\06\\0b\\01\\30\\00\\41\\80\\08\\0b\\01\\30\\00\\41\\80\\0a\\0b\\01\\30\\00\\41\\80\\0c\\0b\\01\\30\\00\\41\\80\\0e\\0b\\01\\30\\00\\41\\80\\10\\0b\\01\\30\")\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $main\n    (call $finish (i32.const 0) (i32.const     9319))\n  )\n)"
  },
  {
    "path": "contracts/wasmtest/struct/struct-r.wat",
    "content": "(module\n  (type (;0;) (func (param ) (result i32)))\n  (type (;1;) (func (param i32 i32) (result i32)))\n  (type (;2;) (func (param ) (result i32)))\n  (type (;3;) (func (param i32) (result i32)))\n  (import  \"ethereum\" \"getAddress\"  (func $f0 (param i32) (result )))\n  (import  \"ethereum\" \"getExternalBalance\"  (func $f1 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockHash\"  (func $f2 (param i64 i32) (result i32)))\n  (import  \"ethereum\" \"callDataCopy\"  (func $f4 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getCallDataSize\"  (func $f5 (param ) (result i32)))\n  (import  \"ethereum\" \"callDelegate\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"storageStore\"  (func $f8 (param i32 i32) (result )))\n  (import  \"ethereum\" \"storageLoad\"  (func $f9 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getCaller\"  (func $f10 (param i32) (result )))\n  (import  \"ethereum\" \"getCallValue\"  (func $f11 (param i32) (result )))\n  (import  \"ethereum\" \"getBlockCoinbase\"  (func $f14 (param i32) (result i32)))\n  (import  \"ethereum\" \"getBlockDifficulty\"  (func $f16 (param i32) (result )))\n  (import  \"ethereum\" \"getGasLeft\"  (func $f19 (param ) (result i64)))\n  (import  \"ethereum\" \"getBlockGasLimit\"  (func $f20 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxGasPrice\"  (func $f21 (param i32) (result )))\n  (import  \"ethereum\" \"log\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\n  (import  \"ethereum\" \"getBlockNumber\"  (func $f23 (param ) (result i64)))\n  (import  \"ethereum\" \"getTxOrigin\"  (func $f24 (param i32) (result )))\n  (import  \"ethereum\" \"useGas\"  (func $f25 (param i64) (result )))\n  (import  \"ethereum\" \"getBlockTimestamp\"  (func $f27 (param ) (result i64)))\n  (import  \"ethereum\" \"revert\"  (func $f28 (param i32 i32) (result )))\n  (import  \"ethereum\" \"getReturnDataSize\"  (func $f29 (param ) (result i32)))\n  (import  \"ethereum\" \"returnDataCopy\"  (func $f30 (param i32 i32 i32) (result )))\n  (import  \"ethereum\" \"call\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\n  (import  \"ethereum\" \"finish\"  (func $finish (param i32 i32) (result )))\n  (memory (;0;) 20)\n  (data (i32.const 0) \"0\")\n  (data (i32.const 256) \"0\")\n  (data (i32.const 512) \"0\")\n  (data (i32.const 768) \"0\")\n  (data (i32.const 1024) \"0\")\n  (data (i32.const 1280) \"0\")\n  (data (i32.const 1536) \"0\")\n  (data (i32.const 1792) \"0\")\n  (data (i32.const 2048) \"0\")\n  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))  (global (mut i32) (i32.const 0))\n  (export \"memory\" (memory 0))\n  (export \"main\" (func $main))\n  (func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\n  (func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\n  (func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\n  (func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\n  (func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\n  (func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\n  (func $main (param ) (result )\n    call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\n    i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\n    global.get 2\n    i32.const 0xe4a30116\n    i32.eq\n    if \n      global.get 0\n      i32.const 64\n      i32.eq\n      i32.eqz\n      if \n        i32.const 220 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f257)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0x8797a610\n    i32.eq\n    if \n      global.get 0\n      i32.const 0\n      i32.eq\n      i32.eqz\n      if \n        i32.const 221 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n\n      (call $f258)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n    global.get 2\n    i32.const 0xc7ba0601\n    i32.eq\n    if \n      global.get 0\n      i32.const 32\n      i32.eq\n      i32.eqz\n      if \n        i32.const 222 \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\n      i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\n      (call $f259)\n      global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\n      i32.const 256\n      i32.const 4\n      (call $finish)\n    else\n      i32.const 22\n      call $set_returndata\n      (call $fallback)\n      end\n      end\n      end\n\n  )\n  (func $constructor (type 0)\n    (local $l0 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x00\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    nop\n    nop\n    nop\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f257 (type 1)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 0\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    local.get 1\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x00\n    local.set 2\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    i32.const 0\n    return\n  )\n  (func $f258 (type 2)\n    (local $l0 i32)\n    (local $l1 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0xb4\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 0x12\n    global.set 0\n    i32.const 512\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 512\n    call $f8\n    nop\n    nop\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0226\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 1\n    nop\n    nop\n    local.get 1\n    local.set 0\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    local.get 0\n    return\n  )\n  (func $f259 (type 3)\n    (local $l1 i32)\n    (local $l2 i32)\n    i32.const 0x0920\n    i32.const 0x0940\n    i32.store\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.add\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 0x0229\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x40\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.const 0x0227\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x00\n    i32.add\n    i32.load\n    global.set 0\n    global.set 1\n    i32.const 0\n    i32.const 9\n    i32.store\n    i32.const 4\n    i32.const 0\n    i32.store\n    i32.const 8\n    i32.const 0\n    i32.store\n    i32.const 12\n    i32.const 0\n    i32.store\n    i32.const 16\n    i32.const 0\n    i32.store\n    i32.const 512\n    i32.const 0\n    i32.store\n    i32.const 256\n    global.get 0\n    i32.store\n    i32.const 260\n    global.get 1\n    i32.store\n    i32.const 10000\n    i64.extend_i32_u\n    i32.const 0\n    i32.const 512\n    i32.const 256\n    i32.const 8\n    call $f3\n    drop\n    i32.const 768\n    i32.const 0\n    call $f29\n    call $f30\n    i32.const 768\n    i32.load\n    i32.const 772\n    i32.load\n    i32.const 776\n    i32.load\n    i32.const 780\n    i32.load\n    i32.const 784\n    i32.load\n    i32.const 788\n    i32.load\n    i32.const 792\n    i32.load\n    i32.const 796\n    i32.load\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    global.set 2\n    global.set 0\n    global.get 2\n    i32.const 28\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 24\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 20\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 16\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 12\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 8\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 4\n    i32.add\n    global.get 0\n    i32.store\n    global.set 0\n    global.get 2\n    i32.const 0\n    i32.add\n    global.get 0\n    i32.store\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.const 0x20\n    i32.add\n    i32.const 32\n    i32.add\n    global.set 2\n    global.get 2\n    i32.const 32\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 28\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 24\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 20\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 16\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 12\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 8\n    i32.sub\n    i32.load\n    global.get 2\n    i32.const 4\n    i32.sub\n    i32.load\n    global.set 0\n    i32.const 1052\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1048\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1044\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1040\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1036\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1032\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1028\n    global.get 0\n    i32.store\n    global.set 0\n    i32.const 1024\n    global.get 0\n    i32.store\n    i32.const 1024\n    i32.const 768\n    call $f9\n    i32.const 768\n    i32.load\n    local.set 2\n    nop\n    nop\n    local.get 2\n    local.get 0\n    i32.lt_u\n    local.set 1\n    i32.const 0x0920\n    i32.const 0x0920\n    i32.load\n    i32.const 0x60\n    i32.sub\n    i32.store\n    local.get 1\n    return\n  )\n)\n"
  },
  {
    "path": "contracts/wasmtest/struct/struct.ds",
    "content": "type addr := int\n\nobject signature OS = {\n\tinitialize : int * int -> unit;\n\thasOwner : unit -> int;\n\thasSupply : int -> bool;\n}\n\ntype Token = {\n\ttotalSupply : int;\n\towner : addr\n}\n\nobject O : OS {\n\tlet token : Token := { totalSupply=0; owner=0 }\n\n\tlet initialize (_totalSupply, _owner) = \n\t\ttoken.totalSupply := _totalSupply;\n\t\ttoken.owner := _owner;\n\t\t()\n\n\tlet hasOwner () =\n\t\ttoken.owner := 180;\n\t\ttoken.totalSupply := 18;\n\t\tlet _owner = token.owner in\n\t\t_owner\n\n\tlet hasSupply (amount) =\n\t\tlet _totalSupply = token.totalSupply in\n\t\t_totalSupply < amount\n\t\n}\n\nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "contracts/wasmtest/struct/struct.js",
    "content": "#!/usr/bin/env node\n'strict';\nlet main = require('../index');\n\nif (process.argv.length < 4) {\n    console.log(`usage: ${process.argv[1]} ewasm-file func  [args..]`);\n    process.exit(0);\n}\n\nfunction generate(funcSig, arg1, arg2) {\n    let callData = ''\n    switch (funcSig) {\n        case 'hasOwner':\n            callData += '8797a610';\n            break;\n        case 'hasSupply':\n            callData += 'c7ba0601';\n            break;\n        // case 'mod':\n        //     callData += 'f43f523a';\n        //     break;\n        // case 'shl':\n        //     callData += '9da760ef';\n        //     break;\n        // case 'shr':\n        //     callData += '75f4479a';\n        //     break;\n        default:\n            console.log(`unknown func: ${funcSig}`);\n            process.exit(0);\n    }\n    if (arg1 !== undefined) {\n        arg1 = BigInt(arg1);\n        callData += arg1.toString(16).padStart(64, '0');\n    }\n    // arg1 = BigInt(arg1);\n    // callData += arg1.toString(16).padStart(64, '0');\n    // arg2 = BigInt(arg2);\n    // callData += arg2.toString(16).padStart(64, '0');\n    return callData;\n}\nlet callData = generate(...process.argv.slice(3, 4));\nmain(process.argv[2], callData).then(console.log).catch(console.log);\n"
  },
  {
    "path": "contracts/wasmtest/testEWASM.sh",
    "content": "set -xe\n\n#caddr=$(certikcli tx cvm deploy --ewasm ewasm/foobar.sol --from node0 --gas-prices 0.025uctk --gas-adjustment 2.0 --gas auto -y -b block | grep -A 1 \"key: new-contract-address\" | grep -o 'certik\\w*')\n#certikcli tx cvm call \"$caddr\" setFoo 17 --from node0 --fees 5000uctk -y -b block\n#certikcli tx cvm call \"$caddr\" getFoo --from node0 --fees 5000uctk -y -b block\n\n#caddr=$(certikcli tx cvm deploy --ewasm ewasm/foobar.wasm --abi ewasm/foobar.abi --from node0 --gas-prices 0.025uctk --gas-adjustment 2.0 --gas auto -y -b block | grep -A 1 \"key: new-contract-address\" | grep -o 'certik\\w*')\n#certikcli tx cvm call \"$caddr\" setFoo 17 --from node0 --fees 5000uctk -y -b block\n#certikcli tx cvm call \"$caddr\" getFoo --from node0 --fees 5000uctk -y -b block\n\ncaddr=$(certikcli tx cvm deploy --ewasm --runtime tests/arith.wasm --abi tests/arith.abi --from node0 --gas-prices 0.025uctk --gas-adjustment 2.0 --gas auto -y -b block | grep -A 1 \"key: new-contract-address\" | grep -o 'certik\\w*')\ncertikcli tx cvm call \"$caddr\" add 17 2 --from node0 --fees 5000uctk -y -b block\n"
  },
  {
    "path": "contracts/wasmtest/utils.js",
    "content": "module.exports = {\n    to256CallData: data => {\n        return BigInt(data).toString(16).padStart(64, '0');\n    },\n    toHex: data => {\n        return Array.from(data).map((value) => value.toString(16).padStart(2, '0')).join('');\n    },\n    toLEHex: data => {\n        return Array.from(data).map((value) => value.toString(16).padStart(2, '0')).reverse().join('');\n    },\n    toBigInt: hexRepr => {\n        return BigInt(hexRepr);\n    },\n}\n"
  },
  {
    "path": "minic_unittests/basic_constructor.mc",
    "content": "int256 foo;\n\nvoid constructor() {\n\tint256 bar;\n\tint256 baz;\n\t\n\tbar = 0;\n\tbaz = bar;\n\tfoo = baz;\n}\n"
  },
  {
    "path": "minic_unittests/comments.mc",
    "content": "void foo() {\n\n\t// single-line comment\n\n\t/* \tsimple\n\t\t\tmultiline \n\t\t\tcomment\n\t*/\n\n\t/* \tnested\n\t/* \tmulti /* line */\n\t\t\tcom- */\n\t\t\tments */\n\n\tint8 /* interrupting comment */ tmp;\n\n\t// Multiline comment symbol '/*' ignored\n\n\n}\n"
  },
  {
    "path": "minic_unittests/declarations.mc",
    "content": "int8 foo1;\nint16 foo2;\nint32 foo3;\nint256 foo4;\nbool foo5;\nvoid foo6;\n\n// int256* foo7;\nint256[256] foo8;\nint256#[int256] foo9;\nint256#[int256] foo10;\n\nstruct bar1 {\n\tint256 baz1;\n\tbool baz2;\n}  foo11;\n\nunion bar2 {\n\tint256 baz1;\n\tbool baz2;\n}  foo12;\n"
  },
  {
    "path": "minic_unittests/expressions.mc",
    "content": "int256[3] array;\nint256#[bool] hashmap;\nstruct bar {\n  bool one;\n  int256#[int8] two;\n} mystruct;\n\nvoid foo(int256 tmp) {\n  tmp = tmp;\n  tmp = 0;\n\t// Pointer deref not supported by backend yet\n  // tmp = *tmp;\n\n  tmp = !tmp;\n  tmp = ~tmp;\n  tmp = -tmp;\n\n  tmp = 1 + 2 - 3 / 4 % 5 ** 6 & 7 | 8 ^ 9 << 10 >> 11 == 12;\n\n\ttmp = sha1 tmp;\n\n  tmp = array[0];\n  array[0] = tmp;\n\n  tmp = hashmap[0];\n  hashmap[0] = tmp;\n\n  tmp = address;\n  tmp = origin;\n  tmp = caller;\n  tmp = callvalue;\n  tmp = coinbase;\n  tmp = timestamp;\n  tmp = number;\n\n  tmp = balance(0);\n  tmp = blockhash(0);\n\n  tmp = mystruct.one;\n  tmp = mystruct.two[0];\n\n}\n"
  },
  {
    "path": "minic_unittests/functions.mc",
    "content": "private int8 foo1() {}\nprivate int16 foo2() {}\nprivate int32 foo3() {}\nprivate int256 foo4() {}\nprivate bool foo5() {}\n"
  },
  {
    "path": "minic_unittests/methods.mc",
    "content": "int8 foo1() {}\nint16 foo2() {}\nint32 foo3() {}\nint256 foo4() {}\nbool foo5() {}\n"
  },
  {
    "path": "minic_unittests/statements.mc",
    "content": "private int256 foo() {\n\tint256 tmp;\n\n\ttmp = 0;\n\treturn tmp;\n}\n\nvoid bar(int256 tmp) {\n\ttmp = 0;\n\ttransfer(0, 1);\n\n\tfoo();\n\ttmp <- foo();\n\n\t{\n\t\ttmp = 0;\n\t}\n\n\tif (tmp == 0) {\n\t}\n\n\tif (tmp == 0)\n\t\ttmp = 1;\n\n\tif (tmp == 0)\n\t\ttmp = 1;\n\telse\n\t\ttmp = 2;\n\n\tif (tmp == 0) {\n\t\ttmp = 1;\n\t} else {\n\t\ttmp = 2;\n\t}\n\n\twhile\n\t\ttmp = tmp - 1;\n\n\twhile {\n\t\ttmp = tmp - 1;\n\t}\n\n\twhile {\n\t\ttmp = tmp - 1;\n\t\tfoo();\n\t\tif (tmp == 0) break;\n\t}\n\n\twhile {\n\t\ttmp <- foo();\n\t\tif (tmp == 0) break;\n\t}\n\n\tcallmethod(tmp; tmp; 12345; 6; ; 7);\n\n\trevert;\n\treturn;\n\treturn tmp;\n\n}\n"
  },
  {
    "path": "minic_unittests/test_bytecode.sh",
    "content": "#!/bin/bash\n\nfail_count=0\npass_count=0\n\nminicc=../binaries/MacOS/minicc\ndsc=../binaries/MacOS/dsc\n\nskip_files=\"token_ant.ds\"\n\nedsger_out_mc=$(mktemp)\nedsger_out_asmbl=$(mktemp)\nminicc_out_mc=$(mktemp)\nminicc_out_asmbl=$(mktemp)\n\non_exit() {\n  echo -e '\\nCleaning up...'\n  rm $edsger_out_mc $edsger_out_asmbl \\\n    $minicc_out_mc $minicc_out_asmbl\n  echo $pass_count passed, $fail_count failed\n}\ntrap on_exit EXIT\n\nfor f in ./unittests/*.ds ./contracts/*/*.ds; do\n  bname=$(basename $f)\n  if echo $skip_files | grep -q -w $bname; then\n    continue\n  fi\n\n  echo -n $f\n\n  $dsc $f minic > $edsger_out_mc\n  $dsc $f assembly > $edsger_out_asmbl\n  $minicc $edsger_out_mc print > $minicc_out_mc\n  $minicc $edsger_out_mc assembly > $minicc_out_asmbl\n\n  if cmp -s $edsger_out_asmbl $minicc_out_asmbl; then\n    echo\n    ((pass_count++))\n  else\n    echo : FAIL\n    ((fail_count++))\n  fi\ndone\n"
  },
  {
    "path": "minic_unittests/test_parse_and_print.sh",
    "content": "#!/bin/bash\n\n# Add deepsea (.ds) or minic (.mc) files to this directory to add new unit\n# tests. Deepsea files are first prett-printed to minic source. Then, all minic\n# files are parsed and printed twice and checked for any differences.\n\nminicc=../binaries/MacOS/minicc\ndsc=../binaries/MacOS/dsc\n\nskip_files=\"token_ant.ds\"\n\ndeepsea_compiled=$(mktemp -d)\ntmp1=$(mktemp)\ntmp2=$(mktemp)\n\non_exit () {\n  echo -e '\\nCleaning up...'\n  rm -r \"$deepsea_compiled\"\n  rm $tmp1 $tmp2\n  echo $pass_count passed, $fail_count failed\n}\ntrap on_exit EXIT\n\nfor f in ./unittests/*.ds ./contracts/*/*.ds; do\n  bname=$(basename $f)\n  if echo $skip_files | grep -q -w $bname; then\n    continue\n  fi\n  echo Compiling $bname\n\n  $dsc $f minic > $deepsea_compiled/${bname%.*}.mc\ndone\n\necho -e '\\nRunning tests'\n\nfail_count=0\npass_count=0\n\nfor mc in ./*.mc $deepsea_compiled/*; do\n  echo -n $(basename $mc)\n\n  $minicc $mc > $tmp1\n  $minicc $tmp1 > $tmp2\n\n  if diff -u $tmp1 $tmp2; then\n    echo\n    ((pass_count++))\n  else\n    echo : FAIL\n    ((fail_count++))\n  fi\ndone\n"
  },
  {
    "path": "src/Edsger/abi.ml",
    "content": "#include \"config.h\"\n\n(* Methods related to the Solidity ABI. Right now, the only thing here is the code to compute the method name hashes. \n\nSee https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html for the spec. *)\n\nopen Astcommon\nopen Ast\n\n\n(* Todo: Solidity uses a primitive type \"address\", which is an\n   unsigned 160-bit integer. So in order to be ABI-compatible with\n   token contracts etc, we will need to support that. *)\n\t\t    \nlet eth_string_of_builtin_type = function\n  | Tint  -> \"uint256\"\n  | Tuint -> \"uint256\"\n  | Tbool -> \"bool\"\n#ifdef ANT\n  | Taddress -> \"identity\"\n#else\n  | Taddress -> \"address\"\n#endif\n  | Thashvalue -> \"uint256\"\n  | Tunit -> \"UNIT\"  (* The capitalized types will not be ABI-compatible with Solidity. *)\n  | Tglobalpointer -> \"UNSUPPORTED\"\n    \nlet rec eth_string_of_a_type_desc = function\n  | ATbuiltin t  -> eth_string_of_builtin_type t\n  | ATdata (id, d) ->  \"UNSUPPORTED\"    (* Todo: Solidity encodes this as a tuple---but we don't currently support struct arguments anyway. *)\n  | ATprod (t1,t2) ->   \"(\" ^ eth_string_of_a_type_desc t1.aTypeDesc\n\t\t      ^ \",\" ^ eth_string_of_a_type_desc t2.aTypeDesc ^ \")\"\n  | ATarray(n,t) -> eth_string_of_a_type_desc t.aTypeDesc ^ \"[\" ^ string_of_int n ^ \"]\"\n  | ATmapping(_,_) -> \"UNSUPPOERTED\" (*todo*)\t\t\t\t\t\t\t\t\t\t      \n  | ATlist _ -> \"UNSUPPORTED\"\n  | ATexternal _ -> \"UNSUPPORTED\"\n\nlet rec eth_string_of_a_type t =\n  eth_string_of_a_type_desc t.aTypeDesc\n\t\t      \nlet eth_string_of_method_type mt =\n  if List.length mt.aMethodArgumentTypes = 1 && (List.nth mt.aMethodArgumentTypes 0).aTypeDesc = ATbuiltin Tunit\n  then \"\"\t\t\t\t\t\t\t\t\t\t\t    \n  else String.concat \",\" (List.map eth_string_of_a_type mt.aMethodArgumentTypes)\n\t\t      \nlet eth_string_of_method_definition md =\n  md.aMethodName ^ \"(\" ^ eth_string_of_method_type md.aMethodType ^ \")\"\n\nlet eth_string_of_event_type et =\n  et.aEventName\n  ^ \"(\"\n  ^ String.concat \",\" (List.map (fun (_,t,_) -> eth_string_of_a_type t)\n                         et.aEventArgs)\n  ^ \")\"\n  \nlet json_string_of_arg i t =\n    Printf.sprintf \"{\\\"name\\\":\\\"%s\\\", \\\"type\\\":\\\"%s\\\"}\" i (eth_string_of_a_type t)\n\nlet json_type_of_function mk =\n    if mk == MKconstructor \n    then \"constructor\"\n    else \"function\" \n\t\t\t\t\t\t\t\t      \nlet json_inputs_of_method idents argtypes =\n    if List.length argtypes = 1 && (List.nth argtypes 0).aTypeDesc = ATbuiltin Tunit\n    then \"[]\"\t\t\t\t\t\t\t\t\t      \n    else \"[\"\n\t ^ (String.concat \",\" (List.map2 json_string_of_arg idents argtypes))\n\t ^ \"]\"\n\nlet json_stateMutability_of_method_kind mk =\n  match mk with\n  | MKconst\n  | MKconstghost -> \"view\"\n  | MKconstructor -> \"nonpayable\"\n  | _ -> \"payable\"\n\nlet json_constantness_of_method_kind mk = \n  match mk with\n  | MKconst\n  | MKconstghost -> \"true\"\n  | _ -> \"false\"\n\nlet json_payable_of_method_kind mk =\n  match mk with\n  | MKconstructor     \n  | MKconst\n  | MKconstghost -> \"false\"\n  | _ -> \"true\"\n\nlet json_outputs_of_method_type mt =\n  if (mt.aMethodReturnType.aTypeDesc = ATbuiltin Tunit)\n  then \"[]\"\n  else Printf.sprintf \"[{\\\"name\\\":\\\"\\\", \\\"type\\\":\\\"%s\\\"}]\" (eth_string_of_a_type mt.aMethodReturnType)\n\t   \nlet json_of_method_definition md =\n  Printf.sprintf\n\" {\\\"type\\\":\\\"%s\\\",\n   \\\"name\\\":\\\"%s\\\",\n   \\\"inputs\\\":%s,\n   \\\"outputs\\\":%s,\n   \\\"payable\\\":%s,\n   \\\"constant\\\":%s,\n   \\\"stateMutability\\\":\\\"%s\\\"}\"\n  (json_type_of_function md.aMethodType.aMethodKind)\n  md.aMethodName\n  (json_inputs_of_method md.aMethodArguments md.aMethodType.aMethodArgumentTypes)\n  (json_outputs_of_method_type md.aMethodType)\n  (json_payable_of_method_kind md.aMethodType.aMethodKind)\t          \n  (json_constantness_of_method_kind md.aMethodType.aMethodKind)\t\t\t       \n  (json_stateMutability_of_method_kind md.aMethodType.aMethodKind)\n\nlet json_string_of_event_arg = function\n  | (i, t, idx) ->\n     let t_str = eth_string_of_a_type t in\n     Printf.sprintf \"{\\\"name\\\":\\\"%s\\\", \\\"type\\\":\\\"%s\\\", \\\"internalType\\\": \\\"%s\\\", \\\"indexed\\\": %s}\"\n       i t_str t_str (string_of_bool idx)\n  \nlet json_inputs_of_event_args args =\n  \"[\"\n  ^ (String.concat \", \" (List.map json_string_of_event_arg args))\n  ^ \"]\"\n  \nlet json_of_event_type et =\n  Printf.sprintf\n\" {\\\"type\\\":\\\"event\\\",\n   \\\"name\\\":\\\"%s\\\",\n   \\\"inputs\\\":%s}\"\n  et.aEventName\n  (json_inputs_of_event_args et.aEventArgs)\n  \nlet json_of_layer l ets cts =\n  \"[\" ^\n  (json_of_method_definition cts) ^\",\\n\" ^\n  (String.concat \",\\n\"\n    (List.concat ((List.map (fun (_,o) -> List.map json_of_method_definition (List.filter (fun (md) -> md.aMethodType.aMethodKind <> MKconstructor) o.aObjectMethods))\n\t\t\t     l.aLayerFreshObjects)\n\t\t @(List.map (fun (_,o) -> List.map json_of_method_definition o.aObjectMethods)\n\t\t\t     l.aLayerPassthroughObjects)\n                 @[List.map json_of_event_type ets])))\n  ^ \"]\"\n  \nopen Cryptokit\n\nlet keccak_string (str: string) : string =\n  let hashval = hash_string (Hash.keccak 256) str in\n  Printf.sprintf \"0x%02x%02x%02x%02x\" (Char.code (String.get hashval 0)) (Char.code (String.get hashval 1)) (Char.code (String.get hashval 2))(Char.code (String.get hashval 3))\n\nlet keccak_intval (str: string) : int =\n  let hashval = hash_string (Hash.keccak 256) str in\n    (0x01000000) * Char.code (String.get hashval 0)\n  + (0x00010000) * Char.code (String.get hashval 1)\n  + (0x00000100) * Char.code (String.get hashval 2)\n  +                Char.code (String.get hashval 3) \n\n\t\t \nlet function_selector_of_method md : string =\n  let str = eth_string_of_method_definition md in\n  keccak_string str ^ \" = \\\"\" ^ str ^ \"\\\"\" \n\n\nlet function_selector_intval_of_method md : int =\n  keccak_intval (eth_string_of_method_definition md)\n\nopen Backend.BinNums \n  \nlet event_topic_of_event_type et =\n  let str = eth_string_of_event_type et in\n  Backend.BinNumsExt.z_of_bytestring (hash_string (Hash.keccak 256) str)\n       \n"
  },
  {
    "path": "src/Edsger/abi.mli",
    "content": "open Ast\n\nval function_selector_of_method  : a_method_definition -> string\nval function_selector_intval_of_method  : a_method_definition -> int\n\nval event_topic_of_event_type : a_event_type -> Backend.BinNums.coq_Z\n \nval json_of_layer : a_layer -> a_event_type list -> a_method_definition -> string\n"
  },
  {
    "path": "src/Edsger/ast.ml",
    "content": "open Astcommon\n\ntype a_ctype =\n  | ACtint\n  | ACtchar\n  | ACtvoid\n  | ACtpointer of a_ctype\n  | ACtarray of int * a_ctype\n  | ACtmapping of a_ctype * a_ctype\t\t\t\n  | ACtstruct of ident * (ident * a_ctype) list\n\n(* Inspired by Ocaml internals, most types are split into a_foo, and a_foo_desc.\n   The description has the branching structure, while the a_foo is a record with extra information. *)\n\n(* This is a description of how a DeepSpec value of an algebraic datatype is mapped to a C value. *)\ntype a_cimpl = {\n  aImplDesc : a_cimpl_desc;\n  aImplType : a_ctype\n}\n\nand a_cimpl_desc =\n  | ACdefault\n  | ACint of int\n  | ACvar of ident\n  | ACplus of a_cimpl * a_cimpl  (* or binop? *)\n  | ACtimes of a_cimpl * a_cimpl  (* or binop? *)\n  | ACcond of a_cimpl * a_cimpl * a_cimpl\n  | ACarray of a_cimpl  (* do we really need this? *)\n  | ACstruct of (ident * a_cimpl) list\n\ntype a_external_type = {\n  aEXTypeName : ident;\n\n  aEXTypeString : string;\n  aEXTypeLowLevelInv : string option;\n  mutable aEXTypeDefault : (string * ident) option  (* String & Name *)\n}\n\ntype a_type = {\n  aTypeDesc : a_type_desc;\n  aTypeCtype : a_ctype;\n  aTypePairIdent : ident;\n  aTypeProvable : bool\n    (* If  provable is true, the type has a reasonable C implementation.\n       (Otherwise, there is a dummy \"int\" implementation, but this can not be proved correct.)\n       External types are not provable, nor types without synthesis hints, except arrays. *)\n}\n\nand a_type_desc =\n  | ATbuiltin of builtin_type\n  | ATdata of ident * a_type_data\n  | ATprod of a_type * a_type\n  | ATarray of int * a_type\n  | ATmapping of a_type * a_type\n  | ATlist of a_type\n  | ATexternal of a_external_type\n\nand a_type_data =\n  | ATsingleton of a_type_constr\n  | ATbranches of a_type_constr list\n\nand a_type_constr = {\n  aTypeConstrName : ident;\n  aTypeConstrArgs : (ident * a_type) list;\n  aTypeConstrImpl : a_cimpl option\n}\n\ntype a_event_type = {\n  aEventName : ident;\n  aEventArgs : (ident * a_type * bool) list;\n}\n\ntype a_method_type = {\n  aMethodArgumentTypes : a_type list;\n  aMethodReturnType : a_type;\n  aMethodKind : method_kind\n}\n\ntype a_signature = {\n  aSignatureName : ident;\n  aSignatureMethods : (ident * a_method_type) list;\n  aSignatureSuppressError : bool\n}\n\ntype a_layer_signature = {\n  aLayerSignatureName : ident;\n  aLayerSignatureSlots : (ident * a_signature) list;\n  aLayerSignatureSuppressError : bool\n}\n\ntype a_object_type = {\n  aObjectBase : a_layer_signature;\n  aObjectSignature : a_signature\n}\n\ntype a_layer_type = {\n  aLayerBase : a_layer_signature;\n  aLayerSignature : a_layer_signature\n}\n\ntype tmp_id_t = int\n\ntype a_rexpr = {\n  aRexprDesc : a_rexpr_desc;\n  aRexprType : a_type\n}\n\nand a_rexpr_desc =\n  | AEconst of constant\n  | AEconstr_val of a_type_constr * (ident * a_rexpr) list\n  | AEtemp of tmp_id_t * ident\n  | AEunop of unop * a_rexpr\n  | AEbinop of binop * a_rexpr * a_rexpr\n  (* builtins in the EVM backend: *)\n  | AEbuiltin of string * a_rexpr list\n\ntype a_lexpr = {\n  aLexprDesc : a_lexpr_desc;\n  aLexprType : a_type;\n\n  aLexprIsGhost : bool\n}\n\nand a_lexpr_desc =\n  | AEglob of ident\n  | AEfield of a_lexpr * ident\n  | AEindex of a_lexpr * a_rexpr\n\t\t\t   \n\n(* \"big\" expressions are those that produce results that do not fit in a C 32-bit int. *)\ntype a_big_expr = {\n  aBigExprDesc : a_big_expr_desc;\n  aBigExprType : a_type\n}\n\nand a_big_expr_desc =\n  | AErexpr of a_rexpr\n  | AEstruct of a_type_constr * (ident * a_big_expr) list\n  | AEconstr of a_type_constr * (ident * a_big_expr) list\n  | AEexternal_const of string * ident                     (* things defined by \"external let x = \" *)\n  (*| AEexternal_call of string * ident * a_big_expr list*)\n\ntype a_matchable = {\n  aMatchableDesc : a_matchable_desc;\n  aMatchableType : a_type\n}\n\nand a_matchable_desc =\n  | AMtemp of tmp_id_t * ident\n  | AMlexpr of a_lexpr\n   (* Why is this an lexpr instead of an rexpr?\n      Suppose we have a single-branch datatype, then we want to compile matches\n          match e with\n            | C x y\n      into C code like\n         x := e.A;\n         y := e.B;\n      When typechecking, we could make e either an lexpr or an rexp, but if we\n      made it an rexpr we wouldn't have enough information to compile the field access. *)\n\ntype a_external_call_arg =\n  | AEXrexer of a_rexpr\n  | AEXlexpr of a_lexpr\n\ntype a_compile_time_constant =\n  | ACONconst of constant\n  | ACONstruct of (ident * a_compile_time_constant) list\n  | ACONconstr of a_type_constr * (ident * a_compile_time_constant) list\n  | ACONexternal_const of string * ident\n  (*| ACONexternal_call of string * ident * a_compile_time_constant list*)\n\ntype a_external_const = {\n  aExtConstName : string;\n  aExtConstUnfolding : bool;\n  aExtConstPartial : bool\n}\n\t\t\t   \ntype a_object_field = {\n  aObjectFieldName : ident;\n  aObjectFieldType : a_type;\n  aObjectFieldInitial : a_compile_time_constant;   (* the initializer. *)\n  aObjectFieldIsLogical : bool  (* aka aObjectFieldNoImplementation *)\n}\n\ntype tmp_env_t = (ident * (tmp_id_t * a_type)) list\n\ntype side_effect_t = {\n  affectsAbstraction : bool;    (* Does it ever change the abstract state part? *)\n  affectsImplementation : bool; (* Does it ever change a non-ghost variable? *)\n  dependsOnAbstraction : bool;  (* Does it ever e.g. read a ghost variable? (So can not be compiled.) *)\n  invokesLogical : bool         (* We don't remember what this is. *)\n}\n\n(* Loops can be annotated by an external name, if so they will be generated as separate global Coq symbol.\n   For example, see the fist loop in object PMM, which captures MM_kern_valid_dec. *)\ntype a_captured_command = {\n  aCapturedName : ident;\n  aCapturedTemp : tmp_env_t\n}\n\ntype a_command = {\n  aCmdDesc : a_command_desc;\n  aCmdType : a_type;\n  aCmdEnv : tmp_env_t;\n\n  aCmdEffect : side_effect_t\n}\n\nand a_command_desc =\n  | ACskip\n  | ACyield of a_rexpr\n  | AClet of tmp_id_t * ident * a_command * a_command\n  | ACsequence of a_command * a_command\n  (* ACcall: layer signature name * method name * args * value* gas*)\n  | ACcall of ident * ident * a_rexpr list * a_rexpr option * a_rexpr option\n  | ACtransfer of a_rexpr * a_rexpr\n  | ACcond of a_rexpr * a_command * a_command\n  | ACfor of tmp_id_t * ident * a_rexpr * tmp_id_t * a_rexpr * a_command\n      (* FOR (*NUM*)    i     = 0      TO (*HOLDER*) n      DO s.run i *)\n           * a_captured_command option\n  | ACmatch of a_matchable * a_clause list\n  | ACemit of a_event_type * a_rexpr list\n             \n  (* extension for certified programming *)\n  | ACload of a_lexpr\n  | ACstore of a_lexpr * a_rexpr\n  | ACconstr of a_lexpr * a_big_expr\n  | ACfail\n  | ACassert of a_command\n  | ACdeny of a_command\n  | ACghost of a_command\n  | ACfirst of tmp_id_t * ident * a_rexpr * tmp_id_t * a_rexpr *\n      (* FIRST (*NUM*)    i     = 0      TO (*HOLDER*) n       *)\n               tmp_id_t * a_command * a_command * a_command\n         (* DO (*HOLDER*) s.test i THEN i    ELSE FAIL *)\n             * a_captured_command option\n  | ACfold of tmp_id_t * ident * a_rexpr * tmp_id_t * a_rexpr *\n      (* FOLD (*NUM*)    i     = 0      TO (*HOLDER*) n       *)\n              tmp_id_t * ident * a_rexpr * tmp_id_t * a_command\n         (* | (*NUM*)    sum   = 0      DO (*HOLDER*) sum + i *)\n            * a_captured_command option\n  | ACexternal of a_lexpr option * string * ident *  a_external_call_arg list\n\nand a_clause = a_type_constr option * tmp_env_t * a_command\n\ntype a_method_semantics =\n  | ASdefault\n  | ASsetCR3\n  | ASassembly\n  | ASassembly'  (* Actually defined in assembly? Used by [pt_in] and [pt_out] *)\n  | AStrap_info_get\n  | AStrap_info_ret\n\ntype a_accessor =\n  | AAnone\n  | AALoadStoreSem1\n  | AALoadStoreSem2\n  | AALoadStoreSem3\n\n(* Assertions and refinement relations. *)\ntype a_proposition = string\n\ntype a_method_definition = {\n  aMethodName : ident;\n  aMethodArguments : ident list;\n  aMethodType : a_method_type;\n  aMethodSemantics : a_method_semantics;\n  aMethodBody : a_command;\n  aMethodParamEnv : tmp_env_t\n}\n\ntype a_object = {\n  aObjectName : ident;\n  aObjectAddress : string option;\n  (*aObjectSerial : int;*)\n  aObjectCoreType : a_object_type;\n  aObjectType : a_object_type;\n  aObjectRequireImpl : bool;\n  aObjectIsTrusted : bool;\n  aObjectFields : a_object_field list;\n  aObjectMethods : a_method_definition list;\n\n  aObjectProcedures : a_method_definition list;\n  aObjectFunctions : a_method_definition list\n}\n\nmodule IdentSet = Set.Make(String)\n\ntype a_checked_layer = {\n  aCheckedLayerName : ident;\n  (*aCheckedLayerSerial : int;*)\n  (*aCheckedLayerCoreType : a_layer_type;*)\n  aCheckedLayerType : a_layer_type;\n  aCheckedLayerAccessor : a_accessor;\n  aCheckedLayerInvariant : a_proposition option;\n\n  aCheckedLayerPassthroughs : a_layer_signature;\n\n  aCheckedLayerTipObjectSet : IdentSet.t;  (* object names *)\n  aCheckedLayerKeelObjectSet : IdentSet.t; (* object names *)\n\n  aCheckedLayerDesc : a_checked_layer_desc\n}\n\nand a_checked_layer_desc =\n  | ALconstr of (ident * a_object) list  (* slot id -> object *)\n  | ALrelax of a_checked_layer\n  | ALinst of a_checked_layer * a_checked_layer\n  | ALrefine of a_checked_layer * a_checked_layer * a_proposition\n\ntype a_layer = {\n  aLayerName : ident;\n  (*aLayerSerial : int;*)\n  (*aLayerCoreType : a_layer_type;*)\n  aLayerType : a_layer_type;\n  aLayerAccessor : a_accessor;\n  aLayerInvariant : a_proposition option;\n\n  aLayerFreshObjects : (ident * a_object) list;  (* slot id -> object *)\n  aLayerPassthroughObjects : (ident * a_object) list;\n  aLayerAllObjects : (ident * a_object) list;\n\n  aLayerTipObjectSet : IdentSet.t;  (* object names *)\n  aLayerKeelObjectSet : IdentSet.t; (* object names *)\n\n  aLayerDesc : a_layer_desc\n}\n\nand a_layer_desc =\n  | ALbottom\n  | ALontop of a_layer                   (* { s |-> w } : I[I] @ L *)\n  | ALrefine_bottom of a_layer * a_proposition\n                                         (* { s |-> w }        :> L *)\n  (*\n  | ALrefine_ontop of a_layer * a_layer  (* ({ s |-> w } @ L1) :> L2 *)\n  *)\n\ntype a_declaration =\n  | ADtype of a_type\n  | ADevent of a_event_type\n  (*\n  | ADobject of a_object\n  *)\n  | ADlayer of a_layer\n  (*\n  | ADexternal_with of string * string list\n  *)\n\ntype a_file = {\n  aFileDeclarations : (ident * a_declaration) list;\n  aFileGlobalAbstractDataType : a_external_type option;\n  aFileExternalVerbatim : (string * string list) list;\n  aFileExternalSymbols : a_external_const list;\n}\n\n(* Implementation of these three match the respecting definition in CompCert\n   almost line by line (with omission as we only support a small subset of\n   types). *)\nlet calign addr alignment = (addr + alignment - 1) / alignment * alignment\nlet rec calignof = function\n  | ACtint -> 4\n  | ACtchar -> 1\n  | ACtvoid -> 1\n  | ACtpointer _ -> 4\n  | ACtarray (_, ct) -> calignof ct\n  | ACtmapping (_, ct) -> calignof ct (* doesn't actually matter for EVM backend.*)\n  | ACtstruct (_, ls) ->\n    List.fold_left (fun curr_max (_, ct) -> max curr_max (calignof ct))\n                   1 ls\nlet rec csizeof = function\n  | ACtint -> 4\n  | ACtchar -> 1\n  | ACtvoid -> 1\n  | ACtpointer _ -> 4\n  | ACtarray (n, ct) -> csizeof ct * max 0 n\n  | ACtmapping (_, ct) -> 1 (* doesn't actually matter for EVM backend. *)\n  | ACtstruct (_, ls) as ct ->\n    calign (List.fold_left\n             (fun pos (_, ct) -> calign pos (calignof ct) + csizeof ct)\n             0 ls)\n           (calignof ct)\n\nlet rec a_type_desc_to_ident = function\n  | ATbuiltin Tint -> \"Z32\"\n  | ATbuiltin Tuint -> \"Z\" (* TODO: use clight builtin type *)\n  | ATbuiltin Tbool -> \"bool\"\n  | ATbuiltin Tunit -> \"unit\"\n  | ATbuiltin Taddress -> \"address\"\n  | ATbuiltin Thashvalue -> \"hashvalue\"\n  | ATbuiltin Tglobalpointer -> \"globalpointer\"\n  (*\n  | ATbuiltin Tval -> \"val\"\n  | ATbuiltin Tflatmem -> \"flatmem\"\n  *)\n  | ATdata (i, _) -> i\n  | ATprod (t1, t2) -> \"PR_\" ^ a_type_desc_to_ident t1.aTypeDesc ^ \"_\"\n                             ^ a_type_desc_to_ident t2.aTypeDesc\n  | ATarray (n, t) -> \"AR\" ^ string_of_int n ^ \"_\" ^ a_type_desc_to_ident t.aTypeDesc\n  | ATmapping (t1, t2) -> \"HASH_\" ^ a_type_desc_to_ident t1.aTypeDesc ^ \"_\" ^ a_type_desc_to_ident t2.aTypeDesc\n  | ATlist t -> \"list_\" ^ a_type_desc_to_ident t.aTypeDesc\n  | ATexternal extype -> extype.aEXTypeName\n\nlet rec a_type_contains_raw_type t = match t.aTypeDesc with\n  (*\n  | ATbuiltin Tval -> true\n  *)\n  | ATbuiltin Tglobalpointer -> true\n  | ATbuiltin _ -> false\n  | ATdata (_, ATsingleton c) -> a_type_constr_contains_raw_type c\n  | ATdata (_, ATbranches cs) -> List.exists a_type_constr_contains_raw_type cs\n  | ATprod (t1, t2) -> a_type_contains_raw_type t1 || a_type_contains_raw_type t2\n  | ATarray (_, t') -> a_type_contains_raw_type t'\n  | ATmapping (t1, t2) -> a_type_contains_raw_type t1 || a_type_contains_raw_type t2\n  | ATlist _ -> true\t\t\t\t\t\t\n  | ATexternal _ -> true\nand a_type_constr_contains_raw_type c =\n  List.exists (fun (_, t) -> a_type_contains_raw_type t) c.aTypeConstrArgs\n\nlet string_of_a_ctype =\n  let rec sf name prefix trailer = function\n    | ACtint -> \"int \" ^ prefix ^ name ^ trailer\n    | ACtchar -> \"char \" ^ prefix ^ name ^ trailer\n    | ACtvoid -> \"void \" ^ prefix ^ name ^ trailer\n    | ACtpointer ct -> sf name (\"*\" ^ prefix) trailer ct\n    | ACtarray (n, ct) ->\n      if prefix <> \"\"\n        then sf name (\"(\" ^ prefix) (trailer ^ \")[\" ^ string_of_int n ^ \"]\") ct\n        else sf name prefix (trailer ^ \"[\" ^ string_of_int n ^ \"]\") ct\n    | ACtmapping (kt, ct) -> \"(mapping [stuff])\"\n    | ACtstruct (i, flds) -> \"struct \" ^ i ^ \" {\\n  \" ^\n      String.concat \"\\n  \" (List.map (fun (f, ct) -> sf f \"\" \"\" ct ^ \";\") flds) ^\n      \"\\n} \" ^ prefix ^ name ^ trailer\n  in sf \"_\" \"\" \"\"\n\nlet rec string_of_a_cimpl c = match c.aImplDesc with\n  | ACdefault -> \"default\"\n  | ACint n -> string_of_int n\n  | ACvar i -> \"CN (\" ^ i ^ \")\"\n  | ACplus (c1, c2) -> \"(\" ^ string_of_a_cimpl c1 ^ \" + \" ^ string_of_a_cimpl c2 ^ \")\"\n  | ACtimes (c1, c2) -> string_of_a_cimpl c1 ^ \" * \" ^ string_of_a_cimpl c2\n  | ACcond (cond, c1, c2) ->\n    \"if \" ^ string_of_a_cimpl cond ^ \" then \" ^ string_of_a_cimpl c1 ^\n    \" else \" ^ string_of_a_cimpl c2\n  | ACarray c -> \"array[] (\" ^ string_of_a_cimpl c ^ \")\"\n  | ACstruct lst -> \"{ \" ^\n    String.concat \"; \" (List.map (fun (i, c) ->\n      i ^ \" = \" ^ string_of_a_cimpl c) lst) ^ \" }\"\n\nlet rec string_of_a_type print_impl t =\n  let body = match t.aTypeDesc with\n    | ATbuiltin t -> string_of_builtin_type t\n    | ATdata (i, d) -> \"TN (\" ^ i ^ \")\" ^\n      if print_impl\n        then match d with\n        | ATsingleton c ->\" {\\n  \" ^\n          String.concat \";\\n  \" (List.map (fun (f, t) ->\n            f ^ \" : \" ^ string_of_a_type false t) c.aTypeConstrArgs) ^\n          \"\\n}\"\n        | ATbranches lst -> \" =\\n  \" ^\n          String.concat \"\\n  \" (List.map (fun c ->\n            \"| \" ^ c.aTypeConstrName ^ String.concat \"\"\n              (List.map (fun (f, t) ->\n                \" (\" ^ f ^ \" : \" ^ string_of_a_type false t ^ \")\")\n                c.aTypeConstrArgs) ^ match c.aTypeConstrImpl with\n                | None -> \"\"\n                | Some impl -> \" [[\" ^ string_of_a_cimpl impl ^ \"]]\")\n            lst)\n        else \"\"\n    | ATprod (t1, t2) -> \"(\" ^ string_of_a_type false t1 ^ \" * \" ^\n                         string_of_a_type false t2 ^ \")\"\n    | ATarray (n, t) -> \"array[\" ^ string_of_int n ^ \"] (\" ^\n                        string_of_a_type false t ^ \")\"\n    | ATmapping (t1, t2) -> \"mapping[\" ^ string_of_a_type false t1 ^ \"] (\" ^\n                        string_of_a_type false t2 ^ \")\"\n    | ATlist t -> \"list (\" ^\n                        string_of_a_type false t ^ \")\"\n    | ATexternal extype -> \"EXT (\\\"\" ^ String.escaped extype.aEXTypeString ^\n        \"\\\", \" ^ extype.aEXTypeName ^ \")\" ^\n        (match extype.aEXTypeLowLevelInv with\n         | None -> \"\"\n         | Some s -> \" LL(\\\"\" ^ String.escaped s ^ \"\\\"\") ^\n        if print_impl\n          then match extype.aEXTypeDefault with\n            | None -> \"*no-default\"\n            | Some (s, i) -> \"*def:(\\\"\" ^ String.escaped s ^ \"\\\", \" ^ i ^ \")\"\n          else \"\"\n  in body ^\n     (if print_impl\n      then \" [[\" ^ string_of_a_ctype t.aTypeCtype ^\n             (if t.aTypeProvable then \"\" else \"*\") ^ \"]]\"\n      else \"\")\n\nlet string_of_tmp_env tmp_env =\n  String.concat \"; \" (List.map (fun (x,(i,t)) -> x\n\t\t\t\t\t\t ^ \" \" ^ (string_of_int i)\n\t\t\t\t\t\t ^ \" : \" ^ (string_of_a_type false t))\n\t\t\t        tmp_env)\n\nlet string_of_method_arg_types = function\n  | [] -> \"()\"\n  | [t] -> string_of_a_type false t\n  | lst -> \"[\" ^ String.concat \"; \" (List.map (string_of_a_type false) lst) ^ \"]\"\n\nlet string_of_a_signature r =\n  \"<<\" ^ r.aSignatureName ^ \">> {\\n  \" ^\n  String.concat \";\\n  \" (List.map\n    (fun (i, m) -> string_of_method_kind m.aMethodKind ^ i ^ \" : \" ^\n      string_of_method_arg_types m.aMethodArgumentTypes ^ \" -> \" ^\n      string_of_a_type false m.aMethodReturnType)\n    r.aSignatureMethods) ^\n  \"\\n}\"\n\nlet string_of_a_layer_signature layer_sig =\n  \"<<\" ^ layer_sig.aLayerSignatureName ^ \">> {\\n  \" ^\n  String.concat \";\\n  \"\n    (List.map (fun (i, s) -> i ^ \" : \" ^ string_of_a_signature s (*s.aSignatureName*)) layer_sig.aLayerSignatureSlots) ^\n  \"\\n}\"\n\n\nlet string_of_a_object_type t =\n  \"[\" ^ string_of_a_layer_signature t.aObjectBase ^ \"] \" ^\n  string_of_a_signature t.aObjectSignature\n\nlet string_of_a_layer_type t =\n  \"[\" ^ string_of_a_layer_signature t.aLayerBase ^ \"] \" ^\n  string_of_a_layer_signature t.aLayerSignature\n\nlet rec string_of_a_rexpr e = match e.aRexprDesc with\n  | AEconst c -> string_of_constant c\n  | AEconstr_val (c, ls) -> \"CONSTR (\" ^ c.aTypeConstrName ^\n    String.concat \" \"\n      (List.map (fun (i, e) -> \"(\" ^ i ^ \" := \" ^ string_of_a_rexpr e ^ \")\") ls) ^\n    \")\"\n  | AEtemp (n, i) -> i ^ \"<\" ^ string_of_int n ^ \">\"\n  | AEunop (op, e) -> string_of_unop op ^ string_of_a_rexpr e\n  | AEbinop (op, e1, e2) ->\n    \"(\" ^ string_of_a_rexpr e1 ^ \" \" ^ string_of_binop op ^ \" \" ^\n    string_of_a_rexpr e2 ^ \")\"\n  | AEbuiltin (be,args) -> (\"BUILTIN\"^be)\n\n\nlet rec string_of_a_lexpr e = match e.aLexprDesc with\n  | AEglob i -> \"global (\" ^ i ^ \")\"\n  | AEfield (e, i) -> string_of_a_lexpr e ^ \".{\" ^ i ^ \"}\"\n  | AEindex (e1, e2) -> string_of_a_lexpr e1 ^ \"[\" ^ string_of_a_rexpr e2 ^ \"]\"\n\nlet rec string_of_a_big_expr e = match e.aBigExprDesc with\n  | AErexpr e -> \"B(\" ^ string_of_a_rexpr e ^ \")\"\n  | AEstruct (c, ls) -> \"((\" ^ c.aTypeConstrName ^ \")){\" ^\n    String.concat \"; \"\n      (List.map (fun (i, e) -> i ^ \" = \" ^ string_of_a_big_expr e) ls) ^ \"}\"\n  | AEconstr (c, ls) -> c.aTypeConstrName ^ \" (\" ^\n    String.concat \") (\"\n      (List.map (fun (i, e) -> i ^ \" := \" ^ string_of_a_big_expr e) ls) ^\n    \")\"\n  | AEexternal_const (s, i) -> \"EXC(\\\"\" ^ String.escaped s ^ \"\\\", \" ^ i ^ \")\"\n  (*\n  | AEexternal_call (s, i, args) ->\n    \"EXF(\\\"\" ^ String.escaped s ^ \"\\\", \" ^ i ^ \") (\" ^\n      String.concat \", \" (List.map string_of_a_big_expr args) ^ \")\"\n  *)\n\nlet string_of_a_matchable e = match e.aMatchableDesc with\n  | AMtemp (n, i) -> i ^ \"<\" ^ string_of_int n ^ \">\"\n  | AMlexpr e' -> string_of_a_lexpr e'\n\nlet rec string_of_a_compile_time_constant = function\n  | ACONconst c -> string_of_constant c\n  | ACONstruct ls -> \"{\" ^\n    String.concat \"; \"\n      (List.map (fun (i, e) -> i ^ \" = \" ^ string_of_a_compile_time_constant e) ls) ^ \"}\"\n  | ACONconstr (c, ls) -> c.aTypeConstrName ^ \" (\" ^\n    String.concat \") (\"\n      (List.map (fun (i, e) -> i ^ \" := \" ^ string_of_a_compile_time_constant e) ls) ^\n    \")\"\n  | ACONexternal_const (s, i) -> \"EXC(\\\"\" ^ String.escaped s ^ \"\\\", \" ^ i ^ \")\"\n  (*\n  | ACONexternal_call (s, i, args) ->\n    \"EXF(\\\"\" ^ String.escaped s ^ \"\\\", \" ^ i ^ \") (\" ^\n      String.concat \", \" (List.map string_of_a_compile_time_constant args) ^ \")\"\n  *)\n\nlet string_of_a_captured_command = function\n  | None -> \"\"\n  | Some cc -> \" [[\" ^ cc.aCapturedName ^\n      (if cc.aCapturedTemp = [] then\n         \"\"\n       else\n         \"(\" ^ String.concat \", \" (List.map (fun a -> fst a) cc.aCapturedTemp)\n             ^ \")\") ^ \"]]\"\n\nlet rec string_of_a_command c = match c.aCmdDesc with\n  | ACskip -> \"skip\"\n  | ACyield e -> \"val (\" ^ string_of_a_rexpr e ^ \")\"\n  | AClet (n, x, c1, c2) ->\n    \"let \" ^ x ^ \"<\" ^ string_of_int n ^ \"> = \" ^ string_of_a_command c1 ^\n    \"\\nin \" ^ string_of_a_command c2\n  | ACsequence (c1, c2) -> string_of_a_command c1 ^ \";\\n\" ^\n                           string_of_a_command c2\n  | ACcall (s, f, es, _, _) -> \"call \" ^ s ^ \".\" ^ f ^ \" (\" ^\n    String.concat \", \" (List.map string_of_a_rexpr es) ^ \")\"\n  | ACtransfer (t, v) -> \"transfer(\" ^ String.concat \", \"\n    (List.map string_of_a_rexpr [t; v]) ^ \")\"\n  | ACcond (e, c1, c2) -> \"if \" ^ string_of_a_rexpr e ^\n                          \"\\n  then \" ^ string_of_a_command c1 ^\n                          \"\\n  else \" ^ string_of_a_command c2\n  | ACfor (ni, i, l, nh, h, c, occ) ->\n    \"for\" ^ string_of_a_captured_command occ ^\n      \" \" ^ i ^ \"<\" ^ string_of_int ni ^ \"> = \" ^ string_of_a_rexpr l ^\n    \" to <\" ^ string_of_int nh ^ \">\" ^ string_of_a_rexpr h ^\n    \"\\ndo \" ^ string_of_a_command c\n  | ACmatch (e, cls) -> \"match \" ^ string_of_a_matchable e ^ \" with\\n\" ^\n                          string_of_a_clause_list cls ^ \"\\nend\"\n  | ACemit (et, es) -> \"emit(\"\n                     ^ String.concat \",\" (List.map string_of_a_rexpr  es) ^ \")\"\n  | ACload e -> \"load (\" ^ string_of_a_lexpr e ^ \")\"\n  | ACstore (v, e) -> string_of_a_lexpr v ^ \" := \" ^ string_of_a_rexpr e\n  | ACconstr (v, e) -> string_of_a_lexpr v ^ \" ::= \" ^ string_of_a_big_expr e\n  | ACfail -> \"fail\"\n  | ACassert c -> \"assert (\" ^ string_of_a_command c ^ \")\"\n  | ACdeny c -> \"deny (\" ^ string_of_a_command c ^ \")\"\n  | ACghost c -> \"ghost (\" ^ string_of_a_command c ^ \")\"\n  | ACfirst (ni, i, l, nh, h, nc, c1, c2, c3, occ) ->\n    \"first\" ^ string_of_a_captured_command occ ^\n        \" \" ^ i ^ \"<\" ^ string_of_int ni ^ \"> = \" ^\n    string_of_a_rexpr l ^ \" to <\" ^ string_of_int nh ^ \">\" ^ string_of_a_rexpr h ^\n    \"\\ndo <\" ^ string_of_int nc ^ \">\" ^ string_of_a_command c1 ^\n    \"\\nthen \" ^ string_of_a_command c2 ^\n    \"\\nelse \" ^ string_of_a_command c3\n  | ACfold (ni, i, l, nh, h, na, a, s, nc, c, occ) ->\n    \"fold\" ^ string_of_a_captured_command occ ^\n       \" \" ^ i ^ \"<\" ^ string_of_int ni ^ \"> = \" ^\n    string_of_a_rexpr l ^ \" to <\" ^ string_of_int nh ^ \">\" ^ string_of_a_rexpr h ^\n    \"\\n| \" ^ a ^ \"<\" ^ string_of_int na ^ \"> = \" ^ string_of_a_rexpr s ^\n    \"\\ndo<\" ^ string_of_int nc ^ \"> \" ^ string_of_a_command c\n  | ACexternal (dest, s, i, []) ->\n    (match dest with None -> \"\" | Some e -> string_of_a_lexpr e ^ \" := \") ^\n    \"EXC(\\\"\" ^ String.escaped s ^ \"\\\", \" ^ i ^ \")\"\n  | ACexternal (dest, s, i, args) ->\n    (match dest with None -> \"\" | Some e -> string_of_a_lexpr e ^ \" := \") ^\n    \"EXF(\\\"\" ^ String.escaped s ^ \"\\\", \" ^ i ^ \") (\" ^\n      String.concat \", \" (List.map (function\n        | AEXrexer e -> string_of_a_rexpr e\n        | AEXlexpr e -> string_of_a_lexpr e) args) ^ \")\"\nand string_of_a_clause_list cls = String.concat \"\\n\"\n  (List.map (fun (con_opt, vs, c) -> \"| \" ^\n    (match con_opt with None -> \"_\" | Some con -> con.aTypeConstrName) ^ \" \" ^\n    String.concat \" \"\n      (List.map (fun (i, (n, _)) -> i ^ \"<\" ^ string_of_int n ^ \">\") vs) ^\n    \" => \" ^ string_of_a_command c) cls)\n\nlet string_of_aMethodArguments = function\n  | [], [] -> \"aMethodArguments[unexpected empty list]\"\n  | [i], [t] -> \"(\" ^ i ^ \" : \" ^ string_of_a_type false t ^ \")\"\n  | idents, types when List.length idents <> List.length types ->\n    \"aMethodArguments[unexpected uneven list]\"\n  | idents, types ->\n    \"(\" ^ String.concat \", \" (List.map2 (fun i t ->\n            i ^ \" : \" ^ string_of_a_type false t) idents types) ^ \")\"\n\nlet string_of_a_method_definition prefix m =\n  prefix ^\n  (match m.aMethodSemantics with\n   | ASdefault -> \"\"\n   | ASsetCR3 -> \"[[semantics (setCR3)]]\"\n   | ASassembly -> \"[[semantics (assembly)]]\"\n   | ASassembly' -> \"[[semantics (assembly')]]\"\n   | AStrap_info_get -> \"[[semantics (trap_info_get)]]\"\n   | AStrap_info_ret -> \"[[semantics (trap_info_ret)]]\") ^\n  m.aMethodName ^ \" \" ^\n  string_of_aMethodArguments (m.aMethodArguments, m.aMethodType.aMethodArgumentTypes) ^\n  \" = \" ^ string_of_a_command m.aMethodBody\n\nlet rec string_of_a_object c = (*match d.pObjectDesc with\n  | POname i -> begin match d.pObjectType with\n    | None -> \"ON (\" ^ i ^ \")\"\n    | Some t -> \"ON (\" ^ i ^ \" : \" ^ string_of_p_object_type t ^ \")\"\n    end\n  | POconstr c ->*) \"Object \" ^ (*string_of_int c.aObjectSerial ^ \"> \" ^*) c.aObjectName ^ \" : \" ^\n      string_of_a_object_type c.aObjectType ^\n      (if c.aObjectCoreType <> c.aObjectType\n         then \" (core: \" ^ string_of_a_object_type c.aObjectCoreType ^ \")\"\n         else \"\") ^\n      (if c.aObjectIsTrusted then\n         \" [[trusted]]{ \"\n       else\n         if not c.aObjectRequireImpl then \" [[logical]]{ \" else \"{ \") ^\n      String.concat \";\\n  \"\n        (List.map (fun f -> (if f.aObjectFieldIsLogical then \"ghost \" else \"\") ^\n             f.aObjectFieldName ^ \" : \" ^\n             string_of_a_type true f.aObjectFieldType ^ \" := \" ^\n             string_of_a_compile_time_constant f.aObjectFieldInitial)\n           c.aObjectFields @\n         List.map (string_of_a_method_definition \"\") c.aObjectMethods @\n         List.map (string_of_a_method_definition \"[[procedure]] \")\n           c.aObjectProcedures @\n         List.map (string_of_a_method_definition \"[[function]] \")\n           c.aObjectFunctions\n         ) ^\n    \"}\"\n  (*| POrelax (o, t) -> string_of_p_object o ^ \" :> \" ^\n                      string_of_p_layer_type t*)\n\nlet string_of_a_accessor = function\n  | AAnone          -> \"\"\n  | AALoadStoreSem1 -> \"LoadStoreSem1\"\n  | AALoadStoreSem2 -> \"LoadStoreSem2\"\n  | AALoadStoreSem3 -> \"LoadStoreSem3\"\n\nlet rec string_of_a_checked_layer_aux succinct l =\n  match l.aCheckedLayerDesc with\n  | ALconstr objs ->\n    (*if succinct then c.aCheckedLayerName else*)\n    \"{L\" ^ string_of_a_accessor l.aCheckedLayerAccessor ^ (* string_of_int l.aLayerSerial ^ *) \"{\" ^\n    string_of_a_layer_type l.aCheckedLayerType ^ \" \" ^\n      String.concat \";\\n  \"\n        (List.map (fun (s, o) -> s ^ \" = \" ^ o.aObjectName (*string_of_a_object o*))\n                  objs) ^\n    \"\\nPassthrough: \" ^ String.concat \", \"\n      (List.map fst l.aCheckedLayerPassthroughs.aLayerSignatureSlots) ^\n    \"\\nTip obj: \" ^ String.concat \", \" (IdentSet.elements l.aCheckedLayerTipObjectSet) ^\n    \"\\nKeel obj: \" ^ String.concat \", \" (IdentSet.elements l.aCheckedLayerKeelObjectSet) ^\n    \"}}}\"\n  | _ ->\n    \"{L\" ^ string_of_a_accessor l.aCheckedLayerAccessor ^ (* string_of_int l.aLayerSerial ^ *) \"{\" ^\n    string_of_a_layer_type l.aCheckedLayerType ^ \" \" ^\n    \"\\nPassthrough: \" ^ String.concat \", \"\n      (List.map fst l.aCheckedLayerPassthroughs.aLayerSignatureSlots) ^\n    \"\\nTip obj: \" ^ String.concat \", \" (IdentSet.elements l.aCheckedLayerTipObjectSet) ^\n    \"\\nKeel obj: \" ^ String.concat \", \" (IdentSet.elements l.aCheckedLayerKeelObjectSet) ^\n    \"}}}\" ^ match l.aCheckedLayerDesc with\n  | ALconstr _ -> assert false\n  | ALrelax l' -> \" RELAXED \" ^ string_of_a_checked_layer_aux true l'\n  | ALinst (l1, l2) -> \" INST \" ^ string_of_a_checked_layer_aux true l1 ^\n                       \" AT \" ^ string_of_a_checked_layer_aux true l2\n  | ALrefine (l1, l2, p) -> \" REFINED \" ^ string_of_a_checked_layer_aux true l1 ^\n                             \" OVER \" ^ string_of_a_checked_layer_aux true l2 ^\n                             \" WITH \\\"\" ^ String.escaped p ^ \"\\\"\"\n\nlet string_of_a_checked_layer = string_of_a_checked_layer_aux false\n\nlet rec string_of_a_layer l =\n  \"{L\" ^ string_of_a_accessor l.aLayerAccessor ^ (* string_of_int l.aLayerSerial ^ *) \"{\" ^\n  string_of_a_layer_type l.aLayerType ^ \" \" ^\n  String.concat \";\\n  \"\n    (List.map (fun (s, o) -> s ^ \" = \" ^ o.aObjectName ^ string_of_a_object o)\n              l.aLayerFreshObjects) ^\n  \"\\nPassthrough: \" ^ String.concat \", \" (List.map fst l.aLayerPassthroughObjects) ^\n  \"\\nTip obj: \" ^ String.concat \", \" (IdentSet.elements l.aLayerTipObjectSet) ^\n  \"\\nKeel obj: \" ^ String.concat \", \" (IdentSet.elements l.aLayerKeelObjectSet) ^\n  \"}}}\" ^\n  match l.aLayerDesc with\n  | ALbottom -> \"\"\n  | ALontop l' -> \" INST \" ^ string_of_a_layer l'\n  | ALrefine_bottom (l', p) -> \" REFINED \" ^ string_of_a_layer l' ^\n                               \" WITH \\\"\" ^ String.escaped p ^ \"\\\"\"\n  (*\n  | ALrefine_ontop _ -> \" @:> XXX\"\n  *)\n\nlet rec string_of_a_layer_desc ld =\n  match ld with\n  | ALbottom   -> \"ALBottom\"\n  | ALontop l -> \"(ALontop \" ^ string_of_a_layer l ^\")\"\n  | ALrefine_bottom (l, p) -> \"(ALrefine_bottom \" ^ string_of_a_layer l ^ \" [some prop])\"\n\t\t\t\t\t\t\t       \n\t\t\t\t\t\t\t\t \n"
  },
  {
    "path": "src/Edsger/ast.mli",
    "content": "open Astcommon\n\ntype a_ctype =\n  | ACtint\n  | ACtchar\n  | ACtvoid\n  | ACtpointer of a_ctype\n  | ACtarray of int * a_ctype\n  | ACtmapping of a_ctype * a_ctype\t\t\t\n  | ACtstruct of ident * (ident * a_ctype) list\n\ntype a_cimpl = {\n  aImplDesc : a_cimpl_desc;\n  aImplType : a_ctype\n}\n\nand a_cimpl_desc =\n  | ACdefault\n  | ACint of int\n  | ACvar of ident\n  | ACplus of a_cimpl * a_cimpl  (* or binop? *)\n  | ACtimes of a_cimpl * a_cimpl  (* or binop? *)\n  | ACcond of a_cimpl * a_cimpl * a_cimpl\n  | ACarray of a_cimpl  (* do we really need this? *)\n  | ACstruct of (ident * a_cimpl) list\n\ntype a_external_type = {\n  aEXTypeName : ident;\n\n  aEXTypeString : string;\n  aEXTypeLowLevelInv : string option;\n  mutable aEXTypeDefault : (string * ident) option  (* String & Name *)\n}\n\ntype a_type = {\n  aTypeDesc : a_type_desc;\n  aTypeCtype : a_ctype;\n  aTypePairIdent : ident;\n  aTypeProvable : bool\n}\n\nand a_type_desc =\n  | ATbuiltin of builtin_type\n  | ATdata of ident * a_type_data\n  | ATprod of a_type * a_type\n  | ATarray of int * a_type\n  | ATmapping of a_type * a_type\n  | ATlist of a_type\n  | ATexternal of a_external_type\n\nand a_type_data =\n  | ATsingleton of a_type_constr\n  | ATbranches of a_type_constr list\n\nand a_type_constr = {\n  aTypeConstrName : ident;\n  aTypeConstrArgs : (ident * a_type) list;\n  aTypeConstrImpl : a_cimpl option\n}\n\ntype a_event_type = {\n  aEventName : ident;\n  aEventArgs : (ident * a_type * bool) list;\n}\n\ntype a_method_type = {\n  aMethodArgumentTypes : a_type list;\n  aMethodReturnType : a_type;\n  aMethodKind : method_kind\n}\n\ntype a_signature = {\n  aSignatureName : ident;\n  aSignatureMethods : (ident * a_method_type) list;\n  aSignatureSuppressError : bool\n}\n\ntype a_layer_signature = {\n  aLayerSignatureName : ident;\n  aLayerSignatureSlots : (ident * a_signature) list;\n  aLayerSignatureSuppressError : bool\n}\n\ntype a_object_type = {\n  aObjectBase : a_layer_signature;\n  aObjectSignature : a_signature\n}\n\ntype a_layer_type = {\n  aLayerBase : a_layer_signature;\n  aLayerSignature : a_layer_signature\n}\n\ntype tmp_id_t = int\n\ntype a_rexpr = {\n  aRexprDesc : a_rexpr_desc;\n  aRexprType : a_type\n}\n\nand a_rexpr_desc =\n  | AEconst of constant\n  | AEconstr_val of a_type_constr * (ident * a_rexpr) list\n  | AEtemp of tmp_id_t * ident\n  | AEunop of unop * a_rexpr\n  | AEbinop of binop * a_rexpr * a_rexpr\n  (* builtins in the EVM backend: *)\n  | AEbuiltin of string * a_rexpr list\n\ntype a_lexpr = {\n  aLexprDesc : a_lexpr_desc;\n  aLexprType : a_type;\n\n  aLexprIsGhost : bool\n}\n\nand a_lexpr_desc =\n  | AEglob of ident\n  | AEfield of a_lexpr * ident\n  | AEindex of a_lexpr * a_rexpr\n\ntype a_big_expr = {\n  aBigExprDesc : a_big_expr_desc;\n  aBigExprType : a_type\n}\n\nand a_big_expr_desc =\n  | AErexpr of a_rexpr\n  | AEstruct of a_type_constr * (ident * a_big_expr) list\n  | AEconstr of a_type_constr * (ident * a_big_expr) list\n  | AEexternal_const of string * ident\n  (*| AEexternal_call of string * ident * a_big_expr list*)\n\ntype a_matchable = {\n  aMatchableDesc : a_matchable_desc;\n  aMatchableType : a_type\n}\n\nand a_matchable_desc =\n  | AMtemp of tmp_id_t * ident\n  | AMlexpr of a_lexpr\n\ntype a_external_call_arg =\n  | AEXrexer of a_rexpr\n  | AEXlexpr of a_lexpr\n\ntype a_compile_time_constant =\n  | ACONconst of constant\n  | ACONstruct of (ident * a_compile_time_constant) list\n  | ACONconstr of a_type_constr * (ident * a_compile_time_constant) list\n  | ACONexternal_const of string * ident\n  (*| ACONexternal_call of string * ident * a_compile_time_constant list*)\n\ntype a_external_const = {\n  aExtConstName : string;\n  aExtConstUnfolding : bool;\n  aExtConstPartial : bool\n}\n\ntype a_object_field = {\n  aObjectFieldName : ident;\n  aObjectFieldType : a_type;\n  aObjectFieldInitial : a_compile_time_constant;\n  aObjectFieldIsLogical : bool  (* aka aObjectFieldNoImplementation *)\n}\n\ntype tmp_env_t = (ident * (tmp_id_t * a_type)) list\n\ntype side_effect_t = {\n  affectsAbstraction : bool;\n  affectsImplementation : bool;\n  dependsOnAbstraction : bool;\n  invokesLogical : bool\n}\n\ntype a_captured_command = {\n  aCapturedName : ident;\n  aCapturedTemp : tmp_env_t\n}\n\ntype a_command = {\n  aCmdDesc : a_command_desc;\n  aCmdType : a_type;\n  aCmdEnv : tmp_env_t;\n\n  aCmdEffect : side_effect_t\n}\n\nand a_command_desc =\n  | ACskip\n  | ACyield of a_rexpr\n  | AClet of tmp_id_t * ident * a_command * a_command\n  | ACsequence of a_command * a_command\n  | ACcall of ident * ident * a_rexpr list * a_rexpr option * a_rexpr option\n  | ACtransfer of a_rexpr * a_rexpr\n  | ACcond of a_rexpr * a_command * a_command\n  | ACfor of tmp_id_t * ident * a_rexpr * tmp_id_t * a_rexpr * a_command\n      (* FOR (*NUM*)    i     = 0      TO (*HOLDER*) n      DO s.run i *)\n           * a_captured_command option\n  | ACmatch of a_matchable * a_clause list\n  | ACemit of a_event_type * a_rexpr list\n\n  (* extension for certified programming *)\n  | ACload of a_lexpr\n  | ACstore of a_lexpr * a_rexpr\n  | ACconstr of a_lexpr * a_big_expr\n  | ACfail\n  | ACassert of a_command\n  | ACdeny of a_command\n  | ACghost of a_command\n  | ACfirst of tmp_id_t * ident * a_rexpr * tmp_id_t * a_rexpr *\n      (* FIRST (*NUM*)    i     = 0      TO (*HOLDER*) n       *)\n               tmp_id_t * a_command * a_command * a_command\n         (* DO (*HOLDER*) s.test i THEN i    ELSE FAIL *)\n             * a_captured_command option\n  | ACfold of tmp_id_t * ident * a_rexpr * tmp_id_t * a_rexpr *\n      (* FOLD (*NUM*)    i     = 0      TO (*HOLDER*) n       *)\n              tmp_id_t * ident * a_rexpr * tmp_id_t * a_command\n         (* | (*NUM*)    sum   = 0      DO (*HOLDER*) sum + i *)\n            * a_captured_command option\n  | ACexternal of a_lexpr option * string * ident * a_external_call_arg list\n\nand a_clause = a_type_constr option * tmp_env_t * a_command\n\n(* Following two types are mCertiKOS specific for low level integration\n   with CompCert *)\ntype a_method_semantics =\n  | ASdefault\n  | ASsetCR3\n  | ASassembly\n  | ASassembly'  (* Actually defined in assembly? Used by [pt_in] and [pt_out] *)\n  | AStrap_info_get\n  | AStrap_info_ret\n\ntype a_accessor =\n  | AAnone\n  | AALoadStoreSem1\n  | AALoadStoreSem2\n  | AALoadStoreSem3\n\ntype a_proposition = string\n\ntype a_method_definition = {\n  aMethodName : ident;\n  aMethodArguments : ident list;\n  aMethodType : a_method_type;\n  aMethodSemantics : a_method_semantics;\n  aMethodBody : a_command;\n  aMethodParamEnv : tmp_env_t\n}\n\ntype a_object = {\n  aObjectName : ident;\n  aObjectAddress : string option;\n  (*aObjectSerial : int;*)\n  aObjectCoreType : a_object_type;\n  aObjectType : a_object_type;\n  aObjectRequireImpl : bool;\n  aObjectIsTrusted : bool;\n  aObjectFields : a_object_field list;\n  aObjectMethods : a_method_definition list;\n\n  aObjectProcedures : a_method_definition list;\n  aObjectFunctions : a_method_definition list\n}\n\nmodule IdentSet : Set.S with type elt := ident\n\ntype a_checked_layer = {\n  aCheckedLayerName : ident;\n  (*aCheckedLayerSerial : int;*)\n  (*aCheckedLayerCoreType : a_layer_type;*)\n  aCheckedLayerType : a_layer_type;\n  aCheckedLayerAccessor : a_accessor;\n  aCheckedLayerInvariant : a_proposition option;\n\n  aCheckedLayerPassthroughs : a_layer_signature;\n\n  aCheckedLayerTipObjectSet : IdentSet.t;  (* object names *)\n  aCheckedLayerKeelObjectSet : IdentSet.t; (* object names *)\n\n  aCheckedLayerDesc : a_checked_layer_desc\n}\n\nand a_checked_layer_desc =\n  | ALconstr of (ident * a_object) list  (* slot id -> object *)\n  | ALrelax of a_checked_layer\n  | ALinst of a_checked_layer * a_checked_layer\n  | ALrefine of a_checked_layer * a_checked_layer * a_proposition\n\ntype a_layer = {\n  aLayerName : ident;\n  (*aLayerSerial : int;*)\n  (*aLayerCoreType : a_layer_type;*)\n  aLayerType : a_layer_type;\n  aLayerAccessor : a_accessor;\n  aLayerInvariant : a_proposition option;\n\n  aLayerFreshObjects : (ident * a_object) list;  (* slot id -> object *)\n  aLayerPassthroughObjects : (ident * a_object) list;\n  aLayerAllObjects : (ident * a_object) list;\n\n  aLayerTipObjectSet : IdentSet.t;  (* object names *)\n  aLayerKeelObjectSet : IdentSet.t; (* object names *)\n\n  aLayerDesc : a_layer_desc\n}\n\nand a_layer_desc =\n  | ALbottom\n  | ALontop of a_layer                   (* { s |-> w } : I[I] @ L *)\n  | ALrefine_bottom of a_layer * a_proposition\n                                         (* { s |-> w }        :> L with p *)\n  (*\n  | ALrefine_ontop of a_layer * a_layer  (* ({ s |-> w } @ L1) :> L2 *)\n  *)\n\ntype a_declaration =\n  | ADtype of a_type\n  | ADevent of a_event_type\n  (*\n  | ADobject of a_object\n  *)\n  | ADlayer of a_layer\n  (*\n  | ADexternal_with of string * string list\n  *)\n\ntype a_file = {\n  aFileDeclarations : (ident * a_declaration) list;\n  aFileGlobalAbstractDataType : a_external_type option;\n  aFileExternalVerbatim : (string * string list) list;\n  aFileExternalSymbols : a_external_const list\n}\n\n(* Behaviors of these three match [Coqlib.align], [Ctypes.alignof], and\n   [Ctypes.sizeof] in CompCert, respectively *)\nval calign : int -> int -> int\nval calignof : a_ctype -> int\nval csizeof : a_ctype -> int\n\nval a_type_desc_to_ident : a_type_desc -> ident\nval a_type_contains_raw_type : a_type -> bool\n\nval string_of_a_ctype : a_ctype -> string\nval string_of_a_type : bool -> a_type -> string\nval string_of_tmp_env : tmp_env_t -> string\nval string_of_method_arg_types : a_type list -> string\nval string_of_a_matchable : a_matchable -> string\n\nval string_of_a_signature : a_signature -> string\nval string_of_a_layer_signature : a_layer_signature -> string\nval string_of_a_object_type : a_object_type -> string\nval string_of_a_layer_type : a_layer_type -> string\n\nval string_of_a_object : a_object -> string\nval string_of_a_layer : a_layer -> string\n\nval string_of_a_checked_layer : a_checked_layer -> string\nval string_of_a_layer_desc : a_layer_desc -> string\n"
  },
  {
    "path": "src/Edsger/astcommon.ml",
    "content": "type ident = string\n\ntype builtin_type =\n  | Tint\n  | Tuint\n  | Tbool\n  | Tunit\n  | Taddress\n  (* EVM specifics *)\n  | Thashvalue\n  (* CertiKOS specifics *)\n  | Tglobalpointer\n  (*\n  | Tval\n  | Tflatmem\n  *)\n\ntype method_kind =\n  | MKnormal\n  | MKlogical\n  | MKrefined\n  | MKconst\n  | MKghost\n  | MKconstghost\n  | MKconstructor\n\ntype constant =\n  | CONint of int\n  | CONuint of int\n  | CONbool of bool\n  | CONunit\n  | CONaddress of string\n  | CONhashvalue (* default value 0u0 *)\n  (*| CONarray_init*)\n  (* CertiKOS specifics *)\n  | CONglobalpointer_undef\n  (*\n  | CONval_undef\n  | CONflatmem_empty\n  *)\n\ntype unop =\n  | OPneg\n  | OPnot\n  | OPbitnot\n  | OPbitneg  (* ??? *)\n  | OPsha_1\n\ntype binop =\n  | OPplus\n  | OPminus\n  | OPtimes\n  | OPdivide\n  | OPremainder\n  | OPand\n  | OPor\n  | OPeq\n  | OPne\n  | OPlt\n  | OPle\n  | OPgt\n  | OPge\n  | OPshl\n  | OPshr\n  | OPxor\n  | OPbitand  (* ??? *)\n  | OPbitor  (* ??? *)\n  | OPsha_2\n\nlet string_of_builtin_type = function\n  | Tint -> \"int\"\n  | Tuint -> \"uint\"\n  | Tbool -> \"bool\"\n  | Tunit -> \"unit\"\n  | Thashvalue -> \"hashvalue\"\n  | Taddress -> \"address\"\n  | Tglobalpointer -> \"globalpointer\"\n  (*\n  | Tval -> \"val\"\n  | Tflatmem -> \"flatmem\"\n  *)\n\nlet string_of_method_kind = function\n  | MKnormal -> \"\"\n  | MKlogical -> \"logical \"\n  | MKconst -> \"const \"\n  | MKghost -> \"ghost \"\n  | MKconstghost -> \"const ghost \"\n  | MKconstructor -> \"constructor \"\n  | MKrefined -> \"refined \"\n\nlet string_of_constant = function\n  | CONint n -> string_of_int n\n  | CONuint n -> \"(Int256.repr \" ^ string_of_int n ^ \")\"\n  | CONbool b -> if b then \"true\" else \"false\"\n  | CONunit -> \"()\"\n  (* initial constant is the same as uint 0 *)\n  | CONaddress addr -> \"(Int256.repr \" ^ Backend.BinNumsExt.numstring2decimalstring addr ^ \")\"\n  | CONhashvalue -> \"(hashval_int256 Int256.zero)\"\n  (*| CONarray_init -> \"array_init\"*)\n  | CONglobalpointer_undef -> \"GLOBUndef\"\n  (*\n  | CONval_undef -> \"Vundef\"\n  | CONflatmem_empty -> \"empty_flatmem\"\n  *)\n\nlet string_of_unop = function\n  | OPneg -> \"-\"\n  | OPnot -> \"!\"\n  | OPbitnot -> \"~\"\n  | OPbitneg -> \"~\"\n  | OPsha_1 -> \"keccak256 \"\n\nlet string_of_binop = function\n  | OPplus -> \"+\"\n  | OPminus -> \"-\"\n  | OPtimes -> \"*\"\n  | OPdivide -> \"/\"\n  | OPremainder -> \"%\"\n  | OPand -> \"/\\\\\"\n  | OPor -> \"\\\\/\"\n  | OPeq -> \"=\"\n  | OPne -> \"<>\"\n  | OPlt -> \"<\"\n  | OPle -> \"<=\"\n  | OPgt -> \">\"\n  | OPge -> \">=\"\n  | OPshl -> \"<<\"\n  | OPshr -> \">>\"\n  | OPxor -> \"^\"\n  | OPbitand -> \"&\"\n  | OPbitor -> \"|\"\n  | OPsha_2 -> \"keccak256\"\n"
  },
  {
    "path": "src/Edsger/astcommon.mli",
    "content": "type ident = string\n\ntype builtin_type =\n  | Tint\n  | Tuint\n  | Tbool\n  | Tunit\n  | Taddress\n  (* EVM specifics *)\n  | Thashvalue\n  (* CertiKOS specifics *)\n  | Tglobalpointer\n  (*\n  | Tval\n  | Tflatmem\n  *)\n\ntype method_kind =\n  | MKnormal\n  | MKlogical\n  | MKrefined\n  | MKconst\n  | MKghost\n  | MKconstghost\n  | MKconstructor\n\ntype constant =\n  | CONint of int\n  | CONuint of int\n  | CONbool of bool\n  | CONunit\n  | CONaddress of string\n  | CONhashvalue\n  (*| CONarray_init (*XXX remove -> a_big_expr in translation *)*)\n  (* CertiKOS specifics *)\n  | CONglobalpointer_undef\n  (*\n  | CONval_undef\n  | CONflatmem_empty\n  *)\n\ntype unop =\n  | OPneg\n  | OPnot\n  | OPbitnot\n  | OPbitneg  (* ??? *)\n  | OPsha_1\n\ntype binop =\n  | OPplus\n  | OPminus\n  | OPtimes\n  | OPdivide\n  | OPremainder\n  | OPand\n  | OPor\n  | OPeq\n  | OPne\n  | OPlt\n  | OPle\n  | OPgt\n  | OPge\n  | OPshl\n  | OPshr\n  | OPxor\n  | OPbitand  (* ??? *)\n  | OPbitor  (* ??? *)\n  | OPsha_2\n\nval string_of_builtin_type : builtin_type -> string\nval string_of_method_kind : method_kind -> string\nval string_of_constant : constant -> string\nval string_of_unop : unop -> string\nval string_of_binop : binop -> string\nval string_of_method_kind : method_kind -> string\n"
  },
  {
    "path": "src/Edsger/config.h",
    "content": "#define REDACTED\n"
  },
  {
    "path": "src/Edsger/coqgen.ml",
    "content": "#include \"config.h\"\n\nopen Ast\nopen Astcommon\nopen Abi\n\ntype coqgen_env = {\n  filename : string;\n  project_name : string;\n\n  coq_DataTypes : out_channel;\n  coq_DataTypeOps : out_channel;\n  coq_DataTypeProofs : out_channel;\n  coq_LinkSource : out_channel;\n  coq_Symbols : out_channel;\n\n  arg_ret_idents : (ident, string) Hashtbl.t;\n  cstruct_idents : (ident, unit) Hashtbl.t;\n  global_idents : (ident, unit) Hashtbl.t;\n\n  files : string list ref;\n\n  external_verbatim : (string * int) list;\n  folded_external_symbol_string : string;\n  partial_external_symbols : (ident, unit) Hashtbl.t;\n\n  folded_symbols : string ref\n}\n\n(* This a topological sort for the dependency DAG.\n   For example, when annotating an external import with [[except DataTypes]],\n   it will be imported into the files that come after DataTypes. *)\nlet file_class_NoDefaultImports = 0\nlet file_class_EdsgerIdents = 0  (* nominal *)\nlet file_class_DataTypes = 1\nlet file_class_DataTypeOps = 2  (* including DataTypeProofs *)\nlet file_class_Layers = 3\nlet file_class_ObjAux = 4\nlet file_class_Refinements = 5\nlet file_class_Code = 6\n\nlet classify_file = function\n  | \"Idents\" -> file_class_EdsgerIdents\n  | \"NoDefaultImports\" -> file_class_NoDefaultImports\n  | \"DataTypes\" -> file_class_DataTypes\n  | \"DataTypeOps\" | \"DataTypeProofs\" -> file_class_DataTypeOps\n  | \"Layers\" -> file_class_Layers\n  | \"ObjAux\" -> file_class_ObjAux\n  | \"Refinements\" -> file_class_Refinements\n  | \"CodeProofs\" -> file_class_Code\n  | _ -> file_class_NoDefaultImports\n\nlet catch_not_found f v = try Some (f v) with Not_found -> None\nlet string_of_ident n = string_of_int n ^ \"%positive\"\n\n(* This regular expression defines the names that can be used as Coq module names.\n   If the user specifies something else, we take the longest prefix that satsifies the regexp. *)\nlet module_name_regexp = Str.regexp \"[a-zA-Z_][a-zA-Z0-9_']*\"\nlet default_module_name = \"EdsgerGen\"\nlet builtin_base_layer_name = \"BuiltinBase\"\n\nlet arg_ret_instance_regexp = Str.regexp \"\\\\bHyperArgRet[ \\t]+\\\\(t[a-zA-Z0-9_']*\\\\)\"\n\n(* Print the boilerplate at the top of a generated file. *)\nlet new_file_imports env out extra_requires classify =\n  if classify > file_class_NoDefaultImports then\n    output_string out\n      (\"Require Import BinPos.\\n\" ^\n       \"Require Import DeepSpec.Runtime.\\n\");\n  if classify > file_class_ObjAux then\n    output_string out\n      (\"Require Import DeepSpec.Linking.\\n\");\n  if classify > file_class_NoDefaultImports then\n    output_string out\n      (\"Require Import \" ^ env.project_name ^ \".EdsgerIdents.\\n\");\n  if classify > file_class_DataTypes then\n    output_string out (\"Require Import \" ^ env.project_name ^ \".DataTypes.\\n\");\n  if classify > file_class_DataTypeOps then\n    output_string out\n      (\"Require Import \" ^ env.project_name ^ \".DataTypeOps.\\n\" ^\n       \"Require Import \" ^ env.project_name ^ \".DataTypeProofs.\\n\");\n  output_string out extra_requires;\n  if classify > file_class_EdsgerIdents then\n    output_string out \"\\nSection EdsgerGen.\\n\\n\";\n  List.iter (fun (s, except) ->\n    if classify > except then output_string out s\n  ) env.external_verbatim\n\nlet new_file env module_name\n\t         extra_requires  (* These will be printed directly after the above set of requires. *)\n                 classify (* the topologial order number *) =\n  let file_name = env.project_name ^ \"/\" ^ module_name ^ \".v\" in\n  let out = open_out file_name in\n  env.files := file_name :: !(env.files);\n  output_string out (\n\"(* WARNING: This file is generated by Edsger, the DeepSEA compiler.\n            All modification will be lost when regenerating. *)\n(* Module \" ^ env.project_name ^ \".\" ^  module_name ^ \" for \" ^ env.filename ^ \" *)\\n\");\n  new_file_imports env out extra_requires classify;\n  out\n\nlet end_edsger_section_regexp = Str.regexp \".*\\\\bEnd +EdsgerGen *\\\\.\\\\( \\\\|$\\\\)\"\n\nlet new_incremental_file env module_name extra_requires output_in_section\n                             entry_regexp classify =\n  let file_marker = \"(* Skeleton by Edgser for \" ^ env.filename ^ \" *)\" in\n  let file_name = env.project_name ^ \"/\" ^ module_name ^ \".v\" in\n  let _ = env.files := file_name :: !(env.files) in\n  if Sys.file_exists file_name then begin\n    print_endline (\"File \" ^ file_name ^ \" already exists; will append to it.\");\n\n    let tmp_name = env.project_name ^ \"/.\" ^ module_name ^ \".v\" in\n    begin try Sys.remove tmp_name with Sys_error _ -> () end;\n    Sys.rename file_name tmp_name;\n\n    let old = open_in tmp_name in\n    let out = open_out file_name in\n    let entrytbl = Hashtbl.create 100 in\n\n    let search line =\n      let rec f from =\n        let at = Str.search_forward entry_regexp line from\n        in Hashtbl.add entrytbl (Str.matched_group 1 line) (Str.matched_string line);\n           f (at + 1)\n      in try f 0 with Not_found (* Str.search_forward *) -> () in\n\n    let rec process first lastline =\n      search lastline;\n      if Str.string_match end_edsger_section_regexp lastline 0 then\n        ()\n      else begin\n        if not first then\n          output_char out '\\n';\n        output_string out lastline;\n        process false (input_line old)\n      end in\n\n    let firstline = input_line old in\n    if firstline <> file_marker then\n      print_endline \" ** Seems from a different project; remove and then recompile to avoid unpredictable behaviors. **\";\n\n    begin try process true firstline\n         with End_of_file (* input_line *) -> () end;\n\n    close_in old;\n    Sys.remove tmp_name;\n\n    out, entrytbl\n  end else  (* [if] Sys.file_exists file_name *)\n    let out = open_out file_name in\n    output_string out (file_marker ^ \"\\n\");\n    new_file_imports env out extra_requires classify;\n    output_in_section out;\n    out, Hashtbl.create 100\n\nlet new_coqgen_env filename  ast =\n  let project_name =\n    let basename = Filename.basename filename in\n    if Str.string_match module_name_regexp basename 0 then\n      Str.matched_string basename\n    else begin\n      print_endline (\"Cannot use prefix of file name '\" ^ basename ^\n        \"' as Coq module name: default to '\" ^ default_module_name ^ \"'\");\n      default_module_name\n    end in\n  let _ = try Unix.mkdir project_name 0o777\n          with Unix.Unix_error (Unix.EEXIST, _, _) -> () in\n  (*make the extract dir*)\n#ifndef REDACTED\n  let __ = try Unix.mkdir (project_name ^ \"/\" ^ \"extraction\") 0o777\n          with Unix.Unix_error (Unix.EEXIST, _, _) -> () in\n#endif\n\n  let env0 = {\n    filename = filename;\n    project_name = project_name;\n\n    coq_DataTypes = stderr;\n    coq_DataTypeOps = stderr;\n    coq_DataTypeProofs = stderr;\n    coq_LinkSource = stderr;\n    coq_Symbols = stderr;\n\n    arg_ret_idents = Hashtbl.create 100;\n    cstruct_idents = Hashtbl.create 100;\n    global_idents = Hashtbl.create 1000;\n\n    files = ref [];\n\n    external_verbatim = List.map (fun (s, excepts) ->\n        s, List.fold_left (fun c except -> max c (classify_file except))\n                          0 excepts\n      ) ast.aFileExternalVerbatim;\n    folded_external_symbol_string =\n      String.concat \" \" (List.map (fun e -> e.aExtConstName)\n\t\t\t\t  (List.filter (fun e -> not e.aExtConstUnfolding)\n\t\t\t\t\t       ast.aFileExternalSymbols));\n    partial_external_symbols =\n      (let tbl = Hashtbl.create 0 in\n       let _ = List.map (fun e ->if e.aExtConstPartial\n\t\t\t\tthen Hashtbl.add tbl e.aExtConstName ())\n\t\t       ast.aFileExternalSymbols in\n       tbl);\n\n    folded_symbols = ref \"\" } in\n\n  let file_DataTypeProofs, arg_ret_idents =\n    new_incremental_file env0 \"DataTypeProofs\"\n      (\"Require Import \" ^ project_name ^ \".DataTypeOps.\\n\") (fun _ -> ())\n      arg_ret_instance_regexp file_class_DataTypeOps in\n  let _ = List.iter\n    (fun builtin_tpair -> Hashtbl.add arg_ret_idents builtin_tpair \"\")\n    [ \"tint_bool\"; \"tint_Z32\";\n      \"tvoid_unit\" (* doesn't really exist, but ignoring is safe *) ] in\n\n  let coq_DataTypes = new_file env0 \"DataTypes\" \"\" file_class_DataTypes in\n  let coq_DataTypeOps = new_file env0 \"DataTypeOps\" \"\" file_class_DataTypeOps in\n  let coq_LinkSource =\n#ifdef REDACTED\n    open_out \"/dev/null\" in\n#else\n    new_file env0 \"CertiKOS\" \"\" file_class_ObjAux in\n#endif\n  let coq_Symbols =\n#ifdef REDACTED\n    open_out \"/dev/null\" in\n#else\n    new_file env0 \"Symbols\" \"Require Import String.\\nRequire Import List.\\nRequire Import compcert.common.AST.\" file_class_DataTypes in\n#endif\n\n  { env0 with\n    coq_DataTypes = coq_DataTypes;\n    coq_DataTypeOps = coq_DataTypeOps;\n    coq_DataTypeProofs = file_DataTypeProofs;\n    coq_LinkSource = coq_LinkSource;\n    coq_Symbols = coq_Symbols;\n    arg_ret_idents = arg_ret_idents\n  }\n\nlet delete_coqgen_env env =\n  let close_coq ch = output_string ch \"\\nEnd EdsgerGen.\\n\"; close_out ch in\n  close_coq env.coq_DataTypes;\n  close_out env.coq_DataTypeOps;\n  close_coq env.coq_DataTypeProofs;\n  close_coq env.coq_LinkSource;\n  close_coq env.coq_Symbols;\n\n  let output_hashtbl out tbl start_num =\n    let arr = Array.make (Hashtbl.length tbl) \"\" in\n    let i = ref 0 in\n    let _ = Hashtbl.iter (fun x _ -> arr.(!i) <- x; incr i) tbl in\n    let _ = Array.sort compare arr in\n    if !i > 0 then\n      let _ = output_char out '\\n' in\n      let num = ref start_num in\n      let _ = Array.iter (fun x ->\n          output_string out (\"Definition \" ^ x ^ \" : ident  := \" ^ string_of_ident !num ^ \".\\n\");\n          incr num\n        ) arr\n      in !num\n    else\n      start_num in\n\n  let file_EdsgerIdents = new_file env \"EdsgerIdents\"\n        \"Require Import BinPos.  (* positive_scope *)\\nRequire Import backend.AST. (* for ident *)\\n\" \n        file_class_EdsgerIdents in\n  let n = output_hashtbl file_EdsgerIdents env.cstruct_idents 550 in\n  let _ = output_hashtbl file_EdsgerIdents env.global_idents n in\n                         (* ((n / 500 + 1) * 500) in *)\n  close_out file_EdsgerIdents;\n\n  let files = List.sort compare !(env.files) in\n  let file_subdir_mk =\n#ifdef REDACTED\n    open_out \"/dev/null\" in\n#else\n    open_out (env.project_name ^ \"/subdir.mk\") in\n#endif\n  output_string file_subdir_mk (\n\"# WARNING: This file is generated by Edsger, the DeepSEA compiler.\n#          All modification will be lost when regenerating.\n\" ^ env.project_name ^ \"_FILES =\");\n  List.iter (fun s -> output_string file_subdir_mk (\" \\\\\\n\" ^ s)) files;\n  output_char file_subdir_mk '\\n';\n  close_out file_subdir_mk\n\nlet output_cstruct_ident env i =\n  if not (Hashtbl.mem env.cstruct_idents i) then\n    Hashtbl.add env.cstruct_idents i ()\n\nlet output_global_ident env i =\n  if not (Hashtbl.mem env.global_idents i) then\n    Hashtbl.add env.global_idents i ()\n\nlet add_folded_symbols env syms =\n  env.folded_symbols :=\n    String.concat \" \" syms ^\n    if !(env.folded_symbols) = \"\" then\n      \"\"\n    else\n      \" \" ^ !(env.folded_symbols)\n\nlet coqgen_warning  msg =\n  print_endline (\"CoqGen warning: \" ^ msg)\n\nlet coqgen_fatal_error loc func msg =\n  print_endline (\"CoqGen error at \" ^ loc ^ \" (\" ^ func ^ \"): \" ^ msg);\n  assert false\n\nlet rec output_type_expr out ind t = match t.aTypeDesc with\n  | ATprod (t1, t2) ->\n    output_string out \"(prod \";\n    output_type_expr out ind t1;\n    output_char out ' ';\n    output_type_expr out ind t2;\n    output_char out ')'\n  | ATarray (_, t') ->\n    output_string out \"(ZMap.t \";\n    output_type_expr out ind t';\n    output_char out ')'\n  | ATmapping ({ aTypeDesc = ATbuiltin t_index}, t')\n     when t_index = Tuint || t_index = Taddress ->\n    output_string out \"(Int256Tree.t \";\n    output_type_expr out ind t';\n    output_char out ')'\n  | ATmapping _ ->\n     coqgen_fatal_error __LOC__ \"output_type_expr\" \"mapping keys of types other than 'uint' and 'address' are currently unsupported.\"\n  | ATlist t' ->\n    output_string out \"(list \";\n    output_type_expr out ind t';\n    output_char out ')'\n  | d -> output_string out (match d with\n    | ATbuiltin Tint -> \"Z32\"\n    | ATbuiltin Tuint -> \"int256\"\n    | ATbuiltin Thashvalue -> \"hashvalue\"\n    | ATbuiltin Tbool -> \"bool\"\n    | ATbuiltin Taddress -> \"int256\"\n    | ATbuiltin Tunit -> \"unit\"\n    | ATbuiltin Tglobalpointer -> \"globalpointer\"\n    (*\n    | ATbuiltin Tval -> \"val\"\n    | ATbuiltin Tflatmem -> \"flatmem\"\n    *)\n    | ATdata (i, _) -> i\n    | ATexternal extype -> extype.aEXTypeString\n    | _ -> coqgen_fatal_error __LOC__ \"output_type_expr\" \"inconsistent rematch\")\n\n(* Output the Coq type of a method, e.g. \"Z -> bool -> DS bool\" *)\t\t       \nlet output_method_type_expr out mt =\n  (match mt.aMethodArgumentTypes with\n  | [t] when t.aTypeDesc = ATbuiltin Tunit -> ()\n  | params -> List.iter (fun t -> output_type_expr out \"\" t; output_string out \" -> \") params);\n  output_string out \" machine_env GetHighData -> DS \";\n  output_type_expr out \"\" mt.aMethodReturnType\n\nlet gen_struct_type env i c =\n  let out = env.coq_DataTypes in\n  let record_field_leftover = ref \"\\n\" in\n  output_string out (\"Record \" ^ i ^ \" := {\");\n  List.iter (fun (fld, t) ->\n    output_string out (!record_field_leftover ^ \"  \" ^ fld ^ \" : \");\n    output_type_expr out \"    \" t;\n    record_field_leftover := \";\\n\"\n  ) c.aTypeConstrArgs;\n  output_string out \"\\n}.\\n\"\n\nlet gen_data_type env i cs =\n  let out = env.coq_DataTypes in\n  output_string out (\"Inductive \" ^ i ^ \" :=\\n\");\n  List.iter (fun c ->\n    output_string out (\"| \" ^ c.aTypeConstrName);\n    List.iter (fun (fld, t) ->\n      output_string out (\" (\" ^ fld ^ \" : \");\n      output_type_expr out \"    \" t;\n      output_char out ')'\n    ) c.aTypeConstrArgs;\n    output_string out (\" : \" ^ i ^ \"\\n\")\n  ) cs;\n  output_string out \".\\n\"\n\nlet struct_name_to_ident name = name ^ \"_struct_ident\"\nlet struct_field_name_to_ident sname fname = sname ^ \"_struct_\" ^ fname ^ \"_ident\"\n\n(* \"prepare\" is not quite the right name. You should call output_prepare_ctype and output_ctype\n   for each type. They write different things to different files. *)\nlet rec output_prepare_ctype env out = function\n  | ACtpointer ct | ACtarray (_, ct) -> output_prepare_ctype env out ct\n  | ACtstruct (name, lst) ->\n    output_cstruct_ident env (struct_name_to_ident name);\n    List.iter (fun (fld, ct) ->\n      output_cstruct_ident env (struct_field_name_to_ident name fld);\n      output_prepare_ctype env out ct;\n    ) lst;\n  | _ -> ()\n\nlet rec output_ctype out ind = function\n  | ACtint -> output_string out \"tint\"\n  | ACtchar -> output_string out \"tchar\"\n  | ACtvoid -> output_string out \"Tvoid\"\n  | ACtpointer ct ->\n    output_string out \"(Tpointer \";\n    output_ctype out ind ct;\n    output_string out \")\"\n  | ACtarray (n, ct) ->\n    output_string out \"(Tarray \";\n    output_ctype out ind ct;\n    output_string out (\" \" ^ string_of_int n ^ \")\")\n  | ACtmapping (t1, t2) -> \n     output_string out \"(Thashmap \";\n     output_ctype out ind t1;\n     output_string out \" \";\n     output_ctype out ind t2;\n     output_string out \")\"\n  | ACtstruct (name, lst) ->\n    output_string out (\"(Tstruct \" ^ struct_name_to_ident name ^ \"\\n\");\n    List.iter (fun (fld, ct) ->\n      output_string out (ind ^ \"(Fcons \" ^\n        struct_field_name_to_ident name fld ^ \" \");\n      output_ctype out (\"  \" ^ ind) ct;\n      output_char out '\\n'\n    ) lst;\n    output_string out (ind ^ \" Fnil\" ^ String.make (List.length lst) ')' ^\n      \")\")\n\nlet type_pair_to_hyper_pair_name i =\n  if i.[0] <> 't'\n    then\n      let _ = print_endline (\"Warning: \" ^ i ^ \" is a type pair but not begin in t\")\n      in i ^ \"_pair\"\n    else String.sub i 1 (String.length i - 1) ^ \"_pair\"\n\nlet rec get_coq_val_cimpl ind get_var =\n  let rec get impl = match impl.aImplDesc with\n    | ACdefault -> coqgen_fatal_error __LOC__ \"get_coq_val_cimpl\"\n                     \"ACdefault under computation constructs\"\n    | ACint n -> string_of_int n\n    | ACvar v -> get_var ind v\n    | ACplus (i1, i2) -> \"(\" ^ get i1 ^ \" + \" ^ get i2 ^ \")\"\n    | ACtimes (i1, i2) -> \"(\" ^ get i1 ^ \" * \" ^ get i2 ^ \")\"\n    | ACcond (b, i1, i2) ->\n      \"(if \" ^ get b ^ \" then \" ^ get i1 ^ \" else \" ^ get i2 ^ \")\"\n    | ACarray _ -> coqgen_fatal_error __LOC__ \"get_coq_val_cimpl\"\n                   \"ACarray under computation constructs\"\n    | ACstruct _ -> coqgen_fatal_error __LOC__ \"get_coq_val_cimpl\"\n                      \"ACarray under computation constructs\"\n  in get\n\nlet cimpl_struct_name impl =\n match impl.aImplType with\n   | ACtstruct (i, _) -> i\n   | _ -> coqgen_fatal_error __LOC__ \"output_cval_cimpl\"\n                 \"Structure a_cimpl with non-structural a_ctype\"\n\n(* Takes a_cimpl, and outputs a Coq expression which builds an extended C value. *)\nlet rec output_cval_cimpl out ind out_var get_var =\n  let rec output impl = match impl.aImplDesc with\n    | ACdefault -> output_string out \"CVany\"\n    | ACint n ->\n      output_string out (\"(CVval (Values.Vint (Int256.repr \" ^ string_of_int n ^ \")))\")\n    | ACvar v -> out_var out ind v\n    | ACplus _ ->\n      output_string out (\"(CVval (Values.Vint (Int256.repr \" ^\n        get_coq_val_cimpl ind get_var impl ^ \")))\")\n    | ACtimes _ ->\n      output_string out (\"(CVval (Values.Vint (Int256.repr \" ^\n        get_coq_val_cimpl ind get_var impl ^ \")))\")\n    | ACcond (b, i1, i2) ->\n      output_string out (\"(if \" ^ get_coq_val_cimpl ind get_var b ^ \" then \");\n      output i1;\n      output_string out \" else \";\n      output i2;\n      output_char out ')'\n    | ACarray _ -> output_string out \"CVany (* not yet implemented *)\" (* ???: how? *)\n    | ACstruct ls ->\n        match impl.aImplType with\n\t| ACtstruct (ci, cls) ->\n\t  output_string out (\"\\n\" ^ ind ^ \"(CVstruct (CSmap\");\n\t  List.iter2 (fun (f, i) (cf, _cfTy) ->\n\t    output_string out (\"\\n  \" ^ ind ^ \"(PTree.set  \" ^\n\t      struct_field_name_to_ident ci cf ^ \" \");\n\t    output_char out ' ';\n\t    output i;\n\t  ) ls cls;\n\t  output_string out (\"\\n  \" ^ ind ^ \"(@PTree.empty cval)))\" ^ String.make (List.length ls) ')')\n\t| _ -> coqgen_fatal_error __LOC__ \"output_cval_cimpl\"\n                 \"Structure a_cimpl with non-structural a_ctype\"\n  in output\n\nlet rec get_coq_val ind f t = match t.aTypeDesc with\n  | ATbuiltin _ -> f\n  (*\n  | ATdata (_, ATsingleton { aTypeConstrImpl = None }) ->\n    coqgen_fatal_error __LOC__ \"get_coq_val\"\n      \"Provable structure type but constructor with no implementation\"\n  *)\n  | ATdata (_, ATsingleton _) -> f\n  | ATdata (_, ATbranches cs) ->\n    \"(match \" ^ f ^ \" with\\n\" ^ ind ^ \"| \" ^\n      String.concat (\"\\n\" ^ ind ^ \"| \") (List.map (fun c ->\n        let impl = match c.aTypeConstrImpl with\n          | Some impl -> impl\n          | None -> coqgen_fatal_error __LOC__ \"get_coq_val\"\n                      (\"Provable data type with constructor \" ^\n                       c.aTypeConstrName ^ \" with no implementation\")\n        in c.aTypeConstrName ^ \" \" ^\n             String.concat \" \" (List.map fst c.aTypeConstrArgs) ^ \" => \" ^\n           get_coq_val_cimpl ind\n             (fun ind v -> get_coq_val ind v (List.assoc v c.aTypeConstrArgs))\n             impl\n      ) cs) ^\n    \"\\n\" ^ ind ^ \" end)\"\n  | ATprod (t1, t2) ->\n    coqgen_fatal_error __LOC__ \"get_coq_val\"\n      \"Requesting encapsulated Coq value for a product type\"\n  | ATarray (_, t') ->\n    coqgen_fatal_error __LOC__ \"get_coq_val\"\n      \"Requesting encapsulated Coq value for an array type\"\n  | ATmapping (_, _) ->\n    coqgen_fatal_error __LOC__ \"get_coq_val\"\n      \"Requesting encapsulated Coq value for a mapping type\"\n  | ATlist t' ->\n    coqgen_fatal_error __LOC__ \"get_coq_val\"\n      \"Requesting encapsulated Coq value for a list type\"\n  | ATexternal extype ->\n    coqgen_fatal_error __LOC__ \"get_coq_val\"\n      (\"External type \" ^ extype.aEXTypeName ^ \" (\" ^ extype.aEXTypeString ^\n       \") marked as provable\")\n\n(* Outputs a coq expression which constructs an extended C value. *)\nlet output_cval out ind f t = match t.aTypeDesc with\n  | ATbuiltin _ ->\n    output_string out (\"(@ht_cval \" ^ t.aTypePairIdent ^ \" _ \" ^ f ^ \")\")\n  | ATdata (_, ATsingleton { aTypeConstrImpl = None }) ->\n    coqgen_fatal_error __LOC__ \"output_cval\"\n      \"Provable structure type but constructor with no implementation\"\n  | ATdata (_, ATsingleton { aTypeConstrImpl = Some impl; aTypeConstrArgs = args }) ->\n    output_cval_cimpl out ind\n      (fun out ind v ->\n       output_string out (\"(@ht_cval \" ^ (List.assoc v args).aTypePairIdent ^\n         \" _ (\" ^ v ^ \" \" ^ f ^ \"))\"))\n      (fun ind v -> get_coq_val ind (\"(\" ^ v ^ \" \" ^ f ^ \")\") (List.assoc v args))\n      impl\n  | ATdata (_, ATbranches cs) ->\n    output_string out (\"(match \" ^ f ^ \" with\");\n    List.iter (fun c ->\n      let impl = match c.aTypeConstrImpl with\n        | Some impl -> impl\n        | None -> coqgen_fatal_error __LOC__ \"output_cval\"\n                    (\"Provable data type with constructor \" ^\n                     c.aTypeConstrName ^ \" with no implementation\") in\n      output_string out (\"\\n\" ^ ind ^ \"| \" ^ c.aTypeConstrName ^ \" \" ^\n        String.concat \" \" (List.map fst c.aTypeConstrArgs) ^ \" => \");\n      output_cval_cimpl out (\"  \" ^ ind)\n        (fun out ind v ->\n         output_string out (\"(@ht_cval \" ^\n           (List.assoc v c.aTypeConstrArgs).aTypePairIdent ^ \" _ \" ^ v ^ \")\"))\n        (fun ind v -> get_coq_val ind v (List.assoc v c.aTypeConstrArgs))\n        impl\n    ) cs;\n    output_string out (\"\\n\" ^ ind ^ \"end)\")\n  | ATprod (t1, t2) as d ->\n    let prod_ident = \"struct_\" ^ a_type_desc_to_ident d in\n    output_string out (\"(CVstruct\\n\" ^ ind ^\n      \"(CFcons \" ^ struct_field_name_to_ident prod_ident \"fst\" ^ \" \");\n    output_ctype out (\"    \" ^ ind) t1.aTypeCtype;\n    output_char out ' ';\n    output_string out (\"(@ht_cval \" ^ t1.aTypePairIdent ^ \" _ (fst \" ^ f ^ \"))\");\n    output_string out (\"\\n  \" ^ ind ^\n      \"(CFcons \" ^ struct_field_name_to_ident prod_ident \"snd\" ^ \" \");\n    output_ctype out (\"    \" ^ ind) t2.aTypeCtype;\n    output_char out ' ';\n    output_string out (\"(@ht_cval \" ^ t2.aTypePairIdent ^ \" _ (snd \" ^ f ^ \"))\");\n    output_string out (\"\\n    \" ^ ind ^ \"CFnil)))\")\n  | ATarray (n, t') ->\n    output_string out (\"(array_cval \" ^ t'.aTypePairIdent ^ \" \" ^ f ^ \" \" ^\n      string_of_int n ^ \")\")\n  | ATmapping _ ->\n     coqgen_warning \"Don't know how to output_cval of a mapping\";\n     output_string out \"(* TODO: implement this in output_cval. *)\"\n  | ATlist t' ->\n    coqgen_fatal_error __LOC__ \"output_cval\"\n      (\"List type \" ^ string_of_a_type false t ^ \" marked as provable.\")\n  | ATexternal extype ->\n    coqgen_fatal_error __LOC__ \"output_cval\"\n      (\"External type \" ^ extype.aEXTypeName ^ \" (\" ^ extype.aEXTypeString ^\n       \") marked as provable\")\n\n(* Given f (a string containing the name of a coq variable) and t (a type),\n   output a Coq expression saying that f satisfies the ft_cond.\n *)\nlet output_ft_cond out ind f t =\n  let rec output ind f t lvl = match t.aTypeDesc with\n    | ATbuiltin _ ->\n      output_string out (\"(@ht_ft_cond \" ^ t.aTypePairIdent ^ \" _ \" ^ f ^ \")\")\n    | ATdata (_, _) | ATprod (_, _) | ATarray (_, _) when lvl <> 0 ->\n      output_string out (\"(@ht_ft_cond \" ^ t.aTypePairIdent ^ \" _ \" ^ f ^ \")\")\n\n    | ATdata (_, ATsingleton c) ->\n      output_constr ind (fun fld -> \"(\" ^ fld ^ \" \" ^ f ^ \")\") c lvl\n    | ATdata (_, ATbranches cs) ->\n      output_string out (\"match \" ^ f ^ \" with\");\n      List.iter (fun c ->\n        output_string out (\"\\n\" ^ ind ^ \"| \" ^ c.aTypeConstrName ^ \" \" ^\n          String.concat \" \" (List.map fst c.aTypeConstrArgs) ^ \" => \");\n        output_constr (\"  \" ^ ind) (fun fld -> fld) c lvl\n      ) cs;\n      output_string out (\"\\n\" ^ ind ^ \"end\")\n    | ATprod (t1, t2) ->\n      (*output_char out '(';*)\n      output ind (\"(fst \" ^ f ^ \")\") t1 (lvl + 1);\n      output_string out \" /\\\\ \";\n      output ind (\"(snd \" ^ f ^ \")\") t2 (lvl + 1);\n      (*output_char out ')'*)\n    | ATarray (n, t') ->\n      let var = \"n\" ^ string_of_int lvl in\n      output_string out (\"(forall \" ^ var ^ \", 0 <= \" ^ var ^ \" < \" ^\n        string_of_int n ^ \" ->\\n\" ^ ind);\n      output (\"  \" ^ ind) (\"(ZMap.get \" ^ var ^ \" \" ^ f ^ \")\") t' (lvl + 1);\n      output_char out ')'\n    | ATmapping _ ->\n       coqgen_warning \"Don't know how to output_ft_cond of a mapping\";\n       output_string out \"True (* TODO: implement this in output_ft_cond. *)\"\n    | ATlist _ ->\n      coqgen_fatal_error __LOC__ \"output_ft_cond\"\n        (\"External type \" ^ string_of_a_type false t ^ \" marked as provable\")\n    | ATexternal extype ->\n      coqgen_fatal_error __LOC__ \"output_ft_cond\"\n        (\"External type \" ^ extype.aEXTypeName ^ \" (\" ^ extype.aEXTypeString ^\n         \") marked as provable\")\n  and output_constr ind get_field c lvl = match c.aTypeConstrArgs with\n    | [] -> output_string out \"True\"\n    | args ->\n      let first = ref true in\n      List.iter (fun (i, t') ->\n        if !first\n          then first := false\n          else output_string out (\"\\n\" ^ ind ^ \"/\\\\ \");\n        output (\"  \" ^ ind) (get_field i) t' (lvl + 1)\n      ) args\n  in output ind f t 0\n\n(* Outputs a desugared value of type t. *)\nlet output_default out ind t =\n  let rec output ind t lvl =  match t.aTypeDesc with\n    | ATbuiltin _ ->\n      output_string out (\"(@ht_default \" ^ t.aTypePairIdent ^ \" _)\")\n    | ATdata (_, _) | ATprod (_, _) | ATarray (_, _) when lvl <> 0 ->\n      output_string out (\"(@ht_default \" ^ t.aTypePairIdent ^ \" _)\")\n\n    | ATdata (_, ATsingleton c) ->\n      let record_field_leftover = ref \"{| \" in\n      List.iter (fun (i, t') ->\n        output_string out (!record_field_leftover ^ i ^ \" := \");\n        record_field_leftover := \";\\n   \" ^ ind;\n        output (\"     \" ^ ind) t' (lvl + 1);\n      ) c.aTypeConstrArgs;\n      output_string out (\"\\n\" ^ ind ^ \"|}\")\n    | ATdata (_, ATbranches ls) ->\n      let c = try\n          (* 1. find a constructor with [a_cimpl] being [ACdefault] *)\n          List.find (function\n              { aTypeConstrImpl = Some { aImplDesc = ACdefault } } -> true\n            | _ -> false) ls\n        with Not_found -> try\n          (* 2. find a constructor with no arguments *)\n          List.find (function { aTypeConstrArgs = [] } -> true | _ -> false) ls\n        with Not_found ->\n          (* 3. we tried our best, now just use an arbitrary one *)\n          List.hd ls\n      in if c.aTypeConstrArgs <> [] then output_char out '(';\n         output_string out c.aTypeConstrName;\n         List.iter (fun (_, t') ->\n           output_char out ' ';\n           output (\"  \" ^ ind) t' (lvl + 1)) c.aTypeConstrArgs;\n         if c.aTypeConstrArgs <> [] then output_char out ')'\n    | ATprod (t1, t2) ->\n      output_char out '(';\n      output ind t1 (lvl + 1);\n      output_string out \", \";\n      output ind t2 (lvl + 1);\n      output_char out ')';\n    | ATarray (_, t') ->\n      output_string out \"(ZMap.init \";\n      output ind t' (lvl + 1);\n      output_char out ')'\n    | ATmapping _ -> \n      output_string out (\"(@ht_default \" ^ t.aTypePairIdent ^ \" _)\")\n    | ATlist _ ->\n       output_string out \"nil\"\n    | ATexternal ({ aEXTypeDefault = None } as extype) ->\n      coqgen_fatal_error __LOC__ \"output_default\"\n        (\"External type \" ^ extype.aEXTypeName ^ \" (\" ^ extype.aEXTypeString ^\n         \") has no default value\")\n    | ATexternal { aEXTypeDefault = Some (s, _) } ->\n      output_string out s\n  in output ind t 0\n\n(* note: the \"valid_ft_cond\" intuitively says that a value is not the default value. *)\nlet output_valid_ft_cond out ind f t =\n  let rec output ind f t lvl = match t.aTypeDesc with\n    | ATbuiltin _ ->\n      output_string out (\"@ht_valid_ft_cond \" ^ t.aTypePairIdent ^ \" _ \" ^ f ^ \"\")\n    | ATdata (_, _) | ATprod (_, _) | ATarray (_, _) when lvl <> 0 ->\n      output_string out (\"@ht_valid_ft_cond \" ^ t.aTypePairIdent ^ \" _ \" ^ f ^ \"\")\n\n    | ATdata (_, ATsingleton c) ->\n      output_constr ind (fun fld -> \"(\" ^ fld ^ \" \" ^ f ^ \")\") c lvl\n    | ATdata (_, ATbranches cs) ->\n      output_string out (\"match \" ^ f ^ \" with\");\n      List.iter (fun c ->\n        output_string out (\"\\n\" ^ ind ^ \"| \" ^ c.aTypeConstrName ^ \" \" ^\n          String.concat \" \" (List.map fst c.aTypeConstrArgs) ^ \" => \");\n        match c.aTypeConstrImpl with\n        | Some { aImplDesc = ACdefault } -> output_string out \"False\"\n        | Some _ -> output_constr (\"  \" ^ ind) (fun fld -> fld) c lvl\n        | None -> coqgen_fatal_error __LOC__ \"output_valid_ft_cond\"\n                    (\"Provable data type with constructor \" ^\n                     c.aTypeConstrName ^ \" with no implementation\")\n      ) cs;\n      output_string out (\"\\n\" ^ ind ^ \"end\")\n    | ATprod (t1, t2) ->\n      (*output_char out '(';*)\n      output ind (\"(fst \" ^ f ^ \")\") t1 (lvl + 1);\n      output_string out \" /\\\\ \";\n      output ind (\"(snd \" ^ f ^ \")\") t2 (lvl + 1);\n      (*output_char out ')'*)\n    | ATarray (n, t') ->\n      let var = \"n\" ^ string_of_int lvl in\n      output_string out (\"(forall \" ^ var ^ \", 0 <= \" ^ var ^ \" < \" ^\n        string_of_int n ^ \" ->\\n\" ^ ind);\n      output (\"  \" ^ ind) (\"(ZMap.get \" ^ var ^ \" \" ^ f ^ \")\") t' (lvl + 1);\n      output_char out ')'\n    | ATmapping _ ->\n       coqgen_warning \"Don't know how to output_valid_ft_cond of a mapping\";\n       output_string out \"True (* TODO: implement this in output_ft_cond. *)\"\n    | ATlist t' ->\n      coqgen_fatal_error __LOC__ \"output_valid_ft_cond\"\n        (\"List type \" ^ string_of_a_type false t  ^ \" marked as provable\")\n    | ATexternal extype ->\n      coqgen_fatal_error __LOC__ \"output_valid_ft_cond\"\n        (\"External type \" ^ extype.aEXTypeName ^ \" (\" ^ extype.aEXTypeString ^\n         \") marked as provable\")\n  and output_constr ind get_field c lvl = match c.aTypeConstrArgs with\n    | [] -> output_string out \"True\"\n    | args ->\n      let first = ref true in\n      List.iter (fun (i, t') ->\n        if !first\n          then first := false\n          else output_string out (\"\\n\" ^ ind ^ \"/\\\\ \");\n        output (\"  \" ^ ind) (get_field i) t' (lvl + 1)\n      ) args\n  in output ind f t 0\n\n(* A type needs an injection if it contains a an imported external type which has a nontrivial injection.\n   (Concretely, we need an injection if the type contains a pointer somewhere. Flatmem and val (raw compcert values)\n   are the most important examples.)\n   *)\nlet need_injection =\n  let rec type_f t = match t.aTypeDesc with\n    | ATbuiltin _ -> false\n    | ATdata (_, ATsingleton c) -> constr_f c\n    | ATdata (_, ATbranches cs) -> List.exists constr_f cs\n    | ATprod (t1, t2) -> type_f t1 || type_f t2\n    | ATarray (_, t') -> type_f t'\n    | ATmapping (_, t') -> type_f t'\n    | ATlist t -> type_f t\n    | ATexternal { aEXTypeLowLevelInv = None } -> false\n    | ATexternal { aEXTypeLowLevelInv = Some _ } -> true\n  and constr_f c =\n    List.exists (fun (_, t) -> type_f t) c.aTypeConstrArgs\n  in type_f\n\n(* If the type needs an injection, output one. Otherwise, use Coq equality. *)\nlet output_ht_inject out ind a b t =\n  let output a b t = output_string out\n        (\"@ht_inject \" ^ t.aTypePairIdent ^ \" _ j \" ^ a ^ \" \" ^ b) in\n  let output_constr ind get_field a b c = match c.aTypeConstrArgs with\n    | [] -> output_string out \"True\"\n    | args ->\n      let first = ref true in\n      List.iter (fun (i, t') ->\n        if !first\n          then first := false\n          else output_string out (\"\\n\" ^ ind ^ \"/\\\\ \");\n        output (get_field a i) (get_field b i) t'\n      ) args in\n\n  if not (need_injection t) then\n    output_string out (a ^ \" = \" ^ b)\n  else match t.aTypeDesc with\n  | ATdata (_, ATsingleton c) ->\n    output_constr ind (fun f fld -> \"(\" ^ fld ^ \" \" ^ f ^ \")\") a b c\n  | ATdata (_, ATbranches cs) ->\n    output_string out (\"match \" ^ a ^ \", \" ^ b ^ \" with\");\n    List.iter (fun c ->\n      output_string out (\"\\n\" ^ ind ^ \"| \" ^ c.aTypeConstrName ^ \" \" ^\n        String.concat \" \" (List.map (fun (i, _) -> a ^ \"_\" ^ i) c.aTypeConstrArgs) ^\n        \", \" ^ c.aTypeConstrName ^ \" \" ^\n        String.concat \" \" (List.map (fun (i, _) -> b ^ \"_\" ^ i) c.aTypeConstrArgs) ^\n        \" => \");\n      output_constr (\"  \" ^ ind) (fun f fld -> f ^ \"_\" ^ fld) a b c\n    ) cs;\n    if List.length cs > 0 then\n      output_string out (\"\\n\" ^ ind ^ \"| _, _ => False\");\n    output_string out (\"\\n\" ^ ind ^ \"end\")\n  | ATprod (t1, t2) ->\n    output (\"(fst \" ^ a ^ \")\") (\"(fst \" ^ b ^ \")\") t1;\n    output_string out \" /\\\\ \";\n    output (\"(snd \" ^ a ^ \")\") (\"(snd \" ^ b ^ \")\") t2;\n  | ATarray (n, t') ->\n    output_string out (\"forall n, (* 0 <= n < \" ^ string_of_int n ^ \" -> *)\\n\" ^ ind);\n    output (\"(ZMap.get n \" ^ a ^ \")\") (\"(ZMap.get n \" ^ b ^ \")\") t';\n  | ATexternal { aEXTypeLowLevelInv = None } ->\n    output_string out (a ^ \" = \" ^ b)\n  | ATexternal { aEXTypeLowLevelInv = Some s } ->\n    output_string out (s ^ \" j \" ^ a ^ \" \" ^ b)\n\n  | _ -> output a b t\n\nlet output_valid_ft_ocond out ind t =\n  let output t = output_string out\n        (\"(@ht_valid_ft_ocond \" ^ t.aTypePairIdent ^ \" _)\") in\n  let output_constr ind c = match c.aTypeConstrArgs with\n    | [] -> output_string out \"otrue1\"\n    | args ->\n      let first = ref true in\n      List.iter (fun (i, t') ->\n        if !first\n          then first := false\n          else output_string out (\"\\n\" ^ ind ^ \"/\\\\ \");\n        output t';\n        output_string out (\" m{ \" ^ i ^ \" }\")\n      ) args in\n\n  match t.aTypeDesc with\n  | ATdata (_, ATsingleton c) ->\n    output_string out (\"(\\n\" ^ ind);\n    output_constr ind c;\n    output_string out \")%oprop1\";\n  | ATdata (_, ATbranches cs) ->\n    output_string out \"oprop1 (fun f => \";\n    output_valid_ft_cond out (\"  \" ^ ind) \"f\" t;\n    output_char out ')'\n    (*\n    output_string out \"(*XXX*) otrue1\"\n    *)\n    (*\n    output_string out (\"match \" ^ a ^ \", \" ^ b ^ \" with\");\n    List.iter (fun c ->\n      output_string out (\"\\n\" ^ ind ^ \"| \" ^ c.aTypeConstrName ^ \" \" ^\n        String.concat \" \" (List.map (fun (i, _) -> a ^ \"_\" ^ i) c.aTypeConstrArgs) ^\n        \", \" ^ c.aTypeConstrName ^ \" \" ^\n        String.concat \" \" (List.map (fun (i, _) -> b ^ \"_\" ^ i) c.aTypeConstrArgs) ^\n        \" => \");\n      output_constr (\"  \" ^ ind) (fun f fld -> f ^ \"_\" ^ fld) a b c\n    ) cs;\n    if List.length cs > 0 then\n      output_string out (\"\\n\" ^ ind ^ \"| _, _ => False\");\n    output_string out (\"\\n\" ^ ind ^ \"end\")\n    *)\n  | ATprod (t1, t2) ->\n    output_char out '(';\n    output t1;\n    output_string out \" m{ fst } /\\\\ \";\n    output t2;\n    output_string out \" m{ snd })%oprop1\"\n  | ATarray (n, t') ->\n    output_string out (\"omap1 (fun p f => forall n, 0 <= n < \" ^\n        string_of_int n ^ \" -> p (ZMap.get n f))\\n\" ^ ind);\n    output t'\n  | ATexternal _ ->\n    output_string out \"otrue1\"\n\n  | _ -> output t\n(*\nlet output_valid_opt out ind f t =\n  let rec output ind f t lvl = match t.aTypeDesc with\n    | ATbuiltin _ ->\n      output_string out (\"(@ht_valid_opt \" ^ t.aTypePairIdent ^ \" _ \" ^ f ^ \")\")\n    | ATdata (_, _) when lvl <> 0 ->\n      output_string out (\"(@ht_valid_opt \" ^ t.aTypePairIdent ^ \" _ \" ^ f ^ \")\")\n\n    | ATdata (_, ATsingleton c) ->\n      output_string out \"fun r k => \";\n      output_constr ind (fun fld -> \"(\" ^ fld ^ \" \" ^ f ^ \")\") c lvl\n    | ATdata (_, ATbranches cs) ->\n      output_string out (\"fun r k => match \" ^ f ^ \" with\");\n      List.iter (fun c ->\n        output_string out (\"\\n\" ^ ind ^ \"| \" ^ c.aTypeConstrName ^ \" \" ^\n          String.concat \" \" (List.map fst c.aTypeConstrArgs) ^ \" => \");\n        match c.aTypeConstrImpl with\n        | Some { aImplDesc = ACdefault } -> output_string out \"None\"\n        | Some _ -> output_constr (\"  \" ^ ind) (fun fld -> fld) c lvl\n        | None -> coqgen_fatal_error __LOC__ \"output_valid_opt\"\n                    (\"Provable data type with constructor \" ^\n                     c.aTypeConstrName ^ \" with no implementation\")\n      ) cs;\n      output_string out (\"\\n\" ^ ind ^ \"end\")\n    | ATprod (t1, t2) ->\n      output_string out \"(Cbind \";\n      output ind (\"(fst \" ^ f ^ \")\") t1 (lvl + 1);\n      output_string out (\"\\n\" ^ ind ^ \"(fun _ => \");\n      output ind (\"(snd \" ^ f ^ \")\") t2 (lvl + 1);\n      output_string out \"))\"\n    | ATarray (n, t') ->\n      let var = \"n\" ^ string_of_int lvl in\n      output_string out (\"Citer \" ^ string_of_int n ^\n        \" (fun \" ^ var ^ \" => \");\n      output (\"  \" ^ ind) (\"(ZMap.get \" ^ var ^ \" \" ^ f ^ \")\") t' (lvl + 1);\n      output_char out ')'\n  and output_constr ind get_field c lvl = match c.aTypeConstrArgs with\n    | [] -> output_string out \"k tt\"\n    | args ->\n      let first = ref true in\n      List.iter (fun (i, t') ->\n        if !first\n          then first := false\n          else output_string out (\"\\n\" ^ ind ^ \"_ (fun _ => \");\n        output (\"  \" ^ ind) (get_field i) t' (lvl + 1)\n      ) args;\n      output_string out (\"\\n\" ^ ind ^ \"_ k\" ^ String.make (List.length args - 1) ')')\n  in output ind f t 0\n*)\n\n(* A \"path\" is a list of numbers which identifies a particular subexpression of a top-level method definition.\n  (The numbers correspond to e.g. the different clauses in a match-expression.)\n  We print such a path as e.g. \"0_0_12\", for use in names of definitions. *)\nlet rec string_of_path path = match path with\n  | []     -> \"\"\n  | [x]    -> string_of_int x\n  | (x::p) -> string_of_int x ^ \"_\" ^ string_of_path p\n\n(* Create a gallina expression of a given type. *)\nlet rec dummy_value_gallina t =\n  match t.aTypeDesc with\n  | ATbuiltin Tint -> \"0\"\n  | ATbuiltin Tuint -> \"Int256.zero\"\n  | ATbuiltin Tbool -> \"true\"\n  | ATbuiltin Tunit ->  \"tt\"\n  | ATdata (_, ATsingleton c)\n  | ATdata (_, ATbranches (c::_)) ->\n     (* If we start supporting properly recursive datatypes this could lead to infinite loops. *)\n     \"(\" ^ c.aTypeConstrName ^ \" \" ^ (String.concat \" \" (List.map (fun (_,t') -> dummy_value_gallina t') c.aTypeConstrArgs)) ^ \")\"\n  | ATprod (t1, t2) -> \"(\" ^ dummy_value_gallina t1 ^ \", \" ^ dummy_value_gallina t2 ^ \")\"\n  | _ -> \"tt (*xxx dummy value not implemented*)\"\n\nlet output_hyper_type_impl out t =\n  let _ = output_string out (\"Global Instance \" ^ t.aTypePairIdent ^\n    \"_hyper_type_impl : HyperTypeImpl \"  ^ t.aTypePairIdent ^ \" :=\") in\n  let _ = match t.aTypeDesc, t.aTypeProvable with\n    | ATarray (n, t'), _ ->       \n        output_string out (\"\n  ZMap_based_array_hyper_type_impl \" ^ t'.aTypePairIdent ^ \" \" ^ string_of_int n ^ \".\\n\")\n    | ATmapping ({aTypeDesc = ATbuiltin t_index}, t'), _\n      when t_index = Tuint || t_index = Taddress ->\n        output_string out (\"\n   Int256Tree_based_hashmap_hyper_type_impl \" ^ t'.aTypePairIdent ^ \".\\n\")\n    | ATmapping _, _ ->\n            coqgen_fatal_error __LOC__ \"output_hyper_type_impl\" \"mapping keys of types other than 'uint' or 'address' are currently unsupported.\"\n    | _, false ->\n      output_string out \" {\n  ht_cval := fun _ => CVany;\n  ht_ft_cond := fun _ => True;\n  ht_default := \";\n      output_default out \"    \" t;\n      output_string out \";\n  ht_valid_ft_cond := fun _ => True;\n  ht_valid_ft_ocond := otrue1;\";\n      output_string out \"\\n}.\\n\"\n    | _, true ->\n      output_string out \" {\\n\";\n      (* XXX refactor the five calls? *)\n      output_string out \"  ht_cval f := \";\n      output_cval out \"    \" \"f\" t;\n      output_string out \";\\n  ht_ft_cond f := \";\n      output_ft_cond out \"    \" \"f\" t;\n      output_string out \";\\n  ht_default := \";\n      output_default out \"    \" t;\n      output_string out \";\\n  ht_valid_ft_cond f := \";\n      output_valid_ft_cond out \"    \" \"f\" t;\n      output_string out \";\\n  ht_valid_ft_ocond := \";\n      output_valid_ft_ocond out \"    \" t;\n      (*\n      output_string out \";\\n  ht_inject j a b := \";\n      output_ht_inject out \"    \" \"a\" \"b\" t;\n      output_string out \";\\n  ht_valid_opt f := \";\n      output_valid_opt out \"    \" \"f\" t\n      *)\n      output_string out \"\\n}.\\n\"\n  in output_string out (\"Definition \" ^\n       type_pair_to_hyper_pair_name t.aTypePairIdent ^\n       \" := mk_hyper_type_pair \" ^ t.aTypePairIdent ^ \".\\n\")\n\nlet output_hyper_type out t =\n  if t.aTypeProvable then begin\n    output_string out ( \"Global Instance \" ^ t.aTypePairIdent ^\n      \"_hyper_type : HyperType \"  ^ t.aTypePairIdent);\n    match t.aTypeDesc with\n    | ATbuiltin _ -> output_string out \" := _.\\n\"\n    | ATdata _ | ATprod _ ->\n      output_string out (\".\nProof. solve_algebraic_record_data_type_hyper_type \" ^ t.aTypePairIdent ^\n        \"_hyper_type_impl. Qed.\\n\")\n    | ATarray (n, t') ->\n        output_string out (\" :=\n  ZMap_based_array_hyper_type \" ^ t'.aTypePairIdent ^ \" \" ^ string_of_int n ^ \".\\n\")\n    | ATmapping (t1, t2)  ->\n       if not (t1.aTypeDesc = ATbuiltin Tuint || t1.aTypeDesc = ATbuiltin Taddress) then\n       coqgen_fatal_error __LOC__ \"output_hyper_type\"\n\t\t\t    (\"Currently only mappings keyed on uintegers or addresses are supported, but this mapping is keyed on \" ^ (string_of_a_type false t1) ^ \".\")\t \n       else\n         output_string out (\" :=\n  Int256Tree_based_hashmap_hyper_type \" ^ t2.aTypePairIdent ^ \".\\n\")\n    | ATlist t' ->\n      coqgen_fatal_error __LOC__ \"output_hyper_type\"\n        (\"list type \" ^ string_of_a_type false t ^ \" marked as provable\")\n    | ATexternal extype ->\n      coqgen_fatal_error __LOC__ \"output_hyper_type\"\n        (\"External type \" ^ extype.aEXTypeName ^ \" (\" ^ extype.aEXTypeString ^\n         \") marked as provable\")\n  end  (* [if] t.aTypeProvable *)\n\nlet output_type_naturally_aligned out t =\n  match t.aTypeDesc with\n      | ATdata (i, _) ->\n         output_string out (\"Lemma  \" ^ t.aTypePairIdent\n\t\t\t\t    ^ \"_naturally_aligned : naturally_aligned (unpair_ty \"\n\t\t\t\t    ^ t.aTypePairIdent ^\").\\n\"\n\t\t\t\t    ^ \"Proof. reflexivity. Qed.\\n\")\n      | _ -> ()\n\n\nlet output_hyper_binary_impl_eq out t =\n  let output_eq_expression t a b tt ff =\n#ifdef REDACTED\n    () in\n#else\n    output_string out\n    (\"(* XXX(output_hyper_binary_impl_eq:output_eq_expression) *) \" ^ ff) in\n    (*\n    match a, b with\n  | MMUsable, MMUsable => k true\n  | MMResv, MMResv => k true\n  | _, _ => k false\n  end\n\nmatch a, b with\n  | MMUsable, MMUsable => true\n  | MMResv, MMResv => true\n  | _, _ => false\n  end;\n  *)\n#endif\n\n  match t.aTypeCtype with\n  | ACtstruct _ | ACtarray _ | ACtmapping _ -> ()\n  | _ ->\n    output_string out (\"Global Instance \" ^ t.aTypePairIdent ^\n      \"_hyper_binary_impl_eq : HyperBinaryImpl Oeq \"  ^ t.aTypePairIdent ^\n      \" \" ^ t.aTypePairIdent ^ \" tint_bool := {\n  Hbinary_cond := fun _ _ => True;\n  Hbinary_ocond := otrue2;\n  Hbinary a b := \");\n    output_eq_expression t \"a\" \"b\" \"true\" \"false\";\n    output_string out \"\\n}.\\n\"\n\nlet output_record_hyper_field_impl out struct_type_pair_ident s f ft\n                            offset output_get output_set =\n  output_string out (\"Global Instance \" ^ struct_type_pair_ident ^\n    \"_\" ^ f ^ \"_field_impl : HyperFieldImpl \" ^ struct_type_pair_ident ^ \" \" ^\n    ft.aTypePairIdent ^ \" \" ^ struct_field_name_to_ident s f ^ \" := {\n  Hfield_get s := \");\n  output_get out \"s\"; (* fst s *)\n  output_string out \";\\n  Hfield_set v s := \";\n  output_set out \"v\" \"s\"; (* (v, snd s) *)\n  (*\n  output_string out \";\\n  Hfield_get_opt s := Csome (\";\n  output_get out \"s\"; (* fst s *)\n  output_string out \");\\n  Hfield_set_opt v s := Csome (\";\n  output_set out \"v\" \"s\"; (* (v, snd s) *)\n  output_string out \")\n}.\\n\"\n  *)\n  output_string out \"\n}.\\n\"\n\nlet output_twobranch_hyper_field_impl out t s cs f ft cf\n                                      offset valid_branch default_branch  =\n  output_string out (\"Global Instance \" ^ t.aTypePairIdent ^\n    \"_\" ^ f ^ \"_field_impl : HyperFieldImpl \" ^ t.aTypePairIdent ^ \" \" ^\n    ft.aTypePairIdent ^ \" \" ^ struct_field_name_to_ident cs cf ^ \" := {\n  Hfield_get s := match s with \\n\");   (* TODO: generate fresh names instead of just \"s\" and \"v\". *)\n  output_string out (\"                    | \"\n\t\t     ^ valid_branch.aTypeConstrName ^ \" \");\n  List.iter (fun (f', _) ->\n\t       output_string out (f' ^ \" \"))\n\t    valid_branch.aTypeConstrArgs;\n  output_string out (\" => \" ^ f ^ \"\\n\");\n  output_string out (\"                    | \"\n\t\t     ^ default_branch.aTypeConstrName ^ \" => \"\n\t\t     ^ dummy_value_gallina ft ^\"\\n\");\n  output_string out \"                  end\";\n  output_string out \";\\n  Hfield_set v s := match s with \\n\";\n  output_string out (\"                      | \"\n\t\t     ^ valid_branch.aTypeConstrName ^ \" \");\n  List.iter (fun (f', _) ->\n\t       output_string out (f' ^ \" \"))\n\t    valid_branch.aTypeConstrArgs;\n  output_string out (\" => \" ^ valid_branch.aTypeConstrName ^ \" \");\n  List.iter (fun (f', _) ->\n\t     if (f'<>f)\n\t       then output_string out (f' ^ \" \")\n\t       else output_string out (\"v \"))\n\t    valid_branch.aTypeConstrArgs;\n  output_string out (\"\\n                      | \"\n\t\t     ^ default_branch.aTypeConstrName ^ \" => \"\n\t\t     ^ default_branch.aTypeConstrName ^\"\\n\");\n  output_string out (\"                    end\\n\");\n  output_string out \"\n}.\\n\"\n\nlet output_record_hyper_field out struct_t s  f t =\n  if struct_t.aTypeProvable then\n    output_string out (\"Global Instance \" ^ struct_t.aTypePairIdent ^\n      \"_\" ^ f ^ \"_field : HyperField \" ^\n      struct_t.aTypePairIdent ^ \" \" ^\n      t.aTypePairIdent ^ \" \" ^ struct_field_name_to_ident s f ^ \".\nProof. Admitted. \\n\")\n\nlet output_twobranch_hyper_field out struct_t s cs f cf t =\n  if struct_t.aTypeProvable then\n    output_string out (\"Global Instance \" ^ struct_t.aTypePairIdent ^\n      \"_\" ^ f ^ \"_field : HyperField \" ^\n      struct_t.aTypePairIdent ^ \" \" ^\n      t.aTypePairIdent ^ \" \" ^ struct_field_name_to_ident cs cf ^ \".\nProof. solve_twobranch_type_hyper_field. Admitted.\\n\")\n\n(*\t\t  \nlet output_record_hyper_field_passthrough out t s f ft =\n  output_string out (\"Global Instance \" ^ t.aTypePairIdent ^\n    \"_\" ^ f ^ \"_field_passthrough : HyperFieldPassthrough \" ^\n    t.aTypePairIdent ^ \" \" ^\n    ft.aTypePairIdent ^ \" \" ^ struct_field_name_to_ident s f ^ \".\nProof. esplit; simpl;\n  solve [\n    intros; subst; congruence\n  | intros ? ? ? ? ? ? []; auto\n  | intros ? ? ? []; auto ].\nQed.\\n\")\n\nlet output_twobranch_hyper_field_passthrough out t s cs f cf ft =\n  output_string out (\"Global Instance \" ^ t.aTypePairIdent ^\n    \"_\" ^ f ^ \"_field_passthrough : HyperFieldPassthrough \" ^\n    t.aTypePairIdent ^ \" \" ^\n    ft.aTypePairIdent ^ \" \" ^ struct_field_name_to_ident cs cf ^ \".\nProof. esplit; [intros j a b | intros j av a bv b]; destruct a, b; congruence. Qed.\n\")\n *)\n\nlet output_hyper_index_impl out array_type_pair_ident n t' =\n  output_string out (\"Global Instance \" ^ array_type_pair_ident ^\n    \"_index_impl : HyperIndexImpl \" ^ array_type_pair_ident ^ \" \" ^ t'.aTypePairIdent ^ \" :=\");\n    output_string out (\"\n  ZMap_based_array_hyper_index_impl \" ^ t'.aTypePairIdent ^ \" \" ^ string_of_int n ^ \".\\n\")\n  (*\n  output_string out (\"Global Instance \" ^ array_type_pair_ident ^\n    \"_index_impl : HyperIndexImpl \" ^ array_type_pair_ident ^ \" \" ^\n    t'.aTypePairIdent ^ \" := {\n  Hindex_size := \" ^ string_of_int n ^ \";\n  Hindex_get idx ar := ZMap.get idx ar;\n  Hindex_set idx elem ar := ZMap.set idx elem ar\n}.\\n\")\n  *)\n  (*;\n  Hindex_get_opt idx ar := Csome (ZMap.get idx ar);\n  Hindex_set_opt idx elem ar := fun r k =>\n    if zle 0 idx && zlt idx \" ^ string_of_int n ^ \" then k (ZMap.set idx elem ar) else None\n  *)\n\nlet output_hyper_index out array_t n t' =\n  if array_t.aTypeProvable then begin\n    output_string out (\"Global Instance \" ^ array_t.aTypePairIdent ^\n      \"_index : HyperIndex \" ^ array_t.aTypePairIdent ^ \" \" ^ t'.aTypePairIdent ^ \" :=\");\n      output_string out (\"\n  ZMap_based_array_hyper_index \" ^ t'.aTypePairIdent ^ \" \" ^ string_of_int n ^ \".\\n\")\n  end  (* [if] array_t.aTypeProvable *)\n\nlet output_hyper_hash_impl out type_pair_ident t1 t2 =\n  output_string out (\"Global Instance \" ^ type_pair_ident ^\n\t\t       \"_index_impl : HyperIntHashImpl \" ^ type_pair_ident ^ \" \" ^ t2.aTypePairIdent ^ \" :=\");\n  if not (t1.aTypeDesc = ATbuiltin Tuint || t1.aTypeDesc = ATbuiltin Taddress) then\n       coqgen_fatal_error __LOC__ \"output_hyper_type\"\n\t\t\t    (\"Currently only mappings keyed on uintegers or addresses are supported.\")  \n  else\n        output_string out (\"\n  Int256Tree_based_hashmap_hash_impl \" ^ t2.aTypePairIdent ^ \".\\n\")\n\nlet output_hyper_hash out type_pair_ident t1 t2 =\n  output_string out (\"Global Instance \" ^ type_pair_ident ^\n\t\t       \"_hash : HyperIntHash \" ^ type_pair_ident ^ \" \" ^ t2.aTypePairIdent ^ \" :=\");\n  if not(t1.aTypeDesc = ATbuiltin Tuint || t1.aTypeDesc = ATbuiltin Taddress) then\n       coqgen_fatal_error __LOC__ \"output_hyper_type\"\n\t\t\t    (\"Currently only mappings keyed on uintegers or addresses are supported.\")  \n  else\n        output_string out (\"\n  Int256Tree_based_hashmap_hash \" ^ t2.aTypePairIdent ^ \".\\n\")\n\t\t  \nlet output_hyper_index_passthrough out array_type_pair_ident n t' =\n  output_string out (\"Global Instance \" ^ array_type_pair_ident ^\n    \"_index_passthrough : HyperIndexPassthrough \" ^ array_type_pair_ident ^ \" \" ^\n    t'.aTypePairIdent ^ \" :=\n  ZMap_based_array_hyper_index_passthrough \" ^ t'.aTypePairIdent ^ \" \" ^ string_of_int n ^ \".\\n\")\n  (*\n  output_string out (\"Global Instance \" ^ array_type_pair_ident ^\n    \"_index_passthrough : HyperIndexPassthrough \" ^ array_type_pair_ident ^ \" \" ^\n    t'.aTypePairIdent ^ \".\nProof. esplit; simpl; congruence. Qed.\\n\")\n  *)\n\n(* Take an environment env, a name of a type i, and the description of the type t, output all necessary definitions for the type.\n   (Naming convention: This function opens the output channels itself, so it's called gen_ instead of output_.)\n *)\nlet gen_type env i t =\n  let type_out = env.coq_DataTypes in\n  let ops_out = env.coq_DataTypeOps in\n  match t.aTypeDesc with\n  | ATdata (i', _) when i <> i' ->\n    output_string type_out (\"\\nDefinition \" ^ i ^ \" := \" ^ i' ^ \".\\n\")\n  | _ as d when i <> a_type_desc_to_ident d ->\n    output_string type_out (\"\\nDefinition \" ^ i ^ \" := \");\n    output_type_expr type_out \"  \" t;\n    output_string type_out (\".\\n\")\n  | _ ->\n    let _ = (* (Coq) data type definition *)\n      output_char type_out '\\n';\n      match t.aTypeDesc with\n      | ATdata (_, ATsingleton c) -> gen_struct_type env i c\n      | ATdata (_, ATbranches cs) -> gen_data_type env i cs\n      | _ ->\n        output_string type_out (\"Definition \" ^ i ^ \" := \");\n        output_type_expr type_out \"  \" t;\n        output_string type_out (\".\\n\") in\n    let _ = (* Type pair notation *)\n      output_prepare_ctype env ops_out t.aTypeCtype;\n      output_string ops_out (\"Definition \" ^ t.aTypePairIdent ^\n        \" := (Tpair \" ^ i ^ \" \");\n      output_ctype ops_out \"  \" t.aTypeCtype;\n      output_string ops_out \").\\n\" in\n    let _ = (* [HyperTypeImpl] and [HyperBinaryImpl Oeq] *)\n      output_hyper_type_impl ops_out t;\n      output_hyper_type ops_out t;\n      output_hyper_binary_impl_eq ops_out t in\n    (* let _ = (* naturally_aligned *)\n      output_type_naturally_aligned ops_out t in *)\n    let _ = (* [HyperFieldImpl] and [HyperIndexImpl] *)\n      match t.aTypeDesc with\n      | ATprod (t1, t2) as d ->\n        output_cstruct_ident env\n          (struct_field_name_to_ident (\"struct_\" ^ a_type_desc_to_ident d) \"fst\");\n        output_record_hyper_field_impl\n          ops_out t.aTypePairIdent\n          (\"struct_\" ^ a_type_desc_to_ident d) \"fst\" t1 0\n          (fun out s -> output_string out (\"fst \" ^ s))\n          (fun out v s -> output_string out (\"(\" ^ v ^ \", snd \" ^ s ^ \")\"));\n        output_record_hyper_field\n          ops_out t (\"struct_\" ^ a_type_desc_to_ident d) \"fst\" t1;\n(*        output_record_hyper_field_passthrough\n          ops_out t\n          (\"struct_\" ^ a_type_desc_to_ident d) \"fst\" t1; *)\n        output_cstruct_ident env\n          (struct_field_name_to_ident (\"struct_\" ^ a_type_desc_to_ident d) \"snd\");\n        output_record_hyper_field_impl\n          ops_out t.aTypePairIdent\n          (\"struct_\" ^ a_type_desc_to_ident d) \"snd\" t2\n          1 (* (calign (csizeof t1.aTypeCtype) (calignof t2.aTypeCtype)) *)\n          (fun out s -> output_string out (\"snd \" ^ s))\n          (fun out v s -> output_string out (\"(fst \" ^ s ^ \", \" ^ v ^ \")\"));\n        output_record_hyper_field\n          ops_out t (\"struct_\" ^ a_type_desc_to_ident d) \"snd\" t2;\n(*        output_record_hyper_field_passthrough\n          ops_out t\n          (\"struct_\" ^ a_type_desc_to_ident d) \"snd\" t2 *)\n      | ATdata (i, ATsingleton c) ->\n        let pos = ref 0 in\n        List.iter (fun (f, ft) ->\n            (*let offset = calign !pos (calignof ft.aTypeCtype) in *)\n          output_cstruct_ident env (struct_field_name_to_ident i f);\n          output_record_hyper_field_impl ops_out t.aTypePairIdent i f ft !pos(*offset*)\n            (fun out s -> output_string out (f ^ \" \" ^ s))\n            (fun out v s ->\n              output_string out c.aTypeConstrName;\n              List.iter (fun (f', _) ->\n                if f' = f\n                  then output_string out (\" \" ^ v)\n                  else output_string out (\" (\" ^ f' ^ \" \" ^ s ^ \")\")\n              ) c.aTypeConstrArgs);\n          output_record_hyper_field ops_out t i f ft;\n          (* output_record_hyper_field_passthrough ops_out t i f ft; *)\n          pos := !pos + 1 (*offset + csizeof ft.aTypeCtype*)\n        ) c.aTypeConstrArgs\n      | ATdata (i, ATbranches [{ aTypeConstrImpl = Some {aImplDesc= ACdefault}} as cd;\n\t\t\t       { aTypeConstrImpl = Some ({aImplDesc=ACstruct cs} as impl)} as c])\n      | ATdata (i, ATbranches [{ aTypeConstrImpl = Some ({aImplDesc=ACstruct cs}  as impl)} as c ;\n\t\t\t       { aTypeConstrImpl = Some {aImplDesc = ACdefault}} as cd]) ->\n        let pos = ref 0 in\n        List.iter2 (fun (f, ft) (cf, _cfimpl) ->\n\t  let offset = calign !pos (calignof ft.aTypeCtype) in\n\t  let ci = cimpl_struct_name impl in\n          output_cstruct_ident env (struct_field_name_to_ident ci cf);\n          output_twobranch_hyper_field_impl ops_out t i ci f ft cf offset c cd;\n          output_twobranch_hyper_field ops_out t i ci f cf ft;\n          (* output_twobranch_hyper_field_passthrough ops_out t i ci f cf ft; *)\n          pos := offset + csizeof ft.aTypeCtype\n        ) c.aTypeConstrArgs cs\n      | ATarray (n, t') ->\n        output_hyper_index_impl ops_out t.aTypePairIdent n t';\n        output_hyper_index ops_out t n t';\n      | ATmapping (t1, t2) ->\n         output_hyper_hash_impl ops_out t.aTypePairIdent t1 t2;\n         output_hyper_hash ops_out t.aTypePairIdent t1 t2;\n      | _ -> ()\n    in ()\n\nlet gen_type_arg_ret env t =\n  (* Note: this is an example of how incremental files are used. If it already contained a definition, we don't write a new one. *)\n  if not (Hashtbl.mem env.arg_ret_idents t.aTypePairIdent) then begin\n    Hashtbl.add env.arg_ret_idents t.aTypePairIdent (\"HyperArgRet \" ^ t.aTypePairIdent);\n    output_string env.coq_DataTypeProofs (\n#ifdef REDACTED\n      \"\")\n#else\n    \"\n(* (* commented out because the Ethereum backend doesn't do any proofs. *)\nGlobal Instance \" ^ t.aTypePairIdent ^ \"_hyper_arg_ret : HyperArgRet \" ^ t.aTypePairIdent ^ \".\nProof. esplit.\n  - (* ht_basic *) admit.\n  - (* ht_cast_ident *) admit.\n  - (* ht_injective *) admit.\n  - (* ht_inject_refl *) admit.\n  - (* ht_has_type *) admit.\nQed.\\n*)\\n\")\n#endif\n  end\n\nlet compcert_string_of_unop = function\n  | OPneg -> \"Oneg\"\n  | OPnot -> \"Onotbool\"\n  | OPbitnot -> \"Onotint\"\n  | OPbitneg -> \"Onotint\"\n  | OPsha_1 -> \"Osha_1\"\n\nlet compcert_string_of_binop = function\n  | OPplus -> \"Oadd\"\n  | OPminus -> \"Osub\"\n  | OPtimes -> \"Omul\"\n  | OPdivide -> \"Odiv\"\n  | OPremainder -> \"Omod\"\n  | OPand -> \"Oand\"\n  | OPor -> \"Oor\"\n  | OPeq -> \"Oeq\"\n  | OPne -> \"One\"\n  | OPlt -> \"Olt\"\n  | OPle -> \"Ole\"\n  | OPgt -> \"Ogt\"\n  | OPge -> \"Oge\"\n  | OPshl -> \"Oshl\"\n  | OPshr -> \"Oshr\"\n  | OPxor -> \"Oxor\"\n  | OPbitand -> \"Oand\"\n  | OPbitor -> \"Oor\"\n  | OPsha_2 -> \"Osha_2\"\n\nlet gallina_string_of_unop = function\n  | OPneg -> \"-\"\n  | OPnot -> \"negb\"\n  | OPbitnot -> \"Z.lnot\"\n  | OPbitneg -> \"4294967296 -\"\n  | OPsha_1 -> \"hashval_hash1\"\n\nlet gallina_string_of_binop_prefix = function\n  | OPplus -> \"Z.add\"\n  | OPminus -> \"Z.sub\"\n  | OPtimes -> \"Z.mul\"\n  | OPdivide -> \"Z.div\"\n  | OPremainder -> \"Z.modulo\"\n  | OPand -> \"andb\"\n  | OPor -> \"orb\"\n  | OPeq -> \"Z.eqb\"\n  | OPne -> \"(fun x y => negb (Z.eqb x y))\"\n  | OPlt -> \"Z.ltb\"\n  | OPle -> \"Z.leb\"\n  | OPgt -> \"Z.gtb\"\n  | OPge -> \"Z.geb\"\n  | OPshl -> \"Z.shiftl\"\n  | OPshr -> \"Z.shiftr\"\n  | OPxor -> \"Z.lxor\"\n  | OPbitand -> \"Z.land\"\n  | OPbitor -> \"Z.lor\"\n  | OPsha_2 -> \"hashval_hash2\"\n\nlet rec output_rexpr out ind e = match e.aRexprDesc with\n  | AEconst (CONint n) ->\n    output_string out (\"(ECconst_int256 \" ^ e.aRexprType.aTypePairIdent ^ \" \" ^\n      string_of_int n ^ \" (Int256.repr \" ^ string_of_int n ^ \"))\")\n  | AEconst (CONuint n) ->\n    output_string out (\"(ECconst_int256 \" ^ e.aRexprType.aTypePairIdent ^ \" \" ^\n      \"(Int256.repr \" ^ string_of_int n ^ \")\" ^ \" (Int256.repr \" ^ string_of_int n ^ \"))\")\n  | AEconst (CONbool true) ->\n    output_string out \"(ECconst_int256 tint_bool true Int256.one)\"\n  | AEconst (CONbool false) ->\n    output_string out \"(ECconst_int256 tint_bool false Int256.zero)\"\n  | AEconst CONunit ->\n    output_string out \"(ECconst_int256 tvoid_unit tt Int256.zero)\"\n  | AEconst (CONaddress addr) -> \n    output_string out (\"(ECconst_int256 \" ^ e.aRexprType.aTypePairIdent ^ \" \" ^\n      \"(Int256.repr \" ^  (Backend.BinNumsExt.numstring2decimalstring addr) ^ \")\" ^ \" (Int256.repr \" ^ (Backend.BinNumsExt.numstring2decimalstring addr) ^ \"))\")\n  | AEconst CONhashvalue ->\n    output_string out (\"(ECconst_int256 \" ^ e.aRexprType.aTypePairIdent ^ \" \" ^\n      \"(Int256.repr \" ^ string_of_int 0 ^ \")\" ^ \" (Int256.repr \" ^ string_of_int 0 ^ \"))\"\n#ifdef REDACTED\n      )\n#else\n      ^ \"(* todo, need to handle hashvalues correctly*)\")\n#endif\n  | AEconst CONglobalpointer_undef ->\n    output_string out \"(ECconst_int256 tchar_pointer_globalpointer GLOBUndef Int256.zero)\"\n  (*\n  | AEconst CONval_undef ->\n    output_string out \"(ECconst_int256 tint_val Vundef Int256.zero)\"\n  | AEconst CONflatmem_empty ->\n    output_string out \"(ECconst_int256 tint_flatmem empty_flatmem Int256.zero)\"\n  *)\n  | AEconstr_val (c, args) -> (* XXX: should be [], non-empty list need different treatment *)\n    let rec output c = function\n      | [] -> output_string out c.aTypeConstrName\n      | args -> output_string out (\"(\" ^ c.aTypeConstrName);\n        List.iter (fun (_, e) -> match e.aRexprDesc with\n          | AEconst (CONint n) -> output_string out (\" \" ^ string_of_int n)\n          | AEconst (CONbool b) -> output_string out (\" \" ^ string_of_bool b)\n          | AEconst CONunit -> output_string out \" tt\"\n          | AEconst CONhashvalue -> output_string out (\" (hashval_int256 Int256.zero)\")\n          | AEconst CONglobalpointer_undef -> output_string out \" GLOBUndef\"\n          (*\n          | AEconst CONval_undef -> output_string out \" Vundef\"\n          | AEconst CONflatmem_empty -> output_string out \" empty_flatmem\"\n          *)\n          | AEconstr_val (c', args') -> output_char out ' '; output c' args'\n          | _ -> output_string out (\" tt\"\n           ^ \"(*XXX(output_rexpr | ACconstr_val | complex arg)*)\");\n                 output_string out \"(* (Did you forget C synthesis annotations on the type declaration?) *)\"\n        ) args;\n        output_char out ')' in\n    output_string out (\"(ECconst_int256 \" ^ e.aRexprType.aTypePairIdent ^ \" \");\n    output c args;\n    output_string out (\" \" ^ begin match c.aTypeConstrImpl with\n      | None | Some { aImplDesc = ACdefault } -> \"Int256.zero\"\n      | Some { aImplDesc = ACint n } -> \"(Int256.repr \" ^ string_of_int n ^ \")\"\n      | _ -> \"Int256.zero (*XXX(output_rexpr | ACconstr_val | unrecog. cimpl)*)\"\n      end ^ \")\")\n  | AEtemp (n, i) ->\n    output_string out (\"(ECtempvar \" ^ e.aRexprType.aTypePairIdent ^ \" \" ^ string_of_ident n ^ \" (* \" ^ i ^ \" *))\")\n  | AEunop (op, e') ->\n    output_string out (\"(ECunop \" ^ e.aRexprType.aTypePairIdent ^ \" \" ^\n      compcert_string_of_unop op ^ \" \");\n    output_rexpr out ind e';\n    output_char out ')'\n  | AEbinop (op, e1, e2) ->\n    output_string out (\"(ECbinop \" ^ e.aRexprType.aTypePairIdent ^ \" \" ^\n      compcert_string_of_binop op ^ \"\\n\" ^ ind);\n    output_rexpr out (\"  \" ^ ind) e1;\n    output_string out (\"\\n\" ^ ind);\n    output_rexpr out (\"  \" ^ ind) e2;\n    output_char out ')'\n  | AEbuiltin (\"address\",[]) ->\n     output_string out \"(@ECbuiltin0 _ _  _ builtin0_address_impl)\"\n  | AEbuiltin (\"origin\",[]) ->\n     output_string out \"(@ECbuiltin0 _ _  _ builtin0_origin_impl)\"\n  | AEbuiltin (\"caller\",[]) ->\n     output_string out \"(@ECbuiltin0 _ _  _ builtin0_caller_impl)\"\n  | AEbuiltin (\"callvalue\",[]) ->\n     output_string out \"(@ECbuiltin0 _ _  _ builtin0_callvalue_impl)\"\n  | AEbuiltin (\"coinbase\",[]) ->\n     output_string out \"(@ECbuiltin0 _ _  _ builtin0_coinbase_impl)\"\n  | AEbuiltin (\"timestamp\",[]) ->\n     output_string out \"(@ECbuiltin0 _ _  _ builtin0_timestamp_impl)\"\n  | AEbuiltin (\"number\",[]) ->\n     output_string out \"(@ECbuiltin0 _ _  _ builtin0_number_impl)\"\n  | AEbuiltin (\"chainid\",[]) ->\n     output_string out \"(@ECbuiltin0 _ _  _ builtin0_chainid_impl)\"\n  | AEbuiltin (\"selfbalance\",[]) ->\n     output_string out \"(@ECbuiltin0 _ _  _ builtin0_selfbalance_impl)\"\n  | AEbuiltin (\"balance\",[e1]) ->\n     output_string out \"(@ECbuiltin1 _ _ _ _ _ builtin1_balance_impl \\n\";\n     output_rexpr out (\"  \" ^ ind) e1;\n     output_char out ')'\n  | AEbuiltin (\"blockhash\",[e1]) ->\n     output_string out \"(@ECbuiltin1 _ _ _ _ _ builtin1_blockhash_impl \\n\";\n     output_rexpr out (\"  \" ^ ind) e1;\n     output_char out ')'     \n  | AEbuiltin (other,args) -> coqgen_fatal_error __LOC__ \"output_rexpr\"\n               (\"Internal error, encountered unknown builtin \\\"\"^other^\"\\\".\")\n\t\t\nlet rec output_lexpr out obj ind e = match e.aLexprDesc with\n  | AEglob i -> output_string out (\"(LCvar \" ^ obj ^ \"_\" ^ i ^ \"_var)\")\n  | AEfield (e', f) ->\n    output_string out (\"(LCfield \" ^ e.aLexprType.aTypePairIdent ^ \" \" ^\n      begin match e'.aLexprType.aTypeDesc with\n      | ATdata (i, _) -> struct_field_name_to_ident i f\n      | ATprod _ as d ->\n        struct_field_name_to_ident (\"struct_\" ^ a_type_desc_to_ident d) f\n      | _ -> coqgen_fatal_error __LOC__ \"output_lexpr\"\n               \"Only ATdata and ATprod can be accessed through structure field selector\"\n      end ^ \"\\n\" ^ ind);\n    output_lexpr out obj (\"  \" ^ ind) e';\n    output_char out ')'\n  | AEindex (e', idx) ->\n    (* print_endline (string_of_a_type true e'.aLexprType); *)\n    let lc_type = match e'.aLexprType.aTypeDesc with\n    | ATmapping _ -> \"LChash\"\n    | _ -> \"LCindex\" in\n    output_string out (\"(\" ^ lc_type ^ \" \" ^ e.aLexprType.aTypePairIdent ^ \"\\n\" ^ ind);\n    output_lexpr out obj (\"  \" ^ ind) e';\n    output_string out (\"\\n\" ^ ind);\n    output_rexpr out (\"  \" ^ ind) idx;\n    output_char out ')'\n\nlet output_rexpr_gallina out se =\n  let rec output ind e = match e.aRexprDesc with\n    | AEconst (CONint n) -> output_string out (string_of_int n)\n    | AEconst (CONuint n) -> output_string out (string_of_int n)\n    | AEconst (CONaddress addr) -> output_string out (Backend.BinNumsExt.numstring2decimalstring addr)\n    | AEconst (CONbool b) -> output_string out (string_of_bool b)\n    | AEconst CONunit -> output_string out \"tt\"\n    | AEconst CONhashvalue -> output_string out \"(hashval_int256 Int256.zero)\"\n    | AEconst CONglobalpointer_undef -> output_string out \"GLOBUndef\"\n    (*\n    | AEconst CONval_undef -> output_string out \"Vundef\"\n    *)\n    | AEconstr_val (c, []) -> output_string out c.aTypeConstrName\n    | AEconstr_val (c, es) ->\n      output_char out '(';\n      output_string out c.aTypeConstrName;\n      List.iter (fun p -> output_char out ' '; output (\"  \" ^ ind) (snd p)) es;\n      output_char out ')'\n    | AEtemp (n, i) ->\n      output_string out (\"(SpecTree.get \" ^\n        string_of_ident n ^ \" (* \" ^ i ^ \" *) \" ^ se ^ \")\")\n    | AEunop (op, e) ->\n      output_string out (\"(\" ^ gallina_string_of_unop op ^ \" \");\n      output (\"  \" ^ ind) e;\n      output_char out ')'\n    | AEbinop (op, e1, e2) ->\n      output_string out (\"(\" ^ gallina_string_of_binop_prefix op ^ \" \");\n      output (\"  \" ^ ind) e1;\n      output_char out ' ';\n      output (\"  \" ^ ind) e2;\n      output_char out ')'\n    | AEbuiltin (\"address\",[]) ->\n        output_string out \"(me_address me)\"\n    | AEbuiltin (\"origin\",[]) ->\n        output_string out \"(me_origin me)\"\n    | AEbuiltin (\"caller\",[]) ->\n        output_string out \"(me_caller me)\"\n    | AEbuiltin (\"callvalue\",[]) ->\n        output_string out \"(me_callvalue me)\"\n    | AEbuiltin (\"coinbase\",[]) ->\n        output_string out \"(me_coinbase me)\"\n    | AEbuiltin (\"timestamp\",[]) ->\n        output_string out \"(me_timestamp me)\"\n    | AEbuiltin (\"number\",[]) ->\n        output_string out \"(me_number me)\"\n    | AEbuiltin (\"balance\",[e1]) ->\n        output_string out \"(me_balance me)\"\n    | AEbuiltin (\"blockhash\",[e1]) ->\n        output_string out \"(me_blockhash me)\"\n    | AEbuiltin (other,args) -> coqgen_fatal_error __LOC__ \"output_rexpr_gallina\"\n                  (\"Internal error, encountered unknown builtin \\\"\"^other^\"\\\".\")\n      \n  in output\n\nlet output_lexpr_get_gallina out obj se d =\n  let rec output ind (e : Ast.a_lexpr) = match e.aLexprDesc with\n    | AEglob v ->\n      output_string out (\"(\" ^ obj ^ \"_\" ^ v ^ \"_global.(ltype_get) \" ^ d ^ \")\")\n    | AEfield (e', fld) ->\n      output_string out (\"(Hfield_get (id := \" ^\n        begin match e'.aLexprType.aTypeDesc with\n        | ATdata (i, _) -> struct_field_name_to_ident i fld\n        | ATprod _ as d ->\n          struct_field_name_to_ident (\"struct_\" ^ a_type_desc_to_ident d) fld\n        | _ -> coqgen_fatal_error __LOC__ \"output_lexpr\"\n                 \"Only ATdata and ATprod can be accessed through structure field selector\"\n        end ^ \") \");\n      output (\"  \" ^ ind) e';\n      output_char out ')'\n  | AEindex (e', idx) ->\n    output_string out \"(Hindex_get \";\n    output_rexpr_gallina out se (\"    \" ^ ind) idx;\n    output_char out ' ';\n    output (\"  \" ^ ind) e';\n    output_char out ')'\n  in output\n\nlet output_lexpr_set_gallina out obj se v d =\n  let rec output out_v ind e = match e.aLexprDesc with\n    | AEglob var ->\n      output_string out (obj ^ \"_\" ^ var ^ \"_global.(ltype_set) \");\n      out_v ();\n      output_string out (\" \" ^ d);\n    | AEfield (e', fld) ->\n      let field_id = match e'.aLexprType.aTypeDesc with\n        | ATdata (i, _) -> struct_field_name_to_ident i fld\n        | ATprod _ as d ->\n          struct_field_name_to_ident (\"struct_\" ^ a_type_desc_to_ident d) fld\n        | _ -> coqgen_fatal_error __LOC__ \"output_lexpr\"\n                 \"Only ATdata and ATprod can be accessed through structure field selector\" in\n      output\n        (fun _ ->\n          output_string out (\"(Hfield_set (id := \" ^ field_id ^ \") \");\n          out_v ();\n          output_char out ' ';\n          output_lexpr_get_gallina out obj se d ind e';\n          output_char out ')')\n        (\"  \" ^ ind)\n        e'\n    | AEindex (e', idx) ->\n      output\n        (fun _ ->\n          output_string out (\"(@Hindex_set _ _ \" ^\n            e'.aLexprType.aTypePairIdent ^ \"_index_impl \");\n          output_rexpr_gallina out se (\"    \" ^ ind) idx;\n          output_char out ' ';\n          out_v ();\n          output_char out ' ';\n          output_lexpr_get_gallina out obj se d ind e';\n          output_char out ')')\n        (\"  \" ^ ind)\n        e'\n  in output (fun _ -> output_string out v)\n\nlet rec output_compile_time_constant out ind = function\n  | ACONconst c -> output_string out (string_of_constant c)\n  | ACONstruct lst ->\n    let record_field_leftover = ref \"\\n  \"\n    in output_string out \"{|\";\n       List.iter (fun (i, c) ->\n         output_string out (!record_field_leftover ^ ind ^ i ^ \" := \");\n         output_compile_time_constant out (\"  \" ^ ind) c;\n         record_field_leftover := \";\\n  \"\n       ) lst;\n       output_string out (\"\\n\" ^ ind ^ \"|}\")\n  | ACONconstr ({ aTypeConstrName = \"array_init\"; aTypeConstrArgs = [_, t] }, []) ->\n    output_string out \"(ZMap.init \";\n    output_default out (\"  \" ^ ind) t;\n    output_char out ')'\n  | ACONconstr ({ aTypeConstrName = \"array_sets\"; aTypeConstrArgs = [_, t] }, ll) ->\n    let rec output_array_sets index l =\n      match l with\n      | (_,hd)::tl ->\n              output_string out (\"(ZMap.set \" ^ (string_of_int index) ^ \" \");\n              output_compile_time_constant out ind hd;\n              output_char out ' ';\n              output_array_sets (index-1) tl;\n              output_char out ')'\n      | [] ->\n              output_string out \"(ZMap.init \";\n              output_default out (\"  \" ^ ind) t;\n              output_char out ')'\n    in\n    output_array_sets ((List.length ll)-1) (List.rev ll)\n  | ACONconstr ({ aTypeConstrName = \"mapping_init\"; aTypeConstrArgs = [_, t] }, []) ->\n     output_string out \"(Int256Tree.empty \";\n     output_type_expr out \"\" t;\n     output_char out ')'\t\t      \n  | ACONconstr (cstr, []) -> output_string out cstr.aTypeConstrName\n  | ACONconstr (cstr, lst) ->\n    output_string out (\"(\" ^ cstr.aTypeConstrName);\n    List.iter (fun (_, c) ->\n      output_char out ' ';\n      output_compile_time_constant out (\"  \" ^ ind) c\n    ) lst;\n    output_char out ')'\n  | ACONexternal_const (s, _) -> output_string out s\n\nlet rec output_hyper_pair_list out = function\n  | _, [] -> output_string out \"nil\"\n  | varnames, t :: res ->\n    let v, varres = match varnames with\n      | [] -> \"\", []\n      | v :: res -> \"(* \" ^ v ^ \" : *) \",\n      res in\n    output_string out (\"(cons \" ^ v ^\n      type_pair_to_hyper_pair_name t.aTypePairIdent ^ \" \");\n    output_hyper_pair_list out (varres, res);\n    output_char out ')'\nlet output_params out varnames = function\n  | [t] when t.aTypeDesc = ATbuiltin Tunit -> output_string out \"nil\"\n  | params -> output_hyper_pair_list out (varnames, params)\n\nlet rec output_tmp_env out ind depth = function\n  | [] -> output_string out (\"(@AList.empty hyper_type_pair)\" ^ String.make depth ')')\n  | (_, (n, t)) :: res ->\n    output_string out (\"(AList.set \" ^ string_of_ident n ^ \" \" ^\n      type_pair_to_hyper_pair_name t.aTypePairIdent ^ \" \");\n    output_tmp_env out ind (depth + 1) res\n\nexception PrimitiveNotFound of string\n\n(* When calling a primitive from a lower layer, we need to look up\n     which object it is defined in. *)\nlet ident_of_primitive underlay slotname funcname =\n     let o = try (List.assoc slotname underlay.aLayerAllObjects)\n             with Not_found -> raise (PrimitiveNotFound slotname) in\n     (o.aObjectName ^\"_\"^ funcname ^\"_prim\")\n\nlet output_command env out base_layer obj method_full_name =\n  let rec output_HList ind get_hyper_pair_name output_x = function\n    | [] -> output_string out \"HNil\"\n    | x :: xs ->\n      output_string out (\"(HCons \" ^ get_hyper_pair_name x ^ \" _\\n\" ^ ind);\n      output_x out (\"  \" ^ ind) x;\n      output_string out (\"\\n\" ^ ind);\n      output_HList (\"  \" ^ ind) get_hyper_pair_name output_x xs;\n      output_char out ')' in\n  let output_args ind = function\n    | [e] when e.aRexprType.aTypeDesc = ATbuiltin Tunit ->\n      output_string out \"HNil\"\n    | args ->\n      output_HList ind\n        (fun e -> type_pair_to_hyper_pair_name e.aRexprType.aTypePairIdent)\n        output_rexpr\n        args in\n\n  (* XXX: the code before did something differently based on if \"real_field_idents\" is true or not.\n     (See the commented out code in the method below.) We might need to restore that functionality? *)\n  let rec output_struct_fieldname_list i real_field_idents fields = match fields with\n    | [] -> output_string out \"nil\"\n    | (f :: fs) -> output_string out (\"(cons \" ^ struct_field_name_to_ident i f ^ \" \");\n\t\t   output_struct_fieldname_list i real_field_idents fs;\n\t\t   output_string out \")\"\n   in\n\n  let output_constr_command ind el er =\n    let c, ls, cfieldnames, i, real_field_idents =\n      match er.aBigExprDesc, er.aBigExprType.aTypeDesc with\n      | AEstruct (c, ls), ATdata (i, _) \n      | AEconstr (c, ls), ATdata (i, _) ->\n        begin match er.aBigExprType.aTypeCtype with\n        | ACtstruct (cname,cfields) -> c, ls, List.map fst cfields, cname, er.aBigExprType.aTypeProvable\n        | _                         -> c, ls, List.map fst ls,      i,     false\n        end\n      | _, (ATprod _ as d) -> ignore d;\n        coqgen_fatal_error __LOC__ \"output_constr_command\"\n          \"???: can we have pairs for data construction?\"\n      | _ -> coqgen_fatal_error __LOC__ \"output_constr_command\"\n               \"Only true big expression can be on the RHS of a data construction\"\n    in (* XXX: won't work on [PTPerm] or if data type field name differ from\n                C struct field name.\n\n                Need to make use of [c.aTypeConstrImpl] in such cases. *)\n        output_string out (\"(CCconstr\\n\" ^ ind);\n\toutput_struct_fieldname_list  i real_field_idents cfieldnames ;\n\toutput_string out (\"\\n\" ^ ind);\n        output_hyper_pair_list out (List.split c.aTypeConstrArgs);\n        output_string out (\"\\n\" ^ ind);\n        output_lexpr out obj (\"  \" ^ ind) el;\n        output_string out (\"\\n\" ^ ind);\n        output_HList (\"  \" ^ ind)\n          (fun (_, e) -> type_pair_to_hyper_pair_name e.aBigExprType.aTypePairIdent)\n          (fun out ind (f, e) -> match e.aBigExprDesc with\n           | AErexpr e ->\n(*             if real_field_idents then\n               output_string out (\"(\" ^ struct_field_name_to_ident i f ^ \", \")\n             else\n               output_string out (\"(\" ^ string_of_ident 1 ^ \", \"); *)\n             output_rexpr out ind e;\n(*             output_char out ')' *)\n           | AEexternal_const (s, _) ->\n(*             if real_field_idents then\n               output_string out (\"(\" ^ struct_field_name_to_ident i f ^ \", \")\n             else\n               output_string out (\"(\" ^ string_of_ident 1 ^ \", \"); *)\n             output_string out (\"(ECconst_int256 \" ^ e.aBigExprType.aTypePairIdent ^\n                                \" \" ^ s ^ \" Int256.zero)\");\n           | _ -> coqgen_fatal_error __LOC__ \"output_constr_command\"\n                    \"Nested data type construction not supported yet\")\n          ls;\n        output_string out (\"\\n\" ^ ind ^ c.aTypeConstrName ^ \")\") in\n\n  let rec output_matchable_as_lexpr out obj (* se d *) ind m = match m.aMatchableDesc with\n    | AMtemp (id,ident) ->  output_string out \"XXX: don't know how to handle tempvar\"  (* note, this should probably be a lexpr_constr *)\n    | AMlexpr lexpr -> output_lexpr out obj (\" \" ^ ind) lexpr\n  in\n\n  let rec output_matchable_as_rexpr out obj (* se d *) m = match m.aMatchableDesc with\n    | AMtemp (id,ident) ->  output_string out (\"(ECtempvar \" ^ m.aMatchableType.aTypePairIdent\n\t\t\t                       ^ \" \" ^ string_of_int id ^ \"%positive)\")\n    | AMlexpr lexpr -> output_string out \"XXX: don't know how to handle lexpr\"\n  in\n\n  let rec output_matchable_gallina out obj se d ind m = match m.aMatchableDesc with\n    | AMtemp (n, i) ->\n      output_string out (\"(SpecTree.get \" ^\n        string_of_ident n ^ \" (* \" ^ i ^ \" *) \" ^ se ^ \")\")\n    | AMlexpr lexpr -> output_lexpr_get_gallina out obj se d (\" \" ^ ind) lexpr\n  in\n\n  let output_matchable_pattern_gallina out ind pat tenv =\n    if pat.aTypeConstrName=\"CONS\" then\n      match pat.aTypeConstrArgs with\n      | [ (hd,_); (tl,_)] -> output_string out (hd ^ \" :: \" ^ tl)\n      | _ ->  coqgen_fatal_error __LOC__ \"output_matchable_pattern_gallina\" \"internal error, malformed cons pattern\"\n    else if pat.aTypeConstrName=\"NIL\" then\n      output_string out \"nil\"\n    else begin\n\toutput_string out (\"(\" ^ (pat.aTypeConstrName));\n\tList.iter (fun (ident, _) -> output_string out \" \";\n\t        \t             output_string out ident)\n\t\t  (List.rev tenv); \n\toutput_string out \")\"\n      end\n  in\n\n\n  let output_spec_env tmp_env tail_se =\n    let ind = ref \"\\n             \" in\n    List.iter (fun (ident, (tmp_id, tmp_typ)) ->\n\t       if (ident <> \"_\") then begin\n\t\t output_string out (!ind ^\n\t\t\t\t    \"(SpecTree.set \" ^ string_of_ident tmp_id ^ \" \" ^\n\t\t\t\t      type_pair_to_hyper_pair_name tmp_typ.aTypePairIdent ^ \" \" ^ ident);\n                 ind := !ind ^ \"  \"\n\t       end else\n\t\t output_string out \" (\"\n\t      ) tmp_env;\n    output_string out (!ind ^ tail_se ^ \" \" ^\n      String.make (List.length tmp_env) ')') in\n\n  let rec output_matchable_clause_gallina out ind pure path (cls : a_clause) =\n   let body_name = method_full_name ^ \"_match_body_\" ^ string_of_path path in\n   match cls with\n    | (Some pat, tenv, cmd) ->\n\t output_string out (ind ^ \"| \");\n\t output_matchable_pattern_gallina out ind pat tenv;\n\t output_string out \" =>\\n\";\n\t output_string out (ind ^ \"  \" ^ body_name ^ \"_spec\");\n         output_spec_env tenv \"se\\n\";\n         (* output_string out (\"\\n\" ^ ind ^ \"   d r k\\n\"); *)\n    (* The typechecker enforces that the body of a wildcard branch is just \"fail\". *)\n    | (None, tenv, cmd) ->\n\t output_string out (ind ^ \"| _ => mzero\\n\");\n\n  (* There are a few pattern-matching idioms that can be rendered into C code, so we recognize those,\n     and for the other ones we just give up.\n\n     First, if there is just a single constructor of a big type, and then a default type (which fails), then\n     we can translate the case-expression as a projection function. *)\n  and output_projection_style_match scrutinee tenv struct_name fields body = \n    List.iter2 (fun (ident,(tmp_id, tmp_typ)) (fieldname, _) ->\n\t\tif (ident <> \"_\")\n\t\tthen begin\n\t\t output_string out (\"\n          (CClet \" ^ string_of_int tmp_id ^ \"%positive\n                  (CCload (LCfield \" ^ tmp_typ.aTypePairIdent);\n\t\t output_string out (\" \"^ struct_field_name_to_ident struct_name fieldname \n\t\t\t\t\t ^\"\\n                            \");\n\t\t output_matchable_as_lexpr out obj \"                            \" scrutinee;\n                 output_string out \"))\"\n\t         end\n                else\n\t\t  output_string out \"(\")\n\t\t  (List.rev tenv)\n\t\t  fields;\n        output_string out (\"\\n            \" ^ body\n\t\t\t   ^ String.make (List.length tenv) ')')\n\n  (* Second, if all the matched constructors are realized as distinct constant integers, and none of them bind any varaibles,\n     then we can translate the match into a series of if-statements. *)\n  and output_case_style_match scrutinee clss bodyname_stem path ind =\n    let lastclause = List.length clss - 1 in\n    List.iteri (fun i cls ->\n\t\tmatch cls with\n\t\t| (Some c,_,_) when (i<>lastclause) ->\n\t\t   output_string out (ind ^ \"(CCifthenelse\\n\" ^\n\t\t\t              ind ^ \"  (ECbinop tint_bool Oeq\\n\" ^ ind ^ \"     \");\n\t\t   output_matchable_as_rexpr out obj scrutinee;\n                   output_string out (\"\\n\"^ ind ^ \"     \");\n\t\t   output_rexpr out (\"\\n\"^  ind ^ \"     \") { aRexprDesc = AEconstr_val(c, []); aRexprType = scrutinee.aMatchableType};\n                   output_string out (\")\\n\" ^ ind ^ \"       \"\n\t\t\t\t      ^ bodyname_stem ^ (string_of_path (i::path)) ^ \"\\n\")\n\t\t| _ -> output_string out (ind ^ \"       \" ^  bodyname_stem ^ (string_of_path (i::path))\n\t\t\t\t\t  ^ String.make (List.length clss - 1) ')' ^\"\\n\") (* last, maybe catch-all, branch *)\n\t       )\n               clss\n\n  and output ind pure path c = match c.aCmdDesc with\n    | ACskip -> output_string out \"CCskip\"\n    | ACyield e ->\n      output_string out \"(CCyield \";\n      output_rexpr out ind e;\n      output_char out ')'\n\n    | AClet (n, i, c1, c2) ->\n      output_string out (\"(CClet \" ^ \"(* \" ^ i ^ \" := *) \" ^\n      string_of_ident n ^\n        \"\\n\" ^ ind);\n      output (\"  \" ^ ind) pure (1::path) c1;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) pure (2::path) c2;\n      output_char out ')'\n    | ACsequence (c1, c2) ->\n      output_string out (\"(CCsequence\\n\" ^ ind);\n      output (\"  \" ^ ind) pure (1::path) c1;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) pure (2::path) c2;\n      output_char out ')'\n    | ACcall (s, f, es, _, _) ->\n      let o = (try (List.assoc s base_layer.aLayerAllObjects)\n      with Not_found -> raise (PrimitiveNotFound s); Typecheck.dummy_object s) in\n      (match o.aObjectAddress with\n      (* also need to print the addresses in DatatypeOps for easier proof *)\n      | Some addr -> \n        (* this should be CCrespec *)\n\n        (* (CCrespec_opt (@AList.empty hyper_type_pair) (CCpanic tint_Z32)\n        (fun me se =>\n        (FixedSupplyToken_balanceOf_opt (me_address me) (ext_call_me me (Int256.repr 65587))))). *)\n        \n        output_string out (\"(CCrespec_opt\\n\" ^ ind);\n        output_tmp_env out ind 0 c.aCmdEnv;\n        output_string out (\"\\n\" ^ ind);\n        (try \n        output_string out (\"(CCpanic \" ^ (List.find (fun m -> m.aMethodName = f) o.aObjectMethods).aMethodType.aMethodReturnType.aTypePairIdent ^ \")\")\n        with Not_found -> ());\n        output_string out (\"\\n\" ^ ind);\n        output_string out (\"(fun me se => (\");\n        (* output_string out \"(@bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d => put (execStateT (\"; *)\n        let o = try (List.assoc s base_layer.aLayerAllObjects)\n                with Not_found -> raise (PrimitiveNotFound s) in\n        output_string out (o.aObjectName ^\"_\"^ f ^\"_opt \");\n        \n        let rec output_args_gallina args = match args with\n          | [] -> output_string out \" \"\n          | x :: xs -> \n            match x.aRexprDesc with\n            | AEconst CONunit -> output_string out \" \"\n            | _ -> \n              output_string out \"(\";\n              (match x.aRexprDesc with \n              | AEconst (CONuint n) -> output_string out \"Int256.repr \"\n              | AEconst (CONaddress addr) -> output_string out \"Int256.repr \"\n              | _ -> output_string out \"\");\n              output_rexpr_gallina out \"se\" (\"    \" ^ ind) x;\n              output_string out \") \";\n              output_args_gallina xs\n        in\n        output_args_gallina es;\n\n        output_string out \"(ext_call_me me \";\n        output_string out (\"(Int256.repr \" ^  (Backend.BinNumsExt.numstring2decimalstring addr) ^ \")\");\n        output_string out \"))))\"\n      | None -> \n        output_string out (\"(CCcall \" ^ ident_of_primitive base_layer s f ^ \"\\n\" ^ ind);\n        output_args (\"  \" ^ ind) es;\n        output_char out ')')\n    | ACtransfer (e1, e2) ->\n      output_string out \"(CCtransfer \";\n      output_rexpr out ind e1;\n      output_rexpr out ind e2;\n      output_char out ')'\n    | ACcond (e, c_then, c_else) ->\n      output_string out \"(CCifthenelse \";\n      output_rexpr out (\"  \" ^ ind) e;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) pure (1::path) c_then;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) pure (2::path) c_else;\n      output_char out ')'\n    | ACfor (n_iter, i, e_start, n_end, e_end, c, None) ->\n      output_string out (\"(CCfor (* \" ^ i ^ \" := *) \" ^ string_of_ident n_iter ^  (* XXX: probably need to adjust the path here somewhere? *)\n        \" \" ^ string_of_ident n_end ^ \" \");\n      output_rexpr out (\"  \" ^ ind) e_start;\n      output_char out ' ';\n      output_rexpr out (\"  \" ^ ind) e_end;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) pure path c;\n      output_char out ')';\n    | ACfor (n_iter, i, e_start, n_end, e_end, c0, Some cc) ->\n      if pure then\n        coqgen_fatal_error __LOC__ \"output_command\"\n          \"for command under pure context\";\n      output_string out (\"(CCrespec_opt\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      output_string out (\"\\n\" ^ ind ^\n        method_full_name ^ \"_slice_\" ^ cc.aCapturedName ^ \"\\n\" ^ ind ^\n        \"(fun se d r k =>\\n\" ^ ind ^\n        \" match \" ^ cc.aCapturedName);\n      List.iter (fun (_, (tmp_id, _)) ->\n        output_string out (\" (SpecTree.get \" ^ string_of_ident tmp_id ^ \" se)\")\n      ) cc.aCapturedTemp;\n      output_string out (\" d with\\n\" ^ ind ^\n        \" | Some a => k (a, tt)\\n\" ^ ind ^\n        \" | None => None\\n\" ^ ind ^\n        \" end))\")\n    | ACmatch (e, cls) when pure ->\n      output_string out (\"(CCrespec\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      output_string out (\"\\n\" ^ ind);\n      output_string out (\"(CCpanic \" ^ c.aCmdType.aTypePairIdent ^ \")\");\n      output_string out (\"\\n\" ^ ind);\n      output_string out \"(fun se => @ret _ (@Monad_DS GlobalLayerSpec) _ ht_default (*XXX(output_command | ACmatch when pure)*))\";\n      output_char out ')'\n\n    | ACmatch (e, clss) (* when not pure *)->\n      output_string out (\"(CCrespec_opt\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      let is_simple_int c =  match c with\n\t| (Some { aTypeConstrImpl = Some {aImplDesc = ACint _}}, [], _) -> true\n\t| (None, _, _) -> true\n\t| _ -> false\n      in\n      begin match clss with\n\t    | [(Some { aTypeConstrImpl = Some {aImplDesc = ACstruct fields; aImplType = ACtstruct (struct_name,_)} }, tenv, cmd); (None,_,_)]\n\t    | [(Some { aTypeConstrImpl = Some {aImplDesc = ACstruct fields; aImplType = ACtstruct (struct_name,_)} }, tenv, cmd)]\n               -> output_string out (\"\\n\" ^ ind);\n\t\t  output_projection_style_match e tenv struct_name fields (method_full_name ^ \"_match_body_\" ^ string_of_path (0::path) )\n\t    | _ when List.for_all is_simple_int clss\n\t       -> output_string out (\"\\n\");\n\t\t  output_case_style_match e clss (method_full_name ^ \"_match_body_\") path ind \n\t    | _ -> coqgen_warning (\"Don't know how to synthesise C code for the pattern match on \" ^ string_of_a_matchable e);\n\t\t   output_string out (\"(CCpanic \" ^ c.aCmdType.aTypePairIdent ^ \")\")\n      end;\n      output_string out (\"\\n\" ^ ind);\n      output_string out (\"(fun se => @bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>\\n\" ^ ind);   (* todo: pick fresh names for these vars? *)\n      output_string out \"  match \";\n      output_matchable_gallina out obj \"se\" \"d\" ind e;\n      output_string out  \" with\\n\" ;\n      List.iteri (fun i cls -> output_matchable_clause_gallina out (\"    \" ^ ind) pure (i::path) cls)  clss;\n      output_string out \"end)))\"\n    | ACemit _ ->\n       coqgen_warning \"'emit' statements are currently ignored by the coq backend.\";\n       output_string out \"CCskip\"\n\n    | ACload e ->\n      output_string out \"(CCload \";\n      output_lexpr out obj ind e;\n      output_char out ')'\n    | ACstore (el, er) ->\n      output_string out (\"(CCstore\\n\" ^ ind);\n      output_lexpr out obj (\"  \" ^ ind) el;\n      output_string out (\"\\n\" ^ ind);\n      output_rexpr out (\"  \" ^ ind) er;\n      output_char out ')'\n    | ACconstr (el, er) -> output_constr_command ind el er\n\n    | ACfail ->\n      output_string out (\"(CCpanic \" ^ c.aCmdType.aTypePairIdent ^ \")\")\n    | ACassert c ->\n      output_string out \"(CCassert \";\n      output ind pure path c;\n      output_char out ')'\n    | ACdeny c ->\n      output_string out \"(CCdeny \";\n      output ind pure path c;\n      output_char out ')'\n    | ACghost c ->\n      output_string out \"(CCghost \";\n      output ind pure path c;\n      output_char out ')'\n\n    | ACfirst (n_iter, i, e_start, n_end, e_end, n_c, c, c_then, c_else, None) ->\n      output_string out (\"(CCfirst (* \" ^ i ^ \" := *) \" ^ string_of_ident n_iter ^\n        \" \" ^ string_of_ident n_end ^ \" \" ^ string_of_ident n_c ^ \" \");\n      output_rexpr out (\"  \" ^ ind) e_start;\n      output_char out ' ';\n      output_rexpr out (\"  \" ^ ind) e_end;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) true (1::path) c;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) pure (2::path) c_then;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) pure (3::path) c_else;\n      output_char out ')'\n    | ACfirst (n_iter, i, e_start, n_end, e_end, n_c, _, _, _, Some cc) ->\n      let slice_name = method_full_name ^ \"_slice_\" ^ cc.aCapturedName in\n      let args = String.concat \"\" (List.map (fun (_, (tmp_id, _)) ->\n                   \" (SpecTree.get \" ^ string_of_ident tmp_id ^ \" se)\"\n                 ) cc.aCapturedTemp) in\n      let spec_post_matters =\n        if pure then \"\"\n                else \" _ (fun r => k (ss_mem r, ss_return r))\" in\n      if pure then\n        output_string out (\"(CCrespec\\n\" ^ ind)\n      else\n        output_string out (\"(CCrespec_opt\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      output_string out (\"\\n\" ^ ind ^\n        \"(CCfirst (* \" ^ i ^ \" := *) \" ^ string_of_ident n_iter ^\n        \" \" ^ string_of_ident n_end ^ \" \" ^ string_of_ident n_c ^ \" \");\n      output_rexpr out (\"  \" ^ ind) e_start;\n      output_char out ' ';\n      output_rexpr out (\"  \" ^ ind) e_end;\n      output_string out (\"\\n  \" ^ ind ^\n        slice_name ^ \" \" ^ slice_name ^ \"_found \" ^ slice_name ^ \"_notfound)\\n\" ^ ind ^\n        (if pure then\n           \"(fun se d =>\\n\"\n         else\n           \"(fun se d r k =>\\n\") ^ ind ^\n        \" match \" ^ cc.aCapturedName ^ args ^ \" \");\n      output_rexpr_gallina out \"se\" (\"    \" ^ ind) e_start;\n      output_char out ' ';\n      output_rexpr_gallina out \"se\" (\"    \" ^ ind) e_end;\n      output_string out (\" d with\\n\" ^ ind ^\n        \" | inleft (exist n _) => \" ^ slice_name ^ \"_found_spec\" ^ args ^ \"\\n\" ^ ind ^\n        \"     n d\" ^ spec_post_matters ^ \"\\n\" ^ ind ^\n        \" | inright _ => \" ^ slice_name ^ \"_notfound_spec\" ^ args ^ \"\\n     \" ^ ind);\n      output_rexpr_gallina out \"se\" (\"       \" ^ ind) e_end;\n      output_string out (\" d\" ^ spec_post_matters ^ \"\\n\" ^ ind ^\n        \" end))\")\n\n    | ACfold (n_iter, i_iter, e_start, n_end, e_end, n_acc, i_acc, e_init, n_c, c, None) ->\n      output_string out (\"(CCfold (* \" ^ i_iter ^ \" := *) \" ^ string_of_ident n_iter ^\n        \" \" ^ string_of_ident n_end ^\n        \" (* \" ^ i_acc ^ \" := *) \" ^ string_of_ident n_acc ^\n        \" \" ^ string_of_ident n_c ^ \" \");\n      output_rexpr out (\"  \" ^ ind) e_start;\n      output_char out ' ';\n      output_rexpr out (\"  \" ^ ind) e_end;\n      output_char out ' ';\n      output_rexpr out (\"  \" ^ ind) e_init;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) true path c;\n      output_char out ')'\n    | ACfold (n_iter, i_iter, e_start, n_end, e_end, n_acc, i_acc, e_init, n_c, _, Some cc) ->\n      output_string out (\"(CCrespec\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      output_string out (\"\\n\" ^ ind ^\n        method_full_name ^ \"_slice_\" ^ cc.aCapturedName ^ \"\\n\" ^ ind ^\n        \"(fun se => \" ^ cc.aCapturedName);\n      List.iter (fun (_, (tmp_id, _)) ->\n        output_string out (\" (SpecTree.get \" ^ string_of_ident tmp_id ^ \" se)\")\n      ) cc.aCapturedTemp;\n      output_string out \"))\"\n\n    | ACexternal (dest, s, i, []) ->\n      output_string out (\"(CCrespec_opt\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      output_string out (\"\\n\" ^ ind);\n      output_string out (\"(CCpanic \" ^ c.aCmdType.aTypePairIdent ^ \")\");\n      output_string out (\"\\n\" ^ ind);\n      output_string out (\"(fun se => \");\n      begin match dest with\n      | None -> output_string out (\"ret (\" ^ s ^ \")\")\n      | Some el -> output_string out \"(@bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>  put (\";\n                   output_lexpr_set_gallina out obj \"se\" s \"d\" (\"    \" ^ ind) el; \n                   output_string out \")))\"\n      end;\n      output_string out \"))\"\n\n    | ACexternal (dest, s, i, args) ->\n      let is_partial = Hashtbl.mem env.partial_external_symbols s in\n      output_string out (\"(CCrespec_opt\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      output_string out (\"\\n\" ^ ind);\n      output_string out (\"(CCpanic \" ^ c.aCmdType.aTypePairIdent ^ \")\");\n      output_string out (\"\\n\" ^ ind);\n      output_string out (\"(fun se => @bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>\");\n      output_string out (\"\\n\" ^ ind);\n      (if is_partial\n       then output_string out (\"match \" ^ s)\n       else output_string out (\"let a := \" ^ s));\n      List.iter (function\n        | AEXrexer e ->\n          output_string out (\"\\n     \" ^ ind);\n          output_rexpr_gallina out \"se\" (\"    \" ^ ind) e\n        | AEXlexpr e ->\n          output_string out (\"\\n     \" ^ ind);\n          output_lexpr_get_gallina out obj \"se\" \"d\" (\"    \" ^ ind) e\n      ) args;\n      (if is_partial\n       then output_string out (\" with\\n\" ^\n\t ind ^ \" | None => mzero\\n\" ^ ind ^ \" | Some a => \")\n       else output_string out \" in\\n\");\n      begin match dest with\n      | None -> output_string out \"@ret _ (@Monad_DS GlobalLayerSpec) _ a\"\n      | Some el -> output_string out \"put (\";\n                   output_lexpr_set_gallina out obj \"se\" \"a\" \"d\" (\"    \" ^ ind) el;\n                   output_string out \")\"\n      end;\n      if is_partial\n      then output_string out (\"\\n\" ^ ind ^ \" end)))\")\n      else output_string out (\"\\n\" ^ ind ^ \" )))\")\n\n  in output\n\n(* It would be a good idea to make the \"ignore base\" user-configurable, right now it's just an ad-hoc mess of things that comes up in different examples.. .*)       \n       \nlet cbv_ignore_base = \"Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor Z.of_nat\nInt256.repr Int256.zero Int256.one Int256.add Int256.sub Int256.mul Int256.modu Int256.divu Int256.not Int256.and Int256.or Int256.xor Int256.shl Int256.shru Int256.eq Int256.lt Int256.ltu Ziteri \nList.length is_true bool_dec\nnegb andb orb\nhashvalue_eqb me_address me_origin me_caller me_callvalue me_coinbase me_timestamp me_number me_balance me_blockhash me_transfer me_callmethod\nDS Monad_DS MonadState_DS MonadZero_DS ret bind mzero get put gets guard modify runStateT OptionMonad.Monad_option\nGlobalLayerSpec GetHighData  ZMap.get ZMap.set Int256Tree.t Int256Tree.get Int256Tree.set Int256Tree.empty  Int256Tree.get_default \\n\"\n                    \n(* This \"slices out\" a piece of the AST, and defines it as a separate top-level definition\n   (together with the corresponding environment type, wellformedness proof, etc).\n\n   It is used for two things: loop body expressions that have been annotated with a name in [[ ]]-brackets,\n   and for the bodies of DeepSpec match commands.\n\n   The names of the generated slices and match bodies are derived using a \"path\" that identifies a particular\n   subexpression of a name. Later, in output_command, we will carefully compute the same path, in order to refer\n   to the right name.\n*)\nlet prepare_command env out base_layer obj method_full_name =\n  let create_name str = method_full_name ^ \"_slice_\" ^ str in\n  (*let serial_number = ref 0 in\n    let create_anon_name () =\n    let str = string_of_int !serial_number in\n    incr serial_number;\n    create_name str in *)\n\n  let synth_stmt pure =\n    if pure then \"synth_stmt_spec_ret\"\n            else \"synth_stmt_spec_opt\" in\n\n  let output_init_se tmp_env init_se =\n    let ind = ref \"\\n       \" in\n    List.iter (fun (tmp_name, (tmp_id, tmp_typ)) ->\n      output_string out (!ind ^\n        \"(SpecTree.set \" ^ string_of_ident tmp_id ^ \" \" ^\n        type_pair_to_hyper_pair_name tmp_typ.aTypePairIdent ^ \" \" ^\n        match catch_not_found (Hashtbl.find init_se) tmp_id with\n        | Some v -> v ^ \" (* \" ^ tmp_name ^ \" *) \"\n        | None -> \"ht_default\" ^ \" (* \" ^ tmp_name ^ \" *) \");\n      ind := !ind ^ \"  \"\n    ) tmp_env;\n    output_string out (!ind ^ \"SpecTree.empty\" ^\n      String.make (List.length tmp_env) ')') in\n\n  let rec prepare pure path dest c = match c.aCmdDesc with\n    | ACskip | ACyield _ | ACcall _ | ACemit _ | ACload _ | ACstore _ | ACconstr _\n    | ACfail | ACtransfer (_,_) | ACexternal _ -> ()\n\n    | AClet (tmp_id, _, c1, c2) -> prepare pure (1::path) tmp_id c1; prepare pure (2::path) dest c2\n    | ACsequence (c1, c2) -> prepare pure (1::path) dest c1; prepare pure (2::path) dest c2\n    | ACcond (_, c1, c2) -> prepare pure (1::path) dest c1; prepare pure (2::path) dest c2\n    | ACfor (_, _, _, _, _, c1, None) -> prepare pure path dest c1\n    | ACassert c1 -> prepare pure path dest c1\n    | ACdeny c1 -> prepare pure path dest c1\n    | ACghost c1 -> prepare pure path dest c1\n    | ACfirst (_, _, _, _, _, n_c, c1, c2, c3, None) ->\n      prepare true (1::path) n_c c1; prepare pure (2::path) dest c2; prepare pure (3::path) dest c3\n    | ACfold (_, _, _, _, _, _, _, _, n_c, c1, None) -> prepare true path n_c c1\n\n    | ACfor (n_iter, i, e_start, n_end, e_end, c1, Some cc) ->\n      (* FOR (*NUM*)    i     = 0      TO (*HOLDER*) n      DO s.run i *)\n      if pure then\n        coqgen_fatal_error __LOC__ \"prepare_command\"\n          \"for command under pure context\";\n      prepare pure path dest c1;\n\n      let slice_name = create_name cc.aCapturedName in\n      let init_se = Hashtbl.create (List.length c.aCmdEnv) in\n      output_string out (\"\\n  Definition \" ^ slice_name ^ \" :=\\n    \");\n      output_command env out base_layer obj method_full_name \"      \" pure path \n        { c with aCmdDesc = ACfor (n_iter, i, e_start, n_end, e_end, c1, None) };\n      output_string out (\".\n\n  Lemma \" ^ slice_name ^ \"_wf\n      : synth_stmt_wellformed \" ^ slice_name ^ \"\n          \" ^ string_of_ident dest ^ \"\n          \");\n      output_tmp_env out \"        \" 0 c.aCmdEnv;\n      output_string out (\".\n  Proof. solve_wellformed. Defined.\n\n  Definition \" ^ cc.aCapturedName);\n      List.iter (fun (tmp, (tmp_id, _)) ->\n        output_string out (\" \" ^ tmp);\n        Hashtbl.add init_se tmp_id tmp\n      ) cc.aCapturedTemp;\n      (* Exactly what to evaluate/not evaluate was decided by trial an error to get small and tidy definitions. *)\n      output_string out (\" d :=\n  Eval cbv -[Int256.repr Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub\n             ret bind mzero get put modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set Int256Tree.empty Int256Tree.t          \n\n             \" ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]\n  in synth_stmt_spec_opt _ _ _\n       \" ^ slice_name ^ \"_wf\");\n       add_folded_symbols env [cc.aCapturedName];\n       output_init_se c.aCmdEnv init_se;\n       output_string out \"\n       d _ (fun r => Some (ss_mem r)).\\n\"\n\n    | ACmatch (e, cls) ->\n      (* Other preparation for the embedded commands. *)\n      List.iteri (fun i (_, _, cl) -> prepare pure (i::path) dest cl) cls;\n\n      (* Preparation of the match bodies. *)\n      List.iteri (fun i clause -> match clause with\n\t\t  | (_, tenv, body_cmd) -> \n\t            let body_name = method_full_name ^ \"_match_body_\" ^string_of_path (i::path) in\n\t\t    output_string out (\"\n  Definition \" ^ body_name ^ \"_env := \");\n\t\t    output_tmp_env out \"\" 0 body_cmd.aCmdEnv;\n\t\t    output_string out (\".\\n\");\n\n\t\t    output_string out (\"\n  Definition \" ^ body_name ^ \" := \");\n\n\t\t    output_command env out base_layer obj method_full_name  \"    \" pure (i::path) body_cmd;\n\n\t\t    output_string out (\".\n  Definition \" ^ body_name ^ \"_wf : synth_stmt_wellformed \" ^ body_name ^\" \" ^ string_of_int dest ^ \" \" ^ body_name ^\"_env.\n  Proof. solve_wellformed. Defined.\");\n   \t                               (* Todo: what is \"dest\" here?                          ^^^^*)\n\t\t                       (* it is given as an argument to prepare, which corresponds to the \"current\" dest at this point in the AST. *)\n\toutput_string out (\" \\n\");\n\n\t(* Match bodies typically have free variables in them, so it's better to not evaluate SpecTree.get.  *)\n\t\t    output_string out (\"\n  Definition \" ^ body_name ^ \"_spec :=\n  Eval cbv -[Int256.repr Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub\n             ret bind mzero get put modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set  Int256Tree.get Int256Tree.set SpecTree.get  Int256Tree.empty Int256Tree.t \n             \" ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]\n   in synth_stmt_spec_opt\n     \" ^ body_name ^\"\n     10\n     \" ^ body_name ^\"_env\n     \" ^ body_name ^\"_wf.\\n\");\n\n\t         ()\n\t\t )\n\tcls;\n\n      ()\n\n    | ACfirst (n_iter, i, e_start, n_end, e_end, n_c, c1, c_then, c_else, Some cc) ->\n      (* FIRST (*NUM*)    i     = 0      TO (*HOLDER*) n       *)\n         (* DO (*HOLDER*) s.test i THEN i    ELSE FAIL *)\n      prepare true (1::path) n_c c1;\n      prepare pure (2::path) dest c_then;\n      prepare pure (3::path) dest c_else;\n\n      let slice_name = create_name cc.aCapturedName in\n      let args = ref \"\" in\n      let init_se = Hashtbl.create (List.length c.aCmdEnv) in\n      List.iter (fun (tmp, (tmp_id, _)) ->\n        args := !args ^ \" \" ^ tmp;\n        Hashtbl.add init_se tmp_id tmp\n      ) cc.aCapturedTemp;\n      Hashtbl.add init_se n_iter i;\n\n      output_string out (\"\\n  Definition \" ^ slice_name ^ \" :=\\n    \");\n      output_command env out base_layer obj method_full_name \"      \" true (1::path) c1;\n      output_string out (\".\n\n  Lemma \" ^ slice_name ^ \"_wf\n      : synth_stmt_wellformed \" ^ slice_name ^ \"\n          \" ^ string_of_ident n_c ^ \"\n          \");\n      output_tmp_env out \"        \" 0 c1.aCmdEnv;\n      output_string out (\".\n  Proof. solve_wellformed. Defined.\n\n  Definition \" ^ slice_name ^ \"_P\" ^ !args ^ \" \" ^ i ^ \" d :=\n  Eval cbv -[Int256.repr Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub\n             ret bind mzero get put modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set Int256Tree.empty Int256Tree.t\n             \" ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]\n  in synth_stmt_spec_ret _ _ _\n       \" ^ slice_name ^ \"_wf\");\n       add_folded_symbols env [cc.aCapturedName];\n       output_init_se c1.aCmdEnv init_se;\n       output_string out (\"\n       d.\n\n  Definition \" ^ cc.aCapturedName ^ !args ^ \" start bound d :=\n    let P \" ^ i ^ \" := is_true (\" ^ slice_name ^ \"_P\" ^ !args ^ \" \" ^ i ^ \" d) in\n    let Pdec \" ^ i ^ \" : {P \" ^ i ^ \"} + {~ P \" ^ i ^ \"} :=\n      bool_dec _ true in\n    LangDef.min_ex P start bound Pdec.\n\n  Definition \" ^ slice_name ^ \"_found :=\\n    \");\n      output_command env out base_layer obj method_full_name \"      \" pure (2::path) c_then;\n      output_string out (\".\n\n  Lemma \" ^ slice_name ^ \"_found_wf\n      : synth_stmt_wellformed \" ^ slice_name ^ \"_found\n          \" ^ string_of_ident dest ^ \"\n          \");\n      output_tmp_env out \"        \" 0 c_then.aCmdEnv;\n      output_string out (\".\n  Proof. solve_wellformed. Defined.\n\n  Definition \" ^ slice_name ^ \"_found_spec\" ^ !args ^ \" \" ^ i ^ \" d :=\n  Eval cbv -[Int256.repr Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub\n             ret bind mzero get put modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set Int256Tree.empty Int256Tree.t\n             \" ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]\n  in \" ^ synth_stmt pure ^ \" _ _ _\n       \" ^ slice_name ^ \"_found_wf\");\n       output_init_se c_then.aCmdEnv init_se;\n       output_string out (\".\n\n  Definition \" ^ slice_name ^ \"_notfound :=\\n    \");\n      output_command env out base_layer obj method_full_name \"      \" pure (3::path) c_else;\n      output_string out (\".\n\n  Lemma \" ^ slice_name ^ \"_notfound_wf\n      : synth_stmt_wellformed \" ^ slice_name ^ \"_notfound\n          \" ^ string_of_ident dest ^ \"\n          \");\n      output_tmp_env out \"        \" 0 c_else.aCmdEnv;\n      output_string out (\".\n  Proof. solve_wellformed. Defined.\n\n  Definition \" ^ slice_name ^ \"_notfound_spec\" ^ !args ^ \" \" ^ i ^ \" d :=\n  Eval cbv -[Int256.repr Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub\n             ret bind mzero get put modify\n             GetHighData is_true bool_dec ZMap.get ZMap.set Int256Tree.get Int256Tree.set Int256Tree.empty Int256Tree.t\n             \" ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]\n  in \" ^ synth_stmt pure ^ \" _ _ _\n       \" ^ slice_name ^ \"_notfound_wf\");\n       output_init_se c_else.aCmdEnv init_se;\n       output_string out (\".\\n\")\n\n    | ACfold (n_iter, i_iter, e_start, n_end, e_end, n_acc, i_acc, e_init, n_c, c1, Some cc) ->\n      prepare true path n_c c1;\n\n      let slice_name = create_name cc.aCapturedName in\n      let init_se = Hashtbl.create (List.length c.aCmdEnv) in\n      output_string out (\"\\n  Definition \" ^ slice_name ^ \" :=\\n    \");\n      output_command env out base_layer obj method_full_name \"      \" true path\n        { c with aCmdDesc = ACfold (n_iter, i_iter, e_start, n_end, e_end,\n                                    n_acc, i_acc, e_init, n_c, c1, None) };\n      output_string out (\".\n\n  Lemma \" ^ slice_name ^ \"_wf\n      : synth_stmt_wellformed \" ^ slice_name ^ \"\n          \" ^ string_of_ident dest ^ \"\n          \");\n      output_tmp_env out \"        \" 0 c.aCmdEnv;\n      output_string out (\".\n  Proof. solve_wellformed. Defined.\n\n  Definition \" ^ cc.aCapturedName);\n      List.iter (fun (tmp, (tmp_id, _)) ->\n        output_string out (\" \" ^ tmp);\n        Hashtbl.add init_se tmp_id tmp\n      ) cc.aCapturedTemp;\n      output_string out (\" d :=\n  Eval cbv -[Int256.repr Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub\n             ret bind mzero get put modify\n             GetHighData is_true bool_dec  ZMap.get ZMap.set Int256Tree.get Int256Tree.set Int256Tree.empty Int256Tree.t\n             \" ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]\n  in synth_stmt_spec_ret _ _ _\n       \" ^ slice_name ^ \"_wf\");\n       add_folded_symbols env [cc.aCapturedName];\n       output_init_se c.aCmdEnv init_se;\n       output_string out \"\n       d.\\n\"\n\n  in prepare\n\nlet method_classify mt =\n  (* is pure *) mt.aMethodKind = MKconst || mt.aMethodKind = MKconstghost,\n  (* has return *) mt.aMethodReturnType.aTypeDesc <> ATbuiltin Tunit\n\nlet gen_object_definition env out base_layer_name i o =\n  let unmingledFieldName f = \n    (* base_layer_name.aLayerName ^ \"_\" ^  *)\n    o.aObjectName ^ \"_\" ^ f.aObjectFieldName in\n  let unmingledMethodName m = \n    (* base_layer_name.aLayerName ^ \"_\" ^  *)\n    o.aObjectName ^ \"_\" ^ m.aMethodName in \n  let _ = (* Outside of section: identifiers for methods and variables *)\n    List.iteri (fun n m ->\n      output_global_ident env (\"ident_\" ^ i ^ \"_\" ^ m.aMethodName) \n    ) o.aObjectMethods;\n    List.iteri (fun n f ->\n      if not f.aObjectFieldIsLogical then\n        output_global_ident env (\"var_\" ^ i ^ \"_\" ^ unmingledFieldName f ^ \"_ident\")\n    ) o.aObjectFields in\n\n  let _ = (* Start of section: context *)\n    output_string out (\"\nSection OBJECT_\" ^ i ^ \"_DEFINITION.\n  Context`{HM : !HyperMem}.\\n\\n\") in\n\n  let _ =\n    output_string out \"  (* Object variables *)\\n\";\n    List.iter (fun f ->\n      let variable_coq_name = i ^ \"_\" ^ f.aObjectFieldName ^ \"_var\" in\n      output_string out (\"  Definition \" ^ variable_coq_name ^ \" := {|\n    ltype_tp_marker := \" ^ f.aObjectFieldType.aTypePairIdent ^ \";\n\n    ltype_ident := HighValues.Field HighValues.Global \" ^ (\n      if f.aObjectFieldIsLogical then\n        string_of_ident 99\n      else\n        \"var_\" ^ o.aObjectName ^ \"_\" ^ unmingledFieldName f ^ \"_ident\") ^ \";\n    ltype_ghost := \" ^ string_of_bool f.aObjectFieldIsLogical ^ \";\n\n    ltype_get := \" ^ unmingledFieldName f ^ \";\n    ltype_set := update_\" ^ unmingledFieldName f ^ \";\n\n    ltype_set_ocond := otrue1;\n    ltype_get_extra_ocond := otrue1\n  |}.\\n\");\n      if not f.aObjectFieldIsLogical then\n        output_string out\n#ifdef REDACTED\n        \"\"\n#else\n        (\"(*TODO: variables.*) (*  Definition \" ^ i ^ \"_\" ^ unmingledFieldName f ^ \"_globvar : AST.globvar type :=\n    let ty := unpair_ty \" ^ f.aObjectFieldType.aTypePairIdent ^ \" in\n    {| AST.gvar_info := ty;\n       AST.gvar_init := AST.Init_space (sizeof ty) :: nil; (* XXX: until we can translate [Cval] to [AST.init_data] *)\n       AST.gvar_readonly := false;\n       AST.gvar_volatile := false\n    |}.*)\\n\")\n#endif\n    ) o.aObjectFields in\n  add_folded_symbols env @@ List.map (fun f ->\n  unmingledFieldName f ^ \" update_\" ^ unmingledFieldName f\n  ) o.aObjectFields;\n\n  let _ = (* Methods *)\n    List.iter (fun m ->\n      let method_full_name = i ^ \"_\" ^ m.aMethodName in\n      let mt = m.aMethodType in\n      prepare_command env out base_layer_name i method_full_name\n                      false [] Typecheck.function_start_id_num m.aMethodBody;\n      output_string out (\"\\n  Definition \" ^ method_full_name ^ \" := {|\n    FC_ident_start := BuiltinBase_local_ident_start;\n    FC_params := \");\n      output_params out m.aMethodArguments mt.aMethodArgumentTypes;\n      output_string out (\";\n    FC_returns := \" ^\n        type_pair_to_hyper_pair_name mt.aMethodReturnType.aTypePairIdent ^ \";\n    FC_body := \");\n      output_command env out base_layer_name i method_full_name \"      \" false [] m.aMethodBody;\n      output_string out \"\\n  |}.\\n\";\n\n      let nargs, args = match mt.aMethodArgumentTypes with\n        | [t] when t.aTypeDesc = ATbuiltin Tunit -> 0, \"\"\n        | ts -> List.length ts,\n                String.concat \"\"\n                  (List.mapi (fun n _ -> \" a\" ^ string_of_int n) ts) in\n\n      let is_pure, has_return = method_classify mt in\n      \n      let return_pick = match is_pure, has_return with\n        | true, _ -> \"evalStateT\"\n        | _, false -> \"execStateT\"\n        | _, _ -> \"runStateT\" in\n      (*let hyper_pair = type_pair_to_hyper_pair_name mt.aMethodReturnType.aTypePairIdent in\n        let return_expr = match is_pure, has_return with\n        | true, _ -> \"(@sf_return _ \" ^ hyper_pair ^ \" r)\"\n        | _, false -> \"(@sf_mem _ void_unit_pair r)\"\n        | _, _ -> \"(@sf_mem _ \" ^ hyper_pair ^ \" r, @sf_return _ \" ^ hyper_pair ^ \" r)\" in *)\n      output_string out (\"  Lemma \" ^ method_full_name ^ \"_wf\n      : synth_func_wellformed \" ^ method_full_name ^ \".\n  Proof. solve_wellformed. Defined.\n  Definition \" ^ method_full_name ^ \"_opt :\") ;\n  output_method_type_expr out mt;\t\t\t \n  output_string out (\"  := \n  Eval cbv -[\" ^ cbv_ignore_base              \n              ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]\n  in synth_func_spec_opt \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf.\n  Definition \" ^ method_full_name ^ \"_spec_hlist_opt args :=\n    @apply_param_func \" ^ method_full_name ^ \".(FC_params) _\n                      (\" ^ method_full_name ^ \"_opt) args.\n\n  Definition \" ^ method_full_name ^ \"_prim := {|\n    PRIMident := ident_\" ^ o.aObjectName ^ \"_\" ^ m.aMethodName ^ \";\n    (* PRIMcc := AST.cc_default; *)\n    PRIMghost := \" ^ string_of_bool (mt.aMethodKind = MKghost ||\n                                     mt.aMethodKind = MKconstghost) ^ \";\n    PRIMpure := \" ^ string_of_bool is_pure ^ \";\n    PRIMargt_marker := \" ^ method_full_name ^ \".(FC_params);\n    PRIMret_marker := \" ^ method_full_name ^ \".(FC_returns);\n    PRIMcond := fun _ _ _ => True;\n    (* PRIMsem := \" ^ method_full_name ^ \"_spec_hlist; *)\n    PRIMsem_opt := \" ^ method_full_name ^ \"_spec_hlist_opt\n  |}.\n\n  Lemma \" ^ method_full_name ^ \"_spec_hlist_opt_eq :\n    \" ^ method_full_name ^ \"_spec_hlist_opt =\n    fun args => apply_param_func\n      (synth_func_spec_opt \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf)\n      args.\n  Proof.\\n\" ^\n\"    cbv -[\" ^ cbv_ignore_base \n             ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]. \\n\" ^\n\"     reflexivity.\n  Qed.\\n\");\n      (* Declare [*_spec] for concrete layer definition *)\n      if mt.aMethodKind <> MKghost && mt.aMethodKind <> MKconstghost then begin\n        output_string out (\"  Definition \" ^ method_full_name ^ \"_cfun :=\n  Eval cbv in synth_func_func \" ^ method_full_name ^ \".\n\n  Definition \" ^ method_full_name ^ \"_cond \"^ args ^ \" me d  :=\n  Eval cbv -[\" ^ cbv_ignore_base \n               ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]\n    in\");\n\tfor i = 0 to nargs - 1 do\n          output_string out (\"\n    ht_ft_cond a\" ^ string_of_int i ^\n            \" -> ht_valid_ft_cond a\" ^ string_of_int i ^ \" ->\")\n        done;\n        output_string out (\"\n    high_level_invariant d ->\n    synth_func_cond \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf\n\t\t\t\t\t\t\t\t     \" ^ args ^ \" me d.\\n\");\n\n        output_string out (\"  \n  Lemma \" ^ method_full_name ^ \"_cond_eq : forall \" ^ args ^ \" me d, \n    \" ^method_full_name^\"_cond \" ^ args ^ \" me d ->\");\n\tfor i = 0 to nargs - 1 do\n          output_string out (\"\n    ht_ft_cond a\" ^ string_of_int i ^\n            \" -> ht_valid_ft_cond a\" ^ string_of_int i ^ \" ->\")\n        done;\n        output_string out (\"\n    high_level_invariant d ->\n    synth_func_cond \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf \" ^ args ^ \" me d.\n    Proof.\n      intros \" ^ args ^ \" me d H_cond.\n      cbv -[\" ^ cbv_ignore_base ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"].\n       exact H_cond.\n    Qed.\n\n  Definition \" ^ method_full_name ^ \"_obligation \"^ args ^ \" me d  :=\n  Eval cbv -[\" ^ cbv_ignore_base ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]\n    in\");\n\tfor i = 0 to nargs - 1 do\n          output_string out (\"\n    ht_ft_cond a\" ^ string_of_int i ^\n            \" -> ht_valid_ft_cond a\" ^ string_of_int i ^ \" ->\")\n        done;\n        output_string out (\"\n    high_level_invariant d ->\n    synth_func_obligation \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf\n\t\t\t\t\t\t\t\t     \" ^ args ^ \" me d.\\n\");\n\n        output_string out (\"  \n  Lemma \" ^ method_full_name ^ \"_obligation_eq : forall \" ^ args ^ \" me d, \n    \" ^method_full_name^\"_obligation \" ^ args ^ \" me d ->\");\n\tfor i = 0 to nargs - 1 do\n          output_string out (\"\n    ht_ft_cond a\" ^ string_of_int i ^\n            \" -> ht_valid_ft_cond a\" ^ string_of_int i ^ \" ->\")\n        done;\n        output_string out (\"\n    high_level_invariant d ->\n    synth_func_obligation \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf \" ^ args ^ \" me d.\n    Proof.\n      intros \" ^ args ^ \" me d H_cond.\n      cbv -[\" ^ cbv_ignore_base ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"].\n       exact H_cond.\n    Qed.\\n\");\n\t\n        if m.aMethodSemantics = AStrap_info_get ||\n           m.aMethodSemantics = AStrap_info_ret then begin\n          output_string out (\"\n  Definition \" ^ method_full_name ^ \"_spec :=\n  Eval cbv -[\" ^ cbv_ignore_base ^ env.folded_external_symbol_string ^ \"\n             \" ^ !(env.folded_symbols) ^ \"]\n  in apply_param_func (synth_func_spec_ret \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf) HNil.\\n\")\n    end else begin (* [if] m.aMethodSemantics = AStrap_info_get || m.aMethodSemantics = AStrap_info_ret *)\n            (*let fun_args = if (String.length args > 0) then (\"fun \" ^ args ^ \" => \") else \"\" in *)\n          output_string out (\"\n  Definition \" ^ method_full_name ^ \"_spec :=\n  Eval cbv [sf_mem sf_return fst snd \" ^ method_full_name ^ \"_opt] in\n    \" ^ (\"fun \" ^ args ^ \" me => \") ^\n    return_pick ^ \" (\" ^ method_full_name ^ \"_opt\" ^ args ^ \" me).\n  Lemma \" ^ method_full_name ^ \"_spec_eq :\n    \" ^ method_full_name ^ \"_spec =\n    \" ^ \"fun \" ^ args ^ \" me => \" ^\n    return_pick ^ \" (synth_func_spec_opt \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf\" ^ args ^ \" me).\n  Proof.\n    cbv -[\" ^ cbv_ignore_base ^ env.folded_external_symbol_string ^ \"\n          \" ^ !(env.folded_symbols) ^ \"].\n    reflexivity.\n  Qed.\\n\")\n        end (* [else] m.aMethodSemantics = AStrap_info_get || m.aMethodSemantics = AStrap_info_ret *)\n    end; (* [if] mt.aMethodKind <> MKghost && mt.aMethodKind = MKconst *)\n\n    output_string out (\"\nGlobal Opaque \" ^ method_full_name ^\"_opt.\\n\");\t\t\t\t\t\t       \n      \n    (* Define the method in the link file. *)\n    output_string (env.coq_LinkSource) (\"\nDefinition \" ^ method_full_name ^\"_core := (@\"^ method_full_name ^\" Memimpl.mem memory_model_ops _ _ make_program_ops make_program_prf).\nDefinition \" ^ method_full_name ^\"_func := (synth_func_func \" ^method_full_name^\"_core).\\n\");\n\n\t      (* And its symbol. *)\n    output_string env.coq_Symbols (\"  (ident_\"^method_full_name ^\", \\\"\"^ method_full_name ^\"\\\")::\\n\")\n\t\t  \n    ) o.aObjectMethods in\n\n  output_string out (\"End OBJECT_\" ^ i ^ \"_DEFINITION.\\n\")\n\nlet generate_preserve_invariant_prop m spec_name context =\n  let select_ops, select_HD = match context with\n    | None -> \"\", \"\"\n    | Some (ops, hd) -> \"(data_ops := \" ^ ops ^ \") \", \"(HD := \" ^ hd ^ \") \" in\n  match m.aMethodSemantics with\n  | ASdefault ->\n    if m.aMethodType.aMethodKind = MKconst then\n      None\n    else\n      Some (\"CompatGenSem.PreservesInvariants \" ^ select_HD ^ spec_name)\n  | ASsetCR3 -> Some (\"PrimSemantics.SetCR3Invariants \" ^ select_ops ^ \"(fun d p => \" ^ spec_name ^ \" p d)\")\n  | ASassembly -> Some (\"PrimSemantics.PrimInvariants \" ^ select_ops ^ spec_name)\n  | ASassembly' -> Some (\"PrimSemantics.PrimInvariants \" ^ select_ops ^ spec_name)\n  | AStrap_info_get -> None\n  | AStrap_info_ret -> None\n\nlet generate_compat_sem m spec_name =\n  match m.aMethodSemantics with\n  | ASdefault -> \"CompatGenSem.gensem \" ^ spec_name\n  | ASsetCR3 -> \"PrimSemantics.setCR3_compatsem (fun d p => \"\n              ^ spec_name ^ \" p d)\"\n  | ASassembly -> \"PrimSemantics.primcall_general_compatsem \"\n              ^ spec_name\n  | ASassembly' -> \"PrimSemantics.primcall_general_compatsem' (prim_ident := \"\n              ^ m.aMethodName ^ \") \" ^ spec_name\n  | AStrap_info_get -> \"PrimSemantics.primcall_trap_info_get_compatsem \"\n              ^ spec_name\n  | AStrap_info_ret -> \"PrimSemantics.primcall_trap_info_ret_compatsem \"\n              ^ spec_name\n\nlet output_exists_prop out ind oi_over oi_under m as_lemma with_inv =\n  (* if [not as_lemma] then output as an argument *)\n  if as_lemma && with_inv then\n    print_endline\n      (\"Warning: output_exists_prop with both as_lemma and with_inv being\\n\" ^\n       \"         true will results in compile error in Coq\");\n  let method_full_name_over = oi_over ^ \"_\" ^ m.aMethodName in\n  let method_full_name_under = oi_under ^ \"_\" ^ m.aMethodName in\n  let mt = m.aMethodType in\n  let nargs, args = match mt.aMethodArgumentTypes with\n    | [t] when t.aTypeDesc = ATbuiltin Tunit -> 0, \"\"\n    | ts -> List.length ts,\n            String.concat \"\"\n              (List.mapi (fun n _ -> \" a\" ^ string_of_int n) ts) in\n  if as_lemma then\n    output_string out (ind ^ \"Lemma \" ^ method_full_name_over ^ \"_exists :\\n\" ^ ind ^ \"  \")\n  else\n    output_string out (ind ^ \"  (\");\n  if m.aMethodSemantics = AStrap_info_get || m.aMethodSemantics = AStrap_info_ret then begin\n    output_string out (\"forall j d1 d2,\\n\" ^ ind ^\n      \"    relate_AbData j d1 d2 ->\\n\" ^ ind ^\n      (if with_inv then\n         \"    high_level_invariant d1 ->\\n\" ^ ind ^\n         \"    high_level_invariant d2 ->\\n\" ^ ind\n       else\n         \"\") ^\n      (if m.aMethodSemantics = AStrap_info_get then\n         \"    \" ^ method_full_name_over ^ \"_spec d1 = \" ^ method_full_name_under ^ \"_spec d2\"\n       else\n         \"    Values.val_inject j (\" ^ method_full_name_over ^ \"_spec d1)\\n\" ^ ind ^\n         \"                        (\" ^ method_full_name_under ^ \"_spec d2)\"));\n    if not as_lemma then begin\n      output_char out ')'\n    end else begin\n      (* Recall that to give the layerlib semantics for a layer we use various semantic combinators. Two of these,\n         trap_info_ret and trap_info_get, are slightly special, because they expect a function which does not\n         return an option.\n         Therefore, the passthrough proofs for functions using these semantics look slightly different from\n         other passthrough proofs.\n         Currently, we are using these semantics for only two functions, which happens to have particularly trivial\n         passthrough proof obligations, so everything works. If we wanted to use the semantics more generally, the\n         programmer would have to give manual proofs, so we should write the proof skeleton to a FooProof.v file,\n         instead of the current behaviour which writes the proof to an auto-generated file. *)\n      output_string out (\".\\n\" ^ ind ^\n        \"(* XXX: This looks bad but it's temporary--there should be a separate file for these lemmas *)\\n\" ^ ind ^\n        \"Lemma \" ^ method_full_name_over ^ \"_spec_cond d :\\n\" ^ ind ^\n        \"    synth_func_spec_cond \" ^ method_full_name_over ^ \" \" ^ method_full_name_over ^ \"_wf HNil d.\\n\" ^ ind ^\n        \"Proof.\\n\" ^ ind ^\n        \"  (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\\n\" ^ ind ^\n        \"  compute.\\n\" ^ ind ^\n        \"  exact I.\\n\" ^ ind ^\n          \"Qed.\\n\" ^ ind)\n       (* not sure what this is about, it doesn't seem to generate a valid file: *)\t\t       \n(*\n\t  ^\n        \"Proof (fun j d1 d2 rel =>\\n\" ^ ind ^\n        \"  synth_func_spec_ret_relate_0\\n\" ^ ind ^\n        \"    \" ^ method_full_name_over ^ \"_passthrough_prf\\n\" ^ ind ^\n        \"    \" ^ method_full_name_over ^ \"_wf\\n\" ^ ind ^\n        \"    \" ^ method_full_name_over ^ \"_passthrough_cond\\n\" ^ ind ^\n        \"    j d1 d2 rel\\n\" ^ ind ^\n        \"    (\" ^ method_full_name_over ^ \"_spec_cond d1)).\\n\" ) *)\n    end  (* [else] not as_lemma *)\n  end  (* [if] m.aMethodSemantics = AStrap_info_get || m.aMethodSemantics = AStrap_info_ret *)\n  else match method_classify mt with\n  | true, _ ->   (* is pure *)\n    output_string out (\"forall j\" ^ args ^ \" d1 d2 r,\\n\" ^ ind ^\n      \"    relate_AbData j d1 d2 ->\\n\" ^ ind ^\n      (if with_inv then\n         \"    high_level_invariant d1 ->\\n\" ^ ind ^\n         \"    high_level_invariant d2 ->\\n\" ^ ind\n       else\n         \"\") ^\n      \"    \" ^ method_full_name_over ^ \"_spec\" ^ args ^ \" d1 = Some r ->\\n\" ^ ind ^\n      \"    \" ^ method_full_name_under ^ \"_spec\" ^ args ^ \" d2 = Some r\");\n    if not as_lemma then\n      output_char out ')'\n    else begin\n      output_string out (\".\\n\" ^ ind ^\n        \"Proof.\\n\" ^ ind ^\n        \"  intro j.\\n\" ^ ind ^\n        \"  rewrite * \" ^ method_full_name_over ^ \"_spec_eq.\\n\" ^ ind ^\n        \"  exact (synth_func_relate_\" ^ string_of_int nargs ^ \"_pure\\n\" ^ ind ^\n        \"          \" ^ method_full_name_over ^ \"_passthrough_prf\\n\" ^ ind ^\n        \"          \" ^ method_full_name_over ^ \"_wf\\n\" ^ ind ^\n        \"          \" ^ method_full_name_over ^ \"_passthrough_cond\\n\" ^ ind ^\n        \"          j\");\n        (* [nargs + 1] copies of the trivial proof *)\n        for i = 0 to nargs do output_string out \" (fun _ _ x => x)\" done;\n        output_string out (\").\\n\" ^ ind ^ \"Qed.\\n\")\n    end  (* [else] not with_proof *)\n\n  | _, true ->  (* has return value *)\n    output_string out (\"forall j\" ^ args ^ \" d1 d2 d1' r,\\n\" ^ ind ^\n      \"    relate_AbData j d1 d2 ->\\n\" ^ ind ^\n      (if with_inv then\n         \"    high_level_invariant d1 ->\\n\" ^ ind ^\n         \"    high_level_invariant d2 ->\\n\" ^ ind\n       else\n         \"\") ^\n      \"    \" ^ method_full_name_over ^ \"_spec\" ^ args ^ \" d1 = Some (r, d1') ->\\n\" ^ ind ^\n      \"    exists d2',\\n\" ^ ind ^\n      \"      \" ^ method_full_name_under ^ \"_spec\" ^ args ^ \" d2 = Some (r, d2') /\\\\\\n\" ^ ind ^\n      \"      relate_AbData j d1' d2'\");\n    if not as_lemma then\n      output_char out ')'\n    else begin\n      output_string out (\".\\n\" ^ ind ^\n        \"Proof.\\n\" ^ ind ^\n        \"  intro j.\\n\" ^ ind ^\n        \"  rewrite * \" ^ method_full_name_over ^ \"_spec_eq.\\n\" ^ ind ^\n        \"  exact (synth_func_relate_\" ^ string_of_int nargs ^ \"\\n\" ^ ind ^\n        \"          \" ^ method_full_name_over ^ \"_passthrough_prf\\n\" ^ ind ^\n        \"          \" ^ method_full_name_over ^ \"_wf\\n\" ^ ind ^\n        \"          \" ^ method_full_name_over ^ \"_passthrough_cond\\n\" ^ ind ^\n        \"          j\");\n        (* [nargs + 1] copies of the trivial proofs *)\n        for i = 0 to nargs do output_string out \" (fun _ _ x => x)\" done;\n        output_string out (\").\\n\" ^ ind ^ \"Qed.\\n\")\n    end  (* [else] not with_proof *)\n\n  | _, false ->  (* has no return value *)\n    output_string out (\"forall j\" ^ args ^ \" d1 d2 d1',\\n\" ^ ind ^\n      \"    relate_AbData j d1 d2 ->\\n\" ^ ind ^\n      (if with_inv then\n         \"    high_level_invariant d1 ->\\n\" ^ ind ^\n         \"    high_level_invariant d2 ->\\n\" ^ ind\n       else\n         \"\") ^\n      \"    \" ^ method_full_name_over ^ \"_spec\" ^ args ^ \" d1 = Some d1' ->\\n\" ^ ind ^\n      \"    exists d2',\\n\" ^ ind ^\n      \"      \" ^ method_full_name_under ^ \"_spec\" ^ args ^ \" d2 = Some d2' /\\\\\\n\" ^ ind ^\n      \"      relate_AbData j d1' d2'\");\n    if not as_lemma then\n      output_char out ')'\n    else begin\n      output_string out (\".\\n\" ^ ind ^\n        \"Proof.\\n\" ^ ind ^\n        \"  intro j.\\n\" ^ ind ^\n        \"  rewrite * \" ^ method_full_name_over ^ \"_spec_eq.\\n\" ^ ind ^\n        \"  exact (synth_func_relate_\" ^ string_of_int nargs ^ \"_void\\n\" ^ ind ^\n        \"          \" ^ method_full_name_over ^ \"_passthrough_prf\\n\" ^ ind ^\n        \"          \" ^ method_full_name_over ^ \"_wf\\n\" ^ ind ^\n        \"          \" ^ method_full_name_over ^ \"_passthrough_cond\\n\" ^ ind ^\n        \"          j\");\n        (* [nargs] copies of the trivial proofs *)\n        for i = 1 to nargs do output_string out \" (fun _ _ x => x)\" done;\n        output_string out (\").\\n\" ^ ind ^ \"Qed.\\n\")\n    end  (* [else] not with_proof *)\n\nlet output_match_prop out ind oi m as_lemma =  (* if [not as_lemma] then output as an argument *)\n  let method_full_name = oi ^ \"_\" ^ m.aMethodName in\n  let mt = m.aMethodType in\n  let nargs, args = match mt.aMethodArgumentTypes with\n    | [t] when t.aTypeDesc = ATbuiltin Tunit -> 0, \"\"\n    | ts -> List.length ts,\n            String.concat \"\"\n              (List.mapi (fun n _ -> \" a\" ^ string_of_int n) ts) in\n  let is_pure, has_return = method_classify mt in\n  if not is_pure && m.aMethodSemantics <> AStrap_info_get &&\n                    m.aMethodSemantics <> AStrap_info_ret then begin\n    if as_lemma then\n      output_string out (ind ^ \"Lemma \" ^ method_full_name ^ \"_match :\\n\" ^ ind ^ \"  \")\n    else\n      output_string out (ind ^ \"  (\");\n    if has_return then begin\n      output_string out (\"forall j d d' m\" ^ args ^ \" r,\\n\" ^ ind ^\n        \"    match_AbData d m j ->\\n\" ^ ind ^\n        \"    \" ^ method_full_name ^ \"_spec\" ^ args ^ \" d = Some (r, d') ->\\n\" ^ ind ^\n        \"    match_AbData d' m j\");\n      if not as_lemma then\n        output_string out \") ->\\n\"\n      else\n        output_string out (\".\\n\" ^ ind ^\n          \"Proof.\\n\" ^ ind ^\n          \"  rewrite * \" ^ method_full_name ^ \"_spec_eq.\\n\" ^ ind ^\n          \"  exact (synth_func_match_\" ^ string_of_int nargs ^ \"\\n\" ^ ind ^\n          \"          \" ^ method_full_name ^ \"_passthrough_prf\\n\" ^ ind ^\n          \"          \" ^ method_full_name ^ \"_wf\\n\" ^ ind ^\n          \"          \" ^ method_full_name ^ \"_passthrough_cond).\\n\" ^ ind ^\n          \"Qed.\\n\")\n    end else begin  (* [if] has_return *)\n      output_string out (\"forall j d d' m\" ^ args ^ \",\\n\" ^ ind ^\n        \"    match_AbData d m j ->\\n\" ^ ind ^\n        \"    \" ^ method_full_name ^ \"_spec\" ^ args ^ \" d = Some d' ->\\n\" ^ ind ^\n        \"    match_AbData d' m j\");\n      if not as_lemma then\n        output_string out \") ->\\n\"\n      else\n        output_string out (\".\\n\" ^ ind ^\n          \"Proof.\\n\" ^ ind ^\n          \"  rewrite * \" ^ method_full_name ^ \"_spec_eq.\\n\" ^ ind ^\n          \"  exact (synth_func_match_\" ^ string_of_int nargs ^ \"_void\\n\" ^ ind ^\n          \"          \" ^ method_full_name ^ \"_passthrough_prf\\n\" ^ ind ^\n          \"          \" ^ method_full_name ^ \"_wf\\n\" ^ ind ^\n          \"          \" ^ method_full_name ^ \"_passthrough_cond).\\n\" ^ ind ^\n          \"Qed.\\n\")\n    end;  (* [else] has_return *)\n    true\n  end else\n    false\n\nlet gen_layer_linksource env i l  =\n  output_string (env.coq_LinkSource) (\"\\nDefinition \"^ i ^ \"_impl : res LAsm.module := \\n\");\n\n  let unmingledFieldName o f = \n    (* l.aLayerName ^ \"_\" ^  *)\n    o.aObjectName ^ \"_\" ^ f.aObjectFieldName in\n  let iter_functions action =\n      List.iter (fun (_, o) ->\n        if o.aObjectRequireImpl then\n          List.iter (fun m -> action o  m)\n           (o.aObjectMethods @ o.aObjectProcedures @ o.aObjectFunctions)\n\t) l.aLayerFreshObjects in\n\n   iter_functions (fun o m ->\n      output_string env.coq_LinkSource\n       (\"  M_\" ^ o.aObjectName ^ \"_\" ^ m.aMethodName ^ \" <- CompCertiKOS.transf_module (ident_\"^ o.aObjectName ^\"_\"^ m.aMethodName ^\" ↦ \"^ o.aObjectName ^ \"_\" ^ m.aMethodName ^\"_func);\\n\"));\n\n   output_string env.coq_LinkSource (\"  ret (\");\n   \n   List.iter (fun (_, o) ->\n     if o.aObjectRequireImpl then\n       List.iter (fun f ->\n\t if not f.aObjectFieldIsLogical then\n\t   output_string env.coq_LinkSource\n\t\t\t (\"var_\"^o.aObjectName^\"_\"^ unmingledFieldName o f ^\"_ident ↦ \" ^o.aObjectName^ \"_\"^ unmingledFieldName o f ^\"_globvar ⊕ \");\n\t   output_string env.coq_Symbols\n\t\t\t (\"  (var_\"^o.aObjectName^\"_\"^ unmingledFieldName o f ^\"_ident, \\\"\" ^o.aObjectName^ \"_\"^ unmingledFieldName o f ^\"\\\")::\\n\");\t \n       ) o.aObjectFields\n   ) l.aLayerFreshObjects;\n\n   iter_functions (fun o m ->\n      output_string env.coq_LinkSource\n       (\"  M_\" ^ o.aObjectName ^ \"_\" ^ m.aMethodName ^ \"  ⊕ \"));   \n   output_string env.coq_LinkSource \"∅).\\n\"\n\nlet gen_linksource_prelude env fileDeclarations =\n  output_string env.coq_LinkSource \"\nRequire Import compcert.lib.Coqlib.\nRequire Import liblayers.lib.Decision.\nRequire Import liblayers.compcertx.ErrorMonad.\nRequire Import liblayers.compcertx.MakeProgram.\nRequire Import compcertx.common.MemimplX.\nRequire Import liblayers.compcertx.MakeProgramImpl.\nRequire Import liblayers.compat.CompatLayers.\nRequire Import mcertikos.layerlib.LAsmModuleSemDef.\nRequire Import mcertikos.layerlib.CompCertiKOS.\n\nLocal Instance mwd_ops: MemWithData.UseMemWithData Memimpl.mem.\\n\\n\";\n\n    List.iter (function\n     | i, ADlayer l ->\n\toutput_string env.coq_LinkSource (\"Require Import \" ^ env.project_name ^ \".Layer\" ^ l.aLayerName ^ \".\\n\")\n     | _, _ -> ()\n     ) fileDeclarations;\n\n    output_string env.coq_Symbols \"\nOpen Scope string_scope.\n\nDefinition symbols: list (ident * string) :=\\n\"\n\t\t \nlet gen_linksource env fileDeclarations =\n  output_string env.coq_LinkSource \"\\nDefinition certikos := \\n\";\n  List.iter (function\n     | i, ADlayer l ->\n\toutput_string env.coq_LinkSource (\"  M\"^i^\" <- \"^ i ^ \"_impl;\\n\")\n     | _, _ -> ()\n  ) fileDeclarations;\n  output_string env.coq_LinkSource \"  ret (\";  \n  List.iter (function\n     | i, ADlayer l ->\n\toutput_string env.coq_LinkSource (\" M\"^i^\" ⊕\");\n     | _, _ -> ()\n  ) fileDeclarations;\n  output_string env.coq_LinkSource \" ∅).\\n\\n\";\n  output_string env.coq_Symbols \"  nil.\\n\"\n\n\t\t\nlet gen_object_sim env cur_layer_name base_layer i o =\n  let out =\n#ifdef REDACTED\n    open_out \"/dev/null\" in\n#else\n    new_file env (\"ObjSim\" ^ i)\n              (\"Require Import liblayers.compcertx.MakeProgram.\\n\" ^\n               \"Require Import liblayers.compcertx.MemWithData.\\n\" ^\n               \"Require Import layerlib.RefinementTactic.\\n\" ^\n               \"Require Import layerlib.RefinementTacticAux.\\n\\n\" ^\n               \"Require Import \" ^ env.project_name ^ \".Layer\" ^ cur_layer_name ^ \".\\n\" ^\n               if base_layer.aLayerName = builtin_base_layer_name then\n                 \"\"\n               else\n                 \"Require Import \" ^ env.project_name ^ \".LSim\" ^ base_layer.aLayerName ^ \".\\n\")\n              file_class_ObjAux in\n#endif\n  let _ = output_string out \"\\nContext {Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{HM : HyperMem (LayerSpec := GlobalLayerSpec)}.\\n\\n\" in\n\n  let unmingledFieldName o f = \n    (* base_layer.aLayerName ^ \"_\" ^  *)\n    o.aObjectName ^ \"_\" ^ f.aObjectFieldName in\n\n  let _ = (* Variable passthrough premises *)\n    List.iter (fun (_, o) -> List.iter (fun f ->\n      output_string out (\"  Context {\" ^\n        o.aObjectName ^ \"_\" ^ unmingledFieldName o f ^ \"_var_pt_prf : variable_passthrough_prf \" ^\n        o.aObjectName ^ \"_\" ^ unmingledFieldName o f ^ \"_var}.\\n\")\n    ) o.aObjectFields) base_layer.aLayerAllObjects;\n    List.iter (fun f ->\n      output_string out (\"  Context {\" ^\n        i ^ \"_\" ^ unmingledFieldName o f ^ \"_var_pt_prf : variable_passthrough_prf \" ^\n        i ^ \"_\" ^ unmingledFieldName o f ^ \"_var}.\\n\")\n    ) o.aObjectFields in\n\n  let _ = (* Methods passthrough lemmas *)\n    List.iter (fun m ->\n      let method_full_name = i ^ \"_\" ^ m.aMethodName in\n      let mt = m.aMethodType in\n      output_string out (\"\n  Lemma \" ^ method_full_name ^ \"_passthrough_prf :\n      function_constr_passthrough_prf \" ^ method_full_name ^ \".\n  Proof. solve_passthrough_prf @\" ^ method_full_name ^ \". Qed.\n  Lemma \" ^ method_full_name ^ \"_passthrough_cond :\n      synth_func_passthrough_cond \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf.\n  Proof.\n    (* XXX: Only works if no [CCrespec], [CCrespec_opt], or [ECrespec] is used. *)\n    compute.\n    exact I.\n  Qed.\n\n  Global Instance \" ^ method_full_name ^ \"_prim_passthrough\n      : primitive_passthrough_prf \" ^ method_full_name ^ \"_prim.\n  Proof. esplit.\n    (*\n    - unfold PRIMsem, \" ^ method_full_name ^ \"_prim.\n      rewrite \" ^ method_full_name ^ \"_spec_hlist_eq.\n      exact (synth_func_spec_relate\n              \" ^ method_full_name ^ \"_passthrough_prf\n              \" ^ method_full_name ^ \"_wf\n              \" ^ method_full_name ^ \"_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, \" ^ method_full_name ^ \"_prim.\n      rewrite \" ^ method_full_name ^ \"_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_relate\n              \" ^ method_full_name ^ \"_passthrough_prf\n              \" ^ method_full_name ^ \"_wf\n              \" ^ method_full_name ^ \"_passthrough_cond).\n    (*\n    - unfold PRIMsem, \" ^ method_full_name ^ \"_prim.\n      rewrite \" ^ method_full_name ^ \"_spec_hlist_eq.\n      exact (synth_func_spec_match\n              \" ^ method_full_name ^ \"_passthrough_prf\n              \" ^ method_full_name ^ \"_wf\n              \" ^ method_full_name ^ \"_passthrough_cond).\n    *)\n    - unfold PRIMsem_opt, \" ^ method_full_name ^ \"_prim.\n      rewrite \" ^ method_full_name ^ \"_spec_hlist_opt_eq.\n      exact (synth_func_spec_opt_match\n              \" ^ method_full_name ^ \"_passthrough_prf\n              \" ^ method_full_name ^ \"_wf\n              \" ^ method_full_name ^ \"_passthrough_cond).\n  Qed.\\n\");\n      if mt.aMethodKind <> MKghost && mt.aMethodKind <> MKconstghost then begin\n        output_char out '\\n';\n        output_exists_prop out \"  \" i i m true false;\n        output_char out '\\n';\n        if output_match_prop out \"  \" i m true then\n          output_char out '\\n';\n        output_string out (\"  Section \" ^ m.aMethodName ^ \".\\n\");\n        let spec_name = i ^ \"_\" ^ m.aMethodName ^ \"_spec\" in\n        begin match generate_preserve_invariant_prop m spec_name (Some (\"cdataOpsHigh\", \"cdataHigh\")) with\n        | None -> ()\n        | Some prop -> output_string out (\"    Context`{inv : !\" ^ prop ^ \"}.\\n\")\n        end;\n        begin match generate_preserve_invariant_prop m spec_name (Some (\"cdataOpsLow\", \"cdataLow\")) with\n        | None -> ()\n        | Some prop -> output_string out (\"    Context`{inv0 : !\" ^ prop ^ \"}.\\n\\n\")\n        end;\n        if m.aMethodSemantics = AStrap_info_ret then\n          output_string out \"    Context`{low1 : !low_level_invariant_impl (data_ops0 := cdataOpsLow)}.\\n\\n\";\n        output_string out (\n\"    Lemma \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_sim :\n      forall id,\n        sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n            (id ↦ \" ^ generate_compat_sem m spec_name ^ \")\n            (id ↦ \" ^ generate_compat_sem m spec_name ^ \").\n    Proof.\");\n        begin match m.aMethodSemantics with\n        | ASassembly | ASassembly' -> output_string out (\"\n      (* semantics assembly['] *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      inv match_extcall_states.\n      exploit \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_simpl.\n      eapply \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_match; eauto.\\n\")\n\n        | ASsetCR3 -> output_string out (\"\n      (* semantics SetCR3 *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      CommonTactic.inv_val_inject.\n      assert (H8 := H7).\n      eapply AuxLemma.inject_forward_equal' in H8; eauto 1. inv H8.\n      exploit \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_simpl.\n      rewrite Int256.add_zero; eauto.\n      eapply \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_match; eauto.\\n\")\n\n        | AStrap_info_get -> output_string out (\"\n      (* semantics trap_info_get *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      inv match_extcall_states.\n      match_external_states_simpl.\n      erewrite \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto.\\n\")\n\n        | AStrap_info_ret -> output_string out (\"\n      (* semantics trap_info_ret *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      inv match_extcall_states.\n      exploit (low_level_invariant_impl_eq (data_ops0 := cdataOpsLow)); eauto; inversion 1.\n      match_external_states_simpl.\n      eapply \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto.\\n\")\n\n        | ASdefault ->\n          if fst (method_classify m.aMethodType) then begin  (* is_pure *)\n            output_string out (\"\n      (* pure method *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      inv_semof H0.\n      inversion H0; subst; simpl in H0;\n      match_external_states_csem; auto;\n      erewrite \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto; reflexivity.\\n\")\n\n          end else begin  (* [if] is_pure *)\n            output_string out (\"\n      (* non-pure C-primitives *)\n      intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n      try inv_semof H0.\n      try (inversion H0; subst; simpl in H0).\n      exploit \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto 1; intros (labd' & HP & rel).\n      match_external_states_csem; auto;\n      eapply \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_match; eauto.\\n\")\n          end  (* [else] is_pure *)\n        end;  (* match m.aMethodSemantics *)\n\n        output_string out (\n\"    Qed.\n  End \" ^ m.aMethodName ^ \".\\n\")\n      end  (* if mt.aMethodKind <> MKghost && mt.aMethodKind <> MKconstghost *)\n    ) o.aObjectMethods in\n\n  (*\n  let _ = (* Unable to generate simulation proofs consistently--prepare a\n             skeleton to guide user interventien. *)\n    let out, sim_tbl =\n      new_incremental_file\n        env\n        (\"Obj\" ^ i ^ \"Proofs\")\n        (\"Require Import liblayers.compcertx.MakeProgram.\\n\" ^\n         \"Require Import liblayers.compcertx.MemWithData.\\n\" ^\n         \"Require Import layerlib.RefinementTactic.\\n\\n\" ^\n         \"Require Import \" ^ env.project_name ^ \".Layer\" ^ cur_layer_name ^ \".\\n\")\n        (fun out -> output_string out \"\nContext {Hmem: Mem.MemoryModel mem}.\nContext `{Hmwd: UseMemWithData mem}.\nContext `{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext `{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\n\nContext `{HM : HyperMem (LayerSpec := GlobalLayerSpec)}.\\n\";\n         List.iter (fun (_, o) -> List.iter (fun f ->\n           output_string out (\"Context {\" ^\n             o.aObjectName ^ \"_\" ^ f.aObjectFieldName ^ \"_var_pt_prf : variable_passthrough_prf \" ^\n             o.aObjectName ^ \"_\" ^ f.aObjectFieldName ^ \"_var}.\\n\")\n         ) o.aObjectFields) base_layer.aLayerAllObjects;\n         List.iter (fun f ->\n           output_string out (\"Context {\" ^\n             i ^ \"_\" ^ f.aObjectFieldName ^ \"_var_pt_prf : variable_passthrough_prf \" ^\n             i ^ \"_\" ^ f.aObjectFieldName ^ \"_var}.\\n\")\n         ) o.aObjectFields)\n        (Str.regexp (\"\\\\bLemma +\" ^ i ^ \"_\\\\(.+\\\\)_sim\\\\b\"))\n        file_class_ObjAux in\n    List.iter (fun m ->\n      if m.aMethodType.aMethodKind <> MKghost && m.aMethodType.aMethodKind <> MKconstghost &&\n         not (Hashtbl.mem sim_tbl m.aMethodName) then begin\n        let spec_name = i ^ \"_\" ^ m.aMethodName ^ \"_spec\" in\n        output_string out (\"\\nSection \" ^ m.aMethodName ^ \".\\n\");\n        begin match generate_preserve_invariant_prop m spec_name (Some (\"cdataOpsHigh\", \"cdataHigh\")) with\n        | None -> ()\n        | Some prop -> output_string out (\"  Context`{inv : !\" ^ prop ^ \"}.\\n\")\n        end;\n        begin match generate_preserve_invariant_prop m spec_name (Some (\"cdataOpsLow\", \"cdataLow\")) with\n        | None -> ()\n        | Some prop -> output_string out (\"  Context`{inv0 : !\" ^ prop ^ \"}.\\n\\n\")\n        end;\n        if m.aMethodSemantics = AStrap_info_ret then\n          output_string out \"  Context`{low1 : !low_level_invariant_impl (data_ops0 := cdataOpsLow)}.\\n\\n\";\n        output_string out (\n\"  Lemma \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_sim :\n    forall id,\n      sim (crel (CompatRel0 := crel_prf (compatrel := Hcompatrel)) _ _)\n          (id ↦ \" ^ generate_compat_sem m spec_name ^ \")\n          (id ↦ \" ^ generate_compat_sem m spec_name ^ \").\n  Proof.\");\n        begin match m.aMethodSemantics with\n        | ASassembly | ASassembly' -> output_string out (\"\n    (* semantics assembly['] *)\n    intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n    inv match_extcall_states.\n    exploit \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto 1; intros (labd' & HP & rel).\n    match_external_states_simpl.\n    eapply \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_match; eauto.\\n\")\n        | ASsetCR3 -> output_string out (\"\n    (* semantics SetCR3 *)\n    intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n    CommonTactic.inv_val_inject.\n    assert (H8 := H7).\n    eapply AuxLemma.inject_forward_equal' in H8; eauto 1. inv H8.\n    exploit \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto 1; intros (labd' & HP & rel).\n    match_external_states_simpl.\n    rewrite Int256.add_zero; eauto.\n    eapply \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_match; eauto.\\n\")\n        | AStrap_info_get -> output_string out (\"\n    (* semantics trap_info_get *)\n    intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n    inv match_extcall_states.\n    match_external_states_simpl.\n    erewrite \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto.\\n\")\n        | AStrap_info_ret -> output_string out (\"\n    (* semantics trap_info_ret *)\n    intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n    inv match_extcall_states.\n    exploit (low_level_invariant_impl_eq (data_ops0 := cdataOpsLow)); eauto; inversion 1.\n    match_external_states_simpl.\n    eapply \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto.\\n\")\n        | ASdefault ->\n          if fst (method_classify m.aMethodType) then begin  (* is_pure *)\n            output_string out (\"\n    (* pure method *)\n    intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n    match_external_states_simpl.\n    erewrite \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto; reflexivity.\\n\")\n\n            (*\n            ; (* XXX: hack for boolean return value *)\n            if m.aMethodType.aMethodReturnType.aTypeDesc = ATbuiltin Tbool then\n              output_string out \"    (* XXX: hack for boolean return value *)\n    destruct a; constructor.\\n\";\n            *)\n\n          end else begin  (* [if] is_pure *)\n            output_string out (\"\n    (* non-pure C-primitives *)\n    intros. layer_sim_simpl. compatsim_simpl (@match_AbData). intros.\n    exploit \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_exists; eauto 1; intros (labd' & HP & rel).\n    match_external_states_simpl.\");\n\n            (*\n            (* XXX: hack for boolean return value *)\n            if m.aMethodType.aMethodReturnType.aTypeDesc = ATbuiltin Tbool then\n              output_string out \"\n    (* XXX: hack for boolean return value *)\n    destruct a; constructor.\";\n            *)\n\n            output_string out (\"\n    eapply \" ^ i ^ \"_\" ^ m.aMethodName ^ \"_match; eauto.\\n\")\n          end  (* [else] is_pure *)\n        end;  (* match m.aMethodSemantics *)\n        output_string out (\n\"  Qed.\nEnd \" ^ m.aMethodName ^ \".\\n\")\n      end\n    ) o.aObjectMethods;\n    *)\n  output_string out (\"\\nEnd EdsgerGen.\\n\");\n  close_out out\n\nlet generate_low_level_invariant ind j f t : string option * string option =\n  let rec gen_list ind f t lvl : string list * string list = match t.aTypeDesc with\n    (*\n    | ATbuiltin Tval -> [inj ^ \"\\n  \" ^ ind ^ f ^ \"\\n  \" ^ ind ^ f],\n                        [\"Val.has_type \" ^ f ^ \" AST.Tint\"]\n    *)\n    | ATbuiltin _ -> [], []\n\n    (*\n    | ATdata (_, ATsingleton c) ->\n      output_constr ind (fun fld -> \"(\" ^ fld ^ \" \" ^ f ^ \")\") c lvl\n    | ATdata (_, ATbranches cs) ->\n      output_string out (\"match \" ^ f ^ \" with\");\n      List.iter (fun c ->\n        output_string out (\"\\n\" ^ ind ^ \"| \" ^ c.aTypeConstrName ^ \" \" ^\n          String.concat \" \" (List.map fst c.aTypeConstrArgs) ^ \" => \");\n        match c.aTypeConstrImpl with\n        | Some { aImplDesc = ACdefault } -> output_string out \"False\"\n        | Some _ -> output_constr (\"  \" ^ ind) (fun fld -> fld) c lvl\n        | None -> coqgen_fatal_error __LOC__ \"output_valid_ft_cond\"\n                    (\"Provable data type with constructor \" ^\n                     c.aTypeConstrName ^ \" with no implementation\")\n      ) cs;\n      output_string out (\"\\n\" ^ ind ^ \"end\")\n    *)\n  | ATdata (_, ATsingleton c) -> [], [] (* XXX *)\n  | ATdata (_, ATbranches cs) -> [], [] (* XXX *)\n  | ATlist _                  -> [], [] (* XXX *)\n  | ATprod (t1, t2) ->\n    let t1inj, t1typed = gen_list ind (\"(fst \" ^ f ^ \")\") t1 (lvl + 1) in\n    let t2inj, t2typed = gen_list ind (\"(snd \" ^ f ^ \")\") t2 (lvl + 1)\n    in t1inj @ t2inj, t1typed @ t2typed\n  | ATarray (n, t') ->\n    let var = \"n\" ^ string_of_int lvl in\n    let inj, typed = gen_option (\"  \" ^ ind) (\"(ZMap.get \" ^ var ^ \" \" ^ f ^ \")\")\n                                t' lvl in\n    (match inj with\n     | None -> []\n     | Some s -> [\"(forall \" ^ var ^ \", 0 <= \" ^ var ^ \" < \" ^ string_of_int n ^\n                  \" ->\\n  \" ^ ind ^ s ^ \")\"]),\n    (match typed with\n     | None -> []\n     | Some s -> [\"(forall \" ^ var ^ \", 0 <= \" ^ var ^ \" < \" ^ string_of_int n ^\n                    \" ->\\n  \" ^ ind ^ s ^ \")\"])\n  | ATmapping _ -> [], []\n  | ATexternal { aEXTypeLowLevelInv = None } -> [], []\n  | ATexternal { aEXTypeLowLevelInv = Some s } ->\n    [\"(\" ^ s ^ \" \" ^ j ^ \" \" ^ f ^ \" \" ^ f ^ \")\"], []\n  (*\n  and output_constr ind get_field c lvl = match c.aTypeConstrArgs with\n    | [] -> output_string out \"True\"\n    | args ->\n      let first = ref true in\n      List.iter (fun (i, t') ->\n        if !first\n          then first := false\n          else output_string out (\"\\n\" ^ ind ^ \"/\\\\ \");\n        output (\"  \" ^ ind) (get_field i) t' (lvl + 1)\n      ) args\n  *)\n  and gen_option ind f t lvl : string option * string option =\n    let inj, typed = gen_list ind f t lvl\n    in list_to_option inj, list_to_option typed\n  and list_to_option = function\n    | [] -> None\n    | lst -> Some (String.concat \" /\\\\ \" lst)\n  in gen_option ind f t 0\n\nlet builtin_base_layer =\n  { aLayerName = builtin_base_layer_name;\n    aLayerType = {\n      aLayerBase = {\n        aLayerSignatureName = builtin_base_layer_name ^ \"_base\";\n        aLayerSignatureSlots = [];\n        aLayerSignatureSuppressError = false\n      };\n      aLayerSignature = {\n        aLayerSignatureName = builtin_base_layer_name ^ \"_inter\";\n        aLayerSignatureSlots = [];\n        aLayerSignatureSuppressError = false\n      }\n    };\n\n    aLayerAccessor = AAnone;\n    aLayerInvariant = None;\n\n    aLayerFreshObjects = [];\n    aLayerPassthroughObjects = [];\n    aLayerAllObjects = [];\n\n    aLayerTipObjectSet = IdentSet.empty;\n    aLayerKeelObjectSet = IdentSet.empty;\n\n    aLayerDesc = ALbottom\n  }\n\nlet gen_layer env i l =\n  let _ = print_endline (\"This is layer \" ^ i ) in\n\n  let has_base_layer, base_layer =\n    match l.aLayerDesc with\n    | ALbottom ->                false, builtin_base_layer\n    | ALontop l' ->              true,  l'\n    | ALrefine_bottom (l', p) -> true,  l' in\n    (*\n    | ALrefine_ontop _ -> false, \"**RefinedLayersNotSupported**\", l in\n    *)\n  let base_layer_name = base_layer.aLayerName in\n  let accessor_requirement = match l.aLayerAccessor with\n    | AAnone -> \"\"\n    | AALoadStoreSem1 -> \"Require        mcertikos.flatmem.LoadStoreSem1.\\n\"\n    | AALoadStoreSem2 -> \"Require        mcertikos.flatmem.LoadStoreSem2.\\n\"\n    | AALoadStoreSem3 -> \"Require        mcertikos.flatmem.LoadStoreSem3.\\n\" in\n\n  let out = new_file env (\"Layer\" ^ i)\n              (\n               \"Require Import DeepSpec.lib.Monad.Monad.\\n\" ^\n               \"Require Import DeepSpec.lib.Monad.MonadState.\\n\" ^\n               \"Require Import DeepSpec.lib.Monad.StateMonad.\\n\" ^\n               \"Require Import DeepSpec.lib.Monad.OptionMonad.\\n\" ^\n               \"Require Import DeepSpec.lib.Monad.MonadZero.\\n\" ^\n               \"Require Import DeepSpec.core.SynthesisStmt.\\n\" ^\n               \"Require Import DeepSpec.core.SynthesisFunc.\\n\" ^\n               \"Require Import backend.MachineModel.\\n\" ^\n               \"Existing Instance MonadState_DS.\\n\" ^\n               \"Existing Instance MonadZero_DS.\\n\" ^\n               accessor_requirement ^\n               if has_base_layer then\n                 \"Require Export \" ^ env.project_name ^ \".Layer\" ^ base_layer_name ^ \".\\n\"\n               else\n                 \"\")\n              file_class_Layers in\n  let _ = output_string out \"\\n\nContext {memModelOps : MemoryModelOps mem}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  memModelOps := memModelOps;\n  GetHighData := global_abstract_data_type \n}.\n\\n\" in\n\n\n  let foreach_field step =\n    List.iter (fun (_, o) ->\n      List.iter (fun f -> step (o.aObjectName, f)) o.aObjectFields\n    ) l.aLayerAllObjects in\n\n  let high_level_invariant_proof, high_level_invariant_name =\n    match l.aLayerInvariant with\n    | None -> \"I\", fun _ -> \"True\"\n    | Some s -> i ^ \"_init_global_abstract_data_high_level_invariant\",\n                fun abd -> s ^ \" \" ^ abd in\n                \n  let unmingledFieldName o f = \n    (* l.aLayerName ^ \"_\" ^  *)\n    o.aObjectName ^ \"_\" ^ f.aObjectFieldName in\n  let unmingledFieldNameIO io f = \n    (* l.aLayerName ^ \"_\" ^  *)\n    io ^ \"_\" ^ f.aObjectFieldName in\n\n  let _ = (* invariants *)\n    (* kernel_mode: hard coded for CertiKOS only *)\n    output_string out (\"\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nDefinition \" ^ i ^ \"_kernel_mode (abd : global_abstract_data_type) :=\");\n    let have_clause = ref false in\n    foreach_field (fun (io, f) ->\n      if f.aObjectFieldType.aTypeDesc = ATbuiltin Tbool &&\n         (unmingledFieldNameIO io f = \"ikern\" || unmingledFieldNameIO io f = \"ihost\")\n      then begin\n        if !have_clause then output_string out \" /\\\\\";\n        output_string out (\" \" ^ unmingledFieldNameIO io f ^ \" abd = true\");\n        have_clause := true\n      end);\n    if not !have_clause then output_string out \" True\";\n    output_string out (\".\\nGlobal Arguments \" ^ i ^ \"_kernel_mode / abd.\\n\") in\n\n  let _ =  (* Typeclass summarizing proof dependencies *)\n    let record_field_leftover = ref \"\\n  \" in\n    output_string out (\"\nClass Layer_\" ^ i ^ \"_Context_prf  := {\n  (* ensuring global empty data matches those in the object definitions *)\");\n    foreach_field (fun (io, f) ->\n      output_string out (!record_field_leftover ^\n        i ^ \"_init_\" ^ unmingledFieldNameIO io f ^ \"_eq : \" ^\n        unmingledFieldNameIO io f ^ \" init_global_abstract_data = \");\n      output_compile_time_constant out \"    \" f.aObjectFieldInitial;\n      record_field_leftover := \";\\n  \"\n    );\n    if high_level_invariant_proof <> \"I\" then begin\n      output_string out (!record_field_leftover ^\n        high_level_invariant_proof ^ \" :\\n    \" ^\n        high_level_invariant_name \"init_global_abstract_data\");\n      record_field_leftover := \";\\n  \"\n    end;\n    record_field_leftover := !record_field_leftover ^\n      \"(* satisfy all ground base layers' empty data high-level invariant requirements *)\\n  \";\n\n    let foreach_ground_base_layer f =\n      let rec run l = match l.aLayerDesc with\n        | ALbottom -> ()\n        | ALontop l' -> f l'; run l'\n        | ALrefine_bottom (l', _) -> f l'; run l'\n      in run l in\n    foreach_ground_base_layer (fun l -> match l.aLayerInvariant with\n      | Some s ->\n        output_string out (!record_field_leftover ^\n          i ^ \"_init_global_abstract_data_\" ^ l.aLayerName ^\n          \"_high_level_invariant :\\n    \" ^\n          s ^ \" init_global_abstract_data\");\n        record_field_leftover := \";  \"\n      | None -> ()\n    );\n    output_string out (\"\n}.\nContext`{CTXT_prf : !Layer_\" ^ i ^ \"_Context_prf}.\\n\") in\n\n  let _ = (* Over/UnderlaySpecClass *)\n    output_string out (\"\nInstance \" ^ i ^ \"_data_ops : CompatDataOps global_abstract_data_type := {\n  empty_data := init_global_abstract_data;\n  high_level_invariant d := \" ^ high_level_invariant_name \"d\" ^ \";\\n\" ^\n\"}.\n\nInstance \" ^ i ^ \"_data : CompatData global_abstract_data_type := {\\n\" ^\n  \"empty_data_high_level_invariant := \" ^ high_level_invariant_proof ^ \"\n}.\n\nInstance \" ^ i ^ \"_overlay_spec : OverlaySpecClass := {\\n\" ^\n\"}.\\n\n\\n\");\n\n    if has_base_layer then begin\n      (* Realize base layer's requirements -- [base_layer_name ^ \"_Layer\"]\n         coming soon *)\n      output_string out (\"\n(* (* TODO: add this back in for the Ethereum backend. *)\nGlobal Instance Layer_\" ^ i ^ \"'\" ^ base_layer_name ^ \"_Context_prf : Layer_\" ^ base_layer_name ^ \"_Context_prf.\nProof. esplit; apply CTXT_prf.\\n\" ^\n#ifndef REDACTED\n\"  (*\n  - intros; simpl.\n    rewrite \" ^ i ^ \"_AbData_get_set.\n    destruct abd; reflexivity.\n  - intros; simpl.\n    rewrite \" ^ i ^ \"_AbData_get_set, \" ^ i ^ \"_AbData_set_set.\n    reflexivity.\n  - simpl.\n    rewrite \" ^ i ^ \"_AbData_get_empty_data.\n    reflexivity.\n  - admit.\n  *)\" ^\n#endif\n\"Qed.\\n\");\n      output_string out (\"Context`{\" ^ base_layer_name ^ \"_pres_inv : !\" ^\n                         base_layer_name ^ \"_preserves_invariants}.\\n*)\\n\")\n    end;  (* if has_base_layer *)\n\n    output_string out (\"\nInstance \" ^ i ^ \"_underlay_spec : UnderlaySpecClass := {\n  cdataOpsLow := \" ^\n    (if has_base_layer\n     then base_layer_name ^ \"_data_ops\"\n     else \"@BuiltinBase_data_ops GlobalLayerSpec init_global_abstract_data\")\n  ^ \";\n  cdataLow := \" ^ base_layer_name ^ \"_data;\\n\" ^\n#ifndef REDACTED\n\"  (*GetLowLayer := \" ^ base_layer_name ^ \"_Layer *)\\n\" ^\n#endif\n\"}.\\n\\n\") in\n\n  let _ =\n    List.iter (fun (_, o) ->\n      gen_object_definition env out base_layer o.aObjectName o;\n      gen_object_sim env l.aLayerName base_layer o.aObjectName o\n    ) l.aLayerFreshObjects;\n    let sim_out =\n#ifdef REDACTED\n    open_out \"/dev/null\" in\n#else\n    new_file env (\"LSim\" ^ i) \"\" file_class_NoDefaultImports in\n#endif\n    if has_base_layer then\n      output_string sim_out (\"Require Export \" ^ env.project_name ^\n                             \".LSim\" ^ base_layer_name ^ \".\\n\");\n    List.iter (fun (_, o) ->\n      output_string sim_out (\"Require Export \" ^ env.project_name ^\n                             \".ObjSim\" ^ o.aObjectName ^ \".\\n\")\n    ) l.aLayerFreshObjects;\n    close_out sim_out in\n\n#ifdef REDACTED\n  let old_out = out in\n  let out = open_out \"/dev/null\" in\n#endif\n\n  let _ = (* Start of section: context *)\n    output_string out (\"(* (*Temporarily omitted in the Ethereum version.*)\\n\\nSection LAYER_\" ^ i ^ \"_DEFINITION.\") in\n\n  let iter_nonghost_methods action = List.iter (fun m ->\n    if m.aMethodType.aMethodKind <> MKghost &&\n       m.aMethodType.aMethodKind <> MKconstghost\n      then action m) in\n  let _ = (* We're now ready to declare primitives *)\n    (* Instantiate [_prim] to layer (will be used by upper layers when called. *)\n    List.iter (fun (s, o) ->\n      List.iter (fun m ->\n        output_string out (\"\n  Definition \" ^ i ^ \"_\" ^ s ^ \"_\" ^ m.aMethodName ^ \"_prim := \" ^\n          o.aObjectName ^ \"_\" ^ m.aMethodName ^ \"_prim.\")\n      ) o.aObjectMethods\n    ) l.aLayerFreshObjects;\n    List.iter (fun (s, o) ->\n      List.iter (fun m ->\n        output_string out (\"\n  Definition \" ^ i ^ \"_\" ^ s ^ \"_\" ^ m.aMethodName ^ \"_prim := \" ^\n          base_layer_name ^ \"_\" ^ s ^ \"_\" ^ m.aMethodName ^ \"_prim.\")\n      ) o.aObjectMethods\n    ) l.aLayerPassthroughObjects;\n    output_char out '\\n' in\n\n  let _ =\n    (* Fulfilling included object methods' requirements *)\n    let class_field_leftover = ref \"\\n    \" in\n    output_string out (\"\\n  Class \" ^ i ^ \"_preserves_invariants := {\");\n    List.iter (fun (s, o) ->\n      iter_nonghost_methods (fun m ->\n        match generate_preserve_invariant_prop m (o.aObjectName ^ \"_\" ^ m.aMethodName ^ \"_spec\") None with\n        | None -> ()\n        | Some preserve_invariant_prop ->\n          output_string out (!class_field_leftover ^\n            i ^ \"_\" ^ o.aObjectName ^ \"_\" ^ m.aMethodName ^\n            \"_preserves_invariants :>\\n      \" ^ preserve_invariant_prop);\n          class_field_leftover := \";\\n    \"\n      ) o.aObjectMethods\n    ) (l.aLayerFreshObjects @ l.aLayerPassthroughObjects);\n    if l.aLayerAccessor <> AAnone then\n      output_string out (!class_field_leftover ^\n        i ^ \"_trapinfo_set_preserves_invariants :>\n      LoadStoreDef.TrapinfoSetInvariant;\\n    \" ^\n        i ^ \"_flatmem_store_preserves_invariants :>\n      LoadStoreDef.FlatmemStoreInvariant (flatmem_store := \" ^\n        (if l.aLayerAccessor = AALoadStoreSem1 then\n           \"FlatMemoryAux.flatmem_store'\"\n         else\n           \"FlatMemoryAux.flatmem_store\") ^ \")\");\n    output_string out (\"\\n  }.\n  Context`{\" ^ i ^ \"_pres_inv : !\" ^ i ^ \"_preserves_invariants}.\\n\") in\n\n  (* Finally, produce the [compatlayer]s. *)\n  let iter_exporting_methods do_fresh do_passthrough =\n    List.iter (fun (s, o) ->\n      let underlay_same_slot_object_methods =\n        try (List.assoc s l.aLayerType.aLayerBase.aLayerSignatureSlots)\n              .aSignatureMethods\n        with Not_found -> [] in\n      iter_nonghost_methods (fun m ->\n        if List.mem_assoc m.aMethodName underlay_same_slot_object_methods then\n          do_passthrough s o.aObjectName m\n        else\n          do_fresh s o.aObjectName m\n      ) o.aObjectMethods\n    ) l.aLayerFreshObjects;\n    List.iter (fun (s, o) ->\n      iter_nonghost_methods (fun m ->\n        do_passthrough s o.aObjectName m\n      ) o.aObjectMethods\n    ) l.aLayerPassthroughObjects in\n\n  let output_layer_definition def_name fresh_only accessor =\n    begin match accessor with\n    | AAnone -> ()\n    | AALoadStoreSem1 -> output_string out (\"\n  Definition \" ^ i ^ \"_exec_loadex {F V} := LoadStoreSem1.exec_loadex1 (F := F) (V := V).\n  Definition \" ^ i ^ \"_exec_storeex {F V} := LoadStoreSem1.exec_storeex1 (F := F) (V := V) (flatmem_store := FlatMemoryAux.flatmem_store').\\n\")\n    | AALoadStoreSem2 -> output_string out (\"\n  Definition \" ^ i ^ \"_exec_loadex {F V} := LoadStoreSem2.exec_loadex2 (F := F) (V := V).\n  Definition \" ^ i ^ \"_exec_storeex {F V} := LoadStoreSem2.exec_storeex2 (F := F) (V := V) (flatmem_store := FlatMemoryAux.flatmem_store).\\n\")\n    | AALoadStoreSem3 -> output_string out (\"\n  Definition \" ^ i ^ \"_exec_loadex {F V} := LoadStoreSem3.exec_loadex3 (F := F) (V := V).\n  Definition \" ^ i ^ \"_exec_storeex {F V} := LoadStoreSem3.exec_storeex3 (F := F) (V := V) (flatmem_store := FlatMemoryAux.flatmem_store).\\n\")\n    end;\n    let line_leftover = ref \"\\n    \" in\n    let output_prim s oi m =\n      if m.aMethodSemantics = ASdefault then begin\n        List.iter (fun t -> gen_type_arg_ret env t) m.aMethodType.aMethodArgumentTypes;\n        gen_type_arg_ret env m.aMethodType.aMethodReturnType;\n      end;\n      output_string out (!line_leftover ^\n        m.aMethodName ^ \" ↦ \" ^\n          generate_compat_sem m (oi ^ \"_\" ^ m.aMethodName ^ \"_spec\"));\n      line_leftover := \"\\n      ⊕ \" in\n    let output_nothing s oi m = () in\n    output_string out (\"\n  Definition \" ^ def_name ^ \" : CompatLayerDef.compatlayer GetHighDataX :=\");\n    iter_exporting_methods\n      (if fresh_only then output_prim else output_nothing)\n      (if fresh_only then output_nothing else output_prim);\n    if accessor <> AAnone then\n      output_string out (!line_leftover ^\n        \"CompatLayerDef.accessors ↦ {| CompatLayerDef.exec_load := @\" ^ i ^ \"_exec_loadex; CompatLayerDef.exec_store := @\" ^ i ^ \"_exec_storeex |}\");\n    output_string out \".\\n\";\n    in\n\n  let has_fresh = ref false in\n  let has_passthrough = ref false in\n  let _ = (* Wrapping everything up *)\n(*    iter_exporting_methods (fun _ _ _ -> has_fresh := true)\n                           (fun _ _ _ -> has_passthrough := true); *)\n    iter_exporting_methods (fun n oname m -> \n\t\t\t      has_fresh := true)\n                           (fun n oname m -> \n\t\t\t      has_passthrough := true);\n    if not !has_fresh || not !has_passthrough then\n        output_layer_definition (i ^ \"_Layer\") !has_fresh l.aLayerAccessor\n    else begin\n      let layer_fresh = i ^ \"_Layer_fresh\" in\n      let layer_passthrough = i ^ \"_Layer_passthrough\" in\n      output_layer_definition layer_fresh true AAnone;\n      output_layer_definition layer_passthrough false l.aLayerAccessor;\n      output_string out (\"\n  Definition \" ^ i ^ \"_Layer : CompatLayerDef.compatlayer GetHighDataX :=\n    \" ^ layer_fresh ^ \" ⊕ \" ^ layer_passthrough ^ \".\\n\")\n    end\n  in output_string out (\"End LAYER_\" ^ i ^ \"_DEFINITION.\\n*)\\nEnd EdsgerGen.\\n\");\n     close_out out;\n#ifdef REDACTED\n     output_string old_out (\"\\nEnd EdsgerGen.\\n\");\n     close_out old_out;\n#endif\n     !has_fresh, !has_passthrough\n\nlet gen_layer_refinement env i has_fresh has_passthrough l =\n  if l.aLayerDesc <> ALbottom &&\n     List.for_all (fun (_, o) -> not o.aObjectIsTrusted) l.aLayerFreshObjects then begin\n    let base_layer, is_refine, refine_prop =\n      match l.aLayerDesc with\n      | ALbottom -> coqgen_fatal_error __LOC__ \"gen_layer_refinement\" \"inconsistent rematch\"\n      | ALontop l' ->              l', false, \"***OnTopLayersNoProp***\"\n      | ALrefine_bottom (l', p) -> l', true, p in\n    let base_layer_name, base_layer_export_objects =\n      base_layer.aLayerName,\n      base_layer.aLayerFreshObjects @ base_layer.aLayerPassthroughObjects in\n\n    let out =\n#ifdef REDACTED\n        open_out \"/dev/null\" in\n#else\n        new_file env (\"Refine\" ^ i)\n                (\"Require Import layerlib.LayerCalculusLemma.\\n\" ^\n                 \"Require Import layerlib.RefinementTactic.\\n\" ^\n                 \"Require Import layerlib.RefinementTacticAux.\\n\" ^\n                 \"Require Import liblayers.compcertx.MakeProgram.\\n\" ^\n                 \"Require Import liblayers.compcertx.MemWithData.\\n\\n\" ^\n                 \"Require Import \" ^ env.project_name ^ \".Layer\" ^ i ^ \".\\n\" ^\n                 \"Require Import \" ^ env.project_name ^ \".LSim\" ^ base_layer_name ^ \".\\n\"\n                 (*\n                 String.concat \"\" (List.map (fun (_, o) ->\n                   \"Require Import \" ^ env.project_name ^\n                   \".ObjSim\" ^ o.aObjectName ^ \".\\n\"\n                 ) l.aLayerPassthroughObjects) *))\n                file_class_Refinements in\n#endif\n    let _ = output_string out (\"\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\nContext`{CTXT_prf : !Layer_\" ^ i ^ \"_Context_prf}.\nContext`{\" ^ base_layer_name ^ \"_pres_inv : !\" ^ base_layer_name ^ \"_preserves_invariants}.\nContext`{\" ^ i ^ \"_pres_inv : !\" ^ i ^ \"_preserves_invariants}.\n\nExisting Instances \" ^ i ^ \"_overlay_spec \" ^ i ^ \"_underlay_spec.\\n\") in\n\n    let unmingledFieldName o f = \n      (* l.aLayerName ^ \"_\" ^  *)\n      o.aObjectName ^ \"_\" ^ f.aObjectFieldName in\n\n    let unmingledFieldNameOI oi f = \n      (* l.aLayerName ^ \"_\" ^  *)\n      oi ^ \"_\" ^ f.aObjectFieldName in\n\n    let relate_RData_name = (* Toward [HyperMem]: relate_RData *)\n      if is_refine then\n        refine_prop\n      else begin\n        let record_field_leftover = ref \"\\n  \" in\n        output_string out (\"\nRecord relate_RData (j : meminj) (habd : GetHighData) (labd : GetLowData) : Prop\n    := mkrelate_RData {\");\n        List.iter (fun (_, o) ->\n          record_field_leftover := !record_field_leftover ^\n            \"(* \" ^ o.aObjectName ^ \" *)\\n  \";\n          if IdentSet.mem o.aObjectName base_layer.aLayerTipObjectSet then\n            List.iter (fun f ->\n              output_string out (!record_field_leftover ^\n                unmingledFieldName o f ^ \"_re : \");\n(*              output_ht_inject out \"    \" (\"(\" ^ f.aObjectFieldName ^ \" habd)\")\n                                          (\"(\" ^ f.aObjectFieldName ^ \" labd)\")\n                                          f.aObjectFieldType; *)\n              record_field_leftover := \";\\n  \"\n            ) o.aObjectFields\n        ) base_layer.aLayerAllObjects;\n        output_string out \"\\n}.\\n\";\n        \"relate_RData\"\n      end in  (* [else] is_refine *)\n\n    let iter_implemented_fields action =\n      List.iter (fun (_, o) ->\n        if o.aObjectRequireImpl then\n          List.iter (fun f ->\n            if not f.aObjectFieldIsLogical then\n              action o.aObjectName f\n          ) o.aObjectFields\n      ) l.aLayerFreshObjects in\n\n    let has_implemented_fields = (* Toward [HyperMem]: match_RData *)\n      let record_field_leftover = ref (false, \"\nRecord match_RData (habd : GetHighData) (m : mem) (j : meminj) : Prop\n    := MATCH_RDATA {\\n  \") in\n      iter_implemented_fields (fun oi f ->\n        output_string out (snd !record_field_leftover ^ unmingledFieldNameOI oi f ^\n          \"_ma : variable_match \" ^ oi ^ \"_\" ^ unmingledFieldNameOI oi f ^\n          \"_var habd m\");\n        record_field_leftover := (true, \";\\n  \")\n      );\n      if fst !record_field_leftover then\n        output_string out \"\\n}.\\n\"\n      else\n        output_string out \"\nInductive match_RData: GetHighData -> mem -> meminj -> Prop :=\n| MATCH_RDATA: forall habd m f, match_RData habd m f.\\n\";\n      output_string out \"\nLocal Hint Resolve MATCH_RDATA.\\n\";\n      fst !record_field_leftover in\n\n    let _ = (* Toward [HyperMem]: CompatRel *)\n      output_string out (\"\nGlobal Instance rel_ops: CompatRelOps GetHighDataX GetLowDataX :=\n{\n  relate_AbData f d1 d2 := \" ^ relate_RData_name ^ \" f d1 d2;\n  match_AbData d1 m f := match_RData d1 m f;\n  new_glbl := \");\n      iter_implemented_fields (fun oi f ->\n        output_string out (\"var_\" ^ oi ^ \"_\" ^ unmingledFieldNameOI oi f ^ \"_ident :: \")\n      );\n      output_string out \"nil\n}.\\n\";\n      iter_implemented_fields (fun oi f ->\n        output_string out (\"\nGlobal Instance \" ^ oi ^ \"_\" ^ unmingledFieldNameOI oi f ^ \"_hyper_ltype_static :\n    HyperLTypeStatic \" ^ oi ^ \"_\" ^ unmingledFieldNameOI oi f ^ \"_var new_glbl.\nProof.\n  split; try solve\n    [ Decision.decision\n    | simpl; auto\n    | simpl \" ^ oi ^ \"_\" ^ unmingledFieldNameOI oi f ^ \"_var.(ltype_offset);\n      rewrite Int256.unsigned_zero; apply Z.divide_0_r ].\nQed.\\n\")\n      );\n      if is_refine then\n        output_string out \"Context`{rel_prf : !CompatRel GetHighDataX GetLowDataX}.\\n\"\n      else begin\n        output_string out \"\nLemma relate_incr:\n  forall abd abd' f f',\n    relate_RData f abd abd' ->\n    inject_incr f f' ->\n    relate_RData f' abd abd'.\nProof.\n  inversion 1; subst; intros; simpl in *.\n  repeat match goal with\n  | H : _ /\\\\ _ |- _ => destruct H\n  end.\n  repeat (constructor; simpl; eauto).\nQed.\";\n        if has_implemented_fields then\n          output_string out \"\nGlobal Instance rel_prf: CompatRel GetHighDataX GetLowDataX.\nProof.\n  constructor; [ destruct 1 .. |]; intros.\n  - constructor; eapply inject_match_correct; eauto with typeclass_instances.\n  - constructor; eapply store_match_correct; eauto with typeclass_instances.\n  - constructor; eapply alloc_match_correct; eauto with typeclass_instances.\n  - constructor; eapply free_match_correct; eauto with typeclass_instances.\n  - constructor; eapply storebytes_match_correct; eauto with typeclass_instances.\n  - eapply relate_incr; eauto.\nQed.\\n\"\n        else\n          output_string out \"\nGlobal Instance rel_prf: CompatRel GetHighDataX GetLowDataX.\nProof.\n  constructor; intros; simpl; trivial.\n  eapply relate_incr; eauto.\nQed.\\n\"\n      end  (* [else] is_refine *) in\n\n    let _ = (* Construct [HyperMem] *)\n      output_string out (\"\n(*\nLocal Instance: ExternalCallsOps (mwd GetLowDataX) := CompatExternalCalls.compatlayer_extcall_ops \" ^ base_layer_name ^ \"_Layer.\nLocal Instance: CompilerConfigOps _ := CompatExternalCalls.compatlayer_compiler_config_ops \" ^ base_layer_name ^ \"_Layer.\n*)\n\nInstance \" ^ i ^ \"_hypermem : MemoryModel.HyperMem\n  := { Hcompatrel := {| crel_prf := rel_prf |} }.\\n\") in\n\n    let iter_nonghost_methods action = List.iter (fun m ->\n      if m.aMethodType.aMethodKind <> MKghost &&\n         m.aMethodType.aMethodKind <> MKconstghost\n        then action m) in\n    let iter_passthrough_methods action =\n      List.iter (fun (s, o) ->\n        let underlay_same_slot_object =\n          try List.assoc s base_layer_export_objects\n          with Not_found -> Typecheck.dummy_object \"***dummy_empty_object***\" in\n        iter_nonghost_methods (fun m ->\n          if List.exists (fun m' -> m'.aMethodName = m.aMethodName)\n                         underlay_same_slot_object.aObjectMethods then\n            action o.aObjectName underlay_same_slot_object.aObjectName m\n        ) o.aObjectMethods\n      ) l.aLayerFreshObjects;\n      List.iter (fun (s, o) ->\n        let underlay_same_slot_object_name =\n          try (List.assoc s base_layer_export_objects).aObjectName\n          with Not_found -> coqgen_fatal_error __LOC__ \"gen_layer_refinement\"\n                              \"Passthrough object not found in base layer exports\"\n        in iter_nonghost_methods\n             (action o.aObjectName underlay_same_slot_object_name)\n             o.aObjectMethods\n      ) l.aLayerPassthroughObjects in\n\n    let _ = (* Last two implemented instances before the passthrough proof *)\n      let class_field_leftover = ref \"\\n  \" in\n      output_string out (\"\nClass \" ^ i ^ \"_Underlay_preserves_invariants := {\");\n      List.iter (fun (_, o) ->\n        iter_nonghost_methods (fun m ->\n          match generate_preserve_invariant_prop m\n                  (o.aObjectName ^ \"_\" ^ m.aMethodName ^ \"_spec\")\n                  (Some (\"cdataOpsLow\", \"cdataLow\")) with\n          | None -> ()\n          | Some preserve_invariant_prop ->\n            output_string out (!class_field_leftover ^\n              i ^ \"_Underlay_\" ^ o.aObjectName ^ \"_\" ^ m.aMethodName ^\n              \"_preserves_invariants :>\\n    \" ^ preserve_invariant_prop ^\n              \" | 5\");\n            class_field_leftover := \";\\n  \"\n        ) o.aObjectMethods\n      ) base_layer_export_objects;\n      output_string out (\"\n}.\nInstance \" ^ i ^ \"'\" ^ base_layer_name ^ \"_preserves_invariants : \" ^ i ^ \"_Underlay_preserves_invariants.\nProof. esplit; apply \" ^ base_layer_name ^ \"_pres_inv. Defined.\\n\");\n      if l.aLayerAccessor <> AAnone then\n        output_string out \"\n(* XXX: only works with LoadStoreSem1, not tested beyond MContainer *)\nGlobal Instance: LoadStoreDef.LoadStoreProp (ops := rel_ops) (hflatmem_store:= FlatMemoryAux.flatmem_store') (lflatmem_store:= FlatMemoryAux.flatmem_store').\nProof.\n  accessor_prop_tac.\n  eapply ObjFlatMem.flatmem_store'_exists; eauto.\nQed.\\n\" in\n\n    let _ = (* Last two groups of obligations: refinements (behavior &\n               abstraction), and simulations *)\n      let class_field_leftover = ref (false, \"\nClass \" ^ i ^ \"_refinement_prf : Prop := {\\n  \") in\n      iter_passthrough_methods (fun oi_over oi_under m ->\n        if oi_over <> oi_under then\n          if m.aMethodSemantics = AStrap_info_get ||\n             m.aMethodSemantics = AStrap_info_ret then begin\n          (*\n          if fst (method_classify m.aMethodType) then begin  (* is_pure *)\n          *)\n            output_string out (snd !class_field_leftover ^\n              i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_sim :\\n\");\n            if not is_refine then begin\n              output_exists_prop out \"  \" oi_under oi_under m false false;\n              output_string out \" ->\\n\"\n            end;\n            output_string out (\n\"    (forall id,\n      sim (crel (CompatRel0 := rel_prf) _ _)\n          (id ↦ \" ^ generate_compat_sem m (oi_over ^ \"_\" ^ m.aMethodName ^ \"_spec\") ^ \")\n          (id ↦ \" ^ generate_compat_sem m (oi_under ^ \"_\" ^ m.aMethodName ^ \"_spec\") ^ \"))\");\n            class_field_leftover := (true, \";\\n  \")\n          end else begin  (* [if] is_pure *)\n            output_string out (snd !class_field_leftover ^\n              i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_exists :\\n\");\n            if not is_refine then begin\n              output_exists_prop out \"  \" oi_under oi_under m false false;\n              output_string out \" ->\\n\"\n            end;\n            output_exists_prop out \"  \" oi_over oi_under m false true;\n            class_field_leftover := (true, \";\\n  \")\n          end  (* [else] is_pure *)\n      );\n      if fst !class_field_leftover then\n        output_string out (\"\\n}.\nContext`{\" ^ i ^ \"_ref_prf : !\" ^ i ^ \"_refinement_prf}.\\n\") in\n\n    let _ = (* Wrapping everything up *)\n#ifndef REDACTED\n      output_string out (\"\n(*\nLemma passthrough_correct:\n  sim (crel (CompatRel0 := rel_prf) _ _) \" ^ i ^ \"_Layer\" ^\n    (if has_fresh then \"_passthrough \" else \" \") ^ base_layer_name ^ \"_Layer.\nProof.\n  Local Opaque simRR mapsto layer_mapsto_primitive.\n  unfold GlobalLayerSpec, MemoryModel.GetHighDataX.\n  simpl.\n\n  sim_oplus; simpl.\n\n  Local Transparent simRR mapsto layer_mapsto_primitive.\\n\");\n      iter_passthrough_methods (fun oi_over oi_under m ->\n        if oi_over = oi_under then begin  (* true passthrough *)\n          output_string out (\"\n  - (* \" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \": true passthrough *)\n    exact (\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_sim \" ^ m.aMethodName);\n          if m.aMethodSemantics = ASassembly || m.aMethodSemantics = ASassembly' ||\n             m.aMethodSemantics = ASsetCR3 then\n            output_string out (\" (inv0 := \" ^ base_layer.aLayerName ^ \"_\" ^\n              oi_under ^ \"_\" ^ m.aMethodName ^ \"_preserves_invariants)\");\n          output_string out \").\\n\"\n        end else  (* [if] oi_over = oi_under *)\n          match m.aMethodSemantics with\n          | ASassembly | ASassembly' -> output_string out (\"\n  - (* \" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \": semantics assembly['] *)\n    layer_sim_simpl; compatsim_simpl (@match_AbData); intros.\n    inv match_extcall_states.\");\n            if is_refine then\n              output_string out (\"\n    exploit \" ^ i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_exists;\")\n            else\n              output_string out (\"\n    exploit (\" ^ i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_exists \" ^\n                           oi_under ^ \"_\" ^ m.aMethodName ^ \"_exists);\");\n            output_string out (\"\n      eauto 1; intros (labd' & HP & HM).\n    match_external_states_simpl.\\n\")\n          | ASsetCR3 -> output_string out (\"\n  - (* \" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \": semantics SetCR3 *)\n    layer_sim_simpl; compatsim_simpl (@match_AbData); intros.\n    CommonTactic.inv_val_inject.\n    assert (H8 := H7).\n    eapply AuxLemma.inject_forward_equal' in H8; eauto 1. inv H8.\n    exploit (\" ^ i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_exists \" ^\n                           oi_under ^ \"_\" ^ m.aMethodName ^ \"_exists);\n      eauto 1; intros (labd' & HP & HM).\n    match_external_states_simpl.\n    rewrite Int256.add_zero; eauto.\\n\")\n          | AStrap_info_get | AStrap_info_ret ->\n            output_string out (\"\n  - (* \" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \": trap_info_get|set *)\");\n            if is_refine then\n              output_string out (\"\n    apply \" ^ i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_sim.\\n\")\n            else\n              output_string out (\"\n    apply (\" ^ i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_sim \" ^\n                         oi_under ^ \"_\" ^ m.aMethodName ^ \"_exists).\\n\")\n          | ASdefault ->\n            if fst (method_classify m.aMethodType) then begin  (* is_pure *)\n              output_string out (\"\n  - (* \" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \": pure method *)\n    layer_sim_simpl; compatsim_simpl (@match_AbData); intros.\n    inv_semof H0.\n    exploit \" ^ (if is_refine then\n                   i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_exists\"\n                 else\n                   \"(\" ^ i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_exists \" ^\n                                   oi_under ^ \"_\" ^ m.aMethodName ^ \"_exists)\")\n              ^ \";\n      eauto 1; intros HP.\n    match_external_states_csem.\n    rewrite HP; reflexivity.\\n\")\n            end else begin  (* [if] is_pure *)\n              output_string out (\"\n  - (* \" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \": refinement *)\n    layer_sim_simpl; compatsim_simpl (@match_AbData); intros.\n    try inv_semof H0.\");\n              if is_refine then\n                output_string out (\"\n    exploit \" ^ i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_exists;\")\n              else\n                output_string out (\"\n    exploit (\" ^ i ^ \"_\" ^ oi_over ^ \"_\" ^ m.aMethodName ^ \"_exists \" ^\n                           oi_under ^ \"_\" ^ m.aMethodName ^ \"_exists);\");\n              output_string out (\"\n      eauto 1; intros (labd' & HP & HM).\n    match_external_states_csem.\\n\")\n\n            end  (* [else] is_pure *)\n      );\n      begin match l.aLayerAccessor with\n      | AAnone -> ()\n      | AALoadStoreSem1 ->\n        output_string out \"\n  - layer_sim_simpl.\n    + apply LoadStoreSem1.load_correct1.\n    + apply LoadStoreSem1.store_correct1.\\n\"\n      | AALoadStoreSem2 ->\n        output_string out \"\n  - layer_sim_simpl.\n    + apply LoadStoreSem2.load_correct2.\n    + apply LoadStoreSem2.store_correct2.\\n\"\n      | AALoadStoreSem3 ->\n        output_string out \"\n  - layer_sim_simpl.\n    + apply LoadStoreSem3.load_correct3.\n    + apply LoadStoreSem3.store_correct3.\\n\"\n      end;\n      output_string out \"Qed.*)\\n\"\n#else\n    ()\n#endif\n\n    in output_string out (\"End EdsgerGen.\\n\");\n       close_out out\n  end  (* [if] l.aLayerDesc <> ALbottom && no l.aLayerFreshObjects are trusted *)\n\nlet do_gen_layer_code env i l =\n  let iter_nonghost_methods action = List.iter (fun m ->\n    if m.aMethodType.aMethodKind <> MKghost &&\n       m.aMethodType.aMethodKind <> MKconstghost\n      then action m) in\n  let iter_implemented_methods action =\n    List.iter (fun (_, o) ->\n      if o.aObjectRequireImpl then\n        iter_nonghost_methods (action o.aObjectName) o.aObjectMethods\n    ) l.aLayerFreshObjects in\n  let iter_implemented_fields action =\n    List.iter (fun (_, o) ->\n      if o.aObjectRequireImpl then\n        List.iter (fun f ->\n          if not f.aObjectFieldIsLogical then\n            action o.aObjectName f\n        ) o.aObjectFields\n    ) l.aLayerFreshObjects in\n  let unmingledFieldNameOI oi f = \n    (* l.aLayerName ^ \"_\" ^  *)\n    oi ^ \"_\" ^ f.aObjectFieldName in\n  let unmingledFieldName o f = \n    (* l.aLayerName ^ \"_\" ^  *)\n    o.aObjectName ^ \"_\" ^ f.aObjectFieldName in\n\n  begin  (* Clight source module file--keep away from proofs.\n            That is, we want Clight code and proofs to be in separate files, so we \n            can compile the code quickly without having to check the proofs at the same time.\n          *)\n  let out =\n#ifdef REDACTED\n    open_out \"/dev/null\" in\n#else\n    new_file env (\"LSrc\" ^ i)\n            (\"\\n\\nRequire Import \" ^ env.project_name ^ \".Layer\" ^ i ^ \".\\n\\n\"^\n            \"Require Import cclib.Integers.\\n\"^\n            \"Require Import cclib.Coqlib.\\n\"^\n            \"Require Import cclib.Maps.\\n\\n\"^\n            \"Require Import backend.Options.\\n\"^\n            \"Require Import backend.AST.\\n\"^\n            \"Require Import backend.phase.Clike.Language.\\n\"^\n            \"Require Import backend.phase.MiniC.Language.\\n\"^\n            \"Require Import backend.Cop.\\n\"^\n            \"Require Import backend.Ctypes.\\n\"^\n            \"Require Import backend.Compiled.\\n\"^\n            \"Require Import backend.Compiled.\\n\"^\n            \"Require Import backend.Globalenvs.\\n\"^\n            \"Require Import backend.Glue.\\n\\n\")\n            file_class_ObjAux in\n#endif\n  \n  output_string out \"Definition ge : genv := new_genv (\";\n  iter_implemented_fields (fun oi f ->\n  output_string out (\"\\n\\t(var_\" ^ oi ^ \"_\" ^ unmingledFieldNameOI oi f ^ \"_ident,\" ^ \n  \" unpair_ty \" ^ f.aObjectFieldType.aTypePairIdent ^ \")::\"));\n  output_string out (\"nil)\" ^ \"\\n\\tnil\" ^ \"\\n\\t(\");\n\n  iter_implemented_methods (fun oi m ->\n  output_string out (\"\\n\\t(Int.repr \" ^string_of_int (function_selector_intval_of_method m) ^ \", \" ^ \n  oi ^ \"_\" ^ m.aMethodName ^ \"_cfun\" ^ \"):: (* \" ^ function_selector_of_method m ^ \" *)\\n\"));\n  output_string out (\"nil)\\n\");\n  output_string out (\"\\tNone.\\n\\n\\n\");\n\n(*f.aObjectFieldType.aTypePairIdent *)\n  (* output_string out \"      nil;\\n    lm_gvar :=\\n\";\n  iter_implemented_fields (fun oi f ->\n    output_string out\n      (\"      lgv var_\" ^ oi ^ \"_\" ^ f.aObjectFieldName ^ \"_ident \" ^\n                  oi ^ \"_\" ^ f.aObjectFieldName ^ \"_globvar ::\\n\"));\n  output_string out \"      nil;\n    lm_asmfun :=\n      nil\n  |}.\" *)\n\n  output_string out \"End EdsgerGen.\\n\\n\";\n  output_string out (\"(*change into extract directory*)\\n\" ^\n\t\t       \"Cd \\\"\" ^ Sys.getcwd() ^\"/\" ^env.project_name^\"/extraction\\\".\\n\\n\" ^ (*go to the extract dir*)\n    \"(* Avoid name clashes *)\\n\" ^\n    \"Extraction Blacklist List String Int.\\n\\n\" ^\n    \"Separate Extraction\n    nat positive global_abstract_data_type  (* This line forces Coq to generate some files even if they are not used, to make the makefile work correctly. *)\n    Glue.full_compile_genv\n    ge.\\n\");\n\n  close_out out\n  end;  (* Clight source module file *)\n\n  List.iter (fun (_, o) -> if o.aObjectRequireImpl && List.exists (fun m ->\n                                m.aMethodType.aMethodKind <> MKghost &&\n                                m.aMethodType.aMethodKind <> MKconstghost\n                              ) o.aObjectMethods then begin\n    let proofs, prf_tbl =\n        new_incremental_file env (\"Obj\" ^ o.aObjectName ^ \"CodeProofs\")\n        (\n#ifndef REDACTED\n          \"Require Import liblayers.compcertx.MakeProgram.\\n\" ^\n         \"Require Import liblayers.compcertx.MemWithData.\\n\\n\" ^\n#else\n         \"Require Import \" ^ env.project_name ^ \".Layer\" ^ l.aLayerName ^ \".\\n\")\n        (fun out -> output_string out (\n\"Existing Instance GlobalLayerSpec.\nExisting Instances \" ^ l.aLayerName ^ \"_overlay_spec.\\n\\n\" ^\n      \"Context {memModelOps : MemoryModelOps mem}.\\n\"))\n        (Str.regexp (\"\\\\bLemma +\" ^ o.aObjectName ^ \"_\\\\(.+\\\\)_spec_requires_kernel_mode\\\\b\"))   (* TODO: fix this. *)\n        file_class_ObjAux in\n#endif\n    let code =\n#ifdef REDACTED\n      open_out \"/dev/null\" in\n#else\n      new_file env (\"Obj\" ^ o.aObjectName ^ \"Code\")\n        (\"Require Import liblayers.compcertx.MakeProgram.\\n\" ^\n         \"Require Import liblayers.compcertx.MemWithData.\\n\" ^\n         \"Require Import layerlib.LinkSourceTemplate.\\n\\n\" ^\n         \"Require Import \" ^ env.project_name ^ \".Layer\" ^ l.aLayerName ^ \".\\n\" ^\n         \"Require Import \" ^ env.project_name ^ \".Refine\" ^ l.aLayerName ^ \".\\n\" ^\n         \"Require Import \" ^ env.project_name ^ \".Obj\" ^ o.aObjectName ^ \"CodeProofs.\\n\")\n        file_class_Code in\n#endif\n    output_string code \"\nContext {mem}`{Hmem: Mem.MemoryModel mem}.\nContext`{Hmwd: UseMemWithData mem}.\nContext`{make_program_ops: !MakeProgramOps Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nContext`{Hmake_program: !MakeProgram Clight.function Ctypes.type Clight.fundef Ctypes.type}.\nInstance GlobalLayerSpec : LayerSpecClass := {\n  make_program_ops := make_program_ops;\n  Hmake_program := Hmake_program;\n  GetHighData := global_abstract_data_type\n}.\nContext`{global_abdata : !GlobalAbData init_global_abstract_data global_low_level_invariant}.\";\n    begin match l.aLayerDesc with\n    | ALontop l' -> output_string code (\"\nContext`{CTXT_prf : !Layer_\" ^ l.aLayerName ^ \"_Context_prf}.\nContext`{\" ^ l'.aLayerName ^ \"_pres_inv : !\" ^ l'.aLayerName ^ \"_preserves_invariants}.\")\n    | _ -> ()\n    end;\n    output_string code (\"\nExisting Instances \" ^ l.aLayerName ^ \"_overlay_spec \" ^ l.aLayerName ^ \"_underlay_spec\n                   \" ^ l.aLayerName ^ \"_hypermem.\n\nLemma relate_AbData_translates_kernel_mode j d1 d2 :\n    relate_AbData j d1 d2 -> kernel_mode d1 -> kernel_mode d2.\nProof.\n  simpl; intros rel d1_kern.\n  (* rewrite <- (ikern_re _ _ _ rel), <- (ihost_re _ _ _ rel). *)\n  exact d1_kern.\nQed.\\n\");\n\n    (* Headers for [code] and [proofs] are ready, start printing the meat. *)\n    (* [primitive_constr_prf] for all the exposed primitives from underlay *)\n    begin match l.aLayerDesc with\n    | ALbottom -> ()\n    | ALontop base_layer | ALrefine_bottom (base_layer, _) ->\n      List.iter (fun (s, o) ->\n        List.iter (fun m ->\n          if m.aMethodSemantics = ASdefault then begin\n          let method_full_name =\n                base_layer.aLayerName ^ \"_\" ^ s ^ \"_\" ^ m.aMethodName in\n          let method_is_ghost = m.aMethodType.aMethodKind = MKghost ||\n                                m.aMethodType.aMethodKind = MKconstghost in\n          output_string code (\"\nInstance \" ^ method_full_name ^ \"_prim_prf :\n    primitive_prf \" ^ method_full_name ^ \"_prim.\nProof. esplit; \");\n\n          if method_is_ghost then begin\n            output_string code \"[| | discriminate | |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMis_ghost *)\n    intros _ se j d m mm.\n    constructor; apply mm.\"\n\n          end else begin  (* [if] method_is_ghost *)\n            output_string code (\"[|\n    | intros _;\n      set (sem := gencsem \" ^ o.aObjectName ^ \"_\" ^ m.aMethodName ^ \"_spec);\n      apply mk_prim_exec_prf with sem\n    | discriminate |].\n  - (* PRIMsem_opt_simulates_sem *) admit.\n  - (* PRIMret_cond *) admit.\n  - (* PRIMargs_cast *)\n    simpl.\n    repeat match goal with\n      | |- HList _ _ => constructor\n      | |- HyperArgRet (tp_type_pair _) => simpl\n      | |- HyperArgRet _ => typeclasses eauto\n      end.\n  - (* PRIMreturns_cast *) simpl; typeclasses eauto || constructor.\n  - (* PRIMget_layer_primitive *)\n    reflexivity.\n  - (* PRIMsextcall_step *)\n    admit.\n  - (* PRIMprimsem_sig *)\n    reflexivity.\n  - (* PRIMmake_external *)\n    reflexivity.\")\n          end;  (* [else] method_is_ghost *);\n          let method_is_pure = m.aMethodType.aMethodKind = MKconst ||\n                               m.aMethodType.aMethodKind = MKconstghost in\n          if method_is_pure then\n            output_string code \"\n  - (* PRIMis_pure *)\n    simpl. intros.\n    repeat match goal with\n      | |- context [?X _ d] => unfold X\n      | |- ?G => CommonTactic.subdestruct_if G\n      | |- _ => reflexivity\n      end.\\n\"\n          else\n            output_string code \"\n  - (* PRIMis_pure *) discriminate.\\n\";\n\n          output_string code \"Qed.\\n\"\n          end  (* [if] m.aMethodSemantics = ASdefault *)\n        ) o.aObjectMethods\n      ) (base_layer.aLayerFreshObjects @ base_layer.aLayerPassthroughObjects)\n    end;\n\n    (* [HyperLType], which is used to construct [variable_prf], for all the\n       object fields *)\n    List.iter (fun f ->\n      output_string code (\"\nInstance \" ^ o.aObjectName ^ \"_\" ^ unmingledFieldName o f ^ \"_var_prf :\n    HyperLType \" ^ o.aObjectName ^ \"_\" ^ unmingledFieldName o f ^ \"_var.\nProof. esplit; \");\n      if f.aObjectFieldIsLogical then\n        output_string code \"[ typeclasses eauto | discriminate |].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_ltype_ghost *)\n    intros _ f j d m mm.\n    constructor; apply mm.\\n\"\n      else  (* [if] f.aObjectFieldIsLogical *)\n        output_string code (\"[ typeclasses eauto | intros _; esplit | discriminate ].\n  - (* ltype_writable *)\n    intros j d m mm; apply mm.\n  - (* ltype_get_match *)\n    intros j d m mm dc; split.\n    admit. (* ht_ft_cond (ltype_get \" ^ o.aObjectName ^ \"_\" ^ unmingledFieldName o f ^ \"_var d) *)\n    apply mm.\n  - (* ltype_set_match *)\n    intros f j d m fc mm dc m' disjoint_eq match_indirect.\n    constructor.\n    admit. (* [relate_AbData j (ltype_set ... f d) (snd m')]: premise does not\n              bound [snd m'] *)\n    constructor.\n    split.\n    + exact match_indirect.\n    + admit. (* [Mem.range_perm (fst m') ...]: premise does not bound the\n                permissions of [fst m'] *)\\n\");\n\n      output_string code \"Qed.\\n\"\n    ) o.aObjectFields;\n\n    output_string code (\"\n(* Do not assume this context until now to avoid above proofs using the wrong one *)\nContext`{\" ^ l.aLayerName ^ \"_pres_inv : !\" ^ l.aLayerName ^ \"_preserves_invariants}.\\n\");\n\n    (* Final code proof theorems used by linking theorems *)\n    iter_nonghost_methods (fun m ->\n      let method_full_name = o.aObjectName ^ \"_\" ^ m.aMethodName in\n      let nargs, args = match m.aMethodType.aMethodArgumentTypes with\n        | [t] when t.aTypeDesc = ATbuiltin Tunit -> 0, \"\"\n        | ts -> List.length ts,\n                String.concat \"\"\n                  (List.mapi (fun n _ -> \" a\" ^ string_of_int n) ts) in\n      let is_pure, has_return = method_classify m.aMethodType in\n      let suffix, retarg, ret =\n        if is_pure then\n          \"_pure\", \" r\", \"r\"\n        else if has_return then\n          \"\", \" r d'\", \"(r, d')\"\n        else\n          \"_void\", \" d'\", \"d'\" in\n\n      if not (Hashtbl.mem prf_tbl m.aMethodName) then begin\n          (* verification conditions, [method_full_name ^ \"_vc\"], aren't\n             checked if exist themselves, but latched on requires kernel mode\n             proofs currently *)\n        output_string proofs (\"\nLemma \" ^ method_full_name ^ \"_vc\" ^ args ^ \" me d :\");\n        for i = 0 to nargs - 1 do\n          output_string  proofs (\"\n    ht_ft_cond a\" ^ string_of_int i ^\n            \" -> ht_valid_ft_cond a\" ^ string_of_int i ^ \" ->\")\n        done;\n        output_string proofs (\"\n    high_level_invariant d ->\n    synth_func_cond \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf\n                   \" ^ args ^ \" me d.\nProof.\nAdmitted.\n\nLemma \" ^ method_full_name ^ \"_oblg\" ^ args ^ \" me d :\");\n        for i = 0 to nargs - 1 do\n          output_string  proofs (\"\n    ht_ft_cond a\" ^ string_of_int i ^\n            \" -> ht_valid_ft_cond a\" ^ string_of_int i ^ \" ->\")\n        done;\n        output_string proofs (\"\n    high_level_invariant d ->\n    synth_func_obligation \" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_wf\n                         \" ^ args ^ \" me d.\nProof.\nAdmitted.\\n\")\n      end;  (* [if] requires kernel mode proof not exists  *)\n\n      output_string code (\"\nLemma \" ^ method_full_name ^ \"_prf : function_constr_prf \" ^ method_full_name ^ \".\nProof. solve_function_constr_prf @\" ^ method_full_name ^ \". Qed.\n\nTheorem \" ^ method_full_name ^ \"_code_correct:\n  simRR GetHighDataX GetLowDataX (path_inj Hcompatrel)\n    (ident_\" ^ method_full_name ^ \" ↦ CompatGenSem.gensem \" ^ method_full_name ^ \"_spec)\n    (clight_DeepSpec_layer GetLowLayer ident_\" ^ method_full_name ^ \" \" ^ method_full_name ^ \"_cfun).\nProof.\n  assert (cc := cl_sim_sem_code_correct).\n  apply cc; clear cc; try reflexivity.\n  - rewrite \" ^ method_full_name ^ \"_spec_eq.\n    change \" ^ method_full_name ^ \"_cfun\n      with (synth_func_func \" ^ method_full_name ^ \").\n    apply synth_correct_\" ^ string_of_int nargs ^ suffix ^ \".\");\n      if is_pure then\n        output_string code \"\n    + exact IndexedMaps.identity_automorphism.\";\n      if has_return then\n        output_string code \"\n    + reflexivity.\";\n      output_string code (\"\n    + exact \" ^ method_full_name ^ \"_prf.\n    + exact \" ^ method_full_name ^ \"_vc.\n    + exact \" ^ method_full_name ^ \"_oblg.\nQed.\\n\")\n    ) o.aObjectMethods;\n\n    output_string proofs \"\\nEnd EdsgerGen.\\n\";\n    output_string code \"\\nEnd EdsgerGen.\\n\";\n    close_out proofs;\n    close_out code\n    end  (* [if] object has method that's implemented *)\n  ) l.aLayerFreshObjects\n\nlet gen_layer_code env i l =\n(*  if List.exists (fun (_, o) ->\n       o.aObjectRequireImpl && List.exists (fun m ->\n         m.aMethodType.aMethodKind <> MKghost &&\n         m.aMethodType.aMethodKind <> MKconstghost\n       ) o.aObjectMethods\n     ) l.aLayerFreshObjects then *)\n    do_gen_layer_code env i l\n\nlet unmingledFieldName l o f = \n  (* l.aLayerName ^ \"_\" ^   *)\n  o.aObjectName ^ \"_\" ^ f.aObjectFieldName\n\nlet gen_global_abstract_data_type env final_layer fileDeclarations = function\n  | None ->  (* Collect all fields in [final_layer] for the type *)\n    let iter_fields action =\n       List.iter (fun (_, o) ->\n         List.iter (fun f -> action o f\n       ) o.aObjectFields\n      ) final_layer.aLayerAllObjects\n    in\n    let has_fields =\n      List.exists (fun (_,o) ->\n          List.exists (fun f -> true\n            ) o.aObjectFields\n        ) final_layer.aLayerAllObjects\n    in\n    let unmingledFieldName _o f = \n      unmingledFieldName final_layer _o f\n    in\n     \n    let out = env.coq_DataTypeOps in\n    let record_field_leftover = ref \"\\n  \" in\n\n    output_string out \"Require Import backend.MachineModel.\\n\";\n\n    List.iter (function\n    | i, ADlayer l ->\n      List.iter (fun (_, o) ->\n        match o.aObjectAddress with\n        | Some ad -> \n          output_string out (\"Definition \" ^ o.aObjectName ^ \n          \"_address := \" ^ \"(Int256.repr \" ^  (Backend.BinNumsExt.numstring2decimalstring ad) ^ \").\\n\")\n        | None -> \n          ()\n      ) l.aLayerFreshObjects\n    | _, _ -> ()\n    ) fileDeclarations;\n\n    output_string out \"Definition ext_call_me {adata: Type} (me : machine_env adata) (ext_contract : int256) := {|\n  me_address := ext_contract;\n  me_origin := me_origin me;\n  me_caller := me_address me;\n  me_callvalue := me_callvalue me; (* FIXME: the callvalue modeling is wrong *)\n  me_coinbase := me_coinbase me;\n  me_timestamp := me_timestamp me;\n  me_number := me_number me;\n  me_chainid := me_chainid me;\n  me_selfbalance := me_selfbalance me;\n  me_balance := me_balance me;\n  me_blockhash := me_blockhash me;\n  me_transfer := me_transfer me;\n  me_callmethod := me_callmethod me;\n  me_log := me_log me;\n|}.\\n\";\n\n    output_string out \"Record global_abstract_data_type : Type := {\";\n    iter_fields (fun _o f ->\n        (* XXX: option for name mangling.\n           Currently, if two object fields have the same name (anywhere in the entire system)\n           we will get a name clash when they are put into the global abstract data type.\n\n           So we would like to prefix field names with the object names, etc. However, this has to\n           be optional, because when we are reimplementing mcertikos, we want to use exactly the same\n           names for everything. *)\n        output_string out (!record_field_leftover ^ unmingledFieldName _o f ^ \" : \");\n        output_type_expr out \"    \" f.aObjectFieldType;\n        record_field_leftover := \";\\n  \"\n    );\n    output_string out \"\\n}.\\n\";\n\n    iter_fields (fun o f ->\n        output_string out (\"Definition update_\"  ^ unmingledFieldName o f ^ \" glabs_b (glabs_a : global_abstract_data_type)\\n\");\n        output_string out (\"  := Build_global_abstract_data_type \");\t\n\titer_fields (fun o' f' ->\n                      if (o' = o && f' = f)\n\t\t      then output_string out \"glabs_b \"\n\t\t      else output_string out (\"(\" ^ unmingledFieldName o' f' ^ \" glabs_a) \")\n                   );\n        output_string out \".\\n\"\n    );\n\n    if has_fields then begin\n    output_string out \"\\nDefinition init_global_abstract_data : global_abstract_data_type := {|\";\n    record_field_leftover := \"\\n  \";\n    iter_fields (fun _o f ->\n        (* XXX: option for name mangling *)\n        output_string out (!record_field_leftover ^ unmingledFieldName _o f ^ \" := \");\n        output_compile_time_constant out \"      \" f.aObjectFieldInitial;\n        record_field_leftover := \";\\n  \"\n    );\n    output_string out \"\\n|}.\\n\"\n      end else begin\n            output_string out \"\\nDefinition init_global_abstract_data : global_abstract_data_type := Build_global_abstract_data_type.\";\n      end;\n\n    (* abstract data type fields that include [val] components need to be\n       ensured [val_inject] and [Val.has_type]. *)\n    let record_field_leftover = ref (false, \"Record global_low_level_invariant \" ^\n          \"(n : block)(abd : global_abstract_data_type) := {\\n  \") in\n    iter_fields (fun _o f ->\n        (* XXX: option for name mangling *)\n        let field_name = unmingledFieldName _o f  in\n        let inj, typed = generate_low_level_invariant \"    \"\n                \"val_inject (Mem.flat_inj n)\"\n                (\"abd.(\" ^ field_name ^ \")\")\n                f.aObjectFieldType in\n        begin match inj with\n        | None -> ()\n        | Some s ->\n          output_string out (snd !record_field_leftover ^\n            field_name ^ \"_INJECT:\\n    \" ^ s);\n          record_field_leftover := (true, \";\\n  \")\n        end;\n      begin match typed with\n      | None -> ()\n      | Some s ->\n        output_string out (snd !record_field_leftover ^\n          field_name ^ \"_TYPE:\\n    \" ^ s);\n        record_field_leftover := (true, \";\\n  \")\n      end\n    );\n    if fst !record_field_leftover\n    then output_string out \"\\n}.\\n\"\n    else\n      output_string out (\n\t\"\\nDefinition block := positive.\\n\" ^   (* todo, figure out where the wrong definition of positive comes from. *)\n\t\"Definition global_low_level_invariant \" ^\n        \"(n : block)(abd : global_abstract_data_type) := True.\\n\");\n\n    output_string out \"End EdsgerGen.\\n\";  (* Hints are local to sections, so we have to do this block outside the section. *)\n    iter_fields (fun o f ->\n        output_string out \"\\n\";\n\titer_fields (fun o' f' ->\n          output_string out (\"Lemma \"  ^ unmingledFieldName o f ^ \"_of_update_\"^ unmingledFieldName o' f' ^\" : forall _x (glabs_a : global_abstract_data_type),\\n\"\n                             ^ \"  \" ^ unmingledFieldName o f ^ \" (update_\"^ unmingledFieldName o' f' ^\" _x glabs_a) = \"  );\n          if (o' = o && f' = f)\n\t   then output_string out \"_x.\\n\"\n\t   else output_string out (unmingledFieldName o f ^ \" glabs_a.\\n\");\n\t  output_string out \"Proof. intros. destruct glabs_a. reflexivity. Qed.\\n\";\n          output_string out (\"Hint Rewrite \"^ unmingledFieldName o f ^\"_of_update_\"^ unmingledFieldName o' f' ^ \" : updates.\\n\\n\")\n        );\n    );\n\n    if has_fields then begin\n        output_string out (\"Opaque\");\n        iter_fields (fun o f ->\n\t    output_string out (\" \"^ unmingledFieldName o f ^\" update_\"^ unmingledFieldName o f ));\n        output_string out (\".\\n\")\n      end;\n    \n  | Some ({ aEXTypeString = s; aEXTypeDefault = Some (s', _) } as extype) ->\n    output_string env.coq_DataTypeOps\n      (\"Definition global_abstract_data_type : Type := \" ^ s ^ \".\\n\" ^\n       \"Definition init_global_abstract_data : global_abstract_data_type := \" ^\n       s' ^ \".\\n\");\n    begin match extype.aEXTypeLowLevelInv with\n    | Some lli ->\n      output_string env.coq_DataTypeOps\n        (\"Definition global_low_level_invariant := \" ^ lli ^ \".\\n\" ^\n         \"Global Arguments global_low_level_invariant / _ _.\\n\")\n    | None ->\n      output_string env.coq_DataTypeOps (\"Definition global_low_level_invariant \" ^\n        \"(n : block)(abd : global_abstract_data_type) := True.\\n\")\n    end;\n    output_string env.coq_DataTypeOps \"End EdsgerGen.\\n\"; \n  | Some _ -> coqgen_fatal_error __LOC__ \"gen_global_abstract_data_type\"\n                \"Global abstract data type without empty value\"\n\nlet gen_coqProj env fileDeclarations = \n  let stream = open_out (env.project_name ^ \"/_CoqProject\") in\n  output_string stream (\n    \"-R ../../.. DeepSpec\\n\" ^\n    \"-R . \" ^ env.project_name ^ \"\\n\" ^\n    \"./EdsgerIdents.v\\n\" ^\n    \"./DataTypes.v\\n\" ^\n    \"./DataTypeOps.v\\n\" ^\n    \"./DataTypeProofs.v\\n\"\n  );\n  List.iter (function \n  | i, ADlayer l -> output_string stream (\"./Layer\" ^ i ^ \".v\\n\")\n  | _, _ -> ()\n  ) fileDeclarations;\n  List.iter (function\n  | i, ADlayer l -> List.iter (fun (_, o) ->\n      output_string stream (\"./Obj\" ^ o.aObjectName ^ \"CodeProofs.v\\n\"))\n      l.aLayerFreshObjects\n  | _, _ -> ()\n  ) fileDeclarations;\n#ifndef REDACTED\n  List.iter (function\n  | i, ADlayer l -> output_string stream (\"./LSrc\" ^ i ^ \".v\\n\")\n  | _, _ -> ()\n  ) fileDeclarations;\n#endif\n  close_out stream\n\nlet gen_extract_make env fileDeclarations =\n  let stream = open_out (env.project_name ^ \"/extraction/Makefile\") in\n  output_string stream (\"lastfiles = HyperType.mli HyperTypeInst.mli DataTypeOps.mli EdsgerIdents.mli\");\n  List.iter (function \n  | i, ADlayer l -> output_string stream (\" Layer\" ^ i ^ \".mli LSrc\" ^i^\".mli \")\n  | _, _ -> ()\n  ) fileDeclarations;\n  close_out stream;\n  let stream = open_out (env.project_name ^ \"/extraction/Tester.ml\") in\n  List.iter (function \n  | i, ADlayer l -> output_string stream (\"open LSrc\" ^ i ^ \"\\n\")\n  | _, _ -> ()\n  ) fileDeclarations;  \n  output_string stream \"\n(* To build this, copy backend/extraction/Asm.ml and\n    backend/extraction/*Ext.* into this directory, then run\n      ocamlbuild Tester.byte *)\n\nlet usage () = \n  Printf.eprintf \\\"usage: extract (bytecode | bytecode-runtime | assembly)\n\\\" ;\n  exit 1\n\ntype mode = BYTECODE | BYTECODE_RUNTIME | ASSEMBLY \n                                                                                 \nlet mode_flag =\n  if Array.length Sys.argv <> 2 then\n    usage()\n  else match Array.get Sys.argv 1 with\n       | \\\"bytecode\\\" -> BYTECODE\n       | \\\"bytecode-runtime\\\" -> BYTECODE_RUNTIME\n       | \\\"assembly\\\" -> ASSEMBLY\n       | _          -> usage ()\n                \nlet _ =\n  match Glue.full_compile_genv ge with\n  | OptErrMonad.Error msg -> Printf.eprintf (\\\"error in compilation: %s\\n\\\") (DatatypesExt.caml_string msg) ; exit 1\n  | OptErrMonad.Success (Datatypes.Coq_pair (program, entrypoint)) ->\n          let (asm, asm_runtime) =\n            Asm.transform\n              (List.rev (DatatypesExt.caml_list program))\n              entrypoint\n          in\n          let programsize = Asm.size_of_program asm in\n          match mode_flag with\n\t   | BYTECODE -> print_endline (Asm.assemble asm programsize)\n\t   | BYTECODE_RUNTIME -> print_endline (Asm.assemble asm_runtime programsize)\n\t   | ASSEMBLY -> print_endline (Asm.mnemonics asm)\n\";\n  close_out stream\n\nlet gen_prf env fileDeclarations = \n  let stream = open_out (env.project_name ^ \"/prf.v\") in\n  output_string stream (\n    \"Require Import \" ^ env.project_name ^ \".DataTypes.\\n\" ^\n    \"Require Import \" ^ env.project_name ^ \".DataTypeOps.\\n\" ^\n    \"Require Import lib.Monad.StateMonadOption.\\n\" ^\n    \"Require Import cclib.Maps.\\n\" ^\n    \"Require Import cclib.Integers.\\n\" ^\n    \"Require Import ZArith.\\n\" ^\n    \"Require Import core.HyperTypeInst.\\n\" ^\n    \"Require Import backend.MachineModel.\\n\"\n  );\n  List.iter (function \n    | i, ADlayer l -> output_string stream (\"Require Import \" ^ env.project_name ^ \".Layer\" ^ i ^ \".\\n\")\n    | _, _ -> ()\n    ) fileDeclarations;\n  output_string stream (\n      \"\\n\" ^ \n\"Definition state := global_abstract_data_type.\n\nDefinition init_state := init_global_abstract_data.\n\nDefinition wei := Z.\n\nDefinition addr := int256.\n\nDefinition blocknumber := int256.\n\nExisting Instance GlobalLayerSpec.\n\nSection step.\n\n  Context (contract_address : addr).\n\n  Section mstep.\n  (* These are the parameters which are constant within a given block. *)\n  Context (coinbase : int256)\n          (timestamp : int256)\n          (number : int256)\n          (balance : int256 -> int256)\n          (blockhash : int256 -> int256)\n          (prev_contract_state : state).\n\n  Definition make_machine_env (caller: addr)\n                              : machine_env state\n    := {| me_address := contract_address;\n          me_origin := caller;\n          me_caller := caller; (* need update after every control-flow transfer *)\n          me_callvalue := Int256.repr (0);\n          me_coinbase := coinbase; \n          me_timestamp := timestamp;\n          me_number := number;\n          me_balance := balance;\n          me_blockhash := blockhash;\n          (* not implemented *)\n          me_transfer _ _ _ _ _ := False;\n          me_callmethod _ _ _ _ _ _ _ _ _ _ := False;\n          me_log _ _ _ := prev_contract_state;\n        |}.\n\n  Import MonadNotation.\n\n  Definition lif {A:Type}\n                 (caller : addr)\n                 (cmd : machine_env state -> osT global_abstract_data_type A)\n    : osT state A :=\n    st  <- get;;\n    let me := make_machine_env caller in\n    match runStateT (cmd me) st with\n    | None => mzero\n    | Some (v, st') => put st' ;; ret v\n    end.\n\n  (* osT state int256 = \n    state transformer with option monad, state is state, and value is int256 *)\n  Print osT. (* = fun D : Type => stateT D option *)\n  Print stateT. (* (S : Type) (m : Type -> Type) (t : Type) : Type := mkStateT\n  { runStateT : S -> m (t * S)%type } *)\n\n  Print runStateT. (* takes monad transformer, state, returns m (t * S) *)\\n\\n\" ^ \n\n\"  (* How the state of the system changes in a single method call made by player p. *)\n  Inductive mstep u (st st' : state) : Prop :=\\n\"\n  );\n\n  List.iter (function\n  | i, ADlayer l ->\n    List.iter (fun (_, o) ->\n      List.iter (fun m ->\n        let method_full_name = o.aObjectName ^ \"_\" ^ m.aMethodName in\n        let args = if (List.length m.aMethodArguments) = 0 then \"\" else \n          (if (List.nth m.aMethodArguments 0) = \"()\" then \"\" else (String.concat \" \" m.aMethodArguments)) in \n        output_string stream (\"  | \" ^ method_full_name ^ \"_step : \" ^ \"forall r \" ^ args ^ \n          \", runStateT (\" ^ method_full_name ^ \"_opt \" ^ args ^ \n          \" (make_machine_env u)) st = Some (r, st')\" ^ \n        \" -> mstep u st st' \\n\")\n      ) o.aObjectMethods\n    ) l.aLayerFreshObjects\n  | _, _ -> ()\n  ) fileDeclarations;\n\n  output_string stream \".\\n\";\n  output_string stream\n\"\n  (* We can compute a new block by letting the players call the contract \n     in some arbitrary order. *)\n     Inductive multi_mstep : state -> state -> Prop := \n     | multi_mstep_reflexive : forall (st : state), multi_mstep st st\n     | multi_mstep_transitive : forall (st st' st'' : state) u,\n         multi_mstep st st' -> mstep u st' st'' -> multi_mstep st st''.\n\n\n     (* A block is sufficiently synchronous if every player got a chance to submit a \n        transaction to to. *)\n     (* TODO, I think this definition is fine for now, but it seems little too clever,\n        should probably re-state this using some straightforward tracking of the states\n        we pass through. *)\n     Definition multi_mstep_synchronous st1 st2 :=\n       forall u, exists st st',\n                   multi_mstep st1 st /\\\\ mstep u st st' /\\\\ multi_mstep st' st2.\n\n     (* Here are a bunch of induction principles inspired by linear temporal logic. *)\n\n     (* Prove that some property P holds \\\"globally\\\", i.e. for each state along a \n        path.\n        You can also specify a property Pprev which is known to hold for the\n        prev_contract_state. If not needed, it can just be True.\n    *)\n     Lemma multi_mstep_Global_ind : forall (Pprev P : state -> Prop),\n         (forall u st st', Pprev prev_contract_state -> P st -> mstep u st st' -> P st') ->\n          Pprev prev_contract_state -> forall st st', P st -> multi_mstep st st' -> P st'.\n     Proof.\n       induction 4; eauto.\n     Qed.\n\n     (*\n     (* Prove that P holds \\\"until\\\" Q  along a path. \n        \\\"Until\\\" is a liveness assertion, so we need the synchronicity assumption. *)\n     Lemma multi_mstep_Until_ind : forall (Pprev P Q : state -> Prop),\n         (forall p st st', Pprev prev_contract_state -> P st -> In p players\n                           -> mstep p st st' -> (P st' \\/ Q st')) ->\n                           Pprev prev_contract_state ->\n                           forall st,\n                             P st -> exists st',  multi_mstep st st' -> (P st' \\/ Q st').\n     Proof.\n       induction 4; eauto *)\n\n     End mstep.\n\n\n     Definition Int256_incr x := Int256.add x Int256.one.\n\n     Inductive bstep (n : blocknumber) : state -> state -> Prop :=\n     | bstep_step : forall coinbase timestamp balance blockhash st st',\n         multi_mstep coinbase timestamp n balance blockhash st st st' ->\n         bstep n st st'.\n\n     Inductive multi_bstep : blocknumber -> state -> blocknumber -> state -> Prop := \n     | multi_bstep_reflexive : forall n (st : state), multi_bstep n st n st\n     | multi_bstep_transitive : forall n n'  (st st' st'' : state),\n       multi_bstep n st n' st' -> bstep (Int256_incr n') st' st'' -> multi_bstep n st (Int256_incr n') st''.\n\n     (* multi_bstep is the step relation without any synchronicity assumption.\n        This is sufficient to prove some safety properties, but for most interesting \n        theorems we instead need to use this synchronous version: *)\n\n     Inductive bstep_synch (n : blocknumber) : state -> state -> Prop :=\n     | bstep_synch_step : forall coinbase timestamp balance blockhash st st',\n         multi_mstep_synchronous coinbase timestamp n balance blockhash st st st' ->\n         bstep_synch n st st'.\n\n     Inductive multi_bstep_synch : blocknumber -> state -> blocknumber -> state -> Prop := \n     | multi_bstep_synch_reflexive : forall n (st : state), multi_bstep_synch n st n st\n     | multi_bstep_synch_transitive : forall n n'  (st st' st'' : state),\n       multi_bstep_synch n st n' st' -> bstep_synch (Int256_incr n') st' st'' -> multi_bstep_synch n st (Int256_incr n') st''.\n\n     Lemma multi_bstep_Global_ind : forall (P : state -> Prop),\n         (forall coinbase timestamp number balance blockhash prev_block u st st',\n             P prev_block\n             -> P st\n             -> mstep coinbase timestamp number balance blockhash prev_block u st st'\n             -> P st')\n         -> forall n st n' st',\n           P st -> multi_bstep n st n' st' -> P st'.\n     Proof.\n       induction 3.\n       - auto.\n       - inversion H2; subst.\n         eapply multi_mstep_Global_ind with (st:=st') (prev_contract_state := st').\n         + intros.\n           refine (H _ _ _ _ _ _ _ _ _ _ _ H6); auto.\n         + apply IHmulti_bstep; assumption.\n         + apply IHmulti_bstep; assumption.\n         + exact H3.\n     Qed.\n   End step.\n\n   Section DeepSEAGenericProof.\n\n     Lemma Int256Tree_reduce : forall (i: int256) (v: Z) (t: Int256Tree.t Z), Int256Tree.get_default 0%Z i (Int256Tree.set i v t) = v.\n     Proof.\n       intros.\n       unfold Int256Tree.get_default.\n       rewrite Int256Tree.gss .\n       reflexivity.\n     Qed.\n\n     Lemma Int256Tree_mreduce : forall (i j : int256) (v v': Z) (t: Int256Tree.t Z), \n       i <> j ->\n       Int256Tree.get_default 0%Z i (Int256Tree.set j v' (Int256Tree.set i v t)) = v.\n     Proof.\n       intros.\n       unfold Int256Tree.get_default.\n       rewrite Int256Tree.gso.\n       rewrite Int256Tree.gss.\n       reflexivity.\n       exact H.\n     Qed.\n\n     Lemma Int256Tree_mireduce : forall (i j k : int256) (v v': Z) (t: Int256Tree.t Z), \n       i <> j ->\n       i <> k ->\n       j <> k ->\n       Int256Tree.get_default 0%Z i (Int256Tree.set j v' (Int256Tree.set k v t)) = \n       Int256Tree.get_default 0%Z i t.\n     Proof.\n       intros.\n       unfold Int256Tree.get_default.\n       rewrite Int256Tree.gso.\n       rewrite Int256Tree.gso.\n       reflexivity.\n       exact H0.\n       exact H.\n     Qed.\n\n     Lemma add_sub_inv : forall (i j : Z32), (i + j - i)%Z = j.\n     Proof.\n       intros.\n       omega.\n     Qed.\n   End DeepSEAGenericProof.\n\n   Section Proof.   \n     Context (* (strategies : strategy_tuple) *)\n             (initial_balances : addr -> Z)\n             (contract_address : int256).\n\n     Context (init_bt init_rt : int256)\n             (init_coinbase : int256)\n             (init_timestamp : int256)\n             (init_number : int256)\n             (init_blockhash : int256 -> int256)\n             (pre_init_state init_state : state).\n\n     (* These are the parameters which are constant within a given block. *)\n     Context (coinbase : int256)\n             (timestamp : int256)\n             (number : int256)\n             (balance : int256 -> int256)\n             (blockhash : int256 -> int256)\n             (prev_contract_state : state).\n\n     Require Import lib.Monad.RunStateTInv.\n     Require Import lib.ArithInv.\n\n     Definition make_machine_env_wrapped prev_st user :=\n      make_machine_env contract_address coinbase timestamp number balance blockhash prev_st user.\n\n     Lemma make_machine_env_caller_eq : forall st caller, me_caller (make_machine_env_wrapped st caller) = caller.\n      Proof. auto. Qed.\n\n     Lemma make_machine_env_address_eq : forall st caller, me_address (make_machine_env_wrapped st caller) = contract_address.\n      Proof. auto. Qed.\n     \\n\";\n\n  List.iter (function\n  | i, ADlayer l ->\n    List.iter (fun (_, o) ->\n      List.iter (fun m ->\n        let method_full_name = o.aObjectName ^ \"_\" ^ m.aMethodName in\n        output_string stream (\"Transparent \" ^ method_full_name ^ \"_opt.\\n\")\n      ) o.aObjectMethods\n    ) l.aLayerFreshObjects\n  | _, _ -> ()\n  ) fileDeclarations;\n\n  (* List.iter (function\n  | i, ADlayer l ->\n    List.iter (fun (_, o) ->\n      match o.aObjectAddress with\n      | Some ad -> \n      output_string stream (\"Definition \" ^ o.aObjectName ^ \n        \"_address := \" ^ \"(Int256.repr \" ^  (Backend.BinNumsExt.numstring2decimalstring ad) ^ \").\\n\")\n      | None -> \n        ()\n    ) l.aLayerFreshObjects\n  | _, _ -> ()\n  ) fileDeclarations; *)\n\n  output_string stream (\"\\nLtac rds :=\\n\");\n\n  List.iter (function\n    | i, ADlayer l ->\n      List.iter (fun (_, o) ->\n        List.iter (fun m ->\n          let method_full_name = o.aObjectName ^ \"_\" ^ m.aMethodName in\n          output_string stream (\"unfold \" ^ method_full_name ^ \"_opt in *;\\n\")\n        ) o.aObjectMethods\n      ) l.aLayerFreshObjects\n    | _, _ -> ()\n  ) fileDeclarations;\n\n  output_string stream\n\"inv_runStateT;\nsubst;\ninv_arith;\nsimpl;\ntry rewrite make_machine_env_caller_eq in *;\ntry rewrite make_machine_env_address_eq in *;\ntry rewrite Int256Tree_reduce in *;\ntry rewrite Int256Tree_mreduce in *;\ntry rewrite Int256Tree_mireduce in *;\nauto.\\n\";\n\n  output_string stream (\"\\nTheorem sample : forall n, n = n.\\n\");\n\n  output_string stream (\"\\nEnd Proof.\\n\")\n\nlet coqgen filename ast =\n  let final_layer = ref None in\n  let env = new_coqgen_env filename ast\n  in gen_linksource_prelude env ast.aFileDeclarations;\n     List.iter (function\n     | i, ADtype t -> gen_type env i t\n     | i, ADevent _ -> ()\n     (*\n     | i, ADobject o -> gen_object env i o\n     *)\n     | i, ADlayer l ->\n       let has_fresh, has_passthrough = gen_layer env i l in\n       gen_layer_refinement env i has_fresh has_passthrough l;\n       gen_layer_code env i l;\n       gen_layer_linksource env i l;\n       final_layer := Some l\n     (*\n     | _, ADexternal_with (s, except) -> gen_external_with env s except\n     *)\n     ) ast.aFileDeclarations;\n     begin match !final_layer with\n     | None -> ()\n     | Some l -> gen_global_abstract_data_type env l ast.aFileDeclarations ast.aFileGlobalAbstractDataType\n     end;\n     gen_linksource env ast.aFileDeclarations;\n     gen_coqProj env ast.aFileDeclarations; \n#ifndef REDACTED\n     gen_extract_make env ast.aFileDeclarations;\n#endif\n     delete_coqgen_env env\n"
  },
  {
    "path": "src/Edsger/dune",
    "content": "(executable\n  (name edsger)\n  (modes byte exe)\n  ; The line below is a hack to build a MacOS binary without libgmp.so.\n  ; (link_flags (-cclib -Wl,/usr/local/lib/libgmp.a))\n  (libraries backend cryptokit yojson extlib str)\n  (preprocessor_deps config.h)\n  (preprocess (action (run %{bin:cppo} -n -V OCAML:%{ocaml_version} %{input-file})))\n) \n\n(ocamllex lexer)\n"
  },
  {
    "path": "src/Edsger/edsger.ml",
    "content": "#include \"config.h\"\n\nopen Ast\nopen Backend.BytecodeExt\nopen Minicgen\nopen Parser\nopen Parsetree\nopen Typecheck\nopen Metadata\n\n#ifdef ANT\nlet deepsea_basename = \"DeepSEA/AntChain-EVM\"\n#else\nlet deepsea_basename = \"DeepSEA/EVM\"\n#endif\nlet deepsea_version_num = \"1.3.0\"\n\nlet deepsea_version = deepsea_basename ^ \" \" ^ deepsea_version_num\n\ntype mode = ABI | BYTECODE | BYTECODE_RUNTIME | COMBINED_JSON | ASSEMBLY | ASSEMBLY_RUNTIME | MINIC | MINIC_VERBOSE | COQ | EWASM | EWASM_RUNTIME | METADATA | UCLID | CGRAPH | CLASH\n\nlet string_of_token = function\n  | ARRAY        -> \"ARRAY\"\n  | MAPPING      -> \"MAPPING\"\n  | CONST        -> \"CONST\"\n  | CONSTRUCTOR  -> \"CONSTRUCTOR\"\n  | EOF          -> \"EOF\"\n  | EXTERNAL     -> \"EXTERNAL\"\n  | GHOST        -> \"GHOST\"\n  | IDENT s      -> \"IDENT \\\"\" ^ s ^ \"\\\"\"\n  | INT i        -> \"INT \\\"\" ^ i ^ \"\\\"\"\n  | UINT i       -> \"UINT \\\"\" ^ i ^ \"\\\"\"\n  | LOGICAL      -> \"LOGICAL\"\n  | LAYER        -> \"LAYER\"\n  | OBJECT       -> \"OBJECT\"\n  (* | OF        -> \"OF\" *)\n  | SIGNATURE    -> \"SIGNATURE\"\n  | STRING s     -> \"STRING(\\\"\" ^ String.escaped s ^ \"\\\")\"\n  | TRUSTED      -> \"TRUSTED\"\n  | TYPE         -> \"TYPE\"\n  | EVENT        -> \"EVENT\"\n  | REFINED      -> \"COARSED\"\n#ifdef ANT\n  | IDENTITY      -> \"IDENTITY\"\n#else\n  | ADDRESS      -> \"ADDRESS\"\n#endif\n  | INDEXED      -> \"INDEXED\"\n  | EMIT         -> \"EMIT\"\n  | ASSERT       -> \"ASSERT\"\n  | BEGIN        -> \"BEGIN\"\n  | DENY         -> \"DENY\"\n  | DO           -> \"DO\"\n  | ELSE         -> \"ELSE\"\n  | END          -> \"END\"\n  | FAIL         -> \"FAIL\"\n  | FIRST        -> \"FIRST\"\n  | FOLD         -> \"FOLD\"\n  | FOR          -> \"FOR\"\n  | IF           -> \"IF\"\n  | IN           -> \"IN\"\n  | LET          -> \"LET\"\n  | MATCH        -> \"MATCH\"\n  | MOD          -> \"MOD\"\n  | CLONE        -> \"CLONE\"\n  | COLONLESS    -> \"COLONLESS\"\n  (* | SKIP         -> \"SKIP\" *)\n  | THEN         -> \"THEN\"\n  | TO           -> \"TO\"\n  | WITH         -> \"WITH\"\n  | AT           -> \"AT\"\n  | ARROW        -> \"ARROW\"\n  | ASSIGN       -> \"ASSIGN\"\n  | BAR          -> \"BAR\"\n  | BARBAR       -> \"BARBAR\"\n  | BANG         -> \"BANG\"\n  | COLON        -> \"COLON\"\n  | COLONCOLON   -> \"COLONCOLON\"\n  | COLONGREATER -> \"COLONGREATER\"\n  | COMMA        -> \"COMMA\"\n  | CONJUNCTION  -> \"CONJUNCTION\"\n  | DISJUNCTION  -> \"DISJUNCTION\"\n  | DOT          -> \"DOT\"\n  | DOUBLEARROW  -> \"DOUBLEARROW\"\n  | EQUAL        -> \"EQUAL\"\n  | GREATER      -> \"GREATER\"\n  | GREATEREQ    -> \"GREATEREQ\"\n  | LBRACE       -> \"LBRACE\"\n  | LBRACKET     -> \"LBRACKET\"\n  | LESS         -> \"LESS\"\n  | LESSEQ       -> \"LESSEQ\"\n  | LPAREN       -> \"LPAREN\"\n  | MINUS        -> \"MINUS\"\n  | PLUS         -> \"PLUS\"\n  | RBRACE       -> \"RBRACE\"\n  | RBRACKET     -> \"RBRACKET\"\n  | RPAREN       -> \"RPAREN\"\n  | SEMICOLON    -> \"SEMICOLON\"\n  | STAR         -> \"STAR\"\n  | SLASH        -> \"SLASH\"\n  | UNEQUAL      -> \"UNEQUAL\"\n  | BITNOT       -> \"BITNOT\"\n  | BITAND       -> \"BITAND\"\n  | XOR          -> \"XOR\"\n  | SHL          -> \"SHL\"\n  | SHR          -> \"SHR\"\n  | LIST         -> \"LIST\"\n  | TRANSFERETH     -> \"TRANSFERETH\"\n\nlet rec read_tokens buf =\n  let token = Lexer.token buf in\n  print_endline (string_of_token token);\n  if token <> EOF then read_tokens buf\n\nlet rec string_of_declaration d =\n  (string_of_declaration_desc d.p_declaration_desc) (* ^ (string_of_location d.p_declaration_loc) *)\nand string_of_declaration_desc = function\n  | PDtype(t) -> \"string_of_p_type_FO: \" ^ string_of_p_type_FO t\n  | PDevent (lsy) -> \"XD\"\n  | PDsignature(s) -> string_of_p_signature s\n  | PDlayer_sig(f) -> string_of_p_layer_signature f\n  | PDobject(d) -> string_of_p_object_definition d\n  | PDlayer(c) -> string_of_p_layer_definition c\n  | PDexternal_with(s, ann) -> \"external\" ^ string_of_p_annotations ann ^\n         \" with \\\"\" ^ String.escaped s ^ \"\\\"\"\n  | PDexternal_type (s, lli_opt, ann) -> (string_of_p_annotations ann ^\n         \" = \\\"\" ^ String.escaped s ^ \"\\\"\" ^\n         match lli_opt with None -> \"\" | Some lli -> \" \\\"\" ^ lli ^ \"\\\"\")\n  | PDexternal_const (s, t, ann) -> (string_of_p_annotations ann ^\n         \" : \" ^ string_of_p_type_FO t ^\n         \" = \\\"\" ^ String.escaped s ^ \"\\\"\")\n  | PDexternal_function (s, arg, ret, ann) -> (string_of_p_annotations ann ^\n         \" : \" ^ string_of_p_type_FO arg ^\n         \" -> \" ^ string_of_p_type_FO ret ^ \" = \\\"\" ^ String.escaped s ^ \"\\\"\")\n  | PDexternal_prop (s, t) -> (\n         \" : \" ^ string_of_p_type_FO t ^\n         \" = \\\"\" ^ String.escaped s ^ \"\\\"\")\n\nlet print_parse_file_structure structure =\n  List.iter\n    (function (i, d) -> print_endline (i ^ (string_of_declaration d)))\n    structure\n\nlet print_ast_file_structure ast =\n  List.iter\n    (function\n    | i, ADtype t ->\n       print_endline (\"AType \" ^ i ^ \" ::= \" ^ string_of_a_type true t)\n    | i, ADevent e ->\n       print_endline (\"AEvent \" ^ i ^ \" ::= [todo]\")\n\n    (*\n    | i, ADobject o ->\n      print_endline (string_of_a_object o)\n    *)\n    | i, ADlayer c ->\n      print_endline (\"ALayer \" ^ i ^ \" ::= \" ^ string_of_a_layer c)\n    (*\n    | i, ADexternal_with (s, except) ->\n      print_endline (\"AExternal with \\\"\" ^ String.escaped s ^ \"\\\"\" ^\n        if except = []\n          then \"\"\n          else \" except: \" ^ String.concat \", \" except)\n    *)\n    )\n    ast.aFileDeclarations;\n  List.iter (fun (s, except) ->\n    print_endline (\"AExternal with \\\"\" ^ String.escaped s ^ \"\\\"\" ^\n      if except = []\n        then \"\"\n        else \" except: \" ^ String.concat \", \" except)\n    ) ast.aFileExternalVerbatim\n\nlet usage () =\n  prerr_endline ( \"usage: dsc program.ds (bytecode(-runtime)? | abi | combined-json | assembly | minic(-verbose)? | coq | ewasm(-runtime)? | metadata | uclid | cgraph | clash)\\n\"\n\t\t  ^\"or     dsc --version\\n\");\n  exit 1\n\nlet combined_json filename abi bytecode =\n  let s = Printf.sprintf \"{\\\"contracts\\\":{\\\"%s\\\":{\\\"abi\\\":\\\"%s\\\", \\\"bin\\\":\\\"%s\\\"}}, \\\"version\\\":\\\"%s\\\"}\"\n  \t\t filename\n\t\t (Str.global_replace (Str.regexp \"\\\"\") \"\\\\\\\"\" abi)\n\t\t bytecode\n\t\t deepsea_version\n  in\n  Yojson.Basic.to_string (Yojson.Basic.from_string s)\n\nlet main argv =\n  (if (Array.length argv = 2 && argv.(1) = \"--version\")\n     then begin print_endline deepsea_version; exit 0 end);\n  (if (Array.length argv <> 3) then usage());\n  let filename = argv.(1) in\n  let mode_flag = match Array.get argv 2 with\n    | \"bytecode\"         -> BYTECODE\n    | \"bytecode-runtime\" -> BYTECODE_RUNTIME\n    | \"abi\"      -> ABI\n    | \"combined-json\" -> COMBINED_JSON\n    | \"assembly\" -> ASSEMBLY\n    | \"assembly-runtime\" -> ASSEMBLY_RUNTIME\n    | \"minic\"    -> MINIC\n    | \"minic-verbose\" -> MINIC_VERBOSE\n    | \"coq\"      -> COQ\n    | \"ewasm\"     -> EWASM\n    | \"uclid\" -> UCLID\n    | \"cgraph\" -> CGRAPH\n    | \"clash\" -> CLASH\n    | \"metadata\" -> METADATA\n    | _          -> usage () in  \n  (* print_endline (\"reading from \\\"\" ^ filename ^ \"\\\"\"); *)\n  let ch = open_in filename in\n  let buf = Lexing.from_channel ch in\n  (*let _ = Location.init buf filename in*)\n  let parse_structure = try\n    Parser.file\n      Lexer.token\n      (* (fun buf -> let t = Lexer.token buf *)\n      (*   in print_endline (\"TOK: \" ^ string_of_token t); t) *)\n      buf\n     with Failure _\n        | Parser.Error  ->\n\t  let curr = buf.Lexing.lex_curr_p in\n\t  let line = curr.Lexing.pos_lnum in\n\t  let cnum = curr.Lexing.pos_cnum - curr.Lexing.pos_bol in\n\t  let tok = Lexing.lexeme buf in\n\t  print_endline (filename ^\":\"^ string_of_int line\n\t\t\t ^\":\"^ string_of_int cnum\n\t\t\t ^\": Syntax error at token \\\"\" ^ tok ^ \"\\\".\");\n\t  exit 1\n   in\n  (* let _ = print_parse_file_structure parse_structure in *)\n  let has_error, ast_structure = typecheck parse_structure filename\n  in\n  if has_error then\n    begin print_endline \"typecheck failed\"; exit 1 end\n  else\n    let abi = abigen ast_structure in\n    match mode_flag with\n    | COQ -> Coqgen.coqgen filename ast_structure\n    | ABI -> print_endline abi\n    | METADATA -> print_endline (metadata deepsea_version_num argv.(0) filename abi)\n    | _ ->\n      let name_tables, ge = minicgen ast_structure in\n      match mode_flag with\n      | MINIC -> print_endline (Backend.LanguageExt.show_genv false name_tables ge)\n      | MINIC_VERBOSE -> let name_tables, ge = minicgen ast_structure in print_endline (Backend.LanguageExt.show_genv true name_tables ge)\n      | EWASM -> print_endline (ewasm false ge)\n      | EWASM_RUNTIME -> print_endline (ewasm true ge)\n      | UCLID -> Uclidgen.uclidgen filename ast_structure\n      | CGRAPH -> \n        (match Backend.Glue.optm_genv ge with\n        | Backend.OptErrMonad.Error msg ->\n          print_endline (\"Internal error: compilation failed in Cgraph backend\\n\"\n                          ^ \"with error message: \"\n                          ^ Backend.DatatypesExt.caml_string msg);\n          exit 1\n        | Backend.OptErrMonad.Success sd ->\n          let sd = Backend.DatatypesExt.caml_list sd in\n          let dummy = List.map (fun mnd ->\n            match Backend.DatatypesExt.caml_prod mnd with\n            | (cd, en) ->\n              print_endline (Backend.ASM.mnemonics_cgraph \n              (List.map (fun x -> match Backend.DatatypesExt.caml_prod x with | (id, s) -> (id, s)) (Backend.DatatypesExt.caml_list cd))\n              en)) sd in ())\n      | CLASH -> \n        (match Backend.Glue.optm_clash ge with\n        | Backend.OptErrMonad.Error msg ->\n          print_endline (\"Internal error: compilation failed in Cgraph backend\\n\"\n                          ^ \"with error message: \"\n                          ^ Backend.DatatypesExt.caml_string msg);\n          exit 1\n        | Backend.OptErrMonad.Success cgd ->\n          (* list (positive * list positive)) *)\n          let cgd = Backend.DatatypesExt.caml_list cgd in\n          let dummy = List.map (fun cg ->\n          let cg' = \n            (List.map (fun x -> match Backend.DatatypesExt.caml_prod x with | (id, lp) -> (id, Backend.DatatypesExt.caml_list lp)) \n              (Backend.DatatypesExt.caml_list cg))\n          in\n          print_endline (Backend.ASM.mnemonics_clash cg')) cgd in ())\n      | BYTECODE -> print_endline (bytecode false ge)\n      | BYTECODE_RUNTIME -> print_endline (bytecode true ge)\n      | ASSEMBLY -> print_endline (assembly false ge)\n      | ASSEMBLY_RUNTIME -> print_endline (assembly true ge)\n      | COMBINED_JSON ->\n        let asm, _ , programsize = get_bytecode_params ge in\n        print_endline (combined_json filename abi (Backend.ASM.assemble asm))\n      | COQ | ABI | METADATA -> (print_endline \"unreachable\"; exit 1)\n\nlet _ = main Sys.argv\n"
  },
  {
    "path": "src/Edsger/lexer.mll",
    "content": "{\n#include \"config.h\"\n\nopen Parser\nopen Parsetree\n\nlet keyword_table =\n  let tbl = Hashtbl.create 20 in\n  List.iter (fun (key, data) -> Hashtbl.add tbl key data) [\n    \"array\", ARRAY;\n    \"mapping\", MAPPING;\n    \"external\", EXTERNAL;\n    \"const\", CONST;\n    \"ghost\", GHOST;\n    \"constructor\", CONSTRUCTOR;\n    \"layer\", LAYER;\n    \"logical\", LOGICAL;\n    \"coarsed\", REFINED;\n    \"object\", OBJECT;\n    (* \"of\", OF; *)\n    \"signature\", SIGNATURE;\n    \"trusted\", TRUSTED;\n    \"type\", TYPE;\n    \"event\", EVENT;\n#ifdef ANT\n    \"identity\", IDENTITY;\n#else\n    \"address\", ADDRESS;\n#endif\n    \"emit\", EMIT;\n    \"indexed\", INDEXED;\n    \"assert\", ASSERT;\n    \"begin\", BEGIN;\n    \"deny\", DENY;\n    \"do\", DO;\n    \"else\", ELSE;\n    \"end\", END;\n    \"fail\", FAIL;\n    \"first\", FIRST;\n    \"fold\", FOLD;\n    \"for\", FOR;\n    \"if\", IF;\n    \"in\", IN;\n    \"let\", LET;\n    \"match\", MATCH;\n    \"mod\", MOD;\n    (* \"skip\", SKIP; *)\n    \"then\", THEN;\n    \"to\", TO;\n    \"with\", WITH;\n    \"list\", LIST;\n    \"clone\", CLONE;\n    \"transferEth\", TRANSFERETH;\n  ];\n  tbl\n\nlet comment_level = ref 0\n\nlet string_buf = Buffer.create 256\n\n\nlet incr_linenum lexbuf =\n  let pos = lexbuf.Lexing.lex_curr_p in\n  lexbuf.Lexing.lex_curr_p <- { pos with\n    Lexing.pos_lnum = pos.Lexing.pos_lnum + 1;\n    Lexing.pos_bol = pos.Lexing.pos_cnum;\n  }\n\nlet sub_from_2nd st =\n  String.sub st 2 ((String.length st)-2)\n\n}\n\nlet newline = ('\\010' | \"\\013\\010\" )\nlet identstart = ['A'-'Z' 'a'-'z' '_']\nlet identchar = ['A'-'Z' 'a'-'z' '_' '\\'' '0'-'9']\n\nlet decimal_literal =\n  ['1'-'9'] ['0'-'9' '_']* | '0'\nlet hex_literal =\n  '0' ['x' 'X'] ['0'-'9' 'A'-'F' 'a'-'f' '_']*\nlet oct_literal_C =\n  '0' ['0'-'7' '_']+  (* NOTE: C syntax, different from OCaml *)\nlet oct_literal_OCaml =\n  '0' ['o' 'O'] ['0'-'7' '_']+\nlet bin_literal =\n  '0' ['b' 'B'] ['0'-'1' '_']+\nlet int_literal =\n  decimal_literal | hex_literal | oct_literal_OCaml | bin_literal\n\nrule token = parse\n  | newline {  incr_linenum lexbuf; token lexbuf }\n  | [' ' '\\009' '\\012'] +  { token lexbuf }\n\n  | newline \"__END__\" newline { EOF }\n  | eof { EOF }\n\n  | \"(*\" { comment lexbuf; token lexbuf }\n  | \"\\\"\" { Buffer.clear string_buf; string_ lexbuf }\n\n  | identstart identchar*\n      { let s = Lexing.lexeme lexbuf in\n        try Hashtbl.find keyword_table s\n        with Not_found -> IDENT s }\n\n  | \"0u\" int_literal { UINT (sub_from_2nd (Lexing.lexeme lexbuf)) }\n  | int_literal { INT ( Lexing.lexeme lexbuf) }\n  | oct_literal_C { INT (\"0o\" ^ Lexing.lexeme lexbuf) }\n\n  | \"@\" { AT }\n  | \"->\" { ARROW }\n  | \":=\" { ASSIGN }\n  | \"||\" { BARBAR }\n  | \"|\" { BAR }\n  | \"!\" { BANG }\n  | \"~\" { BITNOT }\n  | \"::\" { COLONCOLON }\n  | \":\" { COLON }\n  | \":>\" { COLONGREATER }\n  | \"<:\" { COLONLESS }\n  | \",\" { COMMA }\n  | \"/\\\\\" { CONJUNCTION }\n  | \"\\\\/\" { DISJUNCTION }\n  | \".\" { DOT }\n  | \"=>\" { DOUBLEARROW }\n  | \"=\" { EQUAL }\n  | \">\" { GREATER }\n  | \">=\" { GREATEREQ }\n  | \"{\" { LBRACE }\n  | \"[\" { LBRACKET }\n  | \"<\" { LESS }\n  | \"<=\" { LESSEQ }\n  | \"(\" { LPAREN }\n  | \"-\" { MINUS }\n  | \"+\" { PLUS }\n  | \"]\" { RBRACKET }\n  | \"}\" { RBRACE }\n  | \")\" { RPAREN }\n  | \";\" { SEMICOLON }\n  | \"*\" { STAR }\n  | \"/\" { SLASH }\n  | \"<>\" { UNEQUAL }\n  | \"&\" { BITAND }\n  | \"^\" { XOR }\n  | \"<<\" { SHL }\n  | \">>\" { SHR }\n\nand comment = parse\n  | \"(*\" { incr comment_level; comment lexbuf }\n  | \"*)\" { if !comment_level > 0 then (decr comment_level; comment lexbuf) }\n  | newline { incr_linenum lexbuf; comment lexbuf }\n  | _ { comment lexbuf }\n\nand string_ = parse\n  | \"\\\"\" { STRING(Buffer.contents string_buf) }\n  | \"\\\\\\\"\" { Buffer.add_char string_buf '\"'; string_ lexbuf }\n  | \"\\\\n\"  { Buffer.add_char string_buf '\\n'; string_ lexbuf }\n  | \"\\\\\\\\\" { Buffer.add_char string_buf '\\\\'; string_ lexbuf }\n  | _ { Buffer.add_char string_buf (Lexing.lexeme_char lexbuf 0);\n        string_ lexbuf }\n  | eof { raise (Failure \"Unterminated string\") }\n"
  },
  {
    "path": "src/Edsger/make_parser.sh",
    "content": "#!/bin/bash\n\nroot=$(git rev-parse --show-toplevel)\nEdsger=$root/src/Edsger\n\nsource_file=$(mktemp)\nprocessed=$(mktemp)\nparser=$Edsger/parser.mly\ncp $parser $source_file\ncppo -n $parser > $processed\ncp $processed $parser\nmenhir $parser\ncp $source_file $parser\nrm $source_file $processed\n"
  },
  {
    "path": "src/Edsger/makefile_model",
    "content": "\nlastsources = $(lastfiles:.mli=.ml)\nlibfiles = BinNums.mli BinPosDef.mli Datatypes.mli Specif.mli PeanoNat.mli Nat.mli BinPos.mli BinNat.mli BinInt.mli ZArith_dec.mli List0.mli Coqlib.mli\nlibsources = $(libfiles:.mli=.ml)\nclikefiles = Zpower.mli Integers.mli AST.mli Cop.mli Options.mli Ctypes.mli Maps.mli Globalenvs.mli BuiltinSemantics.mli Language.mli Values.mli MachineModel.mli \nclikesources = $(clikefiles:.mli=.ml)\ncompilefiles = EVM.mli Compiled.mli IndexLib.mli Labels.mli TempModel.mli Language2.mli Language4.mli Language0.mli Language5.mli Language6.mli ExprCompile.mli MemoryModel.mli StmCompile.mli Trees.mli GlobalenvCompile.mli Language1.mli Semantics.mli Gen0.mli Gen.mli Gen4.mli Gen3.mli Language3.mli Gen2.mli Gen1.mli Semantics1.mli Gen6.mli Semantics0.mli Gen5.mli Glue.mli\ncompilesources = $(compilefiles:.mli=.ml)\n\nmain: extract\n\nASM.mli: ../../../backend/ASM.mli\n\tcp ../../../backend/ASM.mli ASM.mli\n\nASM.ml: ../../../backend/ASM.ml\n\tcp ../../../backend/ASM.ml ASM.ml\n\nlibi:\n\tocamlopt $(libfiles)\n\nclikei: libi\n\tocamlopt $(clikefiles)\n\ncompilei: clikei\n\tocamlopt $(compilefiles)\n\nlasti: compilei\n\tocamlopt $(lastfiles)\n\nalli: lasti ASM.mli\n\tocamlopt ASM.mli\n\nall: alli ASM.ml\n\tocamlopt $(libsources) $(clikesources) $(compilesources) $(lastsources) ASM.ml\n\nextract: alli ASM.ml Tester.ml\n\tocamlopt -o extract $(libsources) $(clikesources) $(compilesources) $(lastsources) ASM.ml Tester.ml\n\nclean:\n\trm -f *.mli *.ml *.cmi *.cmx *.o *.exe\n"
  },
  {
    "path": "src/Edsger/metadata.ml",
    "content": "open Cryptokit\nopen Yojson.Basic\nopen Std\n\nlet keccak s =\n  let hash = hash_string (Hash.keccak 256) s in\n  let l = List.init (String.length hash) (String.get hash) in\n  let hex = List.map (function x ->\n    Printf.sprintf \"%02x\" (Char.code x)\n  ) l in\n  String.concat \"\" hex\n\nlet metadata version compiler_filename filename abi =\n  let file = Std.input_file filename in\n  (to_string (`Assoc [\n      \"version\",\n     `String \"1\";\n     \"language\",\n     `String \"DeepSEA\";\n     \"compiler\",\n     `Assoc [\n       \"version\",\n       `String version;\n       \"keccak256\",\n       `String (keccak (Std.input_file compiler_filename));\n     ];\n      \"sources\",\n      `Assoc [\n        Filename.basename filename,\n        `Assoc [\n          \"keccak256\",\n          `String (keccak file);\n          \"content\",\n          `String (Std.input_file filename)\n        ]\n      ];\n      \"output\",\n      `Assoc [\n        \"abi\",\n        from_string abi\n      ]\n    ]\n  ))\n"
  },
  {
    "path": "src/Edsger/minicgen.ml",
    "content": "open Ast\nopen Astcommon\nopen Abi\n\nopen Backend\n  open BinNumsExt\n  open StmtMiniC\n  open ExpMiniC\n  module D = Datatypes\n  open DatatypesExt\n       \ntype coqgen_env = {\n  filename : string;\n  project_name : string;\n\n  external_verbatim : (string * int) list;\n  folded_external_symbol_string : string;\n  partial_external_symbols : (ident, unit) Hashtbl.t;\n\n  folded_symbols : string ref\n}\n\nlet catch_not_found f v = try Some (f v) with Not_found -> None\nlet string_of_ident n = string_of_int n ^ \"%positive\"\n\n(* This regular expression defines the names that can be used as Coq module names.\n   If the user specifies something else, we take the longest prefix that satsifies the regexp. *)\nlet module_name_regexp = Str.regexp \"[a-zA-Z_][a-zA-Z0-9_']*\"\nlet default_module_name = \"EdsgerGen\"\nlet builtin_base_layer_name = \"BuiltinBase\"\n\nlet new_coqgen_env filename ast =\n  let project_name =\n    let basename = Filename.basename filename in\n    if Str.string_match module_name_regexp basename 0 then\n      Str.matched_string basename\n    else begin\n      print_endline (\"Cannot use prefix of file name '\" ^ basename ^\n        \"' as Coq module name: default to '\" ^ default_module_name ^ \"'\");\n      default_module_name\n    end in\n\n  let env0 = {\n    filename = filename;\n    project_name = project_name;\n\n    external_verbatim = List.map (fun (s, excepts) ->\n        s, 0\n      ) ast.aFileExternalVerbatim;\n    folded_external_symbol_string =\n      String.concat \" \" (List.map (fun e -> e.aExtConstName)\n\t\t\t\t  (List.filter (fun e -> not e.aExtConstUnfolding)\n\t\t\t\t\t       ast.aFileExternalSymbols));\n    partial_external_symbols =\n      (let tbl = Hashtbl.create 0 in\n       let _ = List.map (fun e ->if e.aExtConstPartial\n\t\t\t\tthen Hashtbl.add tbl e.aExtConstName ())\n\t\t       ast.aFileExternalSymbols in\n       tbl);\n    \n    folded_symbols = ref \"\" } in  \n    env0\n\n\n  (* TODO: we may need to do something like this?*)\n  (*\n  let output_hashtbl out tbl start_num =\n    let arr = Array.make (Hashtbl.length tbl) \"\" in\n    let i = ref 0 in\n    let _ = Hashtbl.iter (fun x _ -> arr.(!i) <- x; incr i) tbl in\n    let _ = Array.sort compare arr in\n    if !i > 0 then\n      let _ = output_char out '\\n' in\n      let num = ref start_num in\n      let _ = Array.iter (fun x ->\n          output_string out (\"Definition \" ^ x ^ \" : ident  := \" ^ string_of_ident !num ^ \".\\n\");\n          incr num\n        ) arr\n      in !num\n    else\n      start_num in\n\n  let file_EdsgerIdents = new_file env \"EdsgerIdents\"\n        \"Require Import BinPos.  (* positive_scope *)\\nRequire Import backend.AST. (* for ident *)\\n\" \n        file_class_EdsgerIdents in\n  let n = output_hashtbl file_EdsgerIdents env.cstruct_idents 550 in\n  let _ = output_hashtbl file_EdsgerIdents env.global_idents n in\n                         (* ((n / 500 + 1) * 500) in *)\n  close_out file_EdsgerIdents;\n   *)\n\nlet add_folded_symbols env syms =\n  env.folded_symbols :=\n    String.concat \" \" syms ^\n    if !(env.folded_symbols) = \"\" then\n      \"\"\n    else\n      \" \" ^ !(env.folded_symbols)\n\nlet coqgen_warning  msg =\n  print_endline (\"minicgen warning: \" ^ msg)\n\nlet coqgen_fatal_error loc func msg =\n  print_endline (\"minicgen error at \" ^ loc ^ \" (\" ^ func ^ \"): \" ^ msg);\n  assert false\n\n(* Todo: figure out if we need to do anything for type declarations. *)\n(*\t\t\t\t\t\t\t\t\t    \nlet rec output_prepare_ctype env out = function\n  | ACtpointer ct | ACtarray (_, ct) -> output_prepare_ctype env out ct\n  | ACtstruct (name, lst) ->\n    output_cstruct_ident env (struct_name_to_ident name);\n    List.iter (fun (fld, ct) ->\n      output_cstruct_ident env (struct_field_name_to_ident name fld);\n      output_prepare_ctype env out ct;\n    ) lst;\n  | _ -> ()\n *)\n\n(* TODO: move these functions to a common file. *)\nlet rec positive_of_int n =\n    let open Backend.BinNums in\n    if n = 1 then\n      Coq_xH\n    else if (n land 1) = 1 then\n      Coq_xI (positive_of_int (n asr 1))\n    else\n      Coq_xO (positive_of_int (n asr 1))\n    \nlet coq_Z_of_int n =\n    let open Backend.BinNums in\n    if n = 0 then Z0\n    else if n > 0 then Zpos (positive_of_int n)\n    else Zneg (positive_of_int (-n))\n\nlet rec coqlist_of_list = function\n  | [] -> Backend.Datatypes.Coq_nil\n  | x::xs -> Backend.Datatypes.(Coq_cons (x, coqlist_of_list xs))\n\n\nlet rec int_of_positive p =\n  let open Backend.BinNums in\n  match p with\n  | Coq_xI rest -> 2*(int_of_positive rest) + 1\n  | Coq_xO rest -> 2*(int_of_positive rest)\n  | Coq_xH -> 1\n\n\nlet int_of_z =\n  let open Backend.BinNums in\n  function\n  | Z0 -> 0\n  | Zpos rest -> int_of_positive rest\n  | Zneg rest -> -(int_of_positive rest)\n\t\t\t\t \n(* end of functions to move. *)\t   \n\nlet ident_table : (ident, int) Hashtbl.t = Hashtbl.create 1000\nlet ident_counter : int ref = ref 550\n\t\t\t\t \nlet ident_generator = fun prefix midfix postfix ->\n    let id = (prefix ^ midfix ^ \"_\"^ postfix) in\n    try positive_of_int (Hashtbl.find ident_table id)\n    with Not_found -> begin\n       let n = !ident_counter in\n       ident_counter := !ident_counter + 1;\n       Hashtbl.add ident_table id n;\n       positive_of_int n\n      end\n\n(* Todo: look more carefully at this and generate correct numbers. *)\nlet struct_name_to_ident2 = ident_generator \"\" \"struct\"\nlet struct_field_name_to_ident2 = ident_generator \"\"\nlet backend_ident_of_globvar  = ident_generator \"var_\"\nlet backend_ident_of_funcname = ident_generator \"ident_\"\nlet backend_ident_of_tempvar i = positive_of_int i\n\t\t\t\t    \nlet methods_tbl = Hashtbl.create 0\n\nlet rec gen_ctype =\n  let open Backend.Ctypes in \n  function    \n  | ACtint  -> Tint (I256, Unsigned)\n  | ACtchar -> Tint (I8, Unsigned)\n  | ACtvoid -> Tvoid\n  | ACtpointer ct -> coqgen_fatal_error __LOC__ \"gen_ctype\" \"ACtpointer not supported\"\n  | ACtarray (n, ct) -> Tarray (gen_ctype ct, coq_Z_of_int n)\n  | ACtmapping (t1, t2) -> Thashmap (gen_ctype t1, gen_ctype t2)\n  | ACtstruct (name, lst) -> Tstruct (struct_name_to_ident2 name,\n\t\t\t\t      gen_ctype_fields name lst)\n\n  and gen_ctype_fields sname  =\n  let open Backend.Ctypes in \n  function\n  | [] -> Fnil\n  | (fld,ct)::flds -> Fcons (struct_field_name_to_ident2 sname fld,\n\t\t\t     gen_ctype ct,\n\t\t\t     gen_ctype_fields sname flds)\n\t   \n(*\nlet cimpl_struct_name impl =\n match impl.aImplType with\n   | ACtstruct (i, _) -> i\n   | _ -> coqgen_fatal_error __LOC__ \"output_cval_cimpl\"\n                 \"Structure a_cimpl with non-structural a_ctype\"\n\n(* Takes a_cimpl, and outputs a Coq expression which builds an extended C value. *)\nlet rec output_cval_cimpl out ind out_var get_var =\n  let rec output impl = match impl.aImplDesc with\n    | ACdefault -> output_string out \"CVany\"\n    | ACint n ->\n      output_string out (\"(CVval (Values.Vint (Int256.repr \" ^ string_of_int n ^ \")))\")\n    | ACvar v -> out_var out ind v\n    | ACplus _ ->\n      output_string out (\"(CVval (Values.Vint (Int256.repr \" ^\n        get_coq_val_cimpl ind get_var impl ^ \")))\")\n    | ACtimes _ ->\n      output_string out (\"(CVval (Values.Vint (Int256.repr \" ^\n        get_coq_val_cimpl ind get_var impl ^ \")))\")\n    | ACcond (b, i1, i2) ->\n      output_string out (\"(if \" ^ get_coq_val_cimpl ind get_var b ^ \" then \");\n      output i1;\n      output_string out \" else \";\n      output i2;\n      output_char out ')'\n    | ACarray _ -> output_string out \"CVany (* not yet implemented *)\" (* ???: how? *)\n    | ACstruct ls ->\n        match impl.aImplType with\n\t| ACtstruct (ci, cls) ->\n\t  output_string out (\"\\n\" ^ ind ^ \"(CVstruct (CSmap\");\n\t  List.iter2 (fun (f, i) (cf, _cfTy) ->\n\t    output_string out (\"\\n  \" ^ ind ^ \"(PTree.set  \" ^\n\t      struct_field_name_to_ident ci cf ^ \" \");\n\t    output_char out ' ';\n\t    output i;\n\t  ) ls cls;\n\t  output_string out (\"\\n  \" ^ ind ^ \"(@PTree.empty cval)))\" ^ String.make (List.length ls) ')')\n\t| _ -> coqgen_fatal_error __LOC__ \"output_cval_cimpl\"\n                 \"Structure a_cimpl with non-structural a_ctype\"\n  in output\n *)\n\n\n(* Take an environment env, a name of a type i, and the description of the type t, output all necessary definitions for the type.\n   (Naming convention: This function opens the output channels itself, so it's called gen_ instead of output_.)\n *)\n(*\nlet gen_type env i t =\n  let type_out = env.coq_DataTypes in\n  let ops_out = env.coq_DataTypeOps in\n  match t.aTypeDesc with\n  | ATdata (i', _) when i <> i' ->\n    output_string type_out (\"\\nDefinition \" ^ i ^ \" := \" ^ i' ^ \".\\n\")\n  | ATprod _ | ATarray _ as d when i <> a_type_desc_to_ident d ->\n    output_string type_out (\"\\nDefinition \" ^ i ^ \" := \");\n    output_type_expr type_out \"  \" t;\n    output_string type_out (\".\\n\")\n  | _ ->\n    let _ = (* (Coq) data type definition *)\n      output_char type_out '\\n';\n      match t.aTypeDesc with\n      | ATdata (_, ATsingleton c) -> gen_struct_type env i c\n      | ATdata (_, ATbranches cs) -> gen_data_type env i cs\n      | _ ->\n        output_string type_out (\"Definition \" ^ i ^ \" := \");\n        output_type_expr type_out \"  \" t;\n        output_string type_out (\".\\n\") in\n    let _ = (* Type pair notation *)\n      output_prepare_ctype env ops_out t.aTypeCtype;\n      output_string ops_out (\"Definition \" ^ t.aTypePairIdent ^\n        \" := (Tpair \" ^ i ^ \" \");\n      output_ctype ops_out \"  \" t.aTypeCtype;\n      output_string ops_out \").\\n\" in\n    let _ = (* [HyperTypeImpl] and [HyperBinaryImpl Oeq] *)\n      output_hyper_type_impl ops_out t;\n      output_hyper_type ops_out t;\n      output_hyper_binary_impl_eq ops_out t in\n    (* let _ = (* naturally_aligned *)\n      output_type_naturally_aligned ops_out t in *)\n    let _ = (* [HyperFieldImpl] and [HyperIndexImpl] *)\n      match t.aTypeDesc with\n      | ATprod (t1, t2) as d ->\n        output_cstruct_ident env\n          (struct_field_name_to_ident (\"struct_\" ^ a_type_desc_to_ident d) \"fst\");\n        output_record_hyper_field_impl\n          ops_out t.aTypePairIdent\n          (\"struct_\" ^ a_type_desc_to_ident d) \"fst\" t1 0\n          (fun out s -> output_string out (\"fst \" ^ s))\n          (fun out v s -> output_string out (\"(\" ^ v ^ \", snd \" ^ s ^ \")\"));\n        output_record_hyper_field\n          ops_out t (\"struct_\" ^ a_type_desc_to_ident d) \"fst\" t1;\n(*        output_record_hyper_field_passthrough\n          ops_out t\n          (\"struct_\" ^ a_type_desc_to_ident d) \"fst\" t1; *)\n        output_cstruct_ident env\n          (struct_field_name_to_ident (\"struct_\" ^ a_type_desc_to_ident d) \"snd\");\n        output_record_hyper_field_impl\n          ops_out t.aTypePairIdent\n          (\"struct_\" ^ a_type_desc_to_ident d) \"snd\" t2\n          (calign (csizeof t1.aTypeCtype) (calignof t2.aTypeCtype))\n          (fun out s -> output_string out (\"snd \" ^ s))\n          (fun out v s -> output_string out (\"(fst \" ^ s ^ \", \" ^ v ^ \")\"));\n        output_record_hyper_field\n          ops_out t (\"struct_\" ^ a_type_desc_to_ident d) \"snd\" t2;\n(*        output_record_hyper_field_passthrough\n          ops_out t\n          (\"struct_\" ^ a_type_desc_to_ident d) \"snd\" t2 *)\n      | ATdata (i, ATsingleton c) ->\n        let pos = ref 0 in\n        List.iter (fun (f, ft) ->\n          let offset = calign !pos (calignof ft.aTypeCtype) in\n          output_cstruct_ident env (struct_field_name_to_ident i f);\n          output_record_hyper_field_impl ops_out t.aTypePairIdent i f ft offset\n            (fun out s -> output_string out (f ^ \" \" ^ s))\n            (fun out v s ->\n              output_string out c.aTypeConstrName;\n              List.iter (fun (f', _) ->\n                if f' = f\n                  then output_string out (\" \" ^ v)\n                  else output_string out (\" (\" ^ f' ^ \" \" ^ s ^ \")\")\n              ) c.aTypeConstrArgs);\n          output_record_hyper_field ops_out t i f ft;\n          (* output_record_hyper_field_passthrough ops_out t i f ft; *)\n          pos := offset + csizeof ft.aTypeCtype\n        ) c.aTypeConstrArgs\n      | ATdata (i, ATbranches [{ aTypeConstrImpl = Some {aImplDesc= ACdefault}} as cd;\n\t\t\t       { aTypeConstrImpl = Some ({aImplDesc=ACstruct cs} as impl)} as c])\n      | ATdata (i, ATbranches [{ aTypeConstrImpl = Some ({aImplDesc=ACstruct cs}  as impl)} as c ;\n\t\t\t       { aTypeConstrImpl = Some {aImplDesc = ACdefault}} as cd]) ->\n        let pos = ref 0 in\n        List.iter2 (fun (f, ft) (cf, _cfimpl) ->\n\t  let offset = calign !pos (calignof ft.aTypeCtype) in\n\t  let ci = cimpl_struct_name impl in\n          output_cstruct_ident env (struct_field_name_to_ident ci cf);\n          output_twobranch_hyper_field_impl ops_out t i ci f ft cf offset c cd;\n          output_twobranch_hyper_field ops_out t i ci f cf ft;\n          (* output_twobranch_hyper_field_passthrough ops_out t i ci f cf ft; *)\n          pos := offset + csizeof ft.aTypeCtype\n        ) c.aTypeConstrArgs cs\n      | ATarray (n, t') ->\n        output_hyper_index_impl ops_out t.aTypePairIdent n t';\n        output_hyper_index ops_out t n t';\n      | ATmapping (t1, t2) ->\n         output_hyper_hash_impl ops_out t.aTypePairIdent t1 t2;\n         output_hyper_hash ops_out t.aTypePairIdent t1 t2;\n      | _ -> ()\n    in ()\n\n *)\n\nlet gen_unop = \n  let open Backend.Cop in\n  function\n  | OPneg -> Oneg\n  | OPnot -> Onotbool\n  | OPbitnot -> Onotint\n  | OPbitneg -> Onotint\n  | OPsha_1 -> Osha_1\n             \nlet gen_binop =\n  let open Backend.Cop in\n  function\n  | OPplus -> Oadd\n  | OPminus -> Osub\n  | OPtimes -> Omul\n  | OPdivide -> Odiv\n  | OPremainder -> Omod\n  | OPand -> Oand\n  | OPor -> Oor\n  | OPeq -> Oeq\n  | OPne -> One\n  | OPlt -> Olt\n  | OPle -> Ole\n  | OPgt -> Ogt\n  | OPge -> Oge\n  | OPshl -> Oshl\n  | OPshr -> Oshr\n  | OPxor -> Oxor\n  | OPbitand -> Oand\n  | OPbitor -> Oor\n  | OPsha_2 -> Osha_2\n\nlet rec gen_rexpr e =\n  let open Backend.Ctypes in\n  let open Backend.Integers in\n  let open Backend.Language in\n  let open Backend.BinNumsExt in\n  match e.aRexprDesc with\t     \n  | AEconst (CONint n) ->\n     Econst_int256 (Int256.repr (coq_Z_of_int n), gen_ctype e.aRexprType.aTypeCtype)\n  | AEconst (CONuint n) ->\n     Econst_int256 (Int256.repr (coq_Z_of_int n), gen_ctype e.aRexprType.aTypeCtype)\n  | AEconst (CONbool true) ->\n    Econst_int256 (Int256.one, Tint (I256, Unsigned))\n  | AEconst (CONbool false) ->\n    Econst_int256 (Int256.zero, Tint (I256, Unsigned))\n  | AEconst CONhashvalue ->\n     coqgen_fatal_error __LOC__ \"output_rexpr\" \"Assigning hashvalue default value is not supported yet.\"    \n  | AEconst (CONaddress addr) -> \n    Econst_int256 (Int256.repr (z_of_numstring addr), Tint (I256, Unsigned))\n  | AEconst CONunit ->\n    Econst_int256 (Int256.zero, Tvoid)\n  | AEconst CONglobalpointer_undef ->\n     coqgen_fatal_error __LOC__ \"output_rexpr\" \"Internal error.\"\n  | AEconstr_val (c, []) -> \n    Econst_int256 (begin match c.aTypeConstrImpl with\n      | None | Some { aImplDesc = ACdefault } -> Int256.zero\n      | Some { aImplDesc = ACint n }          -> (Int256.repr (coq_Z_of_int n))\n      | _ -> coqgen_fatal_error __LOC__ \"output_rexpr\" \"Internal error.\"\n\t\t    end,\n\t\t   gen_ctype e.aRexprType.aTypeCtype)\n  | AEconstr_val (c, _) -> coqgen_fatal_error __LOC__ \"output_rexpr\" \"Internal error: Nonempty AEconstr is not supported.\"\n  | AEtemp (n, _i) ->\n    Etempvar (backend_ident_of_tempvar n, gen_ctype e.aRexprType.aTypeCtype)\n  | AEunop (op, e') ->\n     Eunop (gen_unop op,\n\t    gen_rexpr e',\n\t    gen_ctype e.aRexprType.aTypeCtype)\n  | AEbinop (op, e1, e2) ->\n     Ebinop (gen_binop op,\n\t     gen_rexpr e1,\n\t     gen_rexpr e2,\n\t     gen_ctype e.aRexprType.aTypeCtype)\t     \n  | AEbuiltin (\"address\",[]) ->\n     Ecall0 (Backend.MachineModel.Baddress,\n\t     gen_ctype e.aRexprType.aTypeCtype)\n  | AEbuiltin (\"origin\",[]) ->\n     Ecall0 (Backend.MachineModel.Borigin,\n\t     gen_ctype e.aRexprType.aTypeCtype)\n  | AEbuiltin (\"caller\",[]) ->\n     Ecall0 (Backend.MachineModel.Bcaller,\n\t     gen_ctype e.aRexprType.aTypeCtype)\n  | AEbuiltin (\"callvalue\",[]) ->\n     Ecall0 (Backend.MachineModel.Bcallvalue,\n\t     gen_ctype e.aRexprType.aTypeCtype)\n  | AEbuiltin (\"coinbase\",[]) ->\n     Ecall0 (Backend.MachineModel.Bcoinbase,\n\t     gen_ctype e.aRexprType.aTypeCtype)\n  | AEbuiltin (\"timestamp\",[]) ->\n     Ecall0 (Backend.MachineModel.Btimestamp,\n\t     gen_ctype e.aRexprType.aTypeCtype)\n  | AEbuiltin (\"number\",[]) ->\n     Ecall0 (Backend.MachineModel.Bnumber,\n\t     gen_ctype e.aRexprType.aTypeCtype)\n  | AEbuiltin (\"chainid\",[]) ->\n     Ecall0 (Backend.MachineModel.Bchainid,\n\t     gen_ctype e.aRexprType.aTypeCtype)\n  | AEbuiltin (\"selfbalance\",[]) ->\n     Ecall0 (Backend.MachineModel.Bselfbalance,\n\t     gen_ctype e.aRexprType.aTypeCtype)\n  | AEbuiltin (\"balance\",[e1]) ->\n     Ecall1 (Backend.MachineModel.Bbalance, (gen_rexpr e1),\n\t     gen_ctype e.aRexprType.aTypeCtype)\n  | AEbuiltin (\"blockhash\",[e1]) ->\n     Ecall1 (Backend.MachineModel.Bblockhash, (gen_rexpr e1),\n\t     gen_ctype e.aRexprType.aTypeCtype)\n\t    \n  | AEbuiltin (other,_) -> coqgen_fatal_error __LOC__ \"output_rexpr\"\n               (\"Internal error, encountered unknown builtin \\\"\"^other^\"\\\".\")\n\nlet rec gen_lexpr obj e =\n  let open Backend.Integers in\n  let open Backend.Language in\n  match e.aLexprDesc with\n  | AEglob i ->\n     Eglob (backend_ident_of_globvar obj i,\n\t   gen_ctype e.aLexprType.aTypeCtype)\n  | AEfield (e', f) ->\n     Efield (gen_lexpr obj e',\n\t           begin match e'.aLexprType.aTypeDesc with\n\t\t\t | ATdata (i, _) -> struct_field_name_to_ident2 i f\n\t\t\t | ATprod _ as d -> struct_field_name_to_ident2 (\"struct_\" ^ a_type_desc_to_ident d) f\n\t\t\t | _ -> coqgen_fatal_error __LOC__ \"output_lexpr\"\n\t\t\t\t\t\t   \"Only ATdata and ATprod can be accessed through structure field selector\"\n\t\t   end,\n\t\t   gen_ctype e.aLexprType.aTypeCtype)\n  | AEindex (e', idx) ->\n    Eindex (gen_lexpr obj e', gen_rexpr idx, gen_ctype e.aLexprType.aTypeCtype)\n\n\n\nlet rec gen_constr_assignments target cname flds es =\n  match flds, es with\n  | (fld_id,ty)::flds', e::es' ->\n     Ssequence (Sassign (Efield (target,\n\t\t\t\t struct_field_name_to_ident2 cname fld_id,\n\t\t\t\t gen_ctype ty),\n\t\t\t e),\n\t\tgen_constr_assignments target cname flds' es')\n  | _,_ -> Sskip\n  \n\t\t\nlet gen_constr_command obj el er =\n    let c, ls, cfields, i =\n      match er.aBigExprDesc, er.aBigExprType.aTypeDesc with\n      | AEstruct (c, ls), ATdata (i, _) \n      | AEconstr (c, ls), ATdata (i, _) ->\n        begin match er.aBigExprType.aTypeCtype with\n        | ACtstruct (cname,cfields) -> c, ls, cfields, cname\n        | _                         -> c, ls, List.map (fun (i,e) -> (i, e.aBigExprType.aTypeCtype)) ls,      i\n        end\n      | _, (ATprod _ ) -> \n        coqgen_fatal_error __LOC__ \"output_constr_command\"\n          \"???: can we have pairs for data construction?\"\n      | _ -> coqgen_fatal_error __LOC__ \"output_constr_command\"\n               \"Only true big expression can be on the RHS of a data construction\"\n    in\n    let es = List.map (fun (f, e) -> match e.aBigExprDesc with\n           | AErexpr re -> gen_rexpr re\n           | _ -> coqgen_fatal_error __LOC__ \"output_constr_command\"\n                    \"Currently only small expressions are supported as contructor arguments\")\n          ls in\t\t \n    gen_constr_assignments (gen_lexpr obj el) i cfields es\n\n\n  let gen_matchable_as_lexpr obj m = match m.aMatchableDesc with\n    | AMtemp (id,ident) ->\n       coqgen_fatal_error __LOC__ \"gen_matchable_as_lexp\" \"Pattern matches on tempvars not yet implemented.\"\n    | AMlexpr lexpr -> gen_lexpr obj lexpr\n\n  let gen_matchable_as_rexpr m = match m.aMatchableDesc with\n    | AMtemp (id,ident) ->  Etempvar (backend_ident_of_tempvar id,\n\t\t\t\t      gen_ctype m.aMatchableType.aTypeCtype)\n    | AMlexpr lexpr -> \n       coqgen_fatal_error __LOC__ \"gen_matchable_as_lexp\" \"Pattern matches on lexpr not yet implemented.\"\n\n  (* When calling a primitive from a lower layer, we need to look up\n     which object it is defined in. *)\t\t\t  \n  let backend_ident_of_primitive underlay slotname funcname =\n    match underlay with\n    | ALontop l ->\n       let o = List.assoc slotname l.aLayerAllObjects in      \t\t\t  \n       backend_ident_of_funcname o.aObjectName funcname\n    | _ -> raise Not_found\n\n\t\t\t  \n  (* There are a few pattern-matching idioms that can be rendered into C code, so we recognize those,\n     and for the other ones we just give up.\n\n     First, if there is just a single constructor of a big type, and then a default type (which fails), then\n     we can translate the case-expression as a projection function. *)\nlet rec gen_projection_style_match scrutinee struct_name tenv fields body =\n  match tenv, fields with\n  | (ident,(tmp_id, tmp_typ))::tenv', (fieldname, _)::fields' ->\n     let rest = gen_projection_style_match scrutinee struct_name tenv' fields' body in\n     if (ident = \"_\") then\n       rest\n     else\n       Ssequence (Sassign (Etempvar (backend_ident_of_tempvar tmp_id,\n\t\t\t\t      gen_ctype tmp_typ.aTypeCtype),\n\t\t\t    Efield (scrutinee,\n\t\t\t\t    struct_field_name_to_ident2 struct_name fieldname,\n\t\t\t\t    gen_ctype tmp_typ.aTypeCtype)),\n\t\t  rest)\n\t\t   \n\t\t    \n       \n  | _,_ -> body\n\nlet rec gen_case_style_match underlay obj pure scrutinee dest clss =\n  let open Backend.Cop in\n  let open Backend.Ctypes in\n  match clss with\n  | []  -> coqgen_fatal_error __LOC__ \"gen_case_style_match\" \"empty match (this should be impossible)\"\n  | (_,_,branch)::[] ->\n      gen_cmd underlay obj pure branch dest  (* last, maybe catch-all, branch *)\n  | (None,_,_)::_ -> coqgen_fatal_error __LOC__ \"gen_case_style_match\" \"only the last branch can be a wildcard\"\n  | (Some c,_,branch)::rest ->     \n     Sifthenelse (Ebinop (Oeq,\n\t\t\t  gen_matchable_as_rexpr scrutinee,\n\t\t\t  gen_rexpr { aRexprDesc = AEconstr_val(c, []); aRexprType = scrutinee.aMatchableType},\n\t\t\t  Tint (IBool, Unsigned)),\n\t\t  gen_cmd underlay obj pure branch dest,\n\t\t  gen_case_style_match underlay obj pure scrutinee dest rest)\n\n     \n(*\t\t      \n  (* Second, if all the matched constructors are realized as distinct constant integers, and none of them bind any varaibles,\n     then we can translate the match into a series of if-statements. *)\n  and output_case_style_match scrutinee clss bodyname_stem path ind =\n    let lastclause = List.length clss - 1 in\n    List.iteri (fun i cls ->\n\t\tmatch cls with\n\t\t| (Some c,_,_) when (i<>lastclause) ->\n\t\t   output_string out (ind ^ \"(CCifthenelse\\n\" ^\n\t\t\t              ind ^ \"  (ECbinop tint_bool Oeq\\n\" ^ ind ^ \"     \");\n\t\t   output_matchable_as_rexpr out obj scrutinee;\n                   output_string out (\"\\n\"^ ind ^ \"     \");\n\t\t   output_rexpr out (\"\\n\"^  ind ^ \"     \") { aRexprDesc = AEconstr_val(c, []); aRexprType = scrutinee.aMatchableType};\n                   output_string out (\")\\n\" ^ ind ^ \"       \"\n\t\t\t\t      ^ bodyname_stem ^ (string_of_path (i::path)) ^ \"\\n\")\n\t\t| _ -> output_string out (ind ^ \"       \" ^  bodyname_stem ^ (string_of_path (i::path))\n\t\t\t\t\t  ^ String.make (List.length clss - 1) ')' ^\"\\n\")\n\t       )\n               clss\n\n *)\n\t\t\t   \n(* This function is the composition of \"output\" in coqgen.ml and synth_stmt_stmt in SYnthesisStmt.v. *)\t       \nand gen_cmd underlay obj pure c dest =\n  let open Backend.Cop in\n  let open Backend.Language in\n  match c.aCmdDesc with\n  | ACskip -> Sskip\n  | ACyield e -> Sset (positive_of_int dest, gen_rexpr e)\n  | AClet (n, _i, c1, c2) ->\n     Ssequence (gen_cmd underlay obj pure c1 n,\n\t\tgen_cmd underlay obj pure c2 dest)\n  | ACsequence (c1, c2) ->\n     Ssequence (gen_cmd underlay obj pure c1 dest,\n\t\tgen_cmd underlay obj pure c2 dest)\n  | ACcall (s, f, es, v, g) ->\n    let o = (match underlay with\n      | ALontop l -> (try Some (List.assoc s l.aLayerAllObjects)\n          with Not_found -> None)\n      | _ -> None)\n    in\n    let retval_dest = begin match c.aCmdType.aTypeCtype with\n    | ACtvoid -> Backend.Datatypes.None\n    | _ -> Backend.Datatypes.Some (positive_of_int dest)\n    end in\n    let args = begin match es with\n    | [e] when e.aRexprType.aTypeDesc = ATbuiltin Tunit -> []\n    | _ -> List.map gen_rexpr es\n    end in\n    let address_signature = (match o with\n    | None -> None\n    | Some o' ->\n        let methd = List.find (fun i -> i.aMethodName = f) o'.aObjectMethods in\n        let signature = coq_Z_of_int (function_selector_intval_of_method methd) in\n        match o'.aObjectAddress with\n        | None -> None\n        | Some address -> Some (address, signature)\n    ) in\n    (match address_signature with\n    | None -> if Option.is_some v || Option.is_some g then \n      raise (Failure \"Value/gas specified for interal method call\") else\n      Scall (retval_dest,\n      backend_ident_of_primitive underlay s f,\n      coqlist_of_list args)\n    | Some (address, signature) ->\n      let v' = (match v with\n        | None -> Econst_int256 (coq_Z_of_int 0, Tint (I256, Unsigned))\n        | Some v'' -> gen_rexpr v''\n      ) in\n      let g' = (match g with\n        | None -> D.None\n        | Some g'' -> D.Some (gen_rexpr g'')\n      ) in\n      Scallmethod (\n        Econst_int256 (coq_Z_of_Z (Z.of_string address), Tint (I256, Unsigned)),\n        coqlist_of_list (match retval_dest with None -> [] | Some r -> [r]), (* only one return value allowed for now *)\n        signature, (* method siguature *)\n        v',\n        g',\n        coqlist_of_list args\n      )\n    )\n  | ACtransfer (to_addr, value) -> Scallmethod (\n      gen_rexpr to_addr,\n      coqlist_of_list [],\n      BinNums.Z0,\n      gen_rexpr value,\n      D.None,\n      coqlist_of_list []\n    )\n  | ACcond (e, c_then, c_else) ->\n     Sifthenelse (gen_rexpr e,\n\t\t  gen_cmd underlay obj pure c_then dest,\n\t\t  gen_cmd underlay obj pure c_else dest)\n  | ACfor (n_iter, i, e1, n_end, e2, c, None) ->\n     let id_it = backend_ident_of_tempvar n_iter in\n     let id_end = backend_ident_of_tempvar n_end in\n     let tint = Backend.Ctypes.(Tint (I256, Unsigned)) in\n     Ssequence\n       (Sset (id_end, gen_rexpr e2),\n        coq_Sfor (Sset (id_it, gen_rexpr e1))\n                 (Ebinop (Olt, Etempvar (id_it, tint), Etempvar (id_end, tint), tint))\n\t\t (gen_cmd underlay obj pure c dest)\n                 (Sset (id_it, (Ebinop (Oadd,\n\t\t\t\t    Etempvar (id_it, tint),\n                                    Econst_int256 (Backend.Integers.Int256.one, tint),\n\t\t\t\t    tint)))))\n    | ACfor (n_iter, i, e_start, n_end, e_end, c0, Some cc) ->\n       coqgen_fatal_error __LOC__ \"gen_cmd\" \"For-loop slices are not supported.\"\n    | ACmatch (e, clss) ->\n      let is_simple_int c =  match c with\n\t| (Some { aTypeConstrImpl = Some {aImplDesc = ACint _}}, [], _) -> true\n\t| (None, _, _) -> true\n\t| _ -> false\n      in\n      begin match clss with\n\t    | [(Some { aTypeConstrImpl = Some {aImplDesc = ACstruct fields; aImplType = ACtstruct (struct_name,_)} }, tenv, cmd); (None,_,_)]\n\t    | [(Some { aTypeConstrImpl = Some {aImplDesc = ACstruct fields; aImplType = ACtstruct (struct_name,_)} }, tenv, cmd)]\n               -> \n               gen_projection_style_match (gen_matchable_as_lexpr obj e)  struct_name tenv fields (gen_cmd underlay obj pure cmd dest) \n\t    | _ when List.for_all is_simple_int clss ->\n\t       gen_case_style_match underlay obj pure e dest clss\n\t    | _ ->\n       coqgen_fatal_error __LOC__ \"gen_cmd\" (\"Don't know how to synthesise code for the pattern match on \" ^ string_of_a_matchable e)\n      end\n    | ACemit (et, es) ->\n       let open Backend.Integers in\n       let open Backend.BinNums in\n       let topics, args = List.partition (fun ((_,_,idxbl),_) -> idxbl)\n                            (List.combine et.aEventArgs es) in\n       let hash = Abi.event_topic_of_event_type et in\n       Slog (coqlist_of_list\n               (Econst_int256 (Int256.repr hash, Tint (I256, Unsigned))\n                          :: (List.map (fun (_,e) -> gen_rexpr e) topics)),\n             coqlist_of_list (List.map (fun (_,e) -> gen_rexpr e) args))\n    | ACload e ->\n       Sset (positive_of_int dest, gen_lexpr obj e)\n    | ACstore (el, er) ->\n       Sassign (gen_lexpr obj el, gen_rexpr er)\n    | ACconstr (el, er) ->\n       (gen_constr_command obj el er)\n\n    | ACfail -> Srevert\n    | ACassert c -> Ssequence(gen_cmd underlay obj pure c dest,\n\t\t\t      Sifthenelse(Etempvar(backend_ident_of_tempvar dest,\n\t\t\t\t\t\t   Tint (I256, Unsigned)),\n\t\t\t\t\t  Sskip,\n\t\t\t\t\t  Srevert))\n    | ACdeny c   -> Ssequence(gen_cmd underlay obj pure c dest,\n\t\t\t      Sifthenelse(Etempvar(backend_ident_of_tempvar dest,\n\t\t\t\t\t\t   Tint (I256, Unsigned)),\n\t\t\t\t\t  Srevert,\n\t\t\t\t\t  Sskip))\n\n    | ACghost c -> Sskip\n\n(*\t\t     \n    | ACfirst (n_iter, i, e_start, n_end, e_end, n_c, c, c_then, c_else, None) ->\n      output_string out (\"(CCfirst (* \" ^ i ^ \" := *) \" ^ string_of_ident n_iter ^\n        \" \" ^ string_of_ident n_end ^ \" \" ^ string_of_ident n_c ^ \" \");\n      output_rexpr out (\"  \" ^ ind) e_start;\n      output_char out ' ';\n      output_rexpr out (\"  \" ^ ind) e_end;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) true (1::path) c;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) pure (2::path) c_then;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) pure (3::path) c_else;\n      output_char out ')'\n    | ACfirst (n_iter, i, e_start, n_end, e_end, n_c, _, _, _, Some cc) ->\n      let slice_name = method_full_name ^ \"_slice_\" ^ cc.aCapturedName in\n      let args = String.concat \"\" (List.map (fun (_, (tmp_id, _)) ->\n                   \" (SpecTree.get \" ^ string_of_ident tmp_id ^ \" se)\"\n                 ) cc.aCapturedTemp) in\n      let spec_post_matters =\n        if pure then \"\"\n                else \" _ (fun r => k (ss_mem r, ss_return r))\" in\n      if pure then\n        output_string out (\"(CCrespec\\n\" ^ ind)\n      else\n        output_string out (\"(CCrespec_opt\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      output_string out (\"\\n\" ^ ind ^\n        \"(CCfirst (* \" ^ i ^ \" := *) \" ^ string_of_ident n_iter ^\n        \" \" ^ string_of_ident n_end ^ \" \" ^ string_of_ident n_c ^ \" \");\n      output_rexpr out (\"  \" ^ ind) e_start;\n      output_char out ' ';\n      output_rexpr out (\"  \" ^ ind) e_end;\n      output_string out (\"\\n  \" ^ ind ^\n        slice_name ^ \" \" ^ slice_name ^ \"_found \" ^ slice_name ^ \"_notfound)\\n\" ^ ind ^\n        (if pure then\n           \"(fun se d =>\\n\"\n         else\n           \"(fun se d r k =>\\n\") ^ ind ^\n        \" match \" ^ cc.aCapturedName ^ args ^ \" \");\n      (* output_rexpr_gallina out \"se\" (\"    \" ^ ind) e_start; *)\n      output_char out ' ';\n      (* output_rexpr_gallina out \"se\" (\"    \" ^ ind) e_end; *)\n      output_string out (\" d with\\n\" ^ ind ^\n        \" | inleft (exist n _) => \" ^ slice_name ^ \"_found_spec\" ^ args ^ \"\\n\" ^ ind ^\n        \"     n d\" ^ spec_post_matters ^ \"\\n\" ^ ind ^\n        \" | inright _ => \" ^ slice_name ^ \"_notfound_spec\" ^ args ^ \"\\n     \" ^ ind);\n      (* output_rexpr_gallina out \"se\" (\"       \" ^ ind) e_end; *)\n      output_string out (\" d\" ^ spec_post_matters ^ \"\\n\" ^ ind ^\n        \" end))\")\n\n    | ACfold (n_iter, i_iter, e_start, n_end, e_end, n_acc, i_acc, e_init, n_c, c, None) ->\n      output_string out (\"(CCfold (* \" ^ i_iter ^ \" := *) \" ^ string_of_ident n_iter ^\n        \" \" ^ string_of_ident n_end ^\n        \" (* \" ^ i_acc ^ \" := *) \" ^ string_of_ident n_acc ^\n        \" \" ^ string_of_ident n_c ^ \" \");\n      output_rexpr out (\"  \" ^ ind) e_start;\n      output_char out ' ';\n      output_rexpr out (\"  \" ^ ind) e_end;\n      output_char out ' ';\n      output_rexpr out (\"  \" ^ ind) e_init;\n      output_string out (\"\\n\" ^ ind);\n      output (\"  \" ^ ind) true path c;\n      output_char out ')'\n    | ACfold (n_iter, i_iter, e_start, n_end, e_end, n_acc, i_acc, e_init, n_c, _, Some cc) ->\n      output_string out (\"(CCrespec\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      output_string out (\"\\n\" ^ ind ^\n        method_full_name ^ \"_slice_\" ^ cc.aCapturedName ^ \"\\n\" ^ ind ^\n        \"(fun se => \" ^ cc.aCapturedName);\n      List.iter (fun (_, (tmp_id, _)) ->\n        output_string out (\" (SpecTree.get \" ^ string_of_ident tmp_id ^ \" se)\")\n      ) cc.aCapturedTemp;\n      output_string out \"))\"\n\n    | ACexternal (dest, s, i, []) ->\n      output_string out (\"(CCrespec_opt\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      output_string out (\"\\n\" ^ ind);\n      output_string out (\"(CCpanic \" ^ c.aCmdType.aTypePairIdent ^ \")\");\n      output_string out (\"\\n\" ^ ind);\n      output_string out (\"(fun se => \");\n      begin match dest with\n      | None -> output_string out (\"ret (\" ^ s ^ \")\")\n      | Some el -> output_string out \"(@bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>  put (\";\n                   (*output_lexpr_set_gallina out obj \"se\" s \"d\" (\"    \" ^ ind) el; *)\n                   output_string out \")))\"\n      end;\n      output_string out \"))\"\n\n    | ACexternal (dest, s, i, args) ->\n      let is_partial = Hashtbl.mem env.partial_external_symbols s in\n      output_string out (\"(CCrespec_opt\\n\" ^ ind);\n      output_tmp_env out ind 0 c.aCmdEnv;\n      output_string out (\"\\n\" ^ ind);\n      output_string out (\"(CCpanic \" ^ c.aCmdType.aTypePairIdent ^ \")\");\n      output_string out (\"\\n\" ^ ind);\n      output_string out (\"(fun se => @bind _ (@Monad_DS GlobalLayerSpec) _ _ get (fun d =>\");\n      output_string out (\"\\n\" ^ ind);\n      (if is_partial\n       then output_string out (\"match \" ^ s)\n       else output_string out (\"let a := \" ^ s));\n      List.iter (function\n        | AEXrexer e ->\n          output_string out (\"\\n     \" ^ ind)\n        (* output_rexpr_gallina out \"se\" (\"    \" ^ ind) e*)\n        | AEXlexpr e ->\n          output_string out (\"\\n     \" ^ ind)\n\t\t(* output_lexpr_get_gallina out obj \"se\" \"d\" (\"    \" ^ ind) e  *)\n      ) args;\n      (if is_partial\n       then output_string out (\" with\\n\" ^\n\t ind ^ \" | None => mzero\\n\" ^ ind ^ \" | Some a => \")\n       else output_string out \" in\\n\");\n      begin match dest with\n      | None -> output_string out \"@ret _ (@Monad_DS GlobalLayerSpec) _ a\"\n      | Some el -> output_string out \"put (\";\n                   (* output_lexpr_set_gallina out obj \"se\" \"a\" \"d\" (\"    \" ^ ind) el; *)\n                   output_string out \")\"\n      end;\n      if is_partial\n      then output_string out (\"\\n\" ^ ind ^ \" end)))\")\n      else output_string out (\"\\n\" ^ ind ^ \" )))\")\n *)\n  | _ -> coqgen_fatal_error __LOC__ \"gen_cmd\" \"todo\"\n\n\n(* Print MiniC expressions/statements, for debugging purposes. *)\n\n\nlet rec string_of_ctype = \n  let open Backend.Ctypes in\n  function\n  | Tvoid -> \"Tvoid\"\n  | Tint (_,_) -> \"TInt (SIZE,SIGNEDNESS)\"\n  | Tpointer _ -> \"Tpointer\"\n  | Tarray (t,z) -> (\"Tarray (\"^string_of_ctype t^\",\"^string_of_int(int_of_z z)^\")\")\n  | Thashmap (t1,t2) -> (\"Thashmap(\"^string_of_ctype t1^\",\"^string_of_ctype t2^\")\")\n  | Tfunction (ts,t) -> \"Tfunction (TYPES,TYPE)\"\n  | Tstruct (id,flds) -> \"Tstring (IDENT, FIELDS)\"\n  | Tunion  (id,flds) -> \"Tunion (IDENT, FIELDS)\"\n  | Tcomp_ptr id -> \"Tcomp_ptr ID\"\n\t\t    \nlet rec string_of_expr = function\n  | Econst_int (z, t) -> (\"Econst_int (\" ^ string_of_int (int_of_z z) ^ \",\"^string_of_ctype t^\")\")\n  | Econst_int256 (z, t) -> (\"Econst_int (\" ^ string_of_int (int_of_z z) ^ \",\"^string_of_ctype t^\")\")\n  | Evar (id,t) -> (\"Evar(\"^string_of_int (int_of_positive id)^\",\"^string_of_ctype t^\")\")\n  | Eglob (id,t) -> (\"Eglob(\"^string_of_int (int_of_positive id)^\",\"^string_of_ctype t^\")\")\n  | Etempvar (id,t) -> (\"Etempvar(\"^string_of_int (int_of_positive id)^\",\"^string_of_ctype t^\")\")\n  | Ederef (e,t) -> (\"Ederef(\" ^ string_of_expr e ^\",\"^ string_of_ctype t ^\")\")\n  | Eaddr (e,t) -> (\"Eaddr(\" ^ string_of_expr e ^\",\"^ string_of_ctype t ^\")\")\n  | Eunop (op,e,t) -> (\"Eunop(OP,\"^string_of_expr e^\",\"^string_of_ctype t ^\")\")\n  | Ebinop (op,e1,e2,t) -> (\"Ebinop(OP,\"^string_of_expr e1^\",\"^string_of_expr e2^\",\"^string_of_ctype t ^\")\")\n  | Efield (e, ident, t) ->(\"Efield(\"^string_of_expr e^\",\"^string_of_int (int_of_positive ident)^\",\"^string_of_ctype t^\")\")\n  | Eindex (e1,e2,t) -> (\"Eindex(\"^string_of_expr e1 ^\",\"^string_of_expr e2^\",\"^string_of_ctype t^\")\")\n  | Ecall0 (bt,t) -> \"Ecall0(BUILTIN,TYPE)\"\n  | Ecall1 (bt,e,t) -> \"Ecall0(BUILTIN,EXPR,TYPE)\"\n\nlet rec string_of_statement = function\n  | Sskip -> \"Sskip\"\n  | Sassign (e1,e2) -> (\"Sassign(\"^string_of_expr e1 ^\",\"^ string_of_expr e2 ^\")\")\n  | Sset (id,e) -> (\"Sset(\"^string_of_int(int_of_positive id)^\",\"^string_of_expr e^\")\")\n  | Scall (None, lab, exprs) -> \"Scall(None, LABEL, ARGS)\"\n  | Scall (Some id, lab, expr) -> \"Scall(Some ID, LABEL, ARGS)\"\n  | Ssequence (s1,s2) -> (\"Ssequence(\"^string_of_statement s1 ^\",\"^ string_of_statement s2^\")\")\n  | Sifthenelse (e,s1,s2) -> (\"Sifthenelse(\"^string_of_expr e^\",\"^string_of_statement s1^\",\"^string_of_statement s2 ^\")\")\n  | Sloop s -> \"(Sloop \"^string_of_statement s^\")\"\n  | Sbreak -> \"Sbreak\"\n  | Sreturn None -> \"Sreturn None\"\n  | Sreturn (Some id) -> (\"Sreturn Some(\"^string_of_int (int_of_positive id)^\")\")\t\t      \n  | Stransfer (e1,e2) -> \"Stransfer (\"^string_of_expr e1 ^\",\"^ string_of_expr e2 ^\")\"\n  | Scallmethod (e1,ids,z,e,eo,es) -> \"Scallmethod TODO\"\n  | Slog _ -> \"Slog TODO\" \n  | Srevert -> \"Srevert\"\n\nlet rec string_of_params = \n  let open Backend.Datatypes in\n  function\n  | Coq_cons (Coq_pair(id, t) , params) -> \"(\"^string_of_int (int_of_positive id) ^\",\"^string_of_ctype t ^\")::\"^ string_of_params params\n  | Coq_nil -> \"nil\"\n\t\t \nlet string_of_methoddef md =\n   \"{ fn_return = \" ^ string_of_ctype md.fn_return ^ \";\\n\"\n  ^\"  fn_params = \" ^ string_of_params md.fn_params ^\";\\n\"\n  ^\"  fn_temps =  \" ^ string_of_params md.fn_temps ^\";\\n\"\n  ^\"  fn_locals = \" ^ string_of_params md.fn_locals ^\";\\n\"\n  ^\"  fn_body = \" ^ string_of_statement md.fn_body ^\"\\n\"\n  ^\"}\"\n     \nlet method_classify mt =\n  (* is pure *) mt.aMethodKind = MKconst || mt.aMethodKind = MKconstghost,\n  (* has return *) mt.aMethodReturnType.aTypeDesc <> ATbuiltin Tunit\t\t\t    \n\nlet rec filter_map f ls =\n  match ls with\n  | [] -> []\n  | x::xs -> match f x with\n\t     | Some y -> y :: filter_map f xs\n\t     | None -> filter_map f xs\n\nlet gen_object_fields o =\n  let open Backend.Datatypes in\n  coqlist_of_list\n    (filter_map (fun f ->\n\t\t if not f.aObjectFieldIsLogical then\n\t\t   Some (Coq_pair (backend_ident_of_globvar o.aObjectName f.aObjectFieldName,\n\t\t\t\t   gen_ctype f.aObjectFieldType.aTypeCtype))\n\t\t else\n\t\t   None\t\t\t    \n\t\t) o.aObjectFields)\n\n\nlet gen_params (env : tmp_env_t) =\n  List.map (fun (_, (x, t)) ->\n      Backend.Datatypes.Coq_pair (backend_ident_of_tempvar x,\n                                  gen_ctype t.aTypeCtype))\n    (List.rev env)\n\nlet rec gen_tempenv = function\n  | [] -> []\n  | (id, typ) :: ts ->\n     Backend.Datatypes.Coq_pair (backend_ident_of_tempvar id, gen_ctype typ) :: gen_tempenv ts\n\nlet builtinBase_local_ident_start_constructor_temp = 111\n\n(* This function is the composition of \"output\" in coqgen.ml and synth_stmt_locals in SynthesisStmt.v. *)\nlet rec gen_cmd_locals c dest =\n  match c.aCmdDesc with\n  | ACskip -> []\n  | ACyield e -> []\n  | AClet (n, _i, c1, c2) ->\n     (n, c1.aCmdType.aTypeCtype) :: gen_cmd_locals c1 n @ gen_cmd_locals c2 dest\n  | ACsequence (c1, c2) ->\n     gen_cmd_locals c1 dest @ gen_cmd_locals c2 dest\n  | ACcall (s, f, es, _, _) -> []\n  | ACtransfer (_, _) -> []\n  | ACcond (e, c1, c2) ->\n     gen_cmd_locals c1 dest @ gen_cmd_locals c2 dest\n  | ACfor (n_iter, i, e1, n_end, e2, c, None) ->\n     (n_iter, ACtint)::(n_end,ACtint)::gen_cmd_locals c dest\n    | ACfor (n_iter, i, e_start, n_end, e_end, c0, Some cc) ->\n       coqgen_fatal_error __LOC__ \"gen_cmd_locals\" \"For-loop slices are not supported.\"\n    | ACmatch (e, clss) ->\n       List.concat\n\t (List.map (fun ((c, tmpenv, branch) : a_clause) ->\n\t\t    List.map (fun (_, (tmpid , tmp_ty)) -> (tmpid, tmp_ty.aTypeCtype))\n\t\t\t     tmpenv\n\t\t    @ gen_cmd_locals branch dest)\n\t    clss)\n\n    | ACemit _ -> []    \n    | ACload e -> []\n    | ACstore (el, er) -> []\n    | ACconstr (el, er) -> []\n    | ACfail -> []\n    | ACassert c -> []\n    | ACdeny c -> []\n    | ACghost c -> []\n    | ACfirst (n_iter, i, e_start, n_end, e_end, n_c, c, c_then, c_else, None) ->\n       (n_iter, ACtint)::(n_end, ACtint)::(n_c, ACtint)::\n\t gen_cmd_locals c dest @ gen_cmd_locals c_then dest @ gen_cmd_locals c_else dest\n    | ACfirst (n_iter, i, e_start, n_end, e_end, n_c, _, _, _, Some cc) ->\n       coqgen_fatal_error __LOC__ \"gen_cmd_locals\" \"todo: implement first\"\n    | ACfold (n_iter, i_iter, e_start, n_end, e_end, n_acc, i_acc, e_init, n_c, c, None) ->\n       coqgen_fatal_error __LOC__ \"gen_cmd_locals\" \"todo: implement fold\"\n    | ACfold (n_iter, i_iter, e_start, n_end, e_end, n_acc, i_acc, e_init, n_c, _, Some cc) ->\n       coqgen_fatal_error __LOC__ \"gen_cmd_locals\" \"todo: implement fold\"\n    | ACexternal (dest, s, i, []) -> []\n    | ACexternal (dest, s, i, args) -> []\n\nlet builtinBase_local_ident_start = 10\n\t\t\t\t  \nlet gen_methoddef underlay objname m =\n  let open Backend.Datatypes in\n  let mt = m.aMethodType in\n  let dest = builtinBase_local_ident_start in  \n  let is_pure, has_return = method_classify mt in\n  let body = gen_cmd underlay objname is_pure m.aMethodBody dest in\n  let ret_type = gen_ctype mt.aMethodReturnType.aTypeCtype in\n  { fn_return = ret_type ;\n    fn_params = coqlist_of_list (gen_params m.aMethodParamEnv);\n    fn_temps  = coqlist_of_list (gen_tempenv ((dest,mt.aMethodReturnType.aTypeCtype)\n\t\t\t\t\t      :: gen_cmd_locals m.aMethodBody dest));\n    fn_locals = coqlist_of_list [];\n    fn_body =  (if has_return then\n                  Ssequence (body,\n\t\t\t                      (Sreturn (Some (positive_of_int dest))))\n\t\telse\n\t\t  Ssequence (body, Sreturn None))\n  }\n\nlet gen_method_stub underlay objname m =\n  let open Backend.Datatypes in\n  let mt = m.aMethodType in\n  let dest = builtinBase_local_ident_start in  \n  let ret_type = gen_ctype mt.aMethodReturnType.aTypeCtype in\n  let params =  gen_params m.aMethodParamEnv in\n  { fn_return = ret_type ;\n    fn_params = coqlist_of_list params ;\n    fn_temps  = coqlist_of_list [Coq_pair (positive_of_int dest, ret_type)] ;\n    fn_locals = coqlist_of_list [];\n    fn_body =  Ssequence (Scall (Some (positive_of_int dest),\n\t\t\t\t backend_ident_of_funcname objname m.aMethodName,\n\t\t\t\t (coqlist_of_list (List.map (fun (Coq_pair (x,t)) -> (Etempvar (x, t))) params))),\n\t\t\t    Sreturn (Some (positive_of_int dest)))\n  }\n\n(* An issue might arise if constructors have temps with the same idents but\n* different types. *)\nlet remove_duplicates tbl temps =\n  coqlist_of_list (List.filter\n    (fun pair ->\n      let ident = D.fst pair in\n      let found = Hashtbl.mem tbl ident in\n      Hashtbl.add tbl ident true;\n      not found\n    )\n    (caml_list temps)\n  )\n\nlet concat_constructor f g =\n  let tmp_tbl = Hashtbl.create 0 in\n    D.Some\n    { fn_return = f.fn_return;\n      fn_params = remove_duplicates tmp_tbl (D.app f.fn_params g.fn_params);\n      fn_temps = remove_duplicates tmp_tbl (D.app f.fn_temps g.fn_temps);\n      fn_locals = coqlist_of_list [];\n      fn_body = Ssequence (f.fn_body, g.fn_body);\n    }\n\n(* When there are multiple objects or multiple layers, we just concatenate together the code for all of them. The constructors from different layers also concatenate together and parameters in constructor is not work for now *)    \nlet concat_genv genv1 genv2 =\n  let open Backend.Datatypes in\n  let open Backend.Maps0 in\n  let open Backend.Globalenvs in\n  let open Backend.Globalenvs.Genv in\n  match genv1.genv_constructor, genv2.genv_constructor with \n  | None , Some(f) ->\n     { genv_vars = app genv1.genv_vars genv2.genv_vars;\n       genv_funcs = app genv1.genv_funcs genv2.genv_funcs;\n       genv_methods = app genv1.genv_methods genv2.genv_methods;\n       genv_defs = PTree.union genv1.genv_defs genv2.genv_defs;\n       genv_fundefs = PTree.union genv1.genv_fundefs genv2.genv_fundefs;\n       genv_methoddefs = IntMap.union genv1.genv_methoddefs genv2.genv_methoddefs;\n       genv_constructor = Some f }\n  | None , None ->\n     { genv_vars = app genv1.genv_vars genv2.genv_vars;\n       genv_funcs = app genv1.genv_funcs genv2.genv_funcs;\n       genv_methods = app genv1.genv_methods genv2.genv_methods;\n       genv_defs = PTree.union genv1.genv_defs genv2.genv_defs;\n       genv_fundefs = PTree.union genv1.genv_fundefs genv2.genv_fundefs;\n       genv_methoddefs = IntMap.union genv1.genv_methoddefs genv2.genv_methoddefs;\n       genv_constructor = None }\n  | Some(f), Some(g) -> \n     { genv_vars = app genv1.genv_vars genv2.genv_vars;\n       genv_funcs = app genv1.genv_funcs genv2.genv_funcs;\n       genv_methods = app genv1.genv_methods genv2.genv_methods;\n       genv_defs = PTree.union genv1.genv_defs genv2.genv_defs;\n       genv_fundefs = PTree.union genv1.genv_fundefs genv2.genv_fundefs;\n       genv_methoddefs = IntMap.union genv1.genv_methoddefs genv2.genv_methoddefs;\n       genv_constructor = concat_constructor f g }\n  | _,_ -> coqgen_fatal_error __LOC__ \"concat_genv\" \"internal error, nonempty constructor\"\n\nlet gen_object_methods gen_methodname gen_method underlay o =\n  let open Backend.Datatypes in\n  coqlist_of_list\n    (filter_map\n       (fun m ->\n\tif m.aMethodType.aMethodKind <> MKghost &&\n\t   m.aMethodType.aMethodKind <> MKconstghost &&\n     m.aMethodType.aMethodKind <> MKconstructor\n\tthen\n\t  begin\n\t  Some (Coq_pair (gen_methodname m,\n\t\t\t  gen_method underlay o.aObjectName m))\n\t  end\n\telse\n\t  None)\n       o.aObjectMethods) \n\nlet last_and_rest xs =\n  match List.rev xs with\n  | [] -> None\n  | y::ys -> Some (y, List.rev ys)\n\nlet gen_constructor gen_methoddef underlay o last_layer =\n  let open Backend.Datatypes in\n  let dest = builtinBase_local_ident_start_constructor_temp in\n  let constructor_list = (List.filter (fun x -> x.aMethodType.aMethodKind == MKconstructor ) o.aObjectMethods) in\n      let constructor_method = List.hd constructor_list in\n      let mt = constructor_method.aMethodType in\n      let is_pure, has_return = method_classify mt in\n      let body = gen_cmd underlay o.aObjectName is_pure constructor_method.aMethodBody dest in\n      let ret_type = gen_ctype mt.aMethodReturnType.aTypeCtype in\n      let params = gen_params constructor_method.aMethodParamEnv in\n      Some { fn_return = ret_type;\n             fn_params = coqlist_of_list params;\n             fn_temps  = coqlist_of_list (gen_tempenv ((dest,mt.aMethodReturnType.aTypeCtype)\n                          :: gen_cmd_locals constructor_method.aMethodBody dest));\n             fn_locals = coqlist_of_list [];\n             fn_body = if last_layer\n                       then Ssequence (body, (Sreturn None))\n                       else body\n        }\n\nlet make_methname m =\n  let i = coq_Z_of_int (function_selector_intval_of_method m) in\n  Hashtbl.add methods_tbl i m.aMethodName;\n  i\n\n(* For the last layer we have to make \"methods\" instead of functions,\n   and additionally we need to make \"shim methods\" for any functions\n   exported from lower layers, to let them be called externally. *)\nlet gen_object underlay last_layer o =\n  let open Backend.Datatypes in\n  let open Backend.Globalenvs.Genv in\n  let make_funcname m = backend_ident_of_funcname o.aObjectName m.aMethodName in\n  new_genv (gen_object_fields o)\n\t   (if not last_layer\n\t    then gen_object_methods make_funcname gen_methoddef underlay o\n\t    else Coq_nil)\n\t   (if last_layer\n\t    then gen_object_methods make_methname gen_methoddef underlay o\n\t    else Coq_nil)\n     (gen_constructor gen_methoddef underlay o last_layer)\n\nlet gen_object_stubs underlay o =\n  let open Backend.Datatypes in\n  let open Backend.Globalenvs.Genv in\n  new_genv Coq_nil\n\t   Coq_nil\n\t   (gen_object_methods make_methname gen_method_stub underlay o)\n\t    None\n\t   \nlet gen_layer last_layer l =\n  let underlay = l.aLayerDesc in\n  List.fold_left concat_genv\n\t\t Backend.Globalenvs.Genv.empty_genv\n\t\t ( (List.map (fun (_,o) -> gen_object underlay last_layer o)\n\t\t\t     l.aLayerFreshObjects)\n\t\t  @(List.map (fun (_,o) -> gen_object_stubs underlay o)\n\t\t\t     l.aLayerPassthroughObjects))\t\t  \n\nlet add_by_prefix tbl prefix of_int id n =\n  let len = String.length prefix in\n  let real_prefix = String.sub id 0 len in\n  if real_prefix = prefix then\n    Hashtbl.add tbl (of_int n) (String.sub id len ((String.length id)-len))\n\nlet gen_name_tables () =\n  let nt = Backend.NameTablesExt.empty_name_tables in\n  Hashtbl.iter (add_by_prefix nt.vars_tbl \"var_\" positive_of_int) ident_table;\n  Hashtbl.iter (add_by_prefix nt.funcs_tbl \"ident_\" positive_of_int) ident_table;\n  nt.methods_tbl <- methods_tbl;\n  nt\n\nlet minicgen ast =\n  match last_and_rest ast.aFileDeclarations with\n  | Some ((_, ADlayer last), rest) ->\n     let rest_compiled =\n       List.fold_left\n\t concat_genv  Backend.Globalenvs.Genv.empty_genv\n\t (filter_map\n\t    (function\n\t     (* todo, do we need to do anything for type declarations? *)\n\t     | i, ADtype t -> None\n             | i, ADevent _ -> None\n\t     | i, ADlayer l -> Some (gen_layer false l))\n\t    rest) in\n     let last_compiled = gen_layer true last in\n     gen_name_tables (), concat_genv rest_compiled last_compiled\n  | _ -> coqgen_warning \"Last declaration is not a layer, no code will be generated\";\n\t Backend.NameTablesExt.empty_name_tables, Backend.Globalenvs.Genv.empty_genv\n\nlet concat_constructor md1 md2 =\n  let args, argtypes = (match md1.aMethodType.aMethodArgumentTypes, md2.aMethodType.aMethodArgumentTypes with\n          | [t], ts when t.aTypeDesc = ATbuiltin Tunit -> md2.aMethodArguments , ts\n          | ts, [t] when t.aTypeDesc = ATbuiltin Tunit -> md1.aMethodArguments , ts\n          | ts1, ts2 -> List.append md1.aMethodArguments md2.aMethodArguments,\n                        List.append ts1 ts2)\n  in\n  {\n    aMethodName = \"constructor\";\n    aMethodArguments = args;\n    aMethodType = {\n        aMethodArgumentTypes = argtypes;\n        aMethodReturnType = md2.aMethodType.aMethodReturnType;\n        aMethodKind = MKconstructor;\n                  };\n    aMethodSemantics = md2.aMethodSemantics;\n    aMethodBody = md2.aMethodBody;\n    aMethodParamEnv = md2.aMethodParamEnv;\n  }\n\nlet abigen ast =\n  let ets = List.concat (List.map (function\n                             | (_, ADevent et) -> [et]\n                             | _ -> [])\n                           ast.aFileDeclarations) in\n  let cts = List.concat (List.map (function \n                            | (_, ADlayer l) -> (List.concat((List.map (fun (_, obj) -> (List.filter (fun (md) -> md.aMethodType.aMethodKind == MKconstructor) obj.aObjectMethods)) l.aLayerFreshObjects)))\n                            | _ -> [])\n                          ast.aFileDeclarations) in\n    let constructor = List.fold_left (concat_constructor) (List.hd cts) (List.tl cts) in\n      match last_and_rest ast.aFileDeclarations with\n    | Some ((_, ADlayer last), rest) ->\n       Abi.json_of_layer last ets constructor\n    | _ -> \"[]\"\n"
  },
  {
    "path": "src/Edsger/parser.ml",
    "content": "\nmodule MenhirBasics = struct\n  \n  exception Error\n  \n  type token = \n    | XOR\n    | WITH\n    | UNEQUAL\n    | UINT of (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n  )\n    | TYPE\n    | TRUSTED\n    | TRANSFERETH\n    | TO\n    | THEN\n    | STRING of (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 24 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n  )\n    | STAR\n    | SLASH\n    | SIGNATURE\n    | SHR\n    | SHL\n    | SEMICOLON\n    | RPAREN\n    | REFINED\n    | RBRACKET\n    | RBRACE\n    | PLUS\n    | OBJECT\n    | MOD\n    | MINUS\n    | MATCH\n    | MAPPING\n    | LPAREN\n    | LOGICAL\n    | LIST\n    | LET\n    | LESSEQ\n    | LESS\n    | LBRACKET\n    | LBRACE\n    | LAYER\n    | INT of (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 54 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n  )\n    | INDEXED\n    | IN\n    | IF\n    | IDENT of (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 62 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n  )\n    | GREATEREQ\n    | GREATER\n    | GHOST\n    | FOR\n    | FOLD\n    | FIRST\n    | FAIL\n    | EXTERNAL\n    | EVENT\n    | EQUAL\n    | EOF\n    | END\n    | EMIT\n    | ELSE\n    | DOUBLEARROW\n    | DOT\n    | DO\n    | DISJUNCTION\n    | DENY\n    | CONSTRUCTOR\n    | CONST\n    | CONJUNCTION\n    | COMMA\n    | COLONLESS\n    | COLONGREATER\n    | COLONCOLON\n    | COLON\n    | CLONE\n    | BITNOT\n    | BITAND\n    | BEGIN\n    | BARBAR\n    | BAR\n    | BANG\n    | AT\n    | ASSIGN\n    | ASSERT\n    | ARROW\n    | ARRAY\n    | ADDRESS\n  \nend\n\ninclude MenhirBasics\n\nlet _eRR =\n  MenhirBasics.Error\n\ntype _menhir_env = {\n  _menhir_lexer: Lexing.lexbuf -> token;\n  _menhir_lexbuf: Lexing.lexbuf;\n  _menhir_token: token;\n  mutable _menhir_error: bool\n}\n\nand _menhir_state = \n  | MenhirState515\n  | MenhirState511\n  | MenhirState509\n  | MenhirState507\n  | MenhirState505\n  | MenhirState504\n  | MenhirState503\n  | MenhirState502\n  | MenhirState499\n  | MenhirState497\n  | MenhirState493\n  | MenhirState489\n  | MenhirState488\n  | MenhirState487\n  | MenhirState485\n  | MenhirState484\n  | MenhirState483\n  | MenhirState482\n  | MenhirState481\n  | MenhirState479\n  | MenhirState476\n  | MenhirState472\n  | MenhirState466\n  | MenhirState463\n  | MenhirState460\n  | MenhirState453\n  | MenhirState447\n  | MenhirState441\n  | MenhirState440\n  | MenhirState435\n  | MenhirState434\n  | MenhirState428\n  | MenhirState427\n  | MenhirState420\n  | MenhirState419\n  | MenhirState418\n  | MenhirState417\n  | MenhirState415\n  | MenhirState410\n  | MenhirState409\n  | MenhirState407\n  | MenhirState404\n  | MenhirState401\n  | MenhirState399\n  | MenhirState395\n  | MenhirState393\n  | MenhirState384\n  | MenhirState383\n  | MenhirState379\n  | MenhirState375\n  | MenhirState369\n  | MenhirState363\n  | MenhirState362\n  | MenhirState360\n  | MenhirState359\n  | MenhirState358\n  | MenhirState354\n  | MenhirState351\n  | MenhirState350\n  | MenhirState349\n  | MenhirState347\n  | MenhirState340\n  | MenhirState339\n  | MenhirState337\n  | MenhirState334\n  | MenhirState333\n  | MenhirState325\n  | MenhirState320\n  | MenhirState312\n  | MenhirState310\n  | MenhirState302\n  | MenhirState301\n  | MenhirState300\n  | MenhirState299\n  | MenhirState295\n  | MenhirState294\n  | MenhirState291\n  | MenhirState290\n  | MenhirState289\n  | MenhirState288\n  | MenhirState281\n  | MenhirState280\n  | MenhirState274\n  | MenhirState270\n  | MenhirState269\n  | MenhirState267\n  | MenhirState264\n  | MenhirState262\n  | MenhirState256\n  | MenhirState255\n  | MenhirState254\n  | MenhirState253\n  | MenhirState251\n  | MenhirState250\n  | MenhirState248\n  | MenhirState247\n  | MenhirState246\n  | MenhirState245\n  | MenhirState243\n  | MenhirState241\n  | MenhirState240\n  | MenhirState237\n  | MenhirState235\n  | MenhirState232\n  | MenhirState231\n  | MenhirState230\n  | MenhirState228\n  | MenhirState219\n  | MenhirState207\n  | MenhirState203\n  | MenhirState195\n  | MenhirState192\n  | MenhirState189\n  | MenhirState185\n  | MenhirState180\n  | MenhirState178\n  | MenhirState176\n  | MenhirState172\n  | MenhirState164\n  | MenhirState162\n  | MenhirState161\n  | MenhirState160\n  | MenhirState158\n  | MenhirState156\n  | MenhirState154\n  | MenhirState152\n  | MenhirState151\n  | MenhirState149\n  | MenhirState148\n  | MenhirState146\n  | MenhirState145\n  | MenhirState142\n  | MenhirState140\n  | MenhirState139\n  | MenhirState137\n  | MenhirState136\n  | MenhirState134\n  | MenhirState132\n  | MenhirState129\n  | MenhirState127\n  | MenhirState126\n  | MenhirState123\n  | MenhirState122\n  | MenhirState120\n  | MenhirState119\n  | MenhirState116\n  | MenhirState113\n  | MenhirState111\n  | MenhirState109\n  | MenhirState107\n  | MenhirState98\n  | MenhirState92\n  | MenhirState91\n  | MenhirState85\n  | MenhirState83\n  | MenhirState81\n  | MenhirState79\n  | MenhirState77\n  | MenhirState75\n  | MenhirState73\n  | MenhirState70\n  | MenhirState68\n  | MenhirState66\n  | MenhirState64\n  | MenhirState62\n  | MenhirState60\n  | MenhirState58\n  | MenhirState56\n  | MenhirState54\n  | MenhirState52\n  | MenhirState50\n  | MenhirState48\n  | MenhirState47\n  | MenhirState45\n  | MenhirState37\n  | MenhirState36\n  | MenhirState33\n  | MenhirState31\n  | MenhirState29\n  | MenhirState28\n  | MenhirState27\n  | MenhirState24\n  | MenhirState14\n  | MenhirState11\n  | MenhirState8\n  | MenhirState6\n  | MenhirState4\n\n# 2 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n  \nopen Astcommon\nopen Parsetree\n\nlet make_loc (startpos, endpos) = {\n  loc_start = startpos;\n  loc_end = endpos;\n}\n\nlet mkexp_ ~loc d =  \n  { p_expression_desc = d; p_expression_loc = make_loc loc; }\nlet mkcmd ~loc d = \n  { p_command_desc = d; p_command_loc = make_loc loc; }\nlet mkfotyp ~loc d = \n  { p_type_FO_desc = d; p_type_FO_loc = make_loc loc; }\nlet mksig ~loc d = \n  { p_signature_desc = d; p_signature_loc = make_loc loc; }\nlet mklayersign ~loc d = \n  { p_layer_signature_desc = d; p_layer_signature_loc = make_loc loc; }\nlet mkobjtyp ~loc objb objs = \n  { pObjectBase = objb; pObjectSignature = objs; pObjectTypLoc = make_loc loc; }\nlet mklayertyp ~loc plbase plsig = \n  { pLayerBase = plbase; pLayerSignature = plsig; pLayerLoc = make_loc loc }\nlet mkmethdef ~loc args rtyp kind body annos =\n  { pMethodArguments = args; pMethodReturnType = rtyp; pMethodKind = kind; pMethodBody = body; pMethodAnnotations = annos; pMethodLoc = make_loc loc; }\nlet mkobjconstr ~loc objtyp objk objfs objms = \n  { pObjType = objtyp; pObjKind = objk; pObjFields = objfs; pObjMethods = objms; pObjLoc = make_loc loc; }\nlet mkobj ~loc d = \n  { p_object_desc = d; p_object_loc = make_loc loc; }\nlet mkobjdef ~loc objtyp obj = \n  { pObjectType = objtyp; pObjectDesc = obj; pObjectLoc = make_loc loc; }\nlet mkobjinst ~loc objinstdesc =\n  { p_object_inst_desc = objinstdesc; p_object_inst_loc = make_loc loc; }\nlet mkprop ~loc d = \n  { p_proposition_desc = d; p_proposition_loc = make_loc loc;}\nlet mklayer ~loc d = \n  { p_layer_desc = d; p_layer_loc = make_loc loc; }\nlet mklayerdef ~loc layer invar annos = \n  { pLayerDesc = layer; pLayerInvariant = invar; pLayerAnnotations = annos; pLayerLoc = make_loc loc}\nlet mkdecl ~loc d = \n  { p_declaration_desc = d; p_declaration_loc = make_loc loc; }\n\n(* let mkanno ~loc d =\n  { p_annotation_desc = d; p_annotation_loc = make_loc loc; } *)\n\nlet builtin_type_table =\n  let tbl = Hashtbl.create 20 in\n  List.iter (fun (key, data) -> Hashtbl.add tbl key data) [\n    \"unit\", (PTbuiltin Tunit);\n    \"bool\", (PTbuiltin Tbool);\n    \"int\", (PTbuiltin Tint);\n    \"uint\", (PTbuiltin Tuint);\n    \"hashvalue\", (PTbuiltin Thashvalue);\n    \"globalpointer\", (PTbuiltin Tglobalpointer) (*;\n    \"val\", PTbuiltin Tval;\n    \"flatmem\", PTbuiltin Tflatmem*)\n  ];\n  tbl\n\nlet constant_table =\n  let tbl = Hashtbl.create 20 in\n  List.iter (fun (key, data) -> Hashtbl.add tbl key data) [\n    \"true\", PEconstant (CONbool true);\n    \"false\", PEconstant (CONbool false);\n    \"null_hash\", PEconstant CONhashvalue;\n    (*\"array_init\", PEconstant CONarray_init;*)\n    \"GLOBUndef\", PEconstant CONglobalpointer_undef (*;\n    \"Vundef\", PEconstant CONval_undef;\n    \"flatmem_empty\", PEconstant CONflatmem_empty*)\n  ];\n  tbl\n\nlet either_to_double_list = function\n  | `Left a -> [a], []\n  | `Right b -> [], [b]\nlet cons_either_double_list e (l1, l2) = match e with\n  | `Left a -> a :: l1, l2\n  | `Right b -> l1, b :: l2\n\n# 388 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n\nlet rec _menhir_goto_match_clauses : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_match_clauses -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : (((('freshtv2045 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * _menhir_state * 'tv_opt_bar) * _menhir_state * 'tv_match_clauses) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | BAR ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv2037 * _menhir_state * 'tv_match_clauses) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run195 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState207 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACKET ->\n            _menhir_run114 _menhir_env (Obj.magic _menhir_stack) MenhirState207 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState207) : 'freshtv2038)\n    | END ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv2041 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * _menhir_state * 'tv_opt_bar) * _menhir_state * 'tv_match_clauses) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv2039 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * _menhir_state * 'tv_opt_bar) * _menhir_state * 'tv_match_clauses) = Obj.magic _menhir_stack in\n        let (_endpos__6_ : Lexing.position) = _endpos in\n        ((let ((((_menhir_stack, _menhir_s, _startpos__1_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_), _, (_4 : 'tv_opt_bar)), _, (_5 : 'tv_match_clauses)) = _menhir_stack in\n        let _6 = () in\n        let _3 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__6_ in\n        let _v : 'tv_command_core = let _endpos = _endpos__6_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 553 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                       ( (PCmatch (mkexp_ ~loc:_sloc e.p_expression_desc, List.rev _5)) )\n# 432 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv2040)) : 'freshtv2042)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv2043 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * _menhir_state * 'tv_opt_bar) * _menhir_state * 'tv_match_clauses) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv2044)) : 'freshtv2046)\n\nand _menhir_goto_match_clause : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_match_clause -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    match _menhir_s with\n    | MenhirState207 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv2031 * _menhir_state * 'tv_match_clauses)) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_match_clause) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv2029 * _menhir_state * 'tv_match_clauses)) = Obj.magic _menhir_stack in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_3 : 'tv_match_clause) : 'tv_match_clause) = _v in\n        ((let (_menhir_stack, _menhir_s, (_1 : 'tv_match_clauses)) = _menhir_stack in\n        let _2 = () in\n        let _v : 'tv_match_clauses = \n# 610 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                   ( _3 :: _1 )\n# 460 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_match_clauses _menhir_env _menhir_stack _menhir_s _v) : 'freshtv2030)) : 'freshtv2032)\n    | MenhirState113 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv2035) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_match_clause) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv2033) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let ((_1 : 'tv_match_clause) : 'tv_match_clause) = _v in\n        ((let _v : 'tv_match_clauses = \n# 609 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                  ( [_1] )\n# 475 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_match_clauses _menhir_env _menhir_stack _menhir_s _v) : 'freshtv2034)) : 'freshtv2036)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_proposition : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_proposition -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v ->\n    match _menhir_s with\n    | MenhirState395 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv2023 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_proposition) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv2021 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        let (_endpos__5_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_5 : 'tv_proposition) : 'tv_proposition) = _v in\n        ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_layer_expression), _startpos__1_), _endpos__3_, _, (_3 : 'tv_layer_expression), _startpos__3_) = _menhir_stack in\n        let _4 = () in\n        let _2 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__5_ in\n        let _v : 'tv_layer_expression = let _endpos = _endpos__5_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 770 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      (  mklayer ~loc:_sloc (PLrefine (_1, _3, _5)) )\n# 506 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv2022)) : 'freshtv2024)\n    | MenhirState404 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv2027 * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_proposition) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv2025 * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_2 : 'tv_proposition) : 'tv_proposition) = _v in\n        ((let (_menhir_stack, _startpos__1_) = _menhir_stack in\n        let _1 = () in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_layer_invariant_annotation = \n# 759 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                        ( Some _2 )\n# 526 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_invariant_annotation _menhir_env _menhir_stack _endpos _v) : 'freshtv2026)) : 'freshtv2028)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_commands : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_commands -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState161 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1983 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | END ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1979 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1977 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n            let (_endpos__3_ : Lexing.position) = _endpos in\n            ((let ((_menhir_stack, _menhir_s, _startpos__1_), _endpos_c_, _, (c : 'tv_commands)) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__3_ in\n            let _v : 'tv_command_core = \n# 552 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                          ( c.p_command_desc )\n# 558 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1978)) : 'freshtv1980)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1981 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1982)) : 'freshtv1984)\n    | MenhirState172 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1987 * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1985 * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_command), _startpos__1_), _endpos__3_, _, (_3 : 'tv_commands)) = _menhir_stack in\n        let _2 = () in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_commands = let _endpos = _endpos__3_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 600 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                ( mkcmd ~loc:_sloc (PCsequence (_1, _3)) )\n# 582 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_commands _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1986)) : 'freshtv1988)\n    | MenhirState126 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv1993 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 590 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv1989 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 600 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState185 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState185 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run124 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState185 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState185 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState185) : 'freshtv1990)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv1991 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 654 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1992)) : 'freshtv1994)\n    | MenhirState119 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv1999 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 663 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv1995 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 673 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState192 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState192 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState192 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState192 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState192) : 'freshtv1996)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv1997 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 733 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1998)) : 'freshtv2000)\n    | MenhirState192 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv2003 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 742 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv2001 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 748 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let ((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, (_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 753 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__2_), _endpos__4_, _, (_4 : 'tv_commands)), _endpos__6_, _, (_6 : 'tv_commands)) = _menhir_stack in\n        let _5 = () in\n        let _3 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__6_ in\n        let _v : 'tv_command = let _endpos = _endpos__6_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 588 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                          ( mkcmd ~loc:_sloc (PClet (_2, _4, _6)) )\n# 766 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv2002)) : 'freshtv2004)\n    | MenhirState116 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv2007 * _menhir_state * Lexing.position) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv2005 * _menhir_state * Lexing.position) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let (((_menhir_stack, _menhir_s, _startpos__1_), _endpos__2_), _endpos__4_, _, (_4 : 'tv_commands)) = _menhir_stack in\n        let _3 = () in\n        let _2 = () in\n        let _1 = () in\n        let _v : 'tv_match_clause = \n# 618 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( (\"NIL\", [], _4) )\n# 781 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_match_clause _menhir_env _menhir_stack _menhir_s _v) : 'freshtv2006)) : 'freshtv2008)\n    | MenhirState203 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv2011 * _menhir_state * 'tv_match_pattern)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv2009 * _menhir_state * 'tv_match_pattern)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, (_1 : 'tv_match_pattern)), _endpos__3_, _, (_3 : 'tv_commands)) = _menhir_stack in\n        let _2 = () in\n        let _v : 'tv_match_clause = \n# 614 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( let (cnstr, params) = _1 in\n        (cnstr , params, _3) )\n# 795 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_match_clause _menhir_env _menhir_stack _menhir_s _v) : 'freshtv2010)) : 'freshtv2012)\n    | MenhirState499 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv2015 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv2013 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let ((((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_annotations)), _), _, (_4 : 'tv_method_param)), _, (_5 : 'tv_opt_type_annotation)), _endpos__7_, _, (_7 : 'tv_commands)) = _menhir_stack in\n        let _6 = () in\n        let _3 = () in\n        let _1 = () in\n        let _v : 'tv_object_field_or_method = let _endpos = _endpos__7_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 709 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( `Right (\"constructor\", { pMethodArguments = _4;\n                      pMethodReturnType = _5;\n                      pMethodKind = MKconstructor;\n                      pMethodBody = _7;\n                      pMethodAnnotations = _2;\n                      pMethodLoc = (make_loc _sloc) }) )\n# 818 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_field_or_method _menhir_env _menhir_stack _menhir_s _v) : 'freshtv2014)) : 'freshtv2016)\n    | MenhirState509 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv2019 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 826 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv2017 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 832 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation)) * Lexing.position * _menhir_state * 'tv_commands) = Obj.magic _menhir_stack in\n        ((let (((((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_annotations)), _, (_3 : 'tv_method_kind)), _endpos__4_, (_4 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 837 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__4_), _, (_5 : 'tv_method_param)), _, (_6 : 'tv_opt_type_annotation)), _endpos__8_, _, (_8 : 'tv_commands)) = _menhir_stack in\n        let _7 = () in\n        let _1 = () in\n        let _v : 'tv_object_field_or_method = let _endpos = _endpos__8_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 701 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( `Right (_4, { pMethodArguments = _5;\n                      pMethodReturnType = _6;\n                      pMethodKind = _3;\n                      pMethodBody = _8;\n                      pMethodAnnotations = _2;\n                      pMethodLoc = (make_loc _sloc) }) )\n# 852 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_field_or_method _menhir_env _menhir_stack _menhir_s _v) : 'freshtv2018)) : 'freshtv2020)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_run201 : _menhir_env -> 'ttv_tail * _menhir_state * 'tv_idents -> Lexing.position -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 861 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1975 * _menhir_state * 'tv_idents) = Obj.magic _menhir_stack in\n    let (_endpos__2_ : Lexing.position) = _endpos in\n    let ((_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 871 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 875 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__2_ : Lexing.position) = _startpos in\n    ((let (_menhir_stack, _menhir_s, (_1 : 'tv_idents)) = _menhir_stack in\n    let _v : 'tv_idents = \n# 317 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                  ( _2 :: _1 )\n# 882 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_idents _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1976)\n\nand _menhir_goto_object_fields_and_methods : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_object_fields_and_methods -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ((((((('freshtv1973 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 893 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) * _menhir_state * 'tv_object_fields_and_methods) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LET ->\n        _menhir_run482 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState511 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | RBRACE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv1971 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 905 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) * _menhir_state * 'tv_object_fields_and_methods) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_menhir_s : _menhir_state) = MenhirState511 in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv1969 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 914 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) * _menhir_state * 'tv_object_fields_and_methods) = Obj.magic _menhir_stack in\n        let (_endpos__9_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        ((let (((((((_menhir_stack, _endpos__1_, (_1 : 'tv_opt_logical_or_trusted), _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 921 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__3_), (_4 : 'tv_base_layer_signature)), _endpos__6_, _, (_6 : 'tv_object_signature_expr), _startpos__6_), _startpos__7_), _, (_8 : 'tv_object_fields_and_methods)) = _menhir_stack in\n        let _9 = () in\n        let _7 = () in\n        let _5 = () in\n        let _2 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__9_ in\n        let _v : 'tv_object_declaration = let _endpos = _endpos__9_ in\n        let _symbolstartpos = if _startpos__1_ != _endpos__1_ then\n          _startpos__1_\n        else\n          _startpos__2_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 639 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( let fields_rev, methods_rev = _8 in\n        let obj_type = { pObjectBase = _4; pObjectSignature = _6; pObjectTypLoc = (make_loc _sloc) } in\n        _3, {\n          pObjectType = None;\n          pObjectDesc = mkobj ~loc:_sloc (POconstr {\n            pObjType = obj_type;\n            pObjKind = _1;\n            pObjFields = List.rev fields_rev;\n            pObjMethods = List.rev methods_rev;\n            pObjLoc = (make_loc _sloc) });\n          pObjectLoc = (make_loc _sloc) }\n      )\n# 949 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_declaration _menhir_env _menhir_stack _endpos _v _startpos) : 'freshtv1970)) : 'freshtv1972)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState511) : 'freshtv1974)\n\nand _menhir_goto_idents_semi_sep : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_idents_semi_sep -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1967 * _menhir_state * 'tv_idents_semi_sep) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | SEMICOLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1965 * _menhir_state * 'tv_idents_semi_sep) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = MenhirState312 in\n        ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1961 * _menhir_state * 'tv_idents_semi_sep) * _menhir_state) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 980 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1959 * _menhir_state * 'tv_idents_semi_sep) * _menhir_state) = Obj.magic _menhir_stack in\n            let (_endpos__3_ : Lexing.position) = _endpos in\n            let ((_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 990 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 994 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos__3_ : Lexing.position) = _startpos in\n            ((let ((_menhir_stack, _menhir_s, (_1 : 'tv_idents_semi_sep)), _) = _menhir_stack in\n            let _2 = () in\n            let _v : 'tv_idents_semi_sep = \n# 392 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                     ( _3 :: _1 )\n# 1002 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_idents_semi_sep _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1960)) : 'freshtv1962)\n        | RBRACE ->\n            _menhir_reduce217 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1963 * _menhir_state * 'tv_idents_semi_sep) * _menhir_state) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1964)) : 'freshtv1966)\n    | RBRACE ->\n        _menhir_reduce216 _menhir_env (Obj.magic _menhir_stack) MenhirState312\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState312) : 'freshtv1968)\n\nand _menhir_goto_layer_slots_plus : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_layer_slots_plus -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1957 * _menhir_state * 'tv_layer_slots_plus) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | SEMICOLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1955 * _menhir_state * 'tv_layer_slots_plus) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = MenhirState383 in\n        ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run361 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState384 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | RBRACE ->\n            _menhir_reduce217 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState384) : 'freshtv1956)\n    | RBRACE ->\n        _menhir_reduce216 _menhir_env (Obj.magic _menhir_stack) MenhirState383\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState383) : 'freshtv1958)\n\nand _menhir_goto_layer_invariant_annotation : _menhir_env -> 'ttv_tail -> Lexing.position -> 'tv_layer_invariant_annotation -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v ->\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ((((('freshtv1953 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1058 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * 'tv_layer_signature_annotation)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n    let (_endpos : Lexing.position) = _endpos in\n    let (_v : 'tv_layer_invariant_annotation) = _v in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ((((('freshtv1951 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1066 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * 'tv_layer_signature_annotation)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n    let (_endpos__7_ : Lexing.position) = _endpos in\n    let ((_7 : 'tv_layer_invariant_annotation) : 'tv_layer_invariant_annotation) = _v in\n    ((let (((((_menhir_stack, _startpos__1_), _endpos__2_, (_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1073 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )), _startpos__2_), _endpos__3_, _, (_3 : 'tv_annotations)), (_4 : 'tv_layer_signature_annotation)), _endpos__6_, _, (_6 : 'tv_layer_expression), _startpos__6_) = _menhir_stack in\n    let _5 = () in\n    let _1 = () in\n    let _startpos = _startpos__1_ in\n    let _endpos = _endpos__7_ in\n    let _v : 'tv_layer_declaration = let _endpos = _endpos__7_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 744 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _2, {  pLayerLoc = (make_loc _sloc); \n              pLayerAnnotations = _3;\n              pLayerInvariant = _7;\n              pLayerDesc = match _4 with\n                | None -> _6\n                | Some t -> mklayer ~loc:_sloc (PLrelax (_6, t));\n             }\n      )\n# 1092 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1949) = _menhir_stack in\n    let (_endpos : Lexing.position) = _endpos in\n    let (_v : 'tv_layer_declaration) = _v in\n    let (_startpos : Lexing.position) = _startpos in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1947) = Obj.magic _menhir_stack in\n    let (_endpos : Lexing.position) = _endpos in\n    let (_v : 'tv_layer_declaration) = _v in\n    let (_startpos : Lexing.position) = _startpos in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1945) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let ((_1 : 'tv_layer_declaration) : 'tv_layer_declaration) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _endpos = _endpos__1_ in\n    let _v : 'tv_declaration = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 229 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                       ( fst _1, mkdecl ~loc:_sloc (PDlayer (snd _1)) )\n# 1116 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv1946)) : 'freshtv1948)) : 'freshtv1950)) : 'freshtv1952)) : 'freshtv1954)\n\nand _menhir_run396 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1123 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1943) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1134 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1138 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _endpos = _endpos__1_ in\n    let _v : 'tv_proposition = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 822 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n            ( mkprop ~loc:_sloc (PPexternal _1) )\n# 1148 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_proposition _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1944)\n\nand _menhir_run397 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1155 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1941) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1166 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1170 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _endpos = _endpos__1_ in\n    let _v : 'tv_proposition = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 821 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( mkprop ~loc:_sloc (PPident _1) )\n# 1180 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_proposition _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1942)\n\nand _menhir_run393 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        _menhir_run390 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState393 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run360 _menhir_env (Obj.magic _menhir_stack) MenhirState393 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run359 _menhir_env (Obj.magic _menhir_stack) MenhirState393 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState393\n\nand _menhir_run399 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LBRACKET ->\n        _menhir_run350 _menhir_env (Obj.magic _menhir_stack) MenhirState399 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState399\n\nand _menhir_run401 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        _menhir_run390 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState401 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run360 _menhir_env (Obj.magic _menhir_stack) MenhirState401 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run359 _menhir_env (Obj.magic _menhir_stack) MenhirState401 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState401\n\nand _menhir_reduce218 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _v : 'tv_opt_type_annotation = \n# 730 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( None )\n# 1233 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_opt_type_annotation _menhir_env _menhir_stack _menhir_s _v\n\nand _menhir_run488 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _menhir_stack = (_menhir_stack, _menhir_s) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState488 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | ARRAY ->\n        _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState488 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState488 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LIST ->\n        _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState488 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState488 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MAPPING ->\n        _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState488 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState488\n\nand _menhir_goto_layer_slots : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_layer_slots -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv1939 * _menhir_state * Lexing.position) * _menhir_state * 'tv_layer_slots) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | RBRACE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1935 * _menhir_state * Lexing.position) * _menhir_state * 'tv_layer_slots) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1933 * _menhir_state * Lexing.position) * _menhir_state * 'tv_layer_slots) = Obj.magic _menhir_stack in\n        let (_endpos__3_ : Lexing.position) = _endpos in\n        ((let ((_menhir_stack, _menhir_s, _startpos__1_), _, (_2 : 'tv_layer_slots)) = _menhir_stack in\n        let _3 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_layer_expression = let _endpos = _endpos__3_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 764 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      (  mklayer ~loc:_sloc (PLconstr (List.rev _2)) )\n# 1287 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1934)) : 'freshtv1936)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1937 * _menhir_state * Lexing.position) * _menhir_state * 'tv_layer_slots) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1938)) : 'freshtv1940)\n\nand _menhir_run361 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1301 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | EQUAL ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1929 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1313 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1927) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_menhir_s : _menhir_state) = MenhirState362 in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | LPAREN ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv1923 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_stack = (_menhir_stack, _startpos) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | INT _v ->\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : ('freshtv1909 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                    let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                    let (_v : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1343 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                    )) = _v in\n                    let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                    ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n                    let _menhir_env = _menhir_discard _menhir_env in\n                    let _tok = _menhir_env._menhir_token in\n                    match _tok with\n                    | RPAREN ->\n                        let (_menhir_env : _menhir_env) = _menhir_env in\n                        let (_menhir_stack : (('freshtv1905 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1355 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                        ) * Lexing.position) = Obj.magic _menhir_stack in\n                        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                        ((let _menhir_stack = (_menhir_stack, _endpos) in\n                        let _menhir_env = _menhir_discard _menhir_env in\n                        let _tok = _menhir_env._menhir_token in\n                        match _tok with\n                        | COLONLESS ->\n                            let (_menhir_env : _menhir_env) = _menhir_env in\n                            let (_menhir_stack : ((('freshtv1901 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1367 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                            ) * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                            ((let _menhir_env = _menhir_discard _menhir_env in\n                            let _tok = _menhir_env._menhir_token in\n                            match _tok with\n                            | CLONE ->\n                                _menhir_run365 _menhir_env (Obj.magic _menhir_stack) MenhirState379 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                            | IDENT _v ->\n                                _menhir_run364 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState379 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                            | LPAREN ->\n                                _menhir_run363 _menhir_env (Obj.magic _menhir_stack) MenhirState379 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                            | _ ->\n                                assert (not _menhir_env._menhir_error);\n                                _menhir_env._menhir_error <- true;\n                                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState379) : 'freshtv1902)\n                        | _ ->\n                            assert (not _menhir_env._menhir_error);\n                            _menhir_env._menhir_error <- true;\n                            let (_menhir_env : _menhir_env) = _menhir_env in\n                            let (_menhir_stack : ((('freshtv1903 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1389 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                            ) * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                            ((let ((((_menhir_stack, _, _menhir_s, _), _), _, _, _), _) = _menhir_stack in\n                            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1904)) : 'freshtv1906)\n                    | _ ->\n                        assert (not _menhir_env._menhir_error);\n                        _menhir_env._menhir_error <- true;\n                        let (_menhir_env : _menhir_env) = _menhir_env in\n                        let (_menhir_stack : (('freshtv1907 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1400 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                        ) * Lexing.position) = Obj.magic _menhir_stack in\n                        ((let (((_menhir_stack, _, _menhir_s, _), _), _, _, _) = _menhir_stack in\n                        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1908)) : 'freshtv1910)\n                | UINT _v ->\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : ('freshtv1919 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                    let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                    let (_v : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1411 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                    )) = _v in\n                    let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                    ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n                    let _menhir_env = _menhir_discard _menhir_env in\n                    let _tok = _menhir_env._menhir_token in\n                    match _tok with\n                    | RPAREN ->\n                        let (_menhir_env : _menhir_env) = _menhir_env in\n                        let (_menhir_stack : (('freshtv1915 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1423 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                        ) * Lexing.position) = Obj.magic _menhir_stack in\n                        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                        ((let _menhir_stack = (_menhir_stack, _endpos) in\n                        let _menhir_env = _menhir_discard _menhir_env in\n                        let _tok = _menhir_env._menhir_token in\n                        match _tok with\n                        | COLONLESS ->\n                            let (_menhir_env : _menhir_env) = _menhir_env in\n                            let (_menhir_stack : ((('freshtv1911 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1435 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                            ) * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                            ((let _menhir_env = _menhir_discard _menhir_env in\n                            let _tok = _menhir_env._menhir_token in\n                            match _tok with\n                            | CLONE ->\n                                _menhir_run365 _menhir_env (Obj.magic _menhir_stack) MenhirState375 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                            | IDENT _v ->\n                                _menhir_run364 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState375 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                            | LPAREN ->\n                                _menhir_run363 _menhir_env (Obj.magic _menhir_stack) MenhirState375 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                            | _ ->\n                                assert (not _menhir_env._menhir_error);\n                                _menhir_env._menhir_error <- true;\n                                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState375) : 'freshtv1912)\n                        | _ ->\n                            assert (not _menhir_env._menhir_error);\n                            _menhir_env._menhir_error <- true;\n                            let (_menhir_env : _menhir_env) = _menhir_env in\n                            let (_menhir_stack : ((('freshtv1913 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1457 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                            ) * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                            ((let ((((_menhir_stack, _, _menhir_s, _), _), _, _, _), _) = _menhir_stack in\n                            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1914)) : 'freshtv1916)\n                    | _ ->\n                        assert (not _menhir_env._menhir_error);\n                        _menhir_env._menhir_error <- true;\n                        let (_menhir_env : _menhir_env) = _menhir_env in\n                        let (_menhir_stack : (('freshtv1917 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 1468 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                        ) * Lexing.position) = Obj.magic _menhir_stack in\n                        ((let (((_menhir_stack, _, _menhir_s, _), _), _, _, _) = _menhir_stack in\n                        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1918)) : 'freshtv1920)\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : ('freshtv1921 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                    ((let ((_menhir_stack, _, _menhir_s, _), _) = _menhir_stack in\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1922)) : 'freshtv1924)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv1925 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1926)) : 'freshtv1928)\n        | CLONE ->\n            _menhir_run365 _menhir_env (Obj.magic _menhir_stack) MenhirState362 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run364 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState362 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run363 _menhir_env (Obj.magic _menhir_stack) MenhirState362 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState362) : 'freshtv1930)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1931 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1503 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1932)\n\nand _menhir_goto_command : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_command -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    match _menhir_s with\n    | MenhirState509 | MenhirState499 | MenhirState203 | MenhirState116 | MenhirState119 | MenhirState192 | MenhirState126 | MenhirState172 | MenhirState161 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1849 * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | SEMICOLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1843 * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState172 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState172 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState172 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState172 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState172) : 'freshtv1844)\n        | BAR | COMMA | ELSE | END | IN | LET | RBRACE | RBRACKET | RPAREN | THEN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1845 * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _endpos_c_, _menhir_s, (c : 'tv_command), _startpos_c_) = _menhir_stack in\n            let _endpos = _endpos_c_ in\n            let _v : 'tv_commands = let _endpos = _endpos_c_ in\n            let _symbolstartpos = _startpos_c_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 599 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                     ( mkcmd ~loc:_sloc c.p_command_desc )\n# 1583 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_commands _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1846)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1847 * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1848)) : 'freshtv1850)\n    | MenhirState156 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((('freshtv1859 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1598 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ELSE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((('freshtv1851 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1608 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState180 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState180 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState180 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState180 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState180) : 'freshtv1852)\n        | THEN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((('freshtv1853 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1666 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState176 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState176 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState176 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState176 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState176) : 'freshtv1854)\n        | BAR | COMMA | END | IN | LET | RBRACE | RBRACKET | RPAREN | SEMICOLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((('freshtv1855 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1724 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (((((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_annotations)), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1729 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__3_), _, (_4 : 'tv_eq_or_assign)), _endpos_e1_, _, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_), _endpos__9_, _, (_9 : 'tv_command), _startpos__9_) = _menhir_stack in\n            let _8 = () in\n            let _6 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__9_ in\n            let _v : 'tv_command_core = let _endpos = _endpos__9_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 566 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( PCfirst (_3, mkexp_ ~loc:_sloc e1.p_expression_desc, mkexp_ ~loc:_sloc e2.p_expression_desc, _9, None, None, _2) )\n# 1742 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1856)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((('freshtv1857 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1752 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1858)) : 'freshtv1860)\n    | MenhirState176 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((((('freshtv1867 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1761 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ELSE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((((('freshtv1861 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1771 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState178 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState178 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState178 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState178 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState178) : 'freshtv1862)\n        | BAR | COMMA | END | IN | LET | RBRACE | RBRACKET | RPAREN | SEMICOLON | THEN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((((('freshtv1863 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1829 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((((((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_annotations)), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1834 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__3_), _, (_4 : 'tv_eq_or_assign)), _endpos_e1_, _, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_), _endpos__9_, _, (_9 : 'tv_command), _startpos__9_), _endpos__11_, _, (_11 : 'tv_command), _startpos__11_) = _menhir_stack in\n            let _10 = () in\n            let _8 = () in\n            let _6 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__11_ in\n            let _v : 'tv_command_core = let _endpos = _endpos__11_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 572 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( PCfirst (_3,mkexp_ ~loc:_sloc e1.p_expression_desc, mkexp_ ~loc:_sloc e2.p_expression_desc, _9, Some _11, None, _2) )\n# 1848 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1864)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((((('freshtv1865 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1858 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1866)) : 'freshtv1868)\n    | MenhirState178 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((((((('freshtv1871 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1867 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((((((('freshtv1869 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1873 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (((((((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_annotations)), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1878 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__3_), _, (_4 : 'tv_eq_or_assign)), _endpos_e1_, _, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_), _endpos__9_, _, (_9 : 'tv_command), _startpos__9_), _endpos__11_, _, (_11 : 'tv_command), _startpos__11_), _endpos__13_, _, (_13 : 'tv_command), _startpos__13_) = _menhir_stack in\n        let _12 = () in\n        let _10 = () in\n        let _8 = () in\n        let _6 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__13_ in\n        let _v : 'tv_command_core = let _endpos = _endpos__13_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 575 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( PCfirst (_3, mkexp_ ~loc:_sloc e1.p_expression_desc, mkexp_ ~loc:_sloc e2.p_expression_desc, _9, Some _11, Some _13, _2) )\n# 1893 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1870)) : 'freshtv1872)\n    | MenhirState180 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((((('freshtv1875 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1901 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((((('freshtv1873 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1907 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((((((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_annotations)), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1912 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__3_), _, (_4 : 'tv_eq_or_assign)), _endpos_e1_, _, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_), _endpos__9_, _, (_9 : 'tv_command), _startpos__9_), _endpos__11_, _, (_11 : 'tv_command), _startpos__11_) = _menhir_stack in\n        let _10 = () in\n        let _8 = () in\n        let _6 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__11_ in\n        let _v : 'tv_command_core = let _endpos = _endpos__11_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 569 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( PCfirst (_3, mkexp_ ~loc:_sloc e1.p_expression_desc, mkexp_ ~loc:_sloc e2.p_expression_desc, _9, None, Some _11, _2) )\n# 1926 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1874)) : 'freshtv1876)\n    | MenhirState148 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((((((('freshtv1879 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1934 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1938 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((((((('freshtv1877 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1944 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1948 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((((((((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_annotations)), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1953 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__3_), _, (_4 : 'tv_eq_or_assign)), _endpos_e1_, _, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_), _endpos__9_, (_9 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1957 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__9_), _, (_10 : 'tv_eq_or_assign)), _endpos_e3_, _, (e3 : 'tv_expression), _startpos_e3_), _endpos__13_, _, (_13 : 'tv_command), _startpos__13_) = _menhir_stack in\n        let _12 = () in\n        let _8 = () in\n        let _6 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__13_ in\n        let _v : 'tv_command_core = let _endpos = _endpos__13_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 578 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( PCfold (_3, mkexp_ ~loc:_sloc e1.p_expression_desc, mkexp_ ~loc:_sloc e2.p_expression_desc, _9, mkexp_ ~loc:_sloc e3.p_expression_desc, _13, _2) )\n# 1971 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1878)) : 'freshtv1880)\n    | MenhirState136 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((('freshtv1883 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1979 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((('freshtv1881 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1985 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (((((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_annotations)), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 1990 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__3_), _, (_4 : 'tv_eq_or_assign)), _endpos_e1_, _, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_), _endpos__9_, _, (_9 : 'tv_command), _startpos__9_) = _menhir_stack in\n        let _8 = () in\n        let _6 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__9_ in\n        let _v : 'tv_command_core = let _endpos = _endpos__9_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 563 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( PCfor (_3, mkexp_ ~loc:_sloc e1.p_expression_desc, mkexp_ ~loc:_sloc e2.p_expression_desc, _9, _2) )\n# 2003 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1882)) : 'freshtv1884)\n    | MenhirState122 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv1891 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ELSE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv1885 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState189 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState189 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState189 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState189 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState189) : 'freshtv1886)\n        | BAR | COMMA | END | IN | LET | RBRACE | RBRACKET | RPAREN | SEMICOLON | THEN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv1887 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (((_menhir_stack, _menhir_s, _startpos__1_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_), _endpos__4_, _, (_4 : 'tv_command), _startpos__4_) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__4_ in\n            let _v : 'tv_command_core = let _endpos = _endpos__4_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 557 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                  ( PCcond (mkexp_ ~loc:_sloc e.p_expression_desc, _4, None) )\n# 2080 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1888)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv1889 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1890)) : 'freshtv1892)\n    | MenhirState189 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv1895 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv1893 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((((_menhir_stack, _menhir_s, _startpos__1_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_), _endpos__4_, _, (_4 : 'tv_command), _startpos__4_), _endpos__6_, _, (_6 : 'tv_command), _startpos__6_) = _menhir_stack in\n        let _5 = () in\n        let _3 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__6_ in\n        let _v : 'tv_command_core = let _endpos = _endpos__6_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 558 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                               ( PCcond (mkexp_ ~loc:_sloc e.p_expression_desc, _4, Some _6) )\n# 2107 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1894)) : 'freshtv1896)\n    | MenhirState24 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1899 * _menhir_state) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1897 * _menhir_state) * Lexing.position * _menhir_state * 'tv_command * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s), _endpos__2_, _, (_2 : 'tv_command), _startpos__2_) = _menhir_stack in\n        let _1 = () in\n        let _v : 'tv_annotation = \n# 800 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                   ( PAexpr _2 )\n# 2120 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_annotation _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1898)) : 'freshtv1900)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_annotated_command : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_annotated_command -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v ->\n    match _menhir_s with\n    | MenhirState162 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1829 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_annotated_command) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1827 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_2 : 'tv_annotated_command) : 'tv_annotated_command) = _v in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_command = let _endpos = _endpos__2_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 584 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                              ( mkcmd ~loc:_sloc (PCassert _2) )\n# 2150 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1828)) : 'freshtv1830)\n    | MenhirState160 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1833 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_annotated_command) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1831 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_2 : 'tv_annotated_command) : 'tv_annotated_command) = _v in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_command = let _endpos = _endpos__2_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 585 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                            ( mkcmd ~loc:_sloc (PCdeny _2) )\n# 2174 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1832)) : 'freshtv1834)\n    | MenhirState185 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv1837 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 2182 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands)) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_annotated_command) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv1835 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 2191 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands)) = Obj.magic _menhir_stack in\n        let (_endpos__6_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_6 : 'tv_annotated_command) : 'tv_annotated_command) = _v in\n        ((let (((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, (_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 2199 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__2_), _endpos__4_, _, (_4 : 'tv_commands)) = _menhir_stack in\n        let _5 = () in\n        let _3 = () in\n        let _1 = () in\n        let _endpos = _endpos__6_ in\n        let _v : 'tv_annotated_command = let _endpos = _endpos__6_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 592 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                   ( mkcmd ~loc:_sloc (PClet (_2, _4, _6)) )\n# 2211 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_annotated_command _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1836)) : 'freshtv1838)\n    | MenhirState123 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1841 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_annotated_command) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1839 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_2 : 'tv_annotated_command) : 'tv_annotated_command) = _v in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_command = let _endpos = _endpos__2_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 586 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                             ( mkcmd ~loc:_sloc (PCghost _2) )\n# 2235 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1840)) : 'freshtv1842)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_run219 : _menhir_env -> 'ttv_tail * _menhir_state * 'tv_annotations_plus -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run211 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState219 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | EQUAL ->\n        _menhir_run24 _menhir_env (Obj.magic _menhir_stack) MenhirState219\n    | IDENT _v ->\n        _menhir_run14 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState219 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run13 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState219 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | STRING _v ->\n        _menhir_run8 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState219 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run7 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState219 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState219\n\nand _menhir_goto_opt_semi : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_opt_semi -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState91 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1767 * _menhir_state * Lexing.position) * _menhir_state * 'tv_struct_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | RBRACE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1763 * _menhir_state * Lexing.position) * _menhir_state * 'tv_struct_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1761 * _menhir_state * Lexing.position) * _menhir_state * 'tv_struct_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            let (_endpos__4_ : Lexing.position) = _endpos in\n            ((let (((_menhir_stack, _menhir_s, _startpos__1_), _, (_2 : 'tv_struct_fields)), _, (_3 : 'tv_opt_semi)) = _menhir_stack in\n            let _4 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__4_ in\n            let _v : 'tv_expression = let _endpos = _endpos__4_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 534 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                          ( mkexp_ ~loc:_sloc (PEstruct (List.rev _2)) )\n# 2292 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1762)) : 'freshtv1764)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1765 * _menhir_state * Lexing.position) * _menhir_state * 'tv_struct_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1766)) : 'freshtv1768)\n    | MenhirState255 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1775 * _menhir_state * Lexing.position) * _menhir_state * 'tv_field_declarations) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | RBRACE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1771 * _menhir_state * Lexing.position) * _menhir_state * 'tv_field_declarations) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1769 * _menhir_state * Lexing.position) * _menhir_state * 'tv_field_declarations) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            let (_endpos__4_ : Lexing.position) = _endpos in\n            ((let (((_menhir_stack, _menhir_s, _startpos__1_), _, (_2 : 'tv_field_declarations)), _, (_3 : 'tv_opt_semi)) = _menhir_stack in\n            let _4 = () in\n            let _1 = () in\n            let _endpos = _endpos__4_ in\n            let _v : 'tv_type_definition = \n# 280 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                               ( PTsingleton (List.rev _2) )\n# 2323 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_type_definition _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1770)) : 'freshtv1772)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1773 * _menhir_state * Lexing.position) * _menhir_state * 'tv_field_declarations) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1774)) : 'freshtv1776)\n    | MenhirState294 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1783 * _menhir_state * Lexing.position) * _menhir_state * 'tv_object_signature_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | RBRACE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1779 * _menhir_state * Lexing.position) * _menhir_state * 'tv_object_signature_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1777 * _menhir_state * Lexing.position) * _menhir_state * 'tv_object_signature_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            let (_endpos__4_ : Lexing.position) = _endpos in\n            ((let (((_menhir_stack, _menhir_s, _startpos__1_), _, (_2 : 'tv_object_signature_fields)), _, (_3 : 'tv_opt_semi)) = _menhir_stack in\n            let _4 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__4_ in\n            let _v : 'tv_object_signature_expr = let _endpos = _endpos__4_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 361 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                    ( mksig ~loc:_sloc (PSconstr (List.rev _2)) )\n# 2358 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_signature_expr _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1778)) : 'freshtv1780)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1781 * _menhir_state * Lexing.position) * _menhir_state * 'tv_object_signature_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1782)) : 'freshtv1784)\n    | MenhirState312 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1813 * _menhir_state * 'tv_idents_semi_sep) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1811 * _menhir_state * 'tv_idents_semi_sep) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, (_1 : 'tv_idents_semi_sep)), _, (_2 : 'tv_opt_semi)) = _menhir_stack in\n        let _v : 'tv_idents_semi = \n# 388 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                              ( List.rev _1 )\n# 2377 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1809) = _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_idents_semi) = _v in\n        ((let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n        match _menhir_s with\n        | MenhirState310 ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1791 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n            ((assert (not _menhir_env._menhir_error);\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RBRACE ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (((('freshtv1787 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (((('freshtv1785 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n                let (_endpos__6_ : Lexing.position) = _endpos in\n                ((let ((((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_object_signature_expr), _startpos__1_), _endpos__3_, _startpos__3_), _startpos__4_), _, (_5 : 'tv_idents_semi)) = _menhir_stack in\n                let _6 = () in\n                let _4 = () in\n                let _3 = () in\n                let _2 = () in\n                let _startpos = _startpos__1_ in\n                let _endpos = _endpos__6_ in\n                let _v : 'tv_object_signature_expr = let _endpos = _endpos__6_ in\n                let _symbolstartpos = _startpos__1_ in\n                let _sloc = (_symbolstartpos, _endpos) in\n                \n# 365 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                                  ( mksig ~loc:_sloc (PSlogicize (_1, _5)) )\n# 2412 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_object_signature_expr _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1786)) : 'freshtv1788)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (((('freshtv1789 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1790)) : 'freshtv1792)\n        | MenhirState320 ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1799 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n            ((assert (not _menhir_env._menhir_error);\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RBRACE ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (((('freshtv1795 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (((('freshtv1793 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n                let (_endpos__6_ : Lexing.position) = _endpos in\n                ((let ((((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_object_signature_expr), _startpos__1_), _startpos__3_), _startpos__4_), _, (_5 : 'tv_idents_semi)) = _menhir_stack in\n                let _6 = () in\n                let _4 = () in\n                let _3 = () in\n                let _2 = () in\n                let _startpos = _startpos__1_ in\n                let _endpos = _endpos__6_ in\n                let _v : 'tv_object_signature_expr = let _endpos = _endpos__6_ in\n                let _symbolstartpos = _startpos__1_ in\n                let _sloc = (_symbolstartpos, _endpos) in\n                \n# 363 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                                ( mksig ~loc:_sloc (PSghostize (_1, _5)) )\n# 2449 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_object_signature_expr _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1794)) : 'freshtv1796)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (((('freshtv1797 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1798)) : 'freshtv1800)\n        | MenhirState325 ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv1807 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n            ((assert (not _menhir_env._menhir_error);\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RBRACE ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((('freshtv1803 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((('freshtv1801 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n                let (_endpos__5_ : Lexing.position) = _endpos in\n                ((let ((((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_object_signature_expr), _startpos__1_), _startpos__2_), _startpos__3_), _, (_4 : 'tv_idents_semi)) = _menhir_stack in\n                let _5 = () in\n                let _3 = () in\n                let _2 = () in\n                let _startpos = _startpos__1_ in\n                let _endpos = _endpos__5_ in\n                let _v : 'tv_object_signature_expr = let _endpos = _endpos__5_ in\n                let _symbolstartpos = _startpos__1_ in\n                let _sloc = (_symbolstartpos, _endpos) in\n                \n# 367 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                           ( mksig ~loc:_sloc (PSminus (_1, _4)) )\n# 2485 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_object_signature_expr _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1802)) : 'freshtv1804)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((('freshtv1805 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) * Lexing.position) * _menhir_state * 'tv_idents_semi) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1806)) : 'freshtv1808)\n        | _ ->\n            _menhir_fail ()) : 'freshtv1810)) : 'freshtv1812)) : 'freshtv1814)\n    | MenhirState339 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1821 * _menhir_state * Lexing.position) * _menhir_state * 'tv_layer_signature_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | RBRACE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1817 * _menhir_state * Lexing.position) * _menhir_state * 'tv_layer_signature_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1815 * _menhir_state * Lexing.position) * _menhir_state * 'tv_layer_signature_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            let (_endpos__4_ : Lexing.position) = _endpos in\n            ((let (((_menhir_stack, _menhir_s, _startpos__1_), _, (_2 : 'tv_layer_signature_fields)), _, (_3 : 'tv_opt_semi)) = _menhir_stack in\n            let _4 = () in\n            let _1 = () in\n            let _endpos = _endpos__4_ in\n            let _v : 'tv_layer_signature = let _endpos = _endpos__4_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 403 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                   ( mklayersign ~loc:_sloc (PLSconstr (List.rev _2)) )\n# 2521 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_layer_signature _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1816)) : 'freshtv1818)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1819 * _menhir_state * Lexing.position) * _menhir_state * 'tv_layer_signature_fields) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1820)) : 'freshtv1822)\n    | MenhirState383 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1825 * _menhir_state * 'tv_layer_slots_plus) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1823 * _menhir_state * 'tv_layer_slots_plus) * _menhir_state * 'tv_opt_semi) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, (_1 : 'tv_layer_slots_plus)), _, (_2 : 'tv_opt_semi)) = _menhir_stack in\n        let _v : 'tv_layer_slots = \n# 774 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                               ( _1 )\n# 2540 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_slots _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1824)) : 'freshtv1826)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_event_declarations : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_event_declarations -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : (('freshtv1759) * _menhir_state * 'tv_opt_bar) * Lexing.position * _menhir_state * 'tv_event_declarations) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | BAR ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1747 * Lexing.position * _menhir_state * 'tv_event_declarations) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run436 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState447 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState447) : 'freshtv1748)\n    | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1755) * _menhir_state * 'tv_opt_bar) * Lexing.position * _menhir_state * 'tv_event_declarations) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, (_2 : 'tv_opt_bar)), _endpos__3_, _, (_3 : 'tv_event_declarations)) = _menhir_stack in\n        let _1 = () in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_events_declaration = \n# 321 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                     ( _3 )\n# 2575 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1753) = _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_v : 'tv_events_declaration) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1751 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_v : 'tv_events_declaration) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1749 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let ((_2 : 'tv_events_declaration) : 'tv_events_declaration) = _v in\n        ((let (_menhir_stack, _endpos__1_, (_1 : 'tv_declarations)) = _menhir_stack in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_declarations = \n# 220 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                    ( _2 @ _1 )\n# 2594 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_declarations _menhir_env _menhir_stack _endpos _v) : 'freshtv1750)) : 'freshtv1752)) : 'freshtv1754)) : 'freshtv1756)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1757) * _menhir_state * 'tv_opt_bar) * Lexing.position * _menhir_state * 'tv_event_declarations) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1758)) : 'freshtv1760)\n\nand _menhir_goto_idents : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_idents -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState195 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1739 * _menhir_state * 'tv_idents) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run201 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | DOUBLEARROW ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1735 * _menhir_state * 'tv_idents) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, (_1 : 'tv_idents)) = _menhir_stack in\n            let _v : 'tv_match_pattern_tail = \n# 631 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( PPTother (List.rev _1) )\n# 2624 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_match_pattern_tail _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1736)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1737 * _menhir_state * 'tv_idents) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1738)) : 'freshtv1740)\n    | MenhirState267 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1745 * Lexing.position) * _menhir_state * 'tv_idents) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1741 * Lexing.position) * _menhir_state * 'tv_idents) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState269 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ARRAY ->\n                _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState269 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState269 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LIST ->\n                _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState269 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState269 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MAPPING ->\n                _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState269 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState269) : 'freshtv1742)\n        | IDENT _v ->\n            _menhir_run201 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1743 * Lexing.position) * _menhir_state * 'tv_idents) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1744)) : 'freshtv1746)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_object_field_or_method : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_object_field_or_method -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    match _menhir_s with\n    | MenhirState511 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1729 * _menhir_state * 'tv_object_fields_and_methods) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_object_field_or_method) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1727 * _menhir_state * 'tv_object_fields_and_methods) = Obj.magic _menhir_stack in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_2 : 'tv_object_field_or_method) : 'tv_object_field_or_method) = _v in\n        ((let (_menhir_stack, _menhir_s, (_1 : 'tv_object_fields_and_methods)) = _menhir_stack in\n        let _v : 'tv_object_fields_and_methods = \n# 680 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( cons_either_double_list _2 _1 )\n# 2690 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_fields_and_methods _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1728)) : 'freshtv1730)\n    | MenhirState481 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1733) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_object_field_or_method) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1731) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let ((_1 : 'tv_object_field_or_method) : 'tv_object_field_or_method) = _v in\n        ((let _v : 'tv_object_fields_and_methods = \n# 678 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( either_to_double_list _1 )\n# 2705 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_fields_and_methods _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1732)) : 'freshtv1734)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_separated_nonempty_list_COMMA_expression_ : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_separated_nonempty_list_COMMA_expression_ -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    match _menhir_s with\n    | MenhirState27 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1721) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_separated_nonempty_list_COMMA_expression_) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1719) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let ((x : 'tv_separated_nonempty_list_COMMA_expression_) : 'tv_separated_nonempty_list_COMMA_expression_) = _v in\n        ((let _v : 'tv_loption_separated_nonempty_list_COMMA_expression__ = \n# 144 \"<standard.mly>\"\n    ( x )\n# 2726 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_loption_separated_nonempty_list_COMMA_expression__ _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1720)) : 'freshtv1722)\n    | MenhirState107 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1725 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_separated_nonempty_list_COMMA_expression_) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1723 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((xs : 'tv_separated_nonempty_list_COMMA_expression_) : 'tv_separated_nonempty_list_COMMA_expression_) = _v in\n        ((let (_menhir_stack, _endpos_x_, _menhir_s, (x : 'tv_expression), _startpos_x_) = _menhir_stack in\n        let _2 = () in\n        let _v : 'tv_separated_nonempty_list_COMMA_expression_ = \n# 243 \"<standard.mly>\"\n    ( x :: xs )\n# 2743 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_separated_nonempty_list_COMMA_expression_ _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1724)) : 'freshtv1726)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_comma_sep_expressions : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_comma_sep_expressions -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState98 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1709 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_comma_sep_expressions) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1707 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_comma_sep_expressions) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_expression), _startpos__1_), _endpos__3_, _, (_3 : 'tv_comma_sep_expressions)) = _menhir_stack in\n        let _2 = () in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_comma_sep_expressions = let _endpos = _endpos__3_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 539 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                            (  mkexp_ ~loc:_sloc (PEpair (_1, _3)) )\n# 2767 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_comma_sep_expressions _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1708)) : 'freshtv1710)\n    | MenhirState29 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1717 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_comma_sep_expressions) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1713 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_comma_sep_expressions) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1711 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_comma_sep_expressions) = Obj.magic _menhir_stack in\n            let (_endpos__3_ : Lexing.position) = _endpos in\n            ((let ((_menhir_stack, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_comma_sep_expressions)) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__3_ in\n            let _v : 'tv_atom = \n# 499 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                         ( _2 )\n# 2792 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_atom _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1712)) : 'freshtv1714)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1715 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_comma_sep_expressions) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1716)) : 'freshtv1718)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_struct_fields : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_struct_fields -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv1705 * _menhir_state * Lexing.position) * _menhir_state * 'tv_struct_fields) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | SEMICOLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1703 * _menhir_state * 'tv_struct_fields) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = MenhirState91 in\n        ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run32 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState92 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | RBRACE ->\n            _menhir_reduce217 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState92) : 'freshtv1704)\n    | RBRACE ->\n        _menhir_reduce216 _menhir_env (Obj.magic _menhir_stack) MenhirState91\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState91) : 'freshtv1706)\n\nand _menhir_run50 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState50 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState50 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState50 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState50 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState50 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState50 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState50 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState50 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState50 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState50\n\nand _menhir_run68 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState68 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState68 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState68 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState68 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState68 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState68 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState68 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState68 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState68 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState68\n\nand _menhir_run52 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState52 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState52 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState52 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState52 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState52 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState52 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState52 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState52 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState52 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState52\n\nand _menhir_run54 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState54 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState54 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState54 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState54 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState54 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState54 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState54 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState54 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState54 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState54\n\nand _menhir_run56 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState56 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState56 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState56 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState56 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState56 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState56 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState56 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState56 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState56 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState56\n\nand _menhir_run64 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState64 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState64 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState64 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState64 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState64 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState64 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState64 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState64 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState64 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState64\n\nand _menhir_run58 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState58 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState58 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState58 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState58 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState58 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState58 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState58 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState58 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState58 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState58\n\nand _menhir_run60 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState60 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState60 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState60 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState60 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState60 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState60 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState60 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState60 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState60 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState60\n\nand _menhir_run62 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _startpos ->\n    let _menhir_stack = (_menhir_stack, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState62 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState62 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState62 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState62 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState62 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState62 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState62 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState62 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState62 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState62\n\nand _menhir_run73 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState73 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState73 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState73 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState73 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState73 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState73 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState73 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState73 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState73 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState73\n\nand _menhir_run75 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState75 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState75 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState75 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState75 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState75 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState75 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState75 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState75 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState75 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState75\n\nand _menhir_run77 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState77 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState77 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState77 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState77 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState77 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState77 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState77 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState77 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState77 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState77\n\nand _menhir_run79 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState79 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState79 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState79 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState79 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState79 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState79 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState79 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState79 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState79 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState79\n\nand _menhir_run81 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState81 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState81 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState81 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState81 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState81 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState81 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState81 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState81 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState81 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState81\n\nand _menhir_run83 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState83 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState83 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState83 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState83 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState83 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState83 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState83 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState83 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState83 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState83\n\nand _menhir_run85 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState85 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState85 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState85 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState85 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState85 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState85 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState85 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState85 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState85 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState85\n\nand _menhir_run66 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState66 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState66 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState66 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState66 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState66 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState66 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState66 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState66 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState66 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState66\n\nand _menhir_run70 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState70 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState70 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState70 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState70 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState70 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState70 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState70 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState70 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState70 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState70\n\nand _menhir_run311 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3344 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1701) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3355 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3359 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _v : 'tv_idents_semi_sep = \n# 391 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( [_1] )\n# 3365 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_idents_semi_sep _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1702)\n\nand _menhir_goto_object_declaration : _menhir_env -> 'ttv_tail -> Lexing.position -> 'tv_object_declaration -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v _startpos ->\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1699) = Obj.magic _menhir_stack in\n    let (_endpos : Lexing.position) = _endpos in\n    let (_v : 'tv_object_declaration) = _v in\n    let (_startpos : Lexing.position) = _startpos in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1697) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let ((_1 : 'tv_object_declaration) : 'tv_object_declaration) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _endpos = _endpos__1_ in\n    let _v : 'tv_declaration = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 228 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                        ( fst _1, mkdecl ~loc:_sloc (PDobject (snd _1)) )\n# 3388 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv1698)) : 'freshtv1700)\n\nand _menhir_goto_layer_obj_inst : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_layer_obj_inst -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv1695 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3398 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position)) = Obj.magic _menhir_stack in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let (_v : 'tv_layer_obj_inst) = _v in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv1693 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3406 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position)) = Obj.magic _menhir_stack in\n    let (_ : _menhir_state) = _menhir_s in\n    let ((_3 : 'tv_layer_obj_inst) : 'tv_layer_obj_inst) = _v in\n    ((let (_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3413 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )), _startpos__1_) = _menhir_stack in\n    let _2 = () in\n    let _v : 'tv_layer_slot = \n# 781 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                ( _1, _3 )\n# 3419 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1691) = _menhir_stack in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let (_v : 'tv_layer_slot) = _v in\n    ((match _menhir_s with\n    | MenhirState384 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1685 * _menhir_state * 'tv_layer_slots_plus) * _menhir_state) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_layer_slot) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1683 * _menhir_state * 'tv_layer_slots_plus) * _menhir_state) = Obj.magic _menhir_stack in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_3 : 'tv_layer_slot) : 'tv_layer_slot) = _v in\n        ((let ((_menhir_stack, _menhir_s, (_1 : 'tv_layer_slots_plus)), _) = _menhir_stack in\n        let _2 = () in\n        let _v : 'tv_layer_slots_plus = \n# 778 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                           ( _3 :: _1 )\n# 3440 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_slots_plus _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1684)) : 'freshtv1686)\n    | MenhirState360 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1689) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_layer_slot) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1687) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let ((_1 : 'tv_layer_slot) : 'tv_layer_slot) = _v in\n        ((let _v : 'tv_layer_slots_plus = \n# 777 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                ( [_1] )\n# 3455 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_slots_plus _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1688)) : 'freshtv1690)\n    | _ ->\n        _menhir_fail ()) : 'freshtv1692)) : 'freshtv1694)) : 'freshtv1696)\n\nand _menhir_run369 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        _menhir_run345 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState369 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run334 _menhir_env (Obj.magic _menhir_stack) MenhirState369 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState369\n\nand _menhir_goto_layer_expression : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_layer_expression -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    match _menhir_s with\n    | MenhirState359 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1661 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | AT ->\n            _menhir_run401 _menhir_env (Obj.magic _menhir_stack)\n        | COLON ->\n            _menhir_run399 _menhir_env (Obj.magic _menhir_stack)\n        | COLONGREATER ->\n            _menhir_run393 _menhir_env (Obj.magic _menhir_stack)\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1657 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1655 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos__3_ : Lexing.position) = _endpos in\n            ((let ((_menhir_stack, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_layer_expression), _startpos__2_) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__3_ in\n            let _v : 'tv_layer_expression = \n# 771 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                    ( _2 )\n# 3507 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_layer_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1656)) : 'freshtv1658)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1659 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1660)) : 'freshtv1662)\n    | MenhirState393 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1667 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | AT ->\n            _menhir_run401 _menhir_env (Obj.magic _menhir_stack)\n        | COLON ->\n            _menhir_run399 _menhir_env (Obj.magic _menhir_stack)\n        | COLONGREATER ->\n            _menhir_run393 _menhir_env (Obj.magic _menhir_stack)\n        | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1663 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                _menhir_run397 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState395 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | STRING _v ->\n                _menhir_run396 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState395 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState395) : 'freshtv1664)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1665 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1666)) : 'freshtv1668)\n    | MenhirState401 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1673 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | AT ->\n            _menhir_run401 _menhir_env (Obj.magic _menhir_stack)\n        | COLON ->\n            _menhir_run399 _menhir_env (Obj.magic _menhir_stack)\n        | COLONGREATER ->\n            _menhir_run393 _menhir_env (Obj.magic _menhir_stack)\n        | ASSERT | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | RPAREN | SIGNATURE | TRUSTED | TYPE | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1669 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_layer_expression), _startpos__1_), _endpos__3_, _, (_3 : 'tv_layer_expression), _startpos__3_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__3_ in\n            let _v : 'tv_layer_expression = let _endpos = _endpos__3_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 768 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      (  mklayer ~loc:_sloc (PLinst (_1, _3)) )\n# 3575 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_layer_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1670)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1671 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1672)) : 'freshtv1674)\n    | MenhirState358 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv1681 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3590 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * 'tv_layer_signature_annotation)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ASSERT ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1675) = Obj.magic _menhir_stack in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                _menhir_run397 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState404 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | STRING _v ->\n                _menhir_run396 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState404 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState404) : 'freshtv1676)\n        | AT ->\n            _menhir_run401 _menhir_env (Obj.magic _menhir_stack)\n        | COLON ->\n            _menhir_run399 _menhir_env (Obj.magic _menhir_stack)\n        | COLONGREATER ->\n            _menhir_run393 _menhir_env (Obj.magic _menhir_stack)\n        | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1677) = Obj.magic _menhir_stack in\n            ((let (_, _endpos) = Obj.magic _menhir_stack in\n            let _v : 'tv_layer_invariant_annotation = \n# 758 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( None )\n# 3624 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_layer_invariant_annotation _menhir_env _menhir_stack _endpos _v) : 'freshtv1678)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv1679 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3634 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * 'tv_layer_signature_annotation)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1680)) : 'freshtv1682)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_run487 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3644 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | COLON ->\n        _menhir_run488 _menhir_env (Obj.magic _menhir_stack) MenhirState487\n    | COMMA | RPAREN ->\n        _menhir_reduce218 _menhir_env (Obj.magic _menhir_stack) MenhirState487\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState487\n\nand _menhir_goto_method_param : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_method_param -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState484 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv1651 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state) * _menhir_state * 'tv_method_param) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLON ->\n            _menhir_run488 _menhir_env (Obj.magic _menhir_stack) MenhirState497\n        | EQUAL ->\n            _menhir_reduce218 _menhir_env (Obj.magic _menhir_stack) MenhirState497\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState497) : 'freshtv1652)\n    | MenhirState502 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv1653 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3683 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_method_param) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLON ->\n            _menhir_run488 _menhir_env (Obj.magic _menhir_stack) MenhirState507\n        | EQUAL ->\n            _menhir_reduce218 _menhir_env (Obj.magic _menhir_stack) MenhirState507\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState507) : 'freshtv1654)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_run359 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        _menhir_run390 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState359 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run360 _menhir_env (Obj.magic _menhir_stack) MenhirState359 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run359 _menhir_env (Obj.magic _menhir_stack) MenhirState359 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState359\n\nand _menhir_run360 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        _menhir_run361 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState360 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | RBRACE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1649) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = MenhirState360 in\n        ((let _v : 'tv_layer_slots = \n# 773 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( [] )\n# 3731 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_slots _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1650)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState360\n\nand _menhir_run390 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3742 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1647) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3753 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3757 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _startpos = _startpos__1_ in\n    let _endpos = _endpos__1_ in\n    let _v : 'tv_layer_expression = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 762 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      (  mklayer ~loc:_sloc (PLname _1) )\n# 3768 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_layer_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1648)\n\nand _menhir_goto_type_definition : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_type_definition -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v ->\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ((('freshtv1645 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3778 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) = Obj.magic _menhir_stack in\n    let (_endpos : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let (_v : 'tv_type_definition) = _v in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ((('freshtv1643 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3787 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) = Obj.magic _menhir_stack in\n    let (_endpos__5_ : Lexing.position) = _endpos in\n    let (_ : _menhir_state) = _menhir_s in\n    let ((_5 : 'tv_type_definition) : 'tv_type_definition) = _v in\n    ((let (((_menhir_stack, _startpos__1_), _endpos__2_, (_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3795 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )), _startpos__2_), _endpos__3_, _, (_3 : 'tv_annotations)) = _menhir_stack in\n    let _4 = () in\n    let _1 = () in\n    let _startpos = _startpos__1_ in\n    let _endpos = _endpos__5_ in\n    let _v : 'tv_type_declaration = let _endpos = _endpos__5_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 256 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _2, mkfotyp ~loc:_sloc (PTdata (_5, _3)) )\n# 3807 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_type_declaration _menhir_env _menhir_stack _endpos _v _startpos) : 'freshtv1644)) : 'freshtv1646)\n\nand _menhir_goto_annotation_arguments : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_annotation_arguments -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    match _menhir_s with\n    | MenhirState14 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1637 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3819 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_annotation_arguments) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1635 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3827 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_2 : 'tv_annotation_arguments) : 'tv_annotation_arguments) = _v in\n        ((let (_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3834 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__1_) = _menhir_stack in\n        let _v : 'tv_annotation = \n# 805 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                ( PAclause (_1, _2) )\n# 3839 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_annotation _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1636)) : 'freshtv1638)\n    | MenhirState8 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1641 * Lexing.position * _menhir_state * (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 3847 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_annotation_arguments) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1639 * Lexing.position * _menhir_state * (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 3855 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_2 : 'tv_annotation_arguments) : 'tv_annotation_arguments) = _v in\n        ((let (_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 3862 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__1_) = _menhir_stack in\n        let _v : 'tv_annotation = \n# 806 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                 ( PAclause (_1, _2) )\n# 3867 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_annotation _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1640)) : 'freshtv1642)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_loption_separated_nonempty_list_COMMA_expression__ : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_loption_separated_nonempty_list_COMMA_expression__ -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : (('freshtv1633 * _menhir_state * Lexing.position) * Lexing.position) * _menhir_state * 'tv_loption_separated_nonempty_list_COMMA_expression__) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | RPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1629 * _menhir_state * Lexing.position) * Lexing.position) * _menhir_state * 'tv_loption_separated_nonempty_list_COMMA_expression__) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1627 * _menhir_state * Lexing.position) * Lexing.position) * _menhir_state * 'tv_loption_separated_nonempty_list_COMMA_expression__) = Obj.magic _menhir_stack in\n        let (_endpos__3_ : Lexing.position) = _endpos in\n        ((let (((_menhir_stack, _menhir_s, _startpos__1_), _startpos__1_inlined1_), _, (xs : 'tv_loption_separated_nonempty_list_COMMA_expression__)) = _menhir_stack in\n        let _3 = () in\n        let _1_inlined1 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_command_core = let l =\n          let _1 = _1_inlined1 in\n          let x = \n# 232 \"<standard.mly>\"\n    ( xs )\n# 3900 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n           in\n          \n# 200 \"<standard.mly>\"\n    ( x )\n# 3905 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n          \n        in\n        \n# 579 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                                               ( PCtransfer l )\n# 3911 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1628)) : 'freshtv1630)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1631 * _menhir_state * Lexing.position) * Lexing.position) * _menhir_state * 'tv_loption_separated_nonempty_list_COMMA_expression__) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1632)) : 'freshtv1634)\n\nand _menhir_goto_command_core : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_command_core -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    match _menhir_s with\n    | MenhirState123 | MenhirState185 | MenhirState160 | MenhirState162 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1621) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_command_core) = _v in\n        let (_startpos : Lexing.position) = _startpos in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1619) = Obj.magic _menhir_stack in\n        let (_endpos_c_ : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let ((c : 'tv_command_core) : 'tv_command_core) = _v in\n        let (_startpos_c_ : Lexing.position) = _startpos in\n        ((let _endpos = _endpos_c_ in\n        let _v : 'tv_annotated_command = let _endpos = _endpos_c_ in\n        let _symbolstartpos = _startpos_c_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 591 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                    ( mkcmd ~loc:_sloc c)\n# 3945 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_annotated_command _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1620)) : 'freshtv1622)\n    | MenhirState509 | MenhirState499 | MenhirState24 | MenhirState203 | MenhirState116 | MenhirState119 | MenhirState192 | MenhirState189 | MenhirState122 | MenhirState126 | MenhirState136 | MenhirState148 | MenhirState180 | MenhirState178 | MenhirState176 | MenhirState156 | MenhirState172 | MenhirState161 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1625) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_command_core) = _v in\n        let (_startpos : Lexing.position) = _startpos in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1623) = Obj.magic _menhir_stack in\n        let (_endpos_c_ : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let ((c : 'tv_command_core) : 'tv_command_core) = _v in\n        let (_startpos_c_ : Lexing.position) = _startpos in\n        ((let _startpos = _startpos_c_ in\n        let _endpos = _endpos_c_ in\n        let _v : 'tv_command = let _endpos = _endpos_c_ in\n        let _symbolstartpos = _startpos_c_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 582 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                    ( mkcmd ~loc:_sloc c )\n# 3969 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_command _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1624)) : 'freshtv1626)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_run124 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1615 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 3988 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) = _v in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | EQUAL ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1611 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4000 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState126 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState126 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState126 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState126 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState126) : 'freshtv1612)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1613 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4060 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _, _menhir_s, _), _, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1614)) : 'freshtv1616)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1617 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1618)\n\nand _menhir_goto_annotations_plus : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_annotations_plus -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState11 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1597 * _menhir_state * Lexing.position) * _menhir_state * 'tv_annotations_plus) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COMMA ->\n            _menhir_run219 _menhir_env (Obj.magic _menhir_stack)\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1593 * _menhir_state * Lexing.position) * _menhir_state * 'tv_annotations_plus) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1591 * _menhir_state * Lexing.position) * _menhir_state * 'tv_annotations_plus) = Obj.magic _menhir_stack in\n            let (_endpos__3_ : Lexing.position) = _endpos in\n            ((let ((_menhir_stack, _menhir_s, _startpos__1_), _, (_2 : 'tv_annotations_plus)) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _v : 'tv_annotation_arguments = \n# 817 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                    ( List.rev _2 )\n# 4098 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_annotation_arguments _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1592)) : 'freshtv1594)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1595 * _menhir_state * Lexing.position) * _menhir_state * 'tv_annotations_plus) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1596)) : 'freshtv1598)\n    | MenhirState6 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1609 * _menhir_state * Lexing.position) * Lexing.position) * _menhir_state * 'tv_annotations_plus) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COMMA ->\n            _menhir_run219 _menhir_env (Obj.magic _menhir_stack)\n        | RBRACKET ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1605 * _menhir_state * Lexing.position) * Lexing.position) * _menhir_state * 'tv_annotations_plus) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RBRACKET ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((('freshtv1601 * _menhir_state * Lexing.position) * Lexing.position) * _menhir_state * 'tv_annotations_plus) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((('freshtv1599 * _menhir_state * Lexing.position) * Lexing.position) * _menhir_state * 'tv_annotations_plus) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos__5_ : Lexing.position) = _endpos in\n                ((let ((((_menhir_stack, _menhir_s, _startpos__1_), _startpos__2_), _, (_3 : 'tv_annotations_plus)), _endpos__4_) = _menhir_stack in\n                let _5 = () in\n                let _4 = () in\n                let _2 = () in\n                let _1 = () in\n                let _endpos = _endpos__5_ in\n                let _v : 'tv_annotations = \n# 792 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                          ( List.rev _3 )\n# 4141 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_annotations _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1600)) : 'freshtv1602)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((('freshtv1603 * _menhir_state * Lexing.position) * Lexing.position) * _menhir_state * 'tv_annotations_plus) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let ((_menhir_stack, _menhir_s, _), _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1604)) : 'freshtv1606)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1607 * _menhir_state * Lexing.position) * Lexing.position) * _menhir_state * 'tv_annotations_plus) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1608)) : 'freshtv1610)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_method_parameters : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_method_parameters -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv1589 * _menhir_state * Lexing.position) * _menhir_state * 'tv_method_parameters) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | COMMA ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1581 * _menhir_state * 'tv_method_parameters) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run487 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState493 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState493) : 'freshtv1582)\n    | RPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1585 * _menhir_state * Lexing.position) * _menhir_state * 'tv_method_parameters) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1583 * _menhir_state * Lexing.position) * _menhir_state * 'tv_method_parameters) = Obj.magic _menhir_stack in\n        let (_endpos__3_ : Lexing.position) = _endpos in\n        ((let ((_menhir_stack, _menhir_s, _startpos__1_), _, (_2 : 'tv_method_parameters)) = _menhir_stack in\n        let _3 = () in\n        let _1 = () in\n        let _v : 'tv_method_param = \n# 720 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                     ( List.rev _2 )\n# 4195 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_method_param _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1584)) : 'freshtv1586)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1587 * _menhir_state * Lexing.position) * _menhir_state * 'tv_method_parameters) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1588)) : 'freshtv1590)\n\nand _menhir_goto_eq_or_assign : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_eq_or_assign -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState129 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv1535 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4215 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState132 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BANG ->\n            _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState132 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BITNOT ->\n            _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState132 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState132 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | INT _v ->\n            _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState132 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState132 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState132 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MINUS ->\n            _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState132 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | UINT _v ->\n            _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState132 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState132) : 'freshtv1536)\n    | MenhirState139 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv1537 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4247 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState140 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BANG ->\n            _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState140 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BITNOT ->\n            _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState140 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState140 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | INT _v ->\n            _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState140 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState140 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState140 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MINUS ->\n            _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState140 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | UINT _v ->\n            _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState140 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState140) : 'freshtv1538)\n    | MenhirState145 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((((('freshtv1539 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4279 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4283 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState146 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BANG ->\n            _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState146 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BITNOT ->\n            _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState146 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState146 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | INT _v ->\n            _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState146 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState146 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState146 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MINUS ->\n            _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState146 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | UINT _v ->\n            _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState146 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState146) : 'freshtv1540)\n    | MenhirState151 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv1541 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4315 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState152 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BANG ->\n            _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState152 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BITNOT ->\n            _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState152 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState152 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | INT _v ->\n            _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState152 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState152 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState152 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MINUS ->\n            _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState152 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | UINT _v ->\n            _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState152 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState152) : 'freshtv1542)\n    | MenhirState410 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv1555 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4347 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STRING _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1551 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4357 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4363 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | STRING _v ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((((('freshtv1545 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4375 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4379 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                let (_v : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4385 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) = _v in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((((('freshtv1543 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4393 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4397 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos__7_ : Lexing.position) = _endpos in\n                let ((_7 : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4403 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4407 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) = _v in\n                let (_startpos__7_ : Lexing.position) = _startpos in\n                ((let ((((((_menhir_stack, _endpos__1_, _startpos__1_), _, _startpos__2_), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4413 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )), _startpos__3_), _endpos__4_, _, (_4 : 'tv_annotations)), _, (_5 : 'tv_eq_or_assign)), _endpos__6_, (_6 : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4417 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )), _startpos__6_) = _menhir_stack in\n                let _2 = () in\n                let _1 = () in\n                let _endpos = _endpos__7_ in\n                let _v : 'tv_external_declaration = let _endpos = _endpos__7_ in\n                let _symbolstartpos = _startpos__1_ in\n                let _sloc = (_symbolstartpos, _endpos) in\n                \n# 241 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _3, mkdecl ~loc:_sloc (PDexternal_type (_6, Some _7, _4)) )\n# 4428 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_external_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv1544)) : 'freshtv1546)\n            | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((((('freshtv1547 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4436 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4440 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let ((((((_menhir_stack, _endpos__1_, _startpos__1_), _, _startpos__2_), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4445 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )), _startpos__3_), _endpos__4_, _, (_4 : 'tv_annotations)), _, (_5 : 'tv_eq_or_assign)), _endpos__6_, (_6 : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4449 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )), _startpos__6_) = _menhir_stack in\n                let _2 = () in\n                let _1 = () in\n                let _endpos = _endpos__6_ in\n                let _v : 'tv_external_declaration = let _endpos = _endpos__6_ in\n                let _symbolstartpos = _startpos__1_ in\n                let _sloc = (_symbolstartpos, _endpos) in\n                \n# 239 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _3, mkdecl ~loc:_sloc (PDexternal_type (_6, None, _4)) )\n# 4460 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_external_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv1548)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((((('freshtv1549 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4470 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4474 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let ((_menhir_stack, _menhir_s, _), _, _, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1550)) : 'freshtv1552)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1553 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4485 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1554)) : 'freshtv1556)\n    | MenhirState420 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((('freshtv1563 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4494 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STRING _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((('freshtv1559 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4504 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4510 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((('freshtv1557 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4518 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            let (_endpos__10_ : Lexing.position) = _endpos in\n            let ((_10 : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4524 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4528 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos__10_ : Lexing.position) = _startpos in\n            ((let ((((((((_menhir_stack, _endpos__1_, _startpos__1_), _endpos__2_, _, _startpos__2_), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4534 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__3_), _endpos__4_, _, (_4 : 'tv_annotations)), _endpos__6_, _, (_6 : 'tv_type_expression), _startpos__6_), _), _endpos__8_, _, (_8 : 'tv_type_expression), _startpos__8_), _, (_9 : 'tv_eq_or_assign)) = _menhir_stack in\n            let _7 = () in\n            let _5 = () in\n            let _2 = () in\n            let _1 = () in\n            let _endpos = _endpos__10_ in\n            let _v : 'tv_external_declaration = let _endpos = _endpos__10_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 246 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _3, mkdecl ~loc:_sloc (PDexternal_function (_10, _6, _8, _4)) )\n# 4547 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_external_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv1558)) : 'freshtv1560)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((('freshtv1561 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4557 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1562)) : 'freshtv1564)\n    | MenhirState418 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv1571 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4566 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STRING _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((('freshtv1567 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4576 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4582 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((('freshtv1565 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4590 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            let (_endpos__8_ : Lexing.position) = _endpos in\n            let ((_8 : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4596 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4600 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos__8_ : Lexing.position) = _startpos in\n            ((let ((((((_menhir_stack, _endpos__1_, _startpos__1_), _endpos__2_, _, _startpos__2_), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4606 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__3_), _endpos__4_, _, (_4 : 'tv_annotations)), _endpos__6_, _, (_6 : 'tv_type_expression), _startpos__6_), _, (_7 : 'tv_eq_or_assign)) = _menhir_stack in\n            let _5 = () in\n            let _2 = () in\n            let _1 = () in\n            let _endpos = _endpos__8_ in\n            let _v : 'tv_external_declaration = let _endpos = _endpos__8_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 243 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _3, mkdecl ~loc:_sloc (PDexternal_const (_8, _6, _4)) )\n# 4618 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_external_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv1566)) : 'freshtv1568)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((('freshtv1569 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4628 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1570)) : 'freshtv1572)\n    | MenhirState428 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv1579 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4637 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STRING _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv1575 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4647 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4653 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv1573 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4661 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            let (_endpos__7_ : Lexing.position) = _endpos in\n            let ((_7 : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4667 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 4671 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos__7_ : Lexing.position) = _startpos in\n            ((let (((((_menhir_stack, _endpos__1_, _startpos__1_), _, _startpos__2_), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4677 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__3_), _endpos__5_, _, (_5 : 'tv_type_expression), _startpos__5_), _, (_6 : 'tv_eq_or_assign)) = _menhir_stack in\n            let _4 = () in\n            let _2 = () in\n            let _1 = () in\n            let _endpos = _endpos__7_ in\n            let _v : 'tv_external_declaration = let _endpos = _endpos__7_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 248 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _3, mkdecl ~loc:_sloc (PDexternal_prop (_7, _5)) )\n# 4689 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_external_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv1574)) : 'freshtv1576)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv1577 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4699 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1578)) : 'freshtv1580)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_object_signature_fields : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_object_signature_fields -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv1533 * _menhir_state * Lexing.position) * _menhir_state * 'tv_object_signature_fields) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | SEMICOLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1531 * _menhir_state * 'tv_object_signature_fields) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = MenhirState294 in\n        ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | CONST ->\n            _menhir_run292 _menhir_env (Obj.magic _menhir_stack) MenhirState295\n        | CONSTRUCTOR ->\n            _menhir_run287 _menhir_env (Obj.magic _menhir_stack) MenhirState295\n        | GHOST ->\n            _menhir_run285 _menhir_env (Obj.magic _menhir_stack) MenhirState295 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LOGICAL ->\n            _menhir_run284 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState295 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | REFINED ->\n            _menhir_run282 _menhir_env (Obj.magic _menhir_stack) MenhirState295\n        | RBRACE ->\n            _menhir_reduce217 _menhir_env (Obj.magic _menhir_stack)\n        | IDENT _ ->\n            _menhir_reduce169 _menhir_env (Obj.magic _menhir_stack) MenhirState295\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState295) : 'freshtv1532)\n    | RBRACE ->\n        _menhir_reduce216 _menhir_env (Obj.magic _menhir_stack) MenhirState294\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState294) : 'freshtv1534)\n\nand _menhir_reduce216 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _v : 'tv_opt_semi = \n# 831 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n               ( () )\n# 4752 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_opt_semi _menhir_env _menhir_stack _menhir_s _v\n\nand _menhir_reduce217 : _menhir_env -> 'ttv_tail * _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let (_menhir_stack, _menhir_s) = _menhir_stack in\n    let _1 = () in\n    let _v : 'tv_opt_semi = \n# 832 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n               ( () )\n# 4763 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_opt_semi _menhir_env _menhir_stack _menhir_s _v\n\nand _menhir_goto_event_parameters : _menhir_env -> 'ttv_tail -> Lexing.position -> 'tv_event_parameters -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v ->\n    let _menhir_stack = (_menhir_stack, _endpos, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv1529 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4774 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position) * Lexing.position * 'tv_event_parameters) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1513) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1509 * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4794 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | COLON ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv1505 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4806 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | ADDRESS ->\n                    _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState440 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | ARRAY ->\n                    _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState440 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | IDENT _v ->\n                    _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState440 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LIST ->\n                    _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState440 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LPAREN ->\n                    _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState440 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | MAPPING ->\n                    _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState440 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState440) : 'freshtv1506)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv1507 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4834 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                (raise _eRR : 'freshtv1508)) : 'freshtv1510)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1511 * Lexing.position) = Obj.magic _menhir_stack in\n            (raise _eRR : 'freshtv1512)) : 'freshtv1514)\n    | BAR | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1525 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4848 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * 'tv_event_parameters) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4853 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__1_), _endpos__2_, (_2 : 'tv_event_parameters)) = _menhir_stack in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_event_declaration = let _endpos = _endpos__2_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 331 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( (_1, mkdecl ~loc:_sloc (PDevent (List.rev _2))) )\n# 4862 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1523) = _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_event_declaration) = _v in\n        ((match _menhir_s with\n        | MenhirState447 ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1517 * Lexing.position * _menhir_state * 'tv_event_declarations)) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _endpos in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let (_v : 'tv_event_declaration) = _v in\n            ((let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1515 * Lexing.position * _menhir_state * 'tv_event_declarations)) = Obj.magic _menhir_stack in\n            let (_endpos__3_ : Lexing.position) = _endpos in\n            let (_ : _menhir_state) = _menhir_s in\n            let ((_3 : 'tv_event_declaration) : 'tv_event_declaration) = _v in\n            ((let (_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_event_declarations)) = _menhir_stack in\n            let _2 = () in\n            let _endpos = _endpos__3_ in\n            let _v : 'tv_event_declarations = \n# 326 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                              ( _3 :: _1 )\n# 4887 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_event_declarations _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1516)) : 'freshtv1518)\n        | MenhirState435 ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1521) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _endpos in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let (_v : 'tv_event_declaration) = _v in\n            ((let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1519) = Obj.magic _menhir_stack in\n            let (_endpos__1_ : Lexing.position) = _endpos in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let ((_1 : 'tv_event_declaration) : 'tv_event_declaration) = _v in\n            ((let _endpos = _endpos__1_ in\n            let _v : 'tv_event_declarations = \n# 325 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                       ( [_1] )\n# 4905 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_event_declarations _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1520)) : 'freshtv1522)\n        | _ ->\n            _menhir_fail ()) : 'freshtv1524)) : 'freshtv1526)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1527 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4917 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * 'tv_event_parameters) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _, _), _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1528)) : 'freshtv1530)\n\nand _menhir_run196 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4925 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1503) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4936 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4940 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _v : 'tv_idents = \n# 316 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( [_1] )\n# 4946 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_idents _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1504)\n\nand _menhir_goto_match_pattern_tail : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_match_pattern_tail -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1501 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4956 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position) = Obj.magic _menhir_stack in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let (_v : 'tv_match_pattern_tail) = _v in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1499 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4964 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position) = Obj.magic _menhir_stack in\n    let (_ : _menhir_state) = _menhir_s in\n    let ((_2 : 'tv_match_pattern_tail) : 'tv_match_pattern_tail) = _v in\n    ((let (_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 4971 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )), _startpos__1_) = _menhir_stack in\n    let _v : 'tv_match_pattern = \n# 623 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( match _2 with\n        | PPTcons x -> (\"CONS\", [x; _1])\n        | PPTother xs -> (_1, xs) )\n# 4978 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1497) = _menhir_stack in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let (_v : 'tv_match_pattern) = _v in\n    ((let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1495 * _menhir_state * 'tv_match_pattern) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | DOUBLEARROW ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1491 * _menhir_state * 'tv_match_pattern) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | ASSERT ->\n            _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BANG ->\n            _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BEGIN ->\n            _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BITNOT ->\n            _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | DENY ->\n            _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | EMIT ->\n            _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | FAIL ->\n            _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | FIRST ->\n            _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | FOLD ->\n            _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | FOR ->\n            _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | GHOST ->\n            _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState203 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IF ->\n            _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | INT _v ->\n            _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState203 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LET ->\n            _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MATCH ->\n            _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MINUS ->\n            _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | TRANSFERETH ->\n            _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState203 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | UINT _v ->\n            _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState203 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState203) : 'freshtv1492)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1493 * _menhir_state * 'tv_match_pattern) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1494)) : 'freshtv1496)) : 'freshtv1498)) : 'freshtv1500)) : 'freshtv1502)\n\nand _menhir_goto_expression : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_expression -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    match _menhir_s with\n    | MenhirState48 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1241 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | RBRACKET ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1237 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1235 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos__4_ : Lexing.position) = _endpos in\n            ((let (((_menhir_stack, _endpos_a_, _menhir_s, (a : 'tv_atom), _startpos_a_), _, _startpos__2_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_) = _menhir_stack in\n            let _4 = () in\n            let _2 = () in\n            let _startpos = _startpos_a_ in\n            let _endpos = _endpos__4_ in\n            let _v : 'tv_atom = let _endpos = _endpos__4_ in\n            let _symbolstartpos = _startpos_a_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 500 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                           (  mkexp_ ~loc:_sloc (PEindex (a, e)) )\n# 5105 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_atom _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1236)) : 'freshtv1238)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1239 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1240)) : 'freshtv1242)\n    | MenhirState50 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1247 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | BARBAR | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EQUAL | EVENT | EXTERNAL | GREATER | GREATEREQ | IN | LAYER | LESS | LESSEQ | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | UNEQUAL | WITH | XOR ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1243 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 517 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                     (  mkexp_ ~loc:_sloc (PEbin (OPxor, e1, e2 )) )\n# 5162 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1244)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1245 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1246)) : 'freshtv1248)\n    | MenhirState52 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1251 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1249 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n        let _2 = () in\n        let _startpos = _startpos_e1_ in\n        let _endpos = _endpos_e2_ in\n        let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n        let _symbolstartpos = _startpos_e1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 523 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                      (  mkexp_ ~loc:_sloc (PEbin (OPtimes, e1, e2 )) )\n# 5187 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1250)) : 'freshtv1252)\n    | MenhirState54 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1255 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1253 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n        let _2 = () in\n        let _startpos = _startpos_e1_ in\n        let _endpos = _endpos_e2_ in\n        let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n        let _symbolstartpos = _startpos_e1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 524 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                       (  mkexp_ ~loc:_sloc (PEbin (OPdivide, e1, e2 )) )\n# 5205 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1254)) : 'freshtv1256)\n    | MenhirState56 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1261 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | BARBAR | BITAND | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EQUAL | EVENT | EXTERNAL | GREATER | GREATEREQ | IN | LAYER | LESS | LESSEQ | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SHL | SHR | SIGNATURE | THEN | TO | TRUSTED | TYPE | UNEQUAL | WITH | XOR ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1257 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 520 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                     (  mkexp_ ~loc:_sloc (PEbin (OPshr, e1, e2)) )\n# 5237 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1258)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1259 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1260)) : 'freshtv1262)\n    | MenhirState58 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1267 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | BARBAR | BITAND | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EQUAL | EVENT | EXTERNAL | GREATER | GREATEREQ | IN | LAYER | LESS | LESSEQ | LET | LOGICAL | MINUS | OBJECT | PLUS | RBRACE | RBRACKET | RPAREN | SEMICOLON | SHL | SHR | SIGNATURE | THEN | TO | TRUSTED | TYPE | UNEQUAL | WITH | XOR ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1263 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 521 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                      (  mkexp_ ~loc:_sloc (PEbin (OPplus, e1, e2 )) )\n# 5272 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1264)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1265 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1266)) : 'freshtv1268)\n    | MenhirState60 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1271 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1269 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n        let _2 = () in\n        let _startpos = _startpos_e1_ in\n        let _endpos = _endpos_e2_ in\n        let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n        let _symbolstartpos = _startpos_e1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 525 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                     (  mkexp_ ~loc:_sloc (PEbin (OPremainder, e1, e2 )) )\n# 5297 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1270)) : 'freshtv1272)\n    | MenhirState62 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1277 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | BARBAR | BITAND | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EQUAL | EVENT | EXTERNAL | GREATER | GREATEREQ | IN | LAYER | LESS | LESSEQ | LET | LOGICAL | MINUS | OBJECT | PLUS | RBRACE | RBRACKET | RPAREN | SEMICOLON | SHL | SHR | SIGNATURE | THEN | TO | TRUSTED | TYPE | UNEQUAL | WITH | XOR ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1273 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _startpos__2_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 522 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                       (  mkexp_ ~loc:_sloc (PEbin (OPminus, e1, e2 )) )\n# 5325 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1274)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1275 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1276)) : 'freshtv1278)\n    | MenhirState64 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1283 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | BARBAR | BITAND | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EQUAL | EVENT | EXTERNAL | GREATER | GREATEREQ | IN | LAYER | LESS | LESSEQ | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SHL | SHR | SIGNATURE | THEN | TO | TRUSTED | TYPE | UNEQUAL | WITH | XOR ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1279 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 519 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                     (  mkexp_ ~loc:_sloc (PEbin (OPshl, e1, e2 )) )\n# 5364 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1280)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1281 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1282)) : 'freshtv1284)\n    | MenhirState66 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1289 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | BARBAR | BITAND | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EQUAL | EVENT | EXTERNAL | GREATER | GREATEREQ | IN | LAYER | LESS | LESSEQ | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | UNEQUAL | WITH | XOR ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1285 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 518 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                        (  mkexp_ ~loc:_sloc (PEbin (OPbitand, e1, e2 )) )\n# 5407 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1286)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1287 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1288)) : 'freshtv1290)\n    | MenhirState68 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1295 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EVENT | EXTERNAL | IN | LAYER | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1291 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 529 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                         (  mkexp_ ~loc:_sloc (PEbin (OPne, e1, e2 )) )\n# 5456 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1292)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1293 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1294)) : 'freshtv1296)\n    | MenhirState70 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1301 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | BARBAR | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EQUAL | EVENT | EXTERNAL | GREATER | GREATEREQ | IN | LAYER | LESS | LESSEQ | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | UNEQUAL | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1297 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 516 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                        (  mkexp_ ~loc:_sloc (PEbin (OPbitor, e1, e2 )) )\n# 5503 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1298)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1299 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1300)) : 'freshtv1302)\n    | MenhirState73 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1307 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EVENT | EXTERNAL | IN | LAYER | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1303 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 531 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                        (  mkexp_ ~loc:_sloc (PEbin (OPle, e1, e2 )) )\n# 5552 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1304)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1305 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1306)) : 'freshtv1308)\n    | MenhirState75 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1313 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EVENT | EXTERNAL | IN | LAYER | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1309 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 530 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                      (  mkexp_ ~loc:_sloc (PEbin (OPlt, e1, e2 )) )\n# 5601 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1310)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1311 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1312)) : 'freshtv1314)\n    | MenhirState77 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1319 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EVENT | EXTERNAL | IN | LAYER | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1315 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 533 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                           (  mkexp_ ~loc:_sloc (PEbin (OPge, e1, e2 )) )\n# 5650 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1316)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1317 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1318)) : 'freshtv1320)\n    | MenhirState79 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1325 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EVENT | EXTERNAL | IN | LAYER | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1321 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 532 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                         (  mkexp_ ~loc:_sloc (PEbin (OPgt, e1, e2 )) )\n# 5699 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1322)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1323 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1324)) : 'freshtv1326)\n    | MenhirState81 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1331 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EVENT | EXTERNAL | IN | LAYER | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1327 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 528 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                       (  mkexp_ ~loc:_sloc (PEbin (OPeq, e1, e2 )) )\n# 5748 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1328)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1329 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1330)) : 'freshtv1332)\n    | MenhirState83 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1337 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | COMMA | CONST | DO | ELSE | END | EOF | EVENT | EXTERNAL | IN | LAYER | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1333 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 527 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                             (  mkexp_ ~loc:_sloc (PEbin (OPor,e1, e2 )) )\n# 5813 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1334)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1335 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1336)) : 'freshtv1338)\n    | MenhirState85 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1343 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | ASSIGN | BAR | COMMA | CONST | DISJUNCTION | DO | ELSE | END | EOF | EVENT | EXTERNAL | IN | LAYER | LET | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | THEN | TO | TRUSTED | TYPE | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1339 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_expression = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 526 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                             (  mkexp_ ~loc:_sloc (PEbin (OPand, e1, e2 )) )\n# 5876 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1340)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1341 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1342)) : 'freshtv1344)\n    | MenhirState37 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1347 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1345 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _startpos__1_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_) = _menhir_stack in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos_e_ in\n        let _v : 'tv_expression = let _endpos = _endpos_e_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 514 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                               (  mkexp_ ~loc:_sloc (PEun (OPnot, e)) )\n# 5901 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1346)) : 'freshtv1348)\n    | MenhirState36 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1351 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1349 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _startpos__1_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_) = _menhir_stack in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos_e_ in\n        let _v : 'tv_expression = let _endpos = _endpos_e_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 515 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                 (  mkexp_ ~loc:_sloc (PEun (OPbitnot, e)) )\n# 5919 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1350)) : 'freshtv1352)\n    | MenhirState33 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1367 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 5927 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | RBRACE | SEMICOLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1363 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 5973 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 5978 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__1_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_) = _menhir_stack in\n            let _2 = () in\n            let _v : 'tv_struct_field = let _endpos = _endpos_e_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 545 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                              ( _1, mkexp_ ~loc:_sloc e.p_expression_desc )\n# 5987 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1361) = _menhir_stack in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let (_v : 'tv_struct_field) = _v in\n            ((match _menhir_s with\n            | MenhirState92 ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv1355 * _menhir_state * 'tv_struct_fields) * _menhir_state) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let (_v : 'tv_struct_field) = _v in\n                ((let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv1353 * _menhir_state * 'tv_struct_fields) * _menhir_state) = Obj.magic _menhir_stack in\n                let (_ : _menhir_state) = _menhir_s in\n                let ((_3 : 'tv_struct_field) : 'tv_struct_field) = _v in\n                ((let ((_menhir_stack, _menhir_s, (_1 : 'tv_struct_fields)), _) = _menhir_stack in\n                let _2 = () in\n                let _v : 'tv_struct_fields = \n# 542 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                          ( _3 :: _1 )\n# 6008 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_struct_fields _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1354)) : 'freshtv1356)\n            | MenhirState31 ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv1359) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let (_v : 'tv_struct_field) = _v in\n                ((let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv1357) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let ((_1 : 'tv_struct_field) : 'tv_struct_field) = _v in\n                ((let _v : 'tv_struct_fields = \n# 541 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                  ( [_1] )\n# 6023 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_struct_fields _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1358)) : 'freshtv1360)\n            | _ ->\n                _menhir_fail ()) : 'freshtv1362)) : 'freshtv1364)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1365 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6035 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1366)) : 'freshtv1368)\n    | MenhirState98 | MenhirState29 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1375 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | COMMA ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1369 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState98 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState98 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState98 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState98 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState98 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState98 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState98 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState98 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState98 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState98) : 'freshtv1370)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1371 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _endpos_e_, _menhir_s, (e : 'tv_expression), _startpos_e_) = _menhir_stack in\n            let _endpos = _endpos_e_ in\n            let _v : 'tv_comma_sep_expressions = let _endpos = _endpos_e_ in\n            let _symbolstartpos = _startpos_e_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 538 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                  ( mkexp_ ~loc:_sloc e.p_expression_desc )\n# 6120 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_comma_sep_expressions _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1372)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1373 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1374)) : 'freshtv1376)\n    | MenhirState28 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1379 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1377 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _startpos__1_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_) = _menhir_stack in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos_e_ in\n        let _v : 'tv_expression = let _endpos = _endpos_e_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 513 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                (  mkexp_ ~loc:_sloc (PEun (OPneg, e)) )\n# 6145 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1378)) : 'freshtv1380)\n    | MenhirState107 | MenhirState27 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1387 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | COMMA ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1381 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState107 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState107 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState107 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState107 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState107 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState107 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState107 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState107 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState107 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState107) : 'freshtv1382)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1383 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _endpos_x_, _menhir_s, (x : 'tv_expression), _startpos_x_) = _menhir_stack in\n            let _v : 'tv_separated_nonempty_list_COMMA_expression_ = \n# 241 \"<standard.mly>\"\n    ( [ x ] )\n# 6225 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_separated_nonempty_list_COMMA_expression_ _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1384)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1385 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1386)) : 'freshtv1388)\n    | MenhirState109 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1393 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1389 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | BAR ->\n                _menhir_run112 _menhir_env (Obj.magic _menhir_stack) MenhirState111\n            | IDENT _ | LBRACKET ->\n                _menhir_reduce211 _menhir_env (Obj.magic _menhir_stack) MenhirState111\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState111) : 'freshtv1390)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1391 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1392)) : 'freshtv1394)\n    | MenhirState120 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1399 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | THEN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1395 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState122 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState122 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState122 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState122 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState122) : 'freshtv1396)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1397 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1398)) : 'freshtv1400)\n    | MenhirState132 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv1405 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6406 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | TO ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1401 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6448 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState134 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState134 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState134 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState134 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState134 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState134 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState134 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState134 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState134 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState134) : 'freshtv1402)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1403 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6486 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1404)) : 'freshtv1406)\n    | MenhirState134 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv1411 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6495 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | DO ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((('freshtv1407 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6513 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState136 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState136 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState136 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState136 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState136) : 'freshtv1408)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((('freshtv1409 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6601 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1410)) : 'freshtv1412)\n    | MenhirState140 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv1417 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6610 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | TO ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1413 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6652 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState142 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState142 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState142 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState142 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState142 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState142 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState142 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState142 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState142 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState142) : 'freshtv1414)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1415 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6690 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1416)) : 'freshtv1418)\n    | MenhirState142 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv1427 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6699 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BAR ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((('freshtv1423 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6709 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((((((('freshtv1419 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6719 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6725 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) = _v in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | ASSIGN ->\n                    _menhir_run131 _menhir_env (Obj.magic _menhir_stack) MenhirState145\n                | EQUAL ->\n                    _menhir_run130 _menhir_env (Obj.magic _menhir_stack) MenhirState145\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState145) : 'freshtv1420)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((((((('freshtv1421 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6747 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1422)) : 'freshtv1424)\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((('freshtv1425 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6794 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1426)) : 'freshtv1428)\n    | MenhirState146 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((((('freshtv1433 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6803 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6807 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | DO ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((((('freshtv1429 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6825 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6829 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState148 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState148 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState148 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState148 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState148) : 'freshtv1430)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((((((('freshtv1431 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6917 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6921 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1432)) : 'freshtv1434)\n    | MenhirState152 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv1439 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6930 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | TO ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1435 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 6972 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState154 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState154 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState154 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState154 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState154 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState154 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState154 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState154 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState154 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState154) : 'freshtv1436)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1437 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7010 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1438)) : 'freshtv1440)\n    | MenhirState154 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv1445 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7019 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | DO ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((('freshtv1441 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7037 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState156 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState156 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState156 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState156 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState156) : 'freshtv1442)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((((('freshtv1443 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7125 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1444)) : 'freshtv1446)\n    | MenhirState158 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1451 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | BAR | COMMA | ELSE | END | IN | LET | RBRACE | RBRACKET | RPAREN | SEMICOLON | THEN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1447 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _menhir_s, _startpos__1_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_) = _menhir_stack in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos_e_ in\n            let _v : 'tv_command_core = let _endpos = _endpos_e_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 560 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                      ( PCemit (mkexp_ ~loc:_sloc e.p_expression_desc) )\n# 7184 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1448)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1449 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1450)) : 'freshtv1452)\n    | MenhirState509 | MenhirState499 | MenhirState24 | MenhirState203 | MenhirState116 | MenhirState192 | MenhirState119 | MenhirState189 | MenhirState122 | MenhirState123 | MenhirState185 | MenhirState126 | MenhirState136 | MenhirState148 | MenhirState180 | MenhirState178 | MenhirState176 | MenhirState156 | MenhirState160 | MenhirState172 | MenhirState161 | MenhirState162 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1459 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ASSIGN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1453 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState164 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState164 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState164 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState164 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState164 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState164 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState164 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState164 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState164 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState164) : 'freshtv1454)\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | BAR | COMMA | ELSE | END | IN | LET | RBRACE | RBRACKET | RPAREN | SEMICOLON | THEN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1455 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _endpos_e_, _menhir_s, (e : 'tv_expression), _startpos_e_) = _menhir_stack in\n            let _startpos = _startpos_e_ in\n            let _endpos = _endpos_e_ in\n            let _v : 'tv_command_core = \n# 549 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                  ( PCyield e )\n# 7273 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1456)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1457 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1458)) : 'freshtv1460)\n    | MenhirState164 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1465 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | BAR | COMMA | ELSE | END | IN | LET | RBRACE | RBRACKET | RPAREN | SEMICOLON | THEN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1461 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos_e1_, _menhir_s, (e1 : 'tv_expression), _startpos_e1_), _endpos_e2_, _, (e2 : 'tv_expression), _startpos_e2_) = _menhir_stack in\n            let _2 = () in\n            let _startpos = _startpos_e1_ in\n            let _endpos = _endpos_e2_ in\n            let _v : 'tv_command_core = let _endpos = _endpos_e2_ in\n            let _symbolstartpos = _startpos_e1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 554 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                        ( (PCstore (mkexp_ ~loc:_sloc e1.p_expression_desc, mkexp_ ~loc:_sloc e2.p_expression_desc)) )\n# 7338 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1462)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1463 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1464)) : 'freshtv1466)\n    | MenhirState235 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1471 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | RBRACKET ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1467 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState237 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ARRAY ->\n                _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState237 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState237 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LIST ->\n                _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState237 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState237 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MAPPING ->\n                _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState237 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState237) : 'freshtv1468)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1469 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1470)) : 'freshtv1472)\n    | MenhirState453 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv1483) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7426 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv1479) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7472 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos__2_, (_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7477 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__2_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _endpos = _endpos_e_ in\n            let _v : 'tv_const_declaration = \n# 233 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( Hashtbl.add constant_table _2 e.p_expression_desc )\n# 7485 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1477) = _menhir_stack in\n            let (_endpos : Lexing.position) = _endpos in\n            let (_v : 'tv_const_declaration) = _v in\n            ((let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1475 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _endpos in\n            let (_v : 'tv_const_declaration) = _v in\n            ((let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1473 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n            let (_endpos__2_ : Lexing.position) = _endpos in\n            let ((_2 : 'tv_const_declaration) : 'tv_const_declaration) = _v in\n            ((let (_menhir_stack, _endpos__1_, (_1 : 'tv_declarations)) = _menhir_stack in\n            let _endpos = _endpos__2_ in\n            let _v : 'tv_declarations = \n# 221 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                    ( _1 )\n# 7504 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_declarations _menhir_env _menhir_stack _endpos _v) : 'freshtv1474)) : 'freshtv1476)) : 'freshtv1478)) : 'freshtv1480)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv1481) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7514 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1482)) : 'freshtv1484)\n    | MenhirState505 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv1489 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7523 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BARBAR ->\n            _menhir_run70 _menhir_env (Obj.magic _menhir_stack)\n        | BITAND ->\n            _menhir_run66 _menhir_env (Obj.magic _menhir_stack)\n        | CONJUNCTION ->\n            _menhir_run85 _menhir_env (Obj.magic _menhir_stack)\n        | DISJUNCTION ->\n            _menhir_run83 _menhir_env (Obj.magic _menhir_stack)\n        | EQUAL ->\n            _menhir_run81 _menhir_env (Obj.magic _menhir_stack)\n        | GREATER ->\n            _menhir_run79 _menhir_env (Obj.magic _menhir_stack)\n        | GREATEREQ ->\n            _menhir_run77 _menhir_env (Obj.magic _menhir_stack)\n        | LESS ->\n            _menhir_run75 _menhir_env (Obj.magic _menhir_stack)\n        | LESSEQ ->\n            _menhir_run73 _menhir_env (Obj.magic _menhir_stack)\n        | MINUS ->\n            _menhir_run62 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MOD ->\n            _menhir_run60 _menhir_env (Obj.magic _menhir_stack)\n        | PLUS ->\n            _menhir_run58 _menhir_env (Obj.magic _menhir_stack)\n        | SHL ->\n            _menhir_run64 _menhir_env (Obj.magic _menhir_stack)\n        | SHR ->\n            _menhir_run56 _menhir_env (Obj.magic _menhir_stack)\n        | SLASH ->\n            _menhir_run54 _menhir_env (Obj.magic _menhir_stack)\n        | STAR ->\n            _menhir_run52 _menhir_env (Obj.magic _menhir_stack)\n        | UNEQUAL ->\n            _menhir_run68 _menhir_env (Obj.magic _menhir_stack)\n        | XOR ->\n            _menhir_run50 _menhir_env (Obj.magic _menhir_stack)\n        | LET | RBRACE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((((('freshtv1485 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7569 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((((((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_annotations)), _, (_3 : 'tv_method_kind)), _endpos__4_, (_4 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7574 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__4_), _), _endpos__6_, _, (_6 : 'tv_type_expression), _startpos__6_), _), _endpos_e_, _, (e : 'tv_expression), _startpos_e_) = _menhir_stack in\n            let _7 = () in\n            let _5 = () in\n            let _1 = () in\n            let _v : 'tv_object_field_or_method = let _endpos = _endpos_e_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 684 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( (* annotations are not used and only one (GHOST) method_kind is\n           acceptable, just there to allow parser to factor with\n           the next rule *)\n    let is_ghost = match _3 with\n      | MKnormal -> false\n      | MKghost -> true\n      | MKconstghost ->\n        print_endline (\"Warning: object fields cannot be declared `const ghost': \" ^\n          _4 ^ \" marked as `ghost'.\");\n        true\n      | k ->\n        print_endline (\"Warning: object fields cannot be declared `\" ^\n          string_of_method_kind k ^ \"': \" ^ _4 ^ \" marked as normal.\");\n        false\n      in `Left (_4, _6, (mkexp_ ~loc:_sloc e.p_expression_desc) , is_ghost) )\n# 7599 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_field_or_method _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1486)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((((('freshtv1487 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7609 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1488)) : 'freshtv1490)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_method_kind : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_method_kind -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState281 | MenhirState295 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1225 * _menhir_state * 'tv_method_kind) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1221 * _menhir_state * 'tv_method_kind) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7633 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | COLON ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv1217 * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7645 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | ADDRESS ->\n                    _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState299 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | ARRAY ->\n                    _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState299 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | IDENT _v ->\n                    _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState299 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LIST ->\n                    _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState299 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LPAREN ->\n                    _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState299 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | MAPPING ->\n                    _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState299 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState299) : 'freshtv1218)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv1219 * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7673 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let ((_menhir_stack, _menhir_s, _), _, _, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1220)) : 'freshtv1222)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1223 * _menhir_state * 'tv_method_kind) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1224)) : 'freshtv1226)\n    | MenhirState483 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv1233 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1229 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7697 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | COLON ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ((('freshtv1227 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7709 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = MenhirState502 in\n                ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | ADDRESS ->\n                    _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState503 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | ARRAY ->\n                    _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState503 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | IDENT _v ->\n                    _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState503 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LIST ->\n                    _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState503 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LPAREN ->\n                    _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState503 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | MAPPING ->\n                    _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState503 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState503) : 'freshtv1228)\n            | IDENT _v ->\n                _menhir_run496 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState502 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run485 _menhir_env (Obj.magic _menhir_stack) MenhirState502 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState502) : 'freshtv1230)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1231 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1232)) : 'freshtv1234)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_run482 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LBRACKET ->\n        _menhir_run5 _menhir_env (Obj.magic _menhir_stack) MenhirState482 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | CONST | CONSTRUCTOR | GHOST | IDENT _ | LOGICAL | REFINED ->\n        _menhir_reduce19 _menhir_env (Obj.magic _menhir_stack) MenhirState482\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState482\n\nand _menhir_goto_base_slots : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_base_slots -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv1215 * Lexing.position) * _menhir_state * 'tv_base_slots) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | COMMA ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1207 * _menhir_state * 'tv_base_slots) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1205) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_menhir_s : _menhir_state) = MenhirState472 in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7787 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | COLON ->\n                _menhir_run466 _menhir_env (Obj.magic _menhir_stack)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv1203 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7803 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1204)) : 'freshtv1206)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState472) : 'freshtv1208)\n    | RPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1211 * Lexing.position) * _menhir_state * 'tv_base_slots) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1209 * Lexing.position) * _menhir_state * 'tv_base_slots) = Obj.magic _menhir_stack in\n        let (_endpos__3_ : Lexing.position) = _endpos in\n        ((let ((_menhir_stack, _startpos__1_), _, (_2 : 'tv_base_slots)) = _menhir_stack in\n        let _3 = () in\n        let _1 = () in\n        let _v : 'tv_base_layer_signature = let _endpos = _endpos__3_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 666 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                              ( mklayersign ~loc:_sloc  (PLSconstr (List.rev _2)) )\n# 7828 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_base_layer_signature _menhir_env _menhir_stack _v) : 'freshtv1210)) : 'freshtv1212)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1213 * Lexing.position) * _menhir_state * 'tv_base_slots) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1214)) : 'freshtv1216)\n\nand _menhir_goto_layer_signature_fields : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_layer_signature_fields -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv1201 * _menhir_state * Lexing.position) * _menhir_state * 'tv_layer_signature_fields) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | SEMICOLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1199 * _menhir_state * 'tv_layer_signature_fields) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = MenhirState339 in\n        ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run336 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState340 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | RBRACE ->\n            _menhir_reduce217 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState340) : 'freshtv1200)\n    | RBRACE ->\n        _menhir_reduce216 _menhir_env (Obj.magic _menhir_stack) MenhirState339\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState339) : 'freshtv1202)\n\nand _menhir_goto_object_signature_declaration : _menhir_env -> 'ttv_tail -> Lexing.position -> 'tv_object_signature_declaration -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v _startpos ->\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1197) = Obj.magic _menhir_stack in\n    let (_endpos : Lexing.position) = _endpos in\n    let (_v : 'tv_object_signature_declaration) = _v in\n    let (_startpos : Lexing.position) = _startpos in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1195) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let ((_1 : 'tv_object_signature_declaration) : 'tv_object_signature_declaration) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _endpos = _endpos__1_ in\n    let _v : 'tv_declaration = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 226 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                  ( fst _1, mkdecl ~loc:_sloc (PDsignature (snd _1)) )\n# 7889 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv1196)) : 'freshtv1198)\n\nand _menhir_run308 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | GHOST ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1181 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1175 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7913 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1173 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos__4_ : Lexing.position) = _endpos in\n            let ((_4 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7923 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7927 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos__4_ : Lexing.position) = _startpos in\n            ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_object_signature_expr), _startpos__1_), _startpos__3_) = _menhir_stack in\n            let _3 = () in\n            let _2 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__4_ in\n            let _v : 'tv_object_signature_expr = let _endpos = _endpos__4_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 362 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                            ( mksig ~loc:_sloc (PSghostize (_1, [_4])) )\n# 7941 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_signature_expr _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1174)) : 'freshtv1176)\n        | LBRACE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1177 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                _menhir_run311 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState320 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState320) : 'freshtv1178)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1179 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _, _menhir_s, _, _), _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1180)) : 'freshtv1182)\n    | LOGICAL ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1191 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _endpos, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1185 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7981 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1183 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos__4_ : Lexing.position) = _endpos in\n            let ((_4 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7991 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 7995 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos__4_ : Lexing.position) = _startpos in\n            ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_object_signature_expr), _startpos__1_), _endpos__3_, _startpos__3_) = _menhir_stack in\n            let _3 = () in\n            let _2 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__4_ in\n            let _v : 'tv_object_signature_expr = let _endpos = _endpos__4_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 364 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                              ( mksig ~loc:_sloc (PSlogicize (_1, [_4])) )\n# 8009 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_signature_expr _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1184)) : 'freshtv1186)\n        | LBRACE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1187 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * Lexing.position) = Obj.magic _menhir_stack in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                _menhir_run311 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState310 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState310) : 'freshtv1188)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv1189 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _, _menhir_s, _, _), _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1190)) : 'freshtv1192)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1193 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1194)\n\nand _menhir_run324 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _startpos ->\n    let _menhir_stack = (_menhir_stack, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1167 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8054 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) = _v in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1165 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__3_ : Lexing.position) = _endpos in\n        let ((_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8064 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8068 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) = _v in\n        let (_startpos__3_ : Lexing.position) = _startpos in\n        ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_object_signature_expr), _startpos__1_), _startpos__2_) = _menhir_stack in\n        let _2 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_object_signature_expr = let _endpos = _endpos__3_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 366 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                       ( mksig ~loc:_sloc (PSminus (_1, [_3])) )\n# 8081 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_signature_expr _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1166)) : 'freshtv1168)\n    | LBRACE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1169 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run311 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState325 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState325) : 'freshtv1170)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1171 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1172)\n\nand _menhir_goto_object_expression : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_object_expression -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    match _menhir_s with\n    | MenhirState363 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1133 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLONGREATER ->\n            _menhir_run369 _menhir_env (Obj.magic _menhir_stack)\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1129 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1127 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos__3_ : Lexing.position) = _endpos in\n            ((let ((_menhir_stack, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_object_expression), _startpos__2_) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__3_ in\n            let _v : 'tv_object_expression = \n# 737 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                     ( _2 )\n# 8134 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1128)) : 'freshtv1130)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1131 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1132)) : 'freshtv1134)\n    | MenhirState375 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv1139 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8149 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLONGREATER ->\n            _menhir_run369 _menhir_env (Obj.magic _menhir_stack)\n        | RBRACE | SEMICOLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv1135 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8161 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8166 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__3_), _endpos__4_), _endpos__6_, _, (_6 : 'tv_object_expression), _startpos__6_) = _menhir_stack in\n            let _5 = () in\n            let _4 = () in\n            let _2 = () in\n            let _1 = () in\n            let _v : 'tv_layer_obj_inst = let _endpos = _endpos__6_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 786 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                           ( mkobjinst ~loc:_sloc (POexternal ((CONaddress _3), _6)) )\n# 8178 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_layer_obj_inst _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1136)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv1137 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8188 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1138)) : 'freshtv1140)\n    | MenhirState379 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv1145 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8197 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLONGREATER ->\n            _menhir_run369 _menhir_env (Obj.magic _menhir_stack)\n        | RBRACE | SEMICOLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv1141 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8209 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (((((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8214 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__3_), _endpos__4_), _endpos__6_, _, (_6 : 'tv_object_expression), _startpos__6_) = _menhir_stack in\n            let _5 = () in\n            let _4 = () in\n            let _2 = () in\n            let _1 = () in\n            let _v : 'tv_layer_obj_inst = let _endpos = _endpos__6_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 785 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                          ( mkobjinst ~loc:_sloc (POexternal ((CONaddress _3), _6)) )\n# 8226 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_layer_obj_inst _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1142)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv1143 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8236 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1144)) : 'freshtv1146)\n    | MenhirState362 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1151 * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLONGREATER ->\n            _menhir_run369 _menhir_env (Obj.magic _menhir_stack)\n        | RBRACE | SEMICOLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1147 * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_object_expression), _startpos__1_) = _menhir_stack in\n            let _v : 'tv_layer_obj_inst = let _endpos = _endpos__1_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 784 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                      ( mkobjinst ~loc:_sloc (POinternal _1) )\n# 8258 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_layer_obj_inst _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1148)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1149 * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1150)) : 'freshtv1152)\n    | MenhirState476 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv1157 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8273 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLONGREATER ->\n            _menhir_run369 _menhir_env (Obj.magic _menhir_stack)\n        | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1153 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8285 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((((_menhir_stack, _endpos__1_, (_1 : 'tv_opt_logical_or_trusted), _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8290 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__3_), _endpos__5_, _, (_5 : 'tv_object_expression), _startpos__5_) = _menhir_stack in\n            let _4 = () in\n            let _2 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__5_ in\n            let _v : 'tv_object_declaration = let _endpos = _endpos__5_ in\n            let _symbolstartpos = if _startpos__1_ != _endpos__1_ then\n              _startpos__1_\n            else\n              _startpos__2_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 659 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _3, { pObjectType = None; pObjectDesc = _5; pObjectLoc = (make_loc _sloc) } )\n# 8305 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_declaration _menhir_env _menhir_stack _endpos _v _startpos) : 'freshtv1154)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1155 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8315 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1156)) : 'freshtv1158)\n    | MenhirState515 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv1163 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8324 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLONGREATER ->\n            _menhir_run369 _menhir_env (Obj.magic _menhir_stack)\n        | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((((('freshtv1159 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8336 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((((((_menhir_stack, _endpos__1_, (_1 : 'tv_opt_logical_or_trusted), _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8341 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__3_), (_4 : 'tv_base_layer_signature)), _endpos__6_, _, (_6 : 'tv_object_signature_expr), _startpos__6_), _endpos__8_, _, (_8 : 'tv_object_expression), _startpos__8_) = _menhir_stack in\n            let _7 = () in\n            let _5 = () in\n            let _2 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__8_ in\n            let _v : 'tv_object_declaration = let _endpos = _endpos__8_ in\n            let _symbolstartpos = if _startpos__1_ != _endpos__1_ then\n              _startpos__1_\n            else\n              _startpos__2_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 656 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _3, { pObjectType = Some { pObjectBase = _4; pObjectSignature = _6; pObjectTypLoc = (make_loc _sloc) };\n              pObjectDesc = _8; pObjectLoc = (make_loc _sloc) } )\n# 8358 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_declaration _menhir_env _menhir_stack _endpos _v _startpos) : 'freshtv1160)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((((('freshtv1161 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8368 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1162)) : 'freshtv1164)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_layer_type : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_layer_type -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v ->\n    match _menhir_s with\n    | MenhirState349 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1121) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_layer_type) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1119) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_2 : 'tv_layer_type) : 'tv_layer_type) = _v in\n        ((let _1 = () in\n        let _v : 'tv_layer_signature_annotation = \n# 755 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                      ( Some _2 )\n# 8393 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_signature_annotation _menhir_env _menhir_stack _v) : 'freshtv1120)) : 'freshtv1122)\n    | MenhirState399 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1125 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_layer_type) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1123 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        let (_endpos__3_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_3 : 'tv_layer_type) : 'tv_layer_type) = _v in\n        ((let (_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_layer_expression), _startpos__1_) = _menhir_stack in\n        let _2 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_layer_expression = let _endpos = _endpos__3_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 766 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      (  mklayer ~loc:_sloc (PLrelax (_1, _3)) )\n# 8417 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1124)) : 'freshtv1126)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_declaration : _menhir_env -> 'ttv_tail -> Lexing.position -> 'tv_declaration -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v ->\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1117 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n    let (_endpos : Lexing.position) = _endpos in\n    let (_v : 'tv_declaration) = _v in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1115 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n    let (_endpos__2_ : Lexing.position) = _endpos in\n    let ((_2 : 'tv_declaration) : 'tv_declaration) = _v in\n    ((let (_menhir_stack, _endpos__1_, (_1 : 'tv_declarations)) = _menhir_stack in\n    let _endpos = _endpos__2_ in\n    let _v : 'tv_declarations = \n# 219 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                              ( _2 :: _1 )\n# 8438 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_declarations _menhir_env _menhir_stack _endpos _v) : 'freshtv1116)) : 'freshtv1118)\n\nand _menhir_run485 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        _menhir_run487 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState485 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | RPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1113 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_menhir_s : _menhir_state) = MenhirState485 in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1111 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _2 = () in\n        let _1 = () in\n        let _v : 'tv_method_param = let _endpos = _endpos__2_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 719 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                   ( [\"()\", Some (mkfotyp ~loc:_sloc (PTbuiltin Tunit))] )\n# 8469 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_method_param _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1112)) : 'freshtv1114)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState485\n\nand _menhir_run496 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8480 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1109) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8491 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8495 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _v : 'tv_method_param = \n# 718 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( [_1, None] )\n# 8501 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_method_param _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1110)\n\nand _menhir_goto_external_declaration : _menhir_env -> 'ttv_tail -> Lexing.position -> 'tv_external_declaration -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v ->\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1107 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n    let (_endpos : Lexing.position) = _endpos in\n    let (_v : 'tv_external_declaration) = _v in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1105 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n    let (_endpos__2_ : Lexing.position) = _endpos in\n    let ((_2 : 'tv_external_declaration) : 'tv_external_declaration) = _v in\n    ((let (_menhir_stack, _endpos__1_, (_1 : 'tv_declarations)) = _menhir_stack in\n    let _endpos = _endpos__2_ in\n    let _v : 'tv_declarations = \n# 222 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                       ( _2 :: _1 )\n# 8520 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_declarations _menhir_env _menhir_stack _endpos _v) : 'freshtv1106)) : 'freshtv1108)\n\nand _menhir_goto_layer_signature_annotation : _menhir_env -> 'ttv_tail -> 'tv_layer_signature_annotation -> 'ttv_return =\n  fun _menhir_env _menhir_stack _v ->\n    let _menhir_stack = (_menhir_stack, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ((('freshtv1103 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8531 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * 'tv_layer_signature_annotation) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | EQUAL ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv1099 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8541 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * 'tv_layer_signature_annotation) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run390 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState358 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run360 _menhir_env (Obj.magic _menhir_stack) MenhirState358 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run359 _menhir_env (Obj.magic _menhir_stack) MenhirState358 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState358) : 'freshtv1100)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv1101 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8563 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * 'tv_layer_signature_annotation) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1102)) : 'freshtv1104)\n\nand _menhir_run350 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        _menhir_run345 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState350 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run334 _menhir_env (Obj.magic _menhir_stack) MenhirState350 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | RBRACKET ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1097 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_menhir_s : _menhir_state) = MenhirState350 in\n        ((let _menhir_stack = (_menhir_stack, _endpos, _menhir_s) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run345 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState351 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run334 _menhir_env (Obj.magic _menhir_stack) MenhirState351 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState351) : 'freshtv1098)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState350\n\nand _menhir_goto_constructor_declarations : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_constructor_declarations -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv1095 * _menhir_state * 'tv_opt_bar) * Lexing.position * _menhir_state * 'tv_constructor_declarations) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | BAR ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1089 * Lexing.position * _menhir_state * 'tv_constructor_declarations) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run263 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState274 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState274) : 'freshtv1090)\n    | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1091 * _menhir_state * 'tv_opt_bar) * Lexing.position * _menhir_state * 'tv_constructor_declarations) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, (_1 : 'tv_opt_bar)), _endpos__2_, _, (_2 : 'tv_constructor_declarations)) = _menhir_stack in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_type_definition = \n# 281 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                               ( PTbranches (List.rev _2) )\n# 8628 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_type_definition _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv1092)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1093 * _menhir_state * 'tv_opt_bar) * Lexing.position * _menhir_state * 'tv_constructor_declarations) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1094)) : 'freshtv1096)\n\nand _menhir_run252 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8642 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | COLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1085 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8654 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState253 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | ARRAY ->\n            _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState253 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState253 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LIST ->\n            _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState253 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState253 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MAPPING ->\n            _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState253 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState253) : 'freshtv1086)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1087 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8682 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1088)\n\nand _menhir_reduce10 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _v : 'tv_annotation_arguments = \n# 809 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( [] )\n# 8692 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_annotation_arguments _menhir_env _menhir_stack _menhir_s _v\n\nand _menhir_run9 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8699 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1083) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8710 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8714 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _v : 'tv_annotation_arguments = let _endpos = _endpos__1_ in\n    let _startpos = _startpos__1_ in\n    let _loc = (_startpos, _endpos) in\n    \n# 811 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n          ( [PAexpr (mkcmd ~loc:_loc (PCyield (mkexp_ ~loc:_loc  (PEconstant (CONuint (int_of_string(_1)))))))] )\n# 8723 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_annotation_arguments _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1084)\n\nand _menhir_run10 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8730 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1081) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8741 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8745 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _v : 'tv_annotation_arguments = \n# 815 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n            ( [PAclause (_1, [])] )\n# 8751 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_annotation_arguments _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1082)\n\nand _menhir_run11 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run211 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState11 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | EQUAL ->\n        _menhir_run24 _menhir_env (Obj.magic _menhir_stack) MenhirState11\n    | IDENT _v ->\n        _menhir_run14 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState11 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run13 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState11 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | RPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1079 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_menhir_s : _menhir_state) = MenhirState11 in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1077 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _2 = () in\n        let _1 = () in\n        let _v : 'tv_annotation_arguments = \n# 816 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                   ( [] )\n# 8785 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_annotation_arguments _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1078)) : 'freshtv1080)\n    | STRING _v ->\n        _menhir_run8 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState11 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run7 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState11 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState11\n\nand _menhir_run15 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8800 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1075) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8811 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8815 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _v : 'tv_annotation_arguments = let _endpos = _endpos__1_ in\n    let _startpos = _startpos__1_ in\n    let _loc = (_startpos, _endpos) in\n    \n# 810 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n         ( [PAexpr (mkcmd ~loc:_loc (PCyield (mkexp_ ~loc:_loc (PEconstant (CONint (int_of_string(_1)))))))] )\n# 8824 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_annotation_arguments _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1076)\n\nand _menhir_run16 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8831 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1073) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8842 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 8846 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _v : 'tv_annotation_arguments = \n# 814 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( [PAclause (_1, [])] )\n# 8852 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_annotation_arguments _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1074)\n\nand _menhir_run17 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1069 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | INT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1057 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8877 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RPAREN ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv1053 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8889 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv1051 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8897 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos__4_ : Lexing.position) = _endpos in\n                ((let (((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8903 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )), _startpos__3_) = _menhir_stack in\n                let _4 = () in\n                let _2 = () in\n                let _1 = () in\n                let _v : 'tv_annotation_arguments = let _endpos = _endpos__4_ in\n                let _startpos = _startpos__1_ in\n                let _loc = (_startpos, _endpos) in\n                \n# 812 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                              ( [PAexpr (mkcmd ~loc:_loc (PCyield (mkexp_ ~loc:_loc (PEconstant (CONaddress _3)))))] )\n# 8914 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_annotation_arguments _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1052)) : 'freshtv1054)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv1055 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8924 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (((_menhir_stack, _, _menhir_s, _), _), _, _, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1056)) : 'freshtv1058)\n        | UINT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1065 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8935 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RPAREN ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv1061 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8947 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv1059 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8955 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos__4_ : Lexing.position) = _endpos in\n                ((let (((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8961 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )), _startpos__3_) = _menhir_stack in\n                let _4 = () in\n                let _2 = () in\n                let _1 = () in\n                let _v : 'tv_annotation_arguments = let _endpos = _endpos__4_ in\n                let _startpos = _startpos__1_ in\n                let _loc = (_startpos, _endpos) in\n                \n# 813 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                               ( [PAexpr (mkcmd ~loc:_loc (PCyield (mkexp_ ~loc:_loc (PEconstant (CONaddress _3)))))] )\n# 8972 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_annotation_arguments _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1060)) : 'freshtv1062)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv1063 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 8982 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (((_menhir_stack, _, _menhir_s, _), _), _, _, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1064)) : 'freshtv1066)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1067 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _, _menhir_s, _), _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1068)) : 'freshtv1070)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1071 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1072)\n\nand _menhir_run26 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1047 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState27 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BANG ->\n            _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState27 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BITNOT ->\n            _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState27 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState27 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | INT _v ->\n            _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState27 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState27 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState27 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MINUS ->\n            _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState27 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | UINT _v ->\n            _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState27 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1045) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = MenhirState27 in\n            ((let _v : 'tv_loption_separated_nonempty_list_COMMA_expression__ = \n# 142 \"<standard.mly>\"\n    ( [] )\n# 9040 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_loption_separated_nonempty_list_COMMA_expression__ _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1046)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState27) : 'freshtv1048)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1049 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1050)\n\nand _menhir_run109 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState109 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState109 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState109 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState109 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState109 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState109 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState109 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState109 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState109 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState109\n\nand _menhir_run117 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1041 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9097 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) = _v in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | EQUAL ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1037 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9109 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState119 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState119 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState119 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState119 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState119) : 'freshtv1038)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1039 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9169 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _, _menhir_s, _), _, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1040)) : 'freshtv1042)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1043 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1044)\n\nand _menhir_run120 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState120 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState120 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState120 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState120 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState120 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState120 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState120 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState120 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState120 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState120\n\nand _menhir_run123 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BEGIN ->\n        _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | EMIT ->\n        _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FAIL ->\n        _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FIRST ->\n        _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FOLD ->\n        _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FOR ->\n        _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState123 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IF ->\n        _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState123 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LET ->\n        _menhir_run124 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MATCH ->\n        _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | TRANSFERETH ->\n        _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState123 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState123 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState123\n\nand _menhir_run127 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LBRACKET ->\n        _menhir_run5 _menhir_env (Obj.magic _menhir_stack) MenhirState127 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _ ->\n        _menhir_reduce19 _menhir_env (Obj.magic _menhir_stack) MenhirState127\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState127\n\nand _menhir_run137 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LBRACKET ->\n        _menhir_run5 _menhir_env (Obj.magic _menhir_stack) MenhirState137 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _ ->\n        _menhir_reduce19 _menhir_env (Obj.magic _menhir_stack) MenhirState137\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState137\n\nand _menhir_run149 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LBRACKET ->\n        _menhir_run5 _menhir_env (Obj.magic _menhir_stack) MenhirState149 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _ ->\n        _menhir_reduce19 _menhir_env (Obj.magic _menhir_stack) MenhirState149\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState149\n\nand _menhir_run157 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1035) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _1 = () in\n    let _startpos = _startpos__1_ in\n    let _endpos = _endpos__1_ in\n    let _v : 'tv_command_core = \n# 555 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n          ( PCfail )\n# 9318 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_command_core _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv1036)\n\nand _menhir_run158 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState158 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState158 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState158 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState158 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState158 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState158 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState158 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState158 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState158 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState158\n\nand _menhir_run160 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BEGIN ->\n        _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | EMIT ->\n        _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FAIL ->\n        _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FIRST ->\n        _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FOLD ->\n        _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FOR ->\n        _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState160 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IF ->\n        _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState160 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LET ->\n        _menhir_run124 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MATCH ->\n        _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | TRANSFERETH ->\n        _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState160 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState160 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState160\n\nand _menhir_run161 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | ASSERT ->\n        _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BEGIN ->\n        _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | DENY ->\n        _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | EMIT ->\n        _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FAIL ->\n        _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FIRST ->\n        _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FOLD ->\n        _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FOR ->\n        _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | GHOST ->\n        _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState161 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IF ->\n        _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState161 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LET ->\n        _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MATCH ->\n        _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | TRANSFERETH ->\n        _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState161 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState161 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState161\n\nand _menhir_run162 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BEGIN ->\n        _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | EMIT ->\n        _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FAIL ->\n        _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FIRST ->\n        _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FOLD ->\n        _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FOR ->\n        _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState162 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IF ->\n        _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState162 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LET ->\n        _menhir_run124 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MATCH ->\n        _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | TRANSFERETH ->\n        _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState162 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState162 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState162\n\nand _menhir_goto_annotation : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_annotation -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    match _menhir_s with\n    | MenhirState219 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1029 * _menhir_state * 'tv_annotations_plus)) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_annotation) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1027 * _menhir_state * 'tv_annotations_plus)) = Obj.magic _menhir_stack in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_3 : 'tv_annotation) : 'tv_annotation) = _v in\n        ((let (_menhir_stack, _menhir_s, (_1 : 'tv_annotations_plus)) = _menhir_stack in\n        let _2 = () in\n        let _v : 'tv_annotations_plus = \n# 796 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                       ( _3 :: _1 )\n# 9521 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_annotations_plus _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1028)) : 'freshtv1030)\n    | MenhirState6 | MenhirState11 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1033) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_annotation) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1031) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let ((_1 : 'tv_annotation) : 'tv_annotation) = _v in\n        ((let _v : 'tv_annotations_plus = \n# 795 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                ( [_1] )\n# 9536 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_annotations_plus _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1032)) : 'freshtv1034)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_opt_type_annotation : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_opt_type_annotation -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState487 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1013 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9551 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_opt_type_annotation) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv1011 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9557 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_opt_type_annotation) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9562 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__1_), _, (_2 : 'tv_opt_type_annotation)) = _menhir_stack in\n        let _v : 'tv_method_parameter = \n# 727 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                               ( _1, _2 )\n# 9567 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv1009) = _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_method_parameter) = _v in\n        ((match _menhir_s with\n        | MenhirState493 ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1003 * _menhir_state * 'tv_method_parameters)) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let (_v : 'tv_method_parameter) = _v in\n            ((let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv1001 * _menhir_state * 'tv_method_parameters)) = Obj.magic _menhir_stack in\n            let (_ : _menhir_state) = _menhir_s in\n            let ((_3 : 'tv_method_parameter) : 'tv_method_parameter) = _v in\n            ((let (_menhir_stack, _menhir_s, (_1 : 'tv_method_parameters)) = _menhir_stack in\n            let _2 = () in\n            let _v : 'tv_method_parameters = \n# 724 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                              ( _3 :: _1 )\n# 9588 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_method_parameters _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1002)) : 'freshtv1004)\n        | MenhirState485 ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1007) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let (_v : 'tv_method_parameter) = _v in\n            ((let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv1005) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let ((_1 : 'tv_method_parameter) : 'tv_method_parameter) = _v in\n            ((let _v : 'tv_method_parameters = \n# 723 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                     ( [_1] )\n# 9603 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_method_parameters _menhir_env _menhir_stack _menhir_s _v) : 'freshtv1006)) : 'freshtv1008)\n        | _ ->\n            _menhir_fail ()) : 'freshtv1010)) : 'freshtv1012)) : 'freshtv1014)\n    | MenhirState497 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv1019 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | EQUAL ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1015 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState499 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState499 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState499 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState499 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState499) : 'freshtv1016)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv1017 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1018)) : 'freshtv1020)\n    | MenhirState507 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv1025 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9680 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | EQUAL ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv1021 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9690 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState509 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState509 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState509 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState509 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState509) : 'freshtv1022)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv1023 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9750 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv1024)) : 'freshtv1026)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_indexed_opt : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_indexed_opt -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : (((('freshtv999 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9764 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_indexed_opt) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | RPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv995 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9774 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_indexed_opt) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv993 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9782 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_indexed_opt) = Obj.magic _menhir_stack in\n        let (_endpos__6_ : Lexing.position) = _endpos in\n        ((let ((((_menhir_stack, _startpos__1_), _endpos__2_, (_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9788 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__2_), _endpos__4_, _, (_4 : 'tv_type_expression), _startpos__4_), _, (_5 : 'tv_indexed_opt)) = _menhir_stack in\n        let _6 = () in\n        let _3 = () in\n        let _1 = () in\n        let _endpos = _endpos__6_ in\n        let _v : 'tv_event_parameter = \n# 345 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( (_2, _4, _5) )\n# 9797 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv991) = _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_v : 'tv_event_parameter) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv989 * Lexing.position * 'tv_event_parameters) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_v : 'tv_event_parameter) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv987 * Lexing.position * 'tv_event_parameters) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let ((_2 : 'tv_event_parameter) : 'tv_event_parameter) = _v in\n        ((let (_menhir_stack, _endpos__1_, (_1 : 'tv_event_parameters)) = _menhir_stack in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_event_parameters = \n# 335 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                      ( _2 :: _1 )\n# 9816 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_event_parameters _menhir_env _menhir_stack _endpos _v) : 'freshtv988)) : 'freshtv990)) : 'freshtv992)) : 'freshtv994)) : 'freshtv996)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv997 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9826 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state * 'tv_indexed_opt) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv998)) : 'freshtv1000)\n\nand _menhir_run130 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv985) = Obj.magic _menhir_stack in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    ((let _1 = () in\n    let _v : 'tv_eq_or_assign = \n# 595 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n          ( () )\n# 9841 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_eq_or_assign _menhir_env _menhir_stack _menhir_s _v) : 'freshtv986)\n\nand _menhir_run131 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv983) = Obj.magic _menhir_stack in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    ((let _1 = () in\n    let _v : 'tv_eq_or_assign = \n# 596 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( () )\n# 9855 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_eq_or_assign _menhir_env _menhir_stack _menhir_s _v) : 'freshtv984)\n\nand _menhir_goto_object_signature_field : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_object_signature_field -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    match _menhir_s with\n    | MenhirState295 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv977 * _menhir_state * 'tv_object_signature_fields) * _menhir_state) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_object_signature_field) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv975 * _menhir_state * 'tv_object_signature_fields) * _menhir_state) = Obj.magic _menhir_stack in\n        let (_ : _menhir_state) = _menhir_s in\n        let ((_3 : 'tv_object_signature_field) : 'tv_object_signature_field) = _v in\n        ((let ((_menhir_stack, _menhir_s, (_1 : 'tv_object_signature_fields)), _) = _menhir_stack in\n        let _2 = () in\n        let _v : 'tv_object_signature_fields = \n# 370 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                              ( _3 :: _1 )\n# 9876 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_signature_fields _menhir_env _menhir_stack _menhir_s _v) : 'freshtv976)) : 'freshtv978)\n    | MenhirState281 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv981) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_object_signature_field) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv979) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let ((_1 : 'tv_object_signature_field) : 'tv_object_signature_field) = _v in\n        ((let _v : 'tv_object_signature_fields = \n# 369 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                            ( [_1] )\n# 9891 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_signature_fields _menhir_env _menhir_stack _menhir_s _v) : 'freshtv980)) : 'freshtv982)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_constructor_parameters : _menhir_env -> 'ttv_tail -> Lexing.position -> 'tv_constructor_parameters -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v ->\n    let _menhir_stack = (_menhir_stack, _endpos, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv973 * Lexing.position * 'tv_constructor_parameters) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv963) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run196 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState267 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState267) : 'freshtv964)\n    | BAR | CONST | EOF | EVENT | EXTERNAL | LAYER | LBRACKET | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv969 * Lexing.position * 'tv_constructor_parameters) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _endpos__1_, (_1 : 'tv_constructor_parameters)) = _menhir_stack in\n        let _endpos = _endpos__1_ in\n        let _v : 'tv_constructor_params = \n# 305 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( List.fold_left (fun a b -> List.rev_append b a) [] _1 )\n# 9927 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv967) = _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_v : 'tv_constructor_params) = _v in\n        ((let _menhir_stack = (_menhir_stack, _endpos, _v) in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv965 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 9938 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * 'tv_constructor_params) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | LBRACKET ->\n            _menhir_run5 _menhir_env (Obj.magic _menhir_stack) MenhirState264 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BAR | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n            _menhir_reduce19 _menhir_env (Obj.magic _menhir_stack) MenhirState264\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState264) : 'freshtv966)) : 'freshtv968)) : 'freshtv970)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv971 * Lexing.position * 'tv_constructor_parameters) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv972)) : 'freshtv974)\n\nand _menhir_goto_field_declarations : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_field_declarations -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ('freshtv961 * _menhir_state * Lexing.position) * _menhir_state * 'tv_field_declarations) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | SEMICOLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv959 * _menhir_state * 'tv_field_declarations) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = MenhirState255 in\n        ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run252 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState256 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | RBRACE ->\n            _menhir_reduce217 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState256) : 'freshtv960)\n    | RBRACE ->\n        _menhir_reduce216 _menhir_env (Obj.magic _menhir_stack) MenhirState255\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState255) : 'freshtv962)\n\nand _menhir_goto_type_declaration : _menhir_env -> 'ttv_tail -> Lexing.position -> 'tv_type_declaration -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v _startpos ->\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv957) = Obj.magic _menhir_stack in\n    let (_endpos : Lexing.position) = _endpos in\n    let (_v : 'tv_type_declaration) = _v in\n    let (_startpos : Lexing.position) = _startpos in\n    ((let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv955) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let ((_1 : 'tv_type_declaration) : 'tv_type_declaration) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _endpos = _endpos__1_ in\n    let _v : 'tv_declaration = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 225 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                      ( fst _1, mkdecl ~loc:_sloc (PDtype (snd _1)) )\n# 10008 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv956)) : 'freshtv958)\n\nand _menhir_run241 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _menhir_stack = (_menhir_stack, _menhir_s) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState241 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | ARRAY ->\n        _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState241 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState241 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LIST ->\n        _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState241 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState241 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MAPPING ->\n        _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState241 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState241\n\nand _menhir_fail : unit -> 'a =\n  fun () ->\n    Printf.fprintf stderr \"Internal failure -- please contact the parser generator's developers.\\n%!\";\n    assert false\n\nand _menhir_run436 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10043 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv953) = Obj.magic _menhir_stack in\n    ((let (_, _endpos) = Obj.magic _menhir_stack in\n    let _v : 'tv_event_parameters = \n# 334 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( [] )\n# 10054 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_event_parameters _menhir_env _menhir_stack _endpos _v) : 'freshtv954)\n\nand _menhir_run263 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10061 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv951) = Obj.magic _menhir_stack in\n    ((let (_, _endpos) = Obj.magic _menhir_stack in\n    let _v : 'tv_constructor_parameters = \n# 308 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( [] )\n# 10072 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_constructor_parameters _menhir_env _menhir_stack _endpos _v) : 'freshtv952)\n\nand _menhir_run114 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | RBRACKET ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv947 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        ((let _menhir_stack = (_menhir_stack, _endpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | DOUBLEARROW ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv943 * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ASSERT ->\n                _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BEGIN ->\n                _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | DENY ->\n                _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EMIT ->\n                _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FAIL ->\n                _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FIRST ->\n                _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOLD ->\n                _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | FOR ->\n                _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | GHOST ->\n                _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState116 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IF ->\n                _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState116 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LET ->\n                _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MATCH ->\n                _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | TRANSFERETH ->\n                _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState116 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState116 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState116) : 'freshtv944)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv945 * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _menhir_s, _), _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv946)) : 'freshtv948)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv949 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv950)\n\nand _menhir_run195 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10162 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | COLONCOLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv939) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = MenhirState195 in\n        ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv935 * _menhir_state) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10184 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv933 * _menhir_state) = Obj.magic _menhir_stack in\n            let (_endpos__2_ : Lexing.position) = _endpos in\n            let ((_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10194 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10198 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos__2_ : Lexing.position) = _startpos in\n            ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n            let _1 = () in\n            let _v : 'tv_match_pattern_tail = \n# 630 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                     ( PPTcons _2 )\n# 10206 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_match_pattern_tail _menhir_env _menhir_stack _menhir_s _v) : 'freshtv934)) : 'freshtv936)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv937 * _menhir_state) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv938)) : 'freshtv940)\n    | IDENT _v ->\n        _menhir_run196 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState195 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | DOUBLEARROW ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv941) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = MenhirState195 in\n        ((let _v : 'tv_match_pattern_tail = \n# 629 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n          ( PPTother [] )\n# 10225 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_match_pattern_tail _menhir_env _menhir_stack _menhir_s _v) : 'freshtv942)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState195\n\nand _menhir_goto_nonempty_list_atom_ : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_nonempty_list_atom_ -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    match _menhir_s with\n    | MenhirState509 | MenhirState505 | MenhirState499 | MenhirState453 | MenhirState235 | MenhirState24 | MenhirState203 | MenhirState116 | MenhirState192 | MenhirState119 | MenhirState189 | MenhirState122 | MenhirState123 | MenhirState185 | MenhirState126 | MenhirState136 | MenhirState148 | MenhirState180 | MenhirState178 | MenhirState176 | MenhirState156 | MenhirState160 | MenhirState172 | MenhirState161 | MenhirState164 | MenhirState162 | MenhirState158 | MenhirState154 | MenhirState152 | MenhirState146 | MenhirState142 | MenhirState140 | MenhirState134 | MenhirState132 | MenhirState120 | MenhirState109 | MenhirState107 | MenhirState27 | MenhirState28 | MenhirState98 | MenhirState29 | MenhirState33 | MenhirState36 | MenhirState85 | MenhirState83 | MenhirState81 | MenhirState79 | MenhirState77 | MenhirState75 | MenhirState73 | MenhirState70 | MenhirState68 | MenhirState66 | MenhirState64 | MenhirState62 | MenhirState60 | MenhirState58 | MenhirState56 | MenhirState54 | MenhirState52 | MenhirState50 | MenhirState48 | MenhirState37 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv923 * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | DOT ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv917 * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState45 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState45 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState45 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState45 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState45 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState45) : 'freshtv918)\n        | ASSIGN | BAR | BARBAR | BITAND | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | ELSE | END | EOF | EQUAL | EVENT | EXTERNAL | GREATER | GREATEREQ | IN | LAYER | LESS | LESSEQ | LET | LOGICAL | MINUS | MOD | OBJECT | PLUS | RBRACE | RBRACKET | RPAREN | SEMICOLON | SHL | SHR | SIGNATURE | SLASH | STAR | THEN | TO | TRUSTED | TYPE | UNEQUAL | WITH | XOR ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv919 * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _endpos_a_, _menhir_s, (a : 'tv_nonempty_list_atom_), _startpos_a_) = _menhir_stack in\n            let _startpos = _startpos_a_ in\n            let _endpos = _endpos_a_ in\n            let _v : 'tv_expression = let _endpos = _endpos_a_ in\n            let _symbolstartpos = _startpos_a_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 506 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n            ( match a with\n      | [hd] -> hd\n      | _ -> mkexp_ ~loc:_sloc (PEapp a)\n    )\n# 10278 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv920)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv921 * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv922)) : 'freshtv924)\n    | MenhirState45 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv927 * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position)) * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv925 * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position)) * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _endpos_a1_, _menhir_s, (a1 : 'tv_nonempty_list_atom_), _startpos_a1_), _endpos_a2_, _, (a2 : 'tv_nonempty_list_atom_), _startpos_a2_) = _menhir_stack in\n        let _2 = () in\n        let _startpos = _startpos_a1_ in\n        let _endpos = _endpos_a2_ in\n        let _v : 'tv_expression = let _endpos = _endpos_a2_ in\n        let _symbolstartpos = _startpos_a1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 510 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                          ( let x = mkexp_ ~loc:_sloc (PEfield (a1, a2)) in\n      (* print_endline (\"PEfield: \" ^ (string_of_p_expression x)); *) x\n    )\n# 10305 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv926)) : 'freshtv928)\n    | MenhirState47 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv931 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv929 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _endpos_x_, _menhir_s, (x : 'tv_atom), _startpos_x_), _endpos_xs_, _, (xs : 'tv_nonempty_list_atom_), _startpos_xs_) = _menhir_stack in\n        let _startpos = _startpos_x_ in\n        let _endpos = _endpos_xs_ in\n        let _v : 'tv_nonempty_list_atom_ = \n# 223 \"<standard.mly>\"\n    ( x :: xs )\n# 10319 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_nonempty_list_atom_ _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv930)) : 'freshtv932)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_reduce169 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _v : 'tv_method_kind = \n# 379 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n             ( MKnormal )\n# 10330 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_method_kind _menhir_env _menhir_stack _menhir_s _v\n\nand _menhir_run282 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv915) = Obj.magic _menhir_stack in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    ((let _1 = () in\n    let _v : 'tv_method_kind = \n# 385 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n            ( MKrefined )\n# 10344 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_method_kind _menhir_env _menhir_stack _menhir_s _v) : 'freshtv916)\n\nand _menhir_run284 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv913) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _1 = () in\n    let _v : 'tv_method_kind = \n# 384 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n             ( MKlogical )\n# 10360 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_method_kind _menhir_env _menhir_stack _menhir_s _v) : 'freshtv914)\n\nand _menhir_run285 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | CONST ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv907 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv905 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _2 = () in\n        let _1 = () in\n        let _v : 'tv_method_kind = \n# 383 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                ( MKconstghost )\n# 10382 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_method_kind _menhir_env _menhir_stack _menhir_s _v) : 'freshtv906)) : 'freshtv908)\n    | IDENT _ ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv909 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _1 = () in\n        let _v : 'tv_method_kind = \n# 381 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n             ( MKghost )\n# 10393 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_method_kind _menhir_env _menhir_stack _menhir_s _v) : 'freshtv910)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv911 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv912)\n\nand _menhir_run287 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _menhir_stack = (_menhir_stack, _menhir_s) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | COLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv901 * _menhir_state) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState288 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | ARRAY ->\n            _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState288 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState288 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LIST ->\n            _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState288 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState288 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MAPPING ->\n            _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState288 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState288) : 'freshtv902)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv903 * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv904)\n\nand _menhir_run292 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _menhir_stack = (_menhir_stack, _menhir_s) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | GHOST ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv895 * _menhir_state) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv893 * _menhir_state) = Obj.magic _menhir_stack in\n        let (_startpos__2_ : Lexing.position) = _startpos in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        let _2 = () in\n        let _1 = () in\n        let _v : 'tv_method_kind = \n# 382 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                ( MKconstghost )\n# 10460 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_method_kind _menhir_env _menhir_stack _menhir_s _v) : 'freshtv894)) : 'freshtv896)\n    | IDENT _ ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv897 * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        let _1 = () in\n        let _v : 'tv_method_kind = \n# 380 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n             ( MKconst )\n# 10471 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_method_kind _menhir_env _menhir_stack _menhir_s _v) : 'freshtv898)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv899 * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv900)\n\nand _menhir_goto_object_signature_expr : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_object_signature_expr -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    match _menhir_s with\n    | MenhirState280 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv845 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10491 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | MINUS ->\n            _menhir_run324 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | WITH ->\n            _menhir_run308 _menhir_env (Obj.magic _menhir_stack)\n        | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv841 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10505 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (((_menhir_stack, _startpos__1_), _endpos__2_, (_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10510 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__2_), _endpos__4_, _, (_4 : 'tv_object_signature_expr), _startpos__4_) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__4_ in\n            let _v : 'tv_object_signature_declaration = \n# 351 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _2, _4 )\n# 10519 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_signature_declaration _menhir_env _menhir_stack _endpos _v _startpos) : 'freshtv842)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv843 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10529 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv844)) : 'freshtv846)\n    | MenhirState337 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv861 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10538 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | MINUS ->\n            _menhir_run324 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | WITH ->\n            _menhir_run308 _menhir_env (Obj.magic _menhir_stack)\n        | RBRACE | SEMICOLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv857 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10552 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10557 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__1_), _endpos__3_, _, (_3 : 'tv_object_signature_expr), _startpos__3_) = _menhir_stack in\n            let _2 = () in\n            let _v : 'tv_layer_signature_field = \n# 409 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                       ( _1, _3 )\n# 10563 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv855) = _menhir_stack in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let (_v : 'tv_layer_signature_field) = _v in\n            ((match _menhir_s with\n            | MenhirState340 ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv849 * _menhir_state * 'tv_layer_signature_fields) * _menhir_state) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let (_v : 'tv_layer_signature_field) = _v in\n                ((let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv847 * _menhir_state * 'tv_layer_signature_fields) * _menhir_state) = Obj.magic _menhir_stack in\n                let (_ : _menhir_state) = _menhir_s in\n                let ((_3 : 'tv_layer_signature_field) : 'tv_layer_signature_field) = _v in\n                ((let ((_menhir_stack, _menhir_s, (_1 : 'tv_layer_signature_fields)), _) = _menhir_stack in\n                let _2 = () in\n                let _v : 'tv_layer_signature_fields = \n# 406 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                            ( _3 :: _1 )\n# 10584 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_layer_signature_fields _menhir_env _menhir_stack _menhir_s _v) : 'freshtv848)) : 'freshtv850)\n            | MenhirState334 ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv853) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let (_v : 'tv_layer_signature_field) = _v in\n                ((let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv851) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let ((_1 : 'tv_layer_signature_field) : 'tv_layer_signature_field) = _v in\n                ((let _v : 'tv_layer_signature_fields = \n# 405 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                           ( [_1] )\n# 10599 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_layer_signature_fields _menhir_env _menhir_stack _menhir_s _v) : 'freshtv852)) : 'freshtv854)\n            | _ ->\n                _menhir_fail ()) : 'freshtv856)) : 'freshtv858)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv859 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10611 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv860)) : 'freshtv862)\n    | MenhirState460 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv867 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10620 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | MINUS ->\n            _menhir_run324 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | WITH ->\n            _menhir_run308 _menhir_env (Obj.magic _menhir_stack)\n        | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv863 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10634 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (((((_menhir_stack, _endpos__1_, (_1 : 'tv_opt_logical_or_trusted), _startpos__1_), _startpos__2_), _startpos__3_), _endpos__4_, (_4 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10639 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__4_), _endpos__6_, _, (_6 : 'tv_object_signature_expr), _startpos__6_) = _menhir_stack in\n            let _5 = () in\n            let _3 = () in\n            let _2 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__6_ in\n            let _v : 'tv_object_signature_declaration = \n# 354 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( if _1 <> POnormal then\n          print_endline \"Warning: object signatures should not be marked logical or trusted\";\n        _4, _6 )\n# 10651 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_signature_declaration _menhir_env _menhir_stack _endpos _v _startpos) : 'freshtv864)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv865 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10661 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv866)) : 'freshtv868)\n    | MenhirState466 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv883 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10670 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | MINUS ->\n            _menhir_run324 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | WITH ->\n            _menhir_run308 _menhir_env (Obj.magic _menhir_stack)\n        | COMMA | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv879 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10684 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10689 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__1_), _endpos__3_, _, (_3 : 'tv_object_signature_expr), _startpos__3_) = _menhir_stack in\n            let _2 = () in\n            let _v : 'tv_base_slot = \n# 673 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                       ( _1, _3 )\n# 10695 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv877) = _menhir_stack in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let (_v : 'tv_base_slot) = _v in\n            ((match _menhir_s with\n            | MenhirState472 ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv871 * _menhir_state * 'tv_base_slots)) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let (_v : 'tv_base_slot) = _v in\n                ((let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv869 * _menhir_state * 'tv_base_slots)) = Obj.magic _menhir_stack in\n                let (_ : _menhir_state) = _menhir_s in\n                let ((_3 : 'tv_base_slot) : 'tv_base_slot) = _v in\n                ((let (_menhir_stack, _menhir_s, (_1 : 'tv_base_slots)) = _menhir_stack in\n                let _2 = () in\n                let _v : 'tv_base_slots = \n# 670 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                ( _3 :: _1 )\n# 10716 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_base_slots _menhir_env _menhir_stack _menhir_s _v) : 'freshtv870)) : 'freshtv872)\n            | MenhirState463 ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv875) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let (_v : 'tv_base_slot) = _v in\n                ((let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv873) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let ((_1 : 'tv_base_slot) : 'tv_base_slot) = _v in\n                ((let _v : 'tv_base_slots = \n# 669 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n               ( [_1] )\n# 10731 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_base_slots _menhir_env _menhir_stack _menhir_s _v) : 'freshtv874)) : 'freshtv876)\n            | _ ->\n                _menhir_fail ()) : 'freshtv878)) : 'freshtv880)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv881 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10743 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv882)) : 'freshtv884)\n    | MenhirState479 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv891 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10752 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | EQUAL ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv885 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10762 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | CLONE ->\n                _menhir_run365 _menhir_env (Obj.magic _menhir_stack) MenhirState515 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run364 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState515 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run363 _menhir_env (Obj.magic _menhir_stack) MenhirState515 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState515) : 'freshtv886)\n        | LBRACE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv887 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10782 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | LET ->\n                _menhir_run482 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState481 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState481) : 'freshtv888)\n        | MINUS ->\n            _menhir_run324 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | WITH ->\n            _menhir_run308 _menhir_env (Obj.magic _menhir_stack)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv889 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10806 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv890)) : 'freshtv892)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_base_layer_signature : _menhir_env -> 'ttv_tail -> 'tv_base_layer_signature -> 'ttv_return =\n  fun _menhir_env _menhir_stack _v ->\n    let _menhir_stack = (_menhir_stack, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : ((('freshtv839 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10820 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    ) * Lexing.position) * 'tv_base_layer_signature) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | COLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv835 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10830 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * 'tv_base_layer_signature) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run306 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState479 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run281 _menhir_env (Obj.magic _menhir_stack) MenhirState479 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState479) : 'freshtv836)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv837 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10850 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * 'tv_base_layer_signature) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv838)) : 'freshtv840)\n\nand _menhir_run466 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10857 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        _menhir_run306 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState466 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run281 _menhir_env (Obj.magic _menhir_stack) MenhirState466 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState466\n\nand _menhir_run363 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | CLONE ->\n        _menhir_run365 _menhir_env (Obj.magic _menhir_stack) MenhirState363 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run364 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState363 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run363 _menhir_env (Obj.magic _menhir_stack) MenhirState363 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState363\n\nand _menhir_run364 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10892 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv833) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10903 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10907 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _startpos = _startpos__1_ in\n    let _endpos = _endpos__1_ in\n    let _v : 'tv_object_expression = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 734 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( mkobj ~loc:_sloc (POname _1) )\n# 10918 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_object_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv834)\n\nand _menhir_run365 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv829 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10935 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) = _v in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv827 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let ((_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10945 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10949 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) = _v in\n        let (_startpos__2_ : Lexing.position) = _startpos in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_object_expression = let _endpos = _endpos__2_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 735 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                 (mkobj ~loc:_sloc (POclone _2))\n# 10962 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv828)) : 'freshtv830)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv831 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv832)\n\nand _menhir_goto_layer_signature : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_layer_signature -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState333 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv799 * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10982 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv797 * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10988 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n        ((let ((((_menhir_stack, _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 10993 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__3_), _endpos__5_, _, (_5 : 'tv_layer_signature)) = _menhir_stack in\n        let _4 = () in\n        let _2 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__5_ in\n        let _v : 'tv_layer_signature_declaration = \n# 398 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _3, _5 )\n# 11003 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv795) = _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_v : 'tv_layer_signature_declaration) = _v in\n        let (_startpos : Lexing.position) = _startpos in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv793) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_v : 'tv_layer_signature_declaration) = _v in\n        let (_startpos : Lexing.position) = _startpos in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv791) = Obj.magic _menhir_stack in\n        let (_endpos__1_ : Lexing.position) = _endpos in\n        let ((_1 : 'tv_layer_signature_declaration) : 'tv_layer_signature_declaration) = _v in\n        let (_startpos__1_ : Lexing.position) = _startpos in\n        ((let _endpos = _endpos__1_ in\n        let _v : 'tv_declaration = let _endpos = _endpos__1_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 227 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                 ( fst _1, mkdecl ~loc:_sloc  (PDlayer_sig (snd _1)) )\n# 11027 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv792)) : 'freshtv794)) : 'freshtv796)) : 'freshtv798)) : 'freshtv800)\n    | MenhirState351 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv803 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv801 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n        ((let (((_menhir_stack, _menhir_s, _startpos__1_), _endpos__2_, _), _endpos__3_, _, (_3 : 'tv_layer_signature)) = _menhir_stack in\n        let _2 = () in\n        let _1 = () in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_layer_type = let _endpos = _endpos__3_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 417 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( { pLayerBase = mklayersign ~loc:_sloc (PLSconstr []); pLayerSignature = _3; pLayerLoc=(make_loc _sloc) } )\n# 11045 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_type _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv802)) : 'freshtv804)\n    | MenhirState350 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv809 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | RBRACKET ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv805 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                _menhir_run345 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState354 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run334 _menhir_env (Obj.magic _menhir_stack) MenhirState354 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState354) : 'freshtv806)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv807 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv808)) : 'freshtv810)\n    | MenhirState354 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv813 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv811 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n        ((let ((((_menhir_stack, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_layer_signature)), _endpos__3_), _endpos__4_, _, (_4 : 'tv_layer_signature)) = _menhir_stack in\n        let _3 = () in\n        let _1 = () in\n        let _endpos = _endpos__4_ in\n        let _v : 'tv_layer_type = let _endpos = _endpos__4_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 415 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( { pLayerBase = _2; pLayerSignature = _4; pLayerLoc =(make_loc _sloc) } )\n# 11092 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_type _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv812)) : 'freshtv814)\n    | MenhirState369 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv817 * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv815 * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_object_expression), _startpos__1_), _endpos__3_, _, (_3 : 'tv_layer_signature)) = _menhir_stack in\n        let _2 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_object_expression = let _endpos = _endpos__3_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 736 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                    ( mkobj ~loc:_sloc (POrelax (_1, _3)) )\n# 11110 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv816)) : 'freshtv818)\n    | MenhirState463 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv825 * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv821 * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv819 * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n            let (_endpos__3_ : Lexing.position) = _endpos in\n            ((let ((_menhir_stack, _startpos__1_), _endpos__2_, _, (_2 : 'tv_layer_signature)) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _v : 'tv_base_layer_signature = \n# 665 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                   ( _2 )\n# 11133 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_base_layer_signature _menhir_env _menhir_stack _v) : 'freshtv820)) : 'freshtv822)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv823 * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv824)) : 'freshtv826)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_run336 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11149 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | COLON ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv787 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11161 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run306 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState337 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run281 _menhir_env (Obj.magic _menhir_stack) MenhirState337 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState337) : 'freshtv788)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv789 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11181 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv790)\n\nand _menhir_reduce143 : _menhir_env -> 'ttv_tail * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11189 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) * Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack ->\n    let (_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11195 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )), _startpos__1_) = _menhir_stack in\n    let _endpos = _endpos__1_ in\n    let _v : 'tv_layer_signature = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 401 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( mklayersign ~loc:_sloc (PLSname _1) )\n# 11204 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_layer_signature _menhir_env _menhir_stack _endpos _menhir_s _v\n\nand _menhir_run7 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11211 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv785) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11222 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11226 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _v : 'tv_annotation = let _endpos = _endpos__1_ in\n    let _startpos = _startpos__1_ in\n    let _loc = (_startpos, _endpos) in\n    \n# 802 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n          ( PAexpr (mkcmd ~loc:_loc (PCyield (mkexp_ ~loc:_loc  (PEconstant (CONuint (int_of_string(_1))))))) )\n# 11235 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_annotation _menhir_env _menhir_stack _menhir_s _v) : 'freshtv786)\n\nand _menhir_run8 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11242 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run17 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState8 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run16 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState8 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run15 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState8 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run11 _menhir_env (Obj.magic _menhir_stack) MenhirState8 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | STRING _v ->\n        _menhir_run10 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState8 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run9 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState8 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | COMMA | RBRACKET | RPAREN ->\n        _menhir_reduce10 _menhir_env (Obj.magic _menhir_stack) MenhirState8\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState8\n\nand _menhir_goto_annotations : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_annotations -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState127 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv717 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv713 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11285 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ASSIGN ->\n                _menhir_run131 _menhir_env (Obj.magic _menhir_stack) MenhirState129\n            | EQUAL ->\n                _menhir_run130 _menhir_env (Obj.magic _menhir_stack) MenhirState129\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState129) : 'freshtv714)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv715 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv716)) : 'freshtv718)\n    | MenhirState137 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv723 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv719 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11320 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ASSIGN ->\n                _menhir_run131 _menhir_env (Obj.magic _menhir_stack) MenhirState139\n            | EQUAL ->\n                _menhir_run130 _menhir_env (Obj.magic _menhir_stack) MenhirState139\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState139) : 'freshtv720)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv721 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv722)) : 'freshtv724)\n    | MenhirState149 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv729 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv725 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11355 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ASSIGN ->\n                _menhir_run131 _menhir_env (Obj.magic _menhir_stack) MenhirState151\n            | EQUAL ->\n                _menhir_run130 _menhir_env (Obj.magic _menhir_stack) MenhirState151\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState151) : 'freshtv726)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv727 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv728)) : 'freshtv730)\n    | MenhirState4 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv737 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11382 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | EQUAL ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv733 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11392 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | BAR ->\n                _menhir_run112 _menhir_env (Obj.magic _menhir_stack) MenhirState250\n            | LBRACE ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv731) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = MenhirState250 in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | IDENT _v ->\n                    _menhir_run252 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState251 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState251) : 'freshtv732)\n            | IDENT _ ->\n                _menhir_reduce211 _menhir_env (Obj.magic _menhir_stack) MenhirState250\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState250) : 'freshtv734)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv735 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11427 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv736)) : 'freshtv738)\n    | MenhirState264 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv751 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11436 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * 'tv_constructor_params) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv749 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11442 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * 'tv_constructor_params) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((let (((_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11447 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )), _startpos__1_), _endpos__2_, (_2 : 'tv_constructor_params)), _endpos__3_, _, (_3 : 'tv_annotations)) = _menhir_stack in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_constructor_declaration = let _endpos = _endpos__3_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 298 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( { pTypeConstrName = _1;\n          pTypeConstrArgs = _2;\n          pTypeConstrAnnotations = _3;\n          pTypeConstrLoc = (make_loc _sloc ) } )\n# 11459 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv747) = _menhir_stack in\n        let (_endpos : Lexing.position) = _endpos in\n        let (_menhir_s : _menhir_state) = _menhir_s in\n        let (_v : 'tv_constructor_declaration) = _v in\n        ((match _menhir_s with\n        | MenhirState274 ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv741 * Lexing.position * _menhir_state * 'tv_constructor_declarations)) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _endpos in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let (_v : 'tv_constructor_declaration) = _v in\n            ((let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv739 * Lexing.position * _menhir_state * 'tv_constructor_declarations)) = Obj.magic _menhir_stack in\n            let (_endpos__3_ : Lexing.position) = _endpos in\n            let (_ : _menhir_state) = _menhir_s in\n            let ((_3 : 'tv_constructor_declaration) : 'tv_constructor_declaration) = _v in\n            ((let (_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_constructor_declarations)) = _menhir_stack in\n            let _2 = () in\n            let _endpos = _endpos__3_ in\n            let _v : 'tv_constructor_declarations = \n# 294 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                          ( _3 :: _1 )\n# 11484 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_constructor_declarations _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv740)) : 'freshtv742)\n        | MenhirState262 ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv745) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _endpos in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let (_v : 'tv_constructor_declaration) = _v in\n            ((let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv743) = Obj.magic _menhir_stack in\n            let (_endpos__1_ : Lexing.position) = _endpos in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let ((_1 : 'tv_constructor_declaration) : 'tv_constructor_declaration) = _v in\n            ((let _endpos = _endpos__1_ in\n            let _v : 'tv_constructor_declarations = \n# 293 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                             ( [_1] )\n# 11502 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_constructor_declarations _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv744)) : 'freshtv746)\n        | _ ->\n            _menhir_fail ()) : 'freshtv748)) : 'freshtv750)) : 'freshtv752)\n    | MenhirState347 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv759 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11512 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv753) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | LBRACKET ->\n                _menhir_run350 _menhir_env (Obj.magic _menhir_stack) MenhirState349 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState349) : 'freshtv754)\n        | EQUAL ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv755) = Obj.magic _menhir_stack in\n            ((let _v : 'tv_layer_signature_annotation = \n# 754 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( None )\n# 11535 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_layer_signature_annotation _menhir_env _menhir_stack _v) : 'freshtv756)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv757 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11545 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv758)) : 'freshtv760)\n    | MenhirState409 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv761 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11554 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ASSIGN ->\n            _menhir_run131 _menhir_env (Obj.magic _menhir_stack) MenhirState410\n        | EQUAL ->\n            _menhir_run130 _menhir_env (Obj.magic _menhir_stack) MenhirState410\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState410) : 'freshtv762)\n    | MenhirState415 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv767 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11572 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | COLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv763 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11582 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState417 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ARRAY ->\n                _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState417 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState417 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LIST ->\n                _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState417 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState417 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MAPPING ->\n                _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState417 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState417) : 'freshtv764)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv765 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11610 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv766)) : 'freshtv768)\n    | MenhirState407 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv779 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | WITH ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv775 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | STRING _v ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv771 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                let (_v : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11633 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) = _v in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv769 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) = Obj.magic _menhir_stack in\n                let (_endpos__4_ : Lexing.position) = _endpos in\n                let ((_4 : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11643 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) : (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11647 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) = _v in\n                let (_startpos__4_ : Lexing.position) = _startpos in\n                ((let ((_menhir_stack, _endpos__1_, _startpos__1_), _endpos__2_, _, (_2 : 'tv_annotations)) = _menhir_stack in\n                let _3 = () in\n                let _1 = () in\n                let _endpos = _endpos__4_ in\n                let _v : 'tv_external_declaration = let _endpos = _endpos__4_ in\n                let _symbolstartpos = _startpos__1_ in\n                let _sloc = (_symbolstartpos, _endpos) in\n                \n# 237 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( \"\", mkdecl ~loc:_sloc (PDexternal_with (_4, _2)) )\n# 11660 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_external_declaration _menhir_env _menhir_stack _endpos _v) : 'freshtv770)) : 'freshtv772)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv773 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv774)) : 'freshtv776)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv777 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv778)) : 'freshtv780)\n    | MenhirState482 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv783 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | CONST ->\n            _menhir_run292 _menhir_env (Obj.magic _menhir_stack) MenhirState483\n        | CONSTRUCTOR ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv781 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = MenhirState483 in\n            ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                _menhir_run496 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState484 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run485 _menhir_env (Obj.magic _menhir_stack) MenhirState484 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState484) : 'freshtv782)\n        | GHOST ->\n            _menhir_run285 _menhir_env (Obj.magic _menhir_stack) MenhirState483 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LOGICAL ->\n            _menhir_run284 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState483 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | REFINED ->\n            _menhir_run282 _menhir_env (Obj.magic _menhir_stack) MenhirState483\n        | IDENT _ ->\n            _menhir_reduce169 _menhir_env (Obj.magic _menhir_stack) MenhirState483\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState483) : 'freshtv784)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_run13 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11719 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv711) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11730 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11734 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _v : 'tv_annotation = let _endpos = _endpos__1_ in\n    let _startpos = _startpos__1_ in\n    let _loc = (_startpos, _endpos) in\n    \n# 801 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n         ( PAexpr (mkcmd ~loc:_loc (PCyield (mkexp_ ~loc:_loc  (PEconstant (CONint (int_of_string(_1))))))) )\n# 11743 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_annotation _menhir_env _menhir_stack _menhir_s _v) : 'freshtv712)\n\nand _menhir_run14 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 11750 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run17 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState14 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run16 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState14 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run15 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState14 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run11 _menhir_env (Obj.magic _menhir_stack) MenhirState14 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | STRING _v ->\n        _menhir_run10 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState14 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run9 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState14 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | COMMA | RBRACKET | RPAREN ->\n        _menhir_reduce10 _menhir_env (Obj.magic _menhir_stack) MenhirState14\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState14\n\nand _menhir_run24 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _menhir_stack = (_menhir_stack, _menhir_s) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | ASSERT ->\n        _menhir_run162 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BEGIN ->\n        _menhir_run161 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | DENY ->\n        _menhir_run160 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | EMIT ->\n        _menhir_run158 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FAIL ->\n        _menhir_run157 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FIRST ->\n        _menhir_run149 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FOLD ->\n        _menhir_run137 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | FOR ->\n        _menhir_run127 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | GHOST ->\n        _menhir_run123 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState24 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IF ->\n        _menhir_run120 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState24 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LET ->\n        _menhir_run117 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MATCH ->\n        _menhir_run109 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | TRANSFERETH ->\n        _menhir_run26 _menhir_env (Obj.magic _menhir_stack) MenhirState24 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState24 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState24\n\nand _menhir_run211 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv707 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | INT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv695 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11852 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RPAREN ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv691 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11864 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv689 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11872 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos__4_ : Lexing.position) = _endpos in\n                ((let (((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11878 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )), _startpos__3_) = _menhir_stack in\n                let _4 = () in\n                let _2 = () in\n                let _1 = () in\n                let _v : 'tv_annotation = let _endpos = _endpos__4_ in\n                let _startpos = _startpos__1_ in\n                let _loc = (_startpos, _endpos) in\n                \n# 803 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                              ( PAexpr (mkcmd ~loc:_loc (PCyield (mkexp_ ~loc:_loc (PEconstant (CONaddress _3))))) )\n# 11889 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_annotation _menhir_env _menhir_stack _menhir_s _v) : 'freshtv690)) : 'freshtv692)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv693 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11899 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (((_menhir_stack, _, _menhir_s, _), _), _, _, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv694)) : 'freshtv696)\n        | UINT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv703 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11910 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RPAREN ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv699 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11922 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv697 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11930 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos__4_ : Lexing.position) = _endpos in\n                ((let (((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11936 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )), _startpos__3_) = _menhir_stack in\n                let _4 = () in\n                let _2 = () in\n                let _1 = () in\n                let _v : 'tv_annotation = let _endpos = _endpos__4_ in\n                let _startpos = _startpos__1_ in\n                let _loc = (_startpos, _endpos) in\n                \n# 804 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                               ( PAexpr (mkcmd ~loc:_loc (PCyield (mkexp_ ~loc:_loc (PEconstant (CONaddress _3))))) )\n# 11947 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_annotation _menhir_env _menhir_stack _menhir_s _v) : 'freshtv698)) : 'freshtv700)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv701 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 11957 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (((_menhir_stack, _, _menhir_s, _), _), _, _, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv702)) : 'freshtv704)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv705 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _, _menhir_s, _), _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv706)) : 'freshtv708)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv709 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv710)\n\nand _menhir_goto_type_expression : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_type_expression -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    match _menhir_s with\n    | MenhirState237 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv595 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv593 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (((((_menhir_stack, _menhir_s, _startpos__1_), _startpos__2_), _endpos_e_, _, (e : 'tv_expression), _startpos_e_), _endpos__4_), _endpos__5_, _, (_5 : 'tv_type_expression), _startpos__5_) = _menhir_stack in\n        let _4 = () in\n        let _2 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__5_ in\n        let _v : 'tv_type_expression = let _endpos = _endpos__5_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 272 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( mkfotyp ~loc:_sloc (PTarray (int_of_p_expression e.p_expression_desc, _5)) )\n# 11997 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_type_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv594)) : 'freshtv596)\n    | MenhirState232 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv599 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState240\n        | ARROW | ASSIGN | COMMA | CONST | EOF | EQUAL | EVENT | EXTERNAL | INDEXED | LAYER | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | TRUSTED | TYPE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv597 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_type_expression), _startpos__2_) = _menhir_stack in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__2_ in\n            let _v : 'tv_type_expression = let _endpos = _endpos__2_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 276 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( mkfotyp ~loc:_sloc (PTlist _2) )\n# 12021 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_type_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv598)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState240) : 'freshtv600)\n    | MenhirState241 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv603 * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv601 * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (((_menhir_stack, _endpos__1_, _menhir_s, (_1 : 'tv_type_expression), _startpos__1_), _), _endpos__3_, _, (_3 : 'tv_type_expression), _startpos__3_) = _menhir_stack in\n        let _2 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__3_ in\n        let _v : 'tv_type_expression = let _endpos = _endpos__3_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 270 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( mkfotyp ~loc:_sloc (PTprod (_1, _3)) )\n# 12043 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_type_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv602)) : 'freshtv604)\n    | MenhirState231 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv609 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv607 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_menhir_s : _menhir_state) = MenhirState243 in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv605 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos__3_ : Lexing.position) = _endpos in\n            let (_ : _menhir_state) = _menhir_s in\n            ((let ((_menhir_stack, _menhir_s, _startpos__1_), _endpos__2_, _, (_2 : 'tv_type_expression), _startpos__2_) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__3_ in\n            let _v : 'tv_type_expression = \n# 268 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _2 )\n# 12070 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_type_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv606)) : 'freshtv608)\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState243\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState243) : 'freshtv610)\n    | MenhirState230 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv613 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | RBRACKET ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv611 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_menhir_s : _menhir_state) = MenhirState245 in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _menhir_s) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState246 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ARRAY ->\n                _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState246 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState246 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LIST ->\n                _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState246 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState246 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MAPPING ->\n                _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState246 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState246) : 'freshtv612)\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState245\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState245) : 'freshtv614)\n    | MenhirState246 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv617 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * Lexing.position * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState247\n        | ARROW | ASSIGN | COMMA | CONST | EOF | EQUAL | EVENT | EXTERNAL | INDEXED | LAYER | LOGICAL | OBJECT | RBRACE | RBRACKET | RPAREN | SEMICOLON | SIGNATURE | TRUSTED | TYPE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv615 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * Lexing.position * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (((((_menhir_stack, _menhir_s, _startpos__1_), _startpos__2_), _endpos__3_, _, (_3 : 'tv_type_expression), _startpos__3_), _endpos__4_, _), _endpos__5_, _, (_5 : 'tv_type_expression), _startpos__5_) = _menhir_stack in\n            let _4 = () in\n            let _2 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos__5_ in\n            let _v : 'tv_type_expression = let _endpos = _endpos__5_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 274 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( mkfotyp ~loc:_sloc (PTmapping (_3, _5)) )\n# 12139 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_type_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv616)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState247) : 'freshtv618)\n    | MenhirState228 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv621 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12151 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState248\n        | CONST | EOF | EVENT | EXTERNAL | LAYER | LOGICAL | OBJECT | SIGNATURE | TRUSTED | TYPE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv619 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12163 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((((_menhir_stack, _startpos__1_), _endpos__2_, (_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12168 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__2_), _), _endpos_te_, _, (te : 'tv_type_expression), _startpos_te_) = _menhir_stack in\n            let _3 = () in\n            let _1 = () in\n            let _startpos = _startpos__1_ in\n            let _endpos = _endpos_te_ in\n            let _v : 'tv_type_declaration = let _endpos = _endpos_te_ in\n            let _symbolstartpos = _startpos__1_ in\n            let _sloc = (_symbolstartpos, _endpos) in\n            \n# 254 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      (   _2,  mkfotyp ~loc:_sloc te.p_type_FO_desc )\n# 12180 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_type_declaration _menhir_env _menhir_stack _endpos _v _startpos) : 'freshtv620)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState248) : 'freshtv622)\n    | MenhirState253 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv635 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12192 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState254\n        | RBRACE | SEMICOLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv633 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12204 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _endpos__1_, _menhir_s, (_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12209 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__1_), _endpos__3_, _, (_3 : 'tv_type_expression), _startpos__3_) = _menhir_stack in\n            let _2 = () in\n            let _v : 'tv_field_declaration = \n# 289 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                 ( _1, _3 )\n# 12215 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv631) = _menhir_stack in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            let (_v : 'tv_field_declaration) = _v in\n            ((match _menhir_s with\n            | MenhirState256 ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv625 * _menhir_state * 'tv_field_declarations) * _menhir_state) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let (_v : 'tv_field_declaration) = _v in\n                ((let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv623 * _menhir_state * 'tv_field_declarations) * _menhir_state) = Obj.magic _menhir_stack in\n                let (_ : _menhir_state) = _menhir_s in\n                let ((_3 : 'tv_field_declaration) : 'tv_field_declaration) = _v in\n                ((let ((_menhir_stack, _menhir_s, (_1 : 'tv_field_declarations)), _) = _menhir_stack in\n                let _2 = () in\n                let _v : 'tv_field_declarations = \n# 286 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                    ( _3 :: _1 )\n# 12236 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_field_declarations _menhir_env _menhir_stack _menhir_s _v) : 'freshtv624)) : 'freshtv626)\n            | MenhirState251 ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv629) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let (_v : 'tv_field_declaration) = _v in\n                ((let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv627) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = _menhir_s in\n                let ((_1 : 'tv_field_declaration) : 'tv_field_declaration) = _v in\n                ((let _v : 'tv_field_declarations = \n# 285 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                       ( [_1] )\n# 12251 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_field_declarations _menhir_env _menhir_stack _menhir_s _v) : 'freshtv628)) : 'freshtv630)\n            | _ ->\n                _menhir_fail ()) : 'freshtv632)) : 'freshtv634)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState254) : 'freshtv636)\n    | MenhirState269 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv647 * Lexing.position) * _menhir_state * 'tv_idents)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv645 * Lexing.position) * _menhir_state * 'tv_idents)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_menhir_s : _menhir_state) = MenhirState270 in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv643 * Lexing.position) * _menhir_state * 'tv_idents)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos__5_ : Lexing.position) = _endpos in\n            let (_ : _menhir_state) = _menhir_s in\n            ((let (((_menhir_stack, _startpos__1_), _, (_2 : 'tv_idents)), _endpos__4_, _, (_4 : 'tv_type_expression), _startpos__4_) = _menhir_stack in\n            let _5 = () in\n            let _3 = () in\n            let _1 = () in\n            let _endpos = _endpos__5_ in\n            let _v : 'tv_constructor_parameter = \n# 313 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( List.map (fun i -> i, _4) _2 )\n# 12284 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv641) = _menhir_stack in\n            let (_endpos : Lexing.position) = _endpos in\n            let (_v : 'tv_constructor_parameter) = _v in\n            ((let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv639 * Lexing.position * 'tv_constructor_parameters) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _endpos in\n            let (_v : 'tv_constructor_parameter) = _v in\n            ((let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv637 * Lexing.position * 'tv_constructor_parameters) = Obj.magic _menhir_stack in\n            let (_endpos__2_ : Lexing.position) = _endpos in\n            let ((_2 : 'tv_constructor_parameter) : 'tv_constructor_parameter) = _v in\n            ((let (_menhir_stack, _endpos__1_, (_1 : 'tv_constructor_parameters)) = _menhir_stack in\n            let _endpos = _endpos__2_ in\n            let _v : 'tv_constructor_parameters = \n# 309 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                                  ( _2 :: _1 )\n# 12303 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_constructor_parameters _menhir_env _menhir_stack _endpos _v) : 'freshtv638)) : 'freshtv640)) : 'freshtv642)) : 'freshtv644)) : 'freshtv646)\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState270\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState270) : 'freshtv648)\n    | MenhirState288 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv651 * _menhir_state)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ARROW ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (('freshtv649 * _menhir_state)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = MenhirState289 in\n            ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState290 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ARRAY ->\n                _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState290 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState290 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LIST ->\n                _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState290 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState290 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MAPPING ->\n                _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState290 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState290) : 'freshtv650)\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState289\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState289) : 'freshtv652)\n    | MenhirState290 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv655 * _menhir_state)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState291\n        | RBRACE | SEMICOLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : (((('freshtv653 * _menhir_state)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((((_menhir_stack, _menhir_s), _endpos__3_, _, (_3 : 'tv_type_expression), _startpos__3_), _), _endpos__5_, _, (_5 : 'tv_type_expression), _startpos__5_) = _menhir_stack in\n            let _4 = () in\n            let _2 = () in\n            let _1 = () in\n            let _v : 'tv_object_signature_field = \n# 376 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      (  \"constructor\", _3, _5, MKconstructor  )\n# 12366 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_signature_field _menhir_env _menhir_stack _menhir_s _v) : 'freshtv654)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState291) : 'freshtv656)\n    | MenhirState299 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv659 * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12378 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ARROW ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((('freshtv657 * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12388 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = MenhirState300 in\n            ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState301 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ARRAY ->\n                _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState301 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState301 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LIST ->\n                _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState301 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState301 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MAPPING ->\n                _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState301 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState301) : 'freshtv658)\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState300\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState300) : 'freshtv660)\n    | MenhirState301 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv663 * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12422 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState302\n        | RBRACE | SEMICOLON ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv661 * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12434 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let (((((_menhir_stack, _menhir_s, (_1 : 'tv_method_kind)), _endpos__2_, (_2 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12439 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )), _startpos__2_), _endpos__4_, _, (_4 : 'tv_type_expression), _startpos__4_), _), _endpos__6_, _, (_6 : 'tv_type_expression), _startpos__6_) = _menhir_stack in\n            let _5 = () in\n            let _3 = () in\n            let _v : 'tv_object_signature_field = \n# 374 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( _2, _4, _6, _1 )\n# 12446 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_object_signature_field _menhir_env _menhir_stack _menhir_s _v) : 'freshtv662)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState302) : 'freshtv664)\n    | MenhirState417 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv667 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12458 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ARROW ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv665 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12468 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = MenhirState418 in\n            ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState419 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | ARRAY ->\n                _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState419 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState419 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LIST ->\n                _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState419 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState419 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MAPPING ->\n                _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState419 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState419) : 'freshtv666)\n        | ASSIGN ->\n            _menhir_run131 _menhir_env (Obj.magic _menhir_stack) MenhirState418\n        | EQUAL ->\n            _menhir_run130 _menhir_env (Obj.magic _menhir_stack) MenhirState418\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState418\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState418) : 'freshtv668)\n    | MenhirState419 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv669 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12506 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ASSIGN ->\n            _menhir_run131 _menhir_env (Obj.magic _menhir_stack) MenhirState420\n        | EQUAL ->\n            _menhir_run130 _menhir_env (Obj.magic _menhir_stack) MenhirState420\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState420\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState420) : 'freshtv670)\n    | MenhirState427 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv671 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12526 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ASSIGN ->\n            _menhir_run131 _menhir_env (Obj.magic _menhir_stack) MenhirState428\n        | EQUAL ->\n            _menhir_run130 _menhir_env (Obj.magic _menhir_stack) MenhirState428\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState428\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState428) : 'freshtv672)\n    | MenhirState440 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv679 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12546 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | INDEXED ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv675) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = MenhirState441 in\n            ((let _menhir_env = _menhir_discard _menhir_env in\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv673) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = _menhir_s in\n            ((let _1 = () in\n            let _v : 'tv_indexed_opt = \n# 340 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n          ( true )\n# 12563 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_indexed_opt _menhir_env _menhir_stack _menhir_s _v) : 'freshtv674)) : 'freshtv676)\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState441\n        | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv677) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = MenhirState441 in\n            ((let _v : 'tv_indexed_opt = \n# 339 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n  ( false )\n# 12575 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_indexed_opt _menhir_env _menhir_stack _menhir_s _v) : 'freshtv678)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState441) : 'freshtv680)\n    | MenhirState488 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv683 * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState489\n        | COMMA | EQUAL | RPAREN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv681 * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _menhir_s), _endpos__2_, _, (_2 : 'tv_type_expression), _startpos__2_) = _menhir_stack in\n            let _1 = () in\n            let _v : 'tv_opt_type_annotation = \n# 731 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                           ( Some _2 )\n# 12598 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n             in\n            _menhir_goto_opt_type_annotation _menhir_env _menhir_stack _menhir_s _v) : 'freshtv682)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState489) : 'freshtv684)\n    | MenhirState503 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv687 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12610 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ASSIGN ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ((((('freshtv685 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12620 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            ) * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = MenhirState504 in\n            ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ADDRESS ->\n                _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState505 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BANG ->\n                _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState505 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | BITNOT ->\n                _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState505 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | IDENT _v ->\n                _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState505 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | INT _v ->\n                _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState505 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LBRACE ->\n                _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState505 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | LPAREN ->\n                _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState505 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | MINUS ->\n                _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState505 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | UINT _v ->\n                _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState505 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState505) : 'freshtv686)\n        | STAR ->\n            _menhir_run241 _menhir_env (Obj.magic _menhir_stack) MenhirState504\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState504) : 'freshtv688)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_goto_opt_bar : _menhir_env -> 'ttv_tail -> _menhir_state -> 'tv_opt_bar -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _v ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _v) in\n    match _menhir_s with\n    | MenhirState111 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv587 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * _menhir_state * 'tv_opt_bar) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run195 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState113 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACKET ->\n            _menhir_run114 _menhir_env (Obj.magic _menhir_stack) MenhirState113 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState113) : 'freshtv588)\n    | MenhirState250 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv589 * _menhir_state * 'tv_opt_bar) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run263 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState262 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState262) : 'freshtv590)\n    | MenhirState434 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv591) * _menhir_state * 'tv_opt_bar) = Obj.magic _menhir_stack in\n        ((assert (not _menhir_env._menhir_error);\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            _menhir_run436 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState435 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState435) : 'freshtv592)\n    | _ ->\n        _menhir_fail ()\n\nand _menhir_run32 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12706 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | EQUAL ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv583 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12718 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState33 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BANG ->\n            _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState33 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BITNOT ->\n            _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState33 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState33 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | INT _v ->\n            _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState33 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState33 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState33 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MINUS ->\n            _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState33 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | UINT _v ->\n            _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState33 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState33) : 'freshtv584)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv585 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12752 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv586)\n\nand _menhir_goto_atom : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> 'tv_atom -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv581 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState47 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState47 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState47 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACKET ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv577 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) = Obj.magic _menhir_stack in\n        let (_menhir_s : _menhir_state) = MenhirState47 in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState48 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BANG ->\n            _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState48 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BITNOT ->\n            _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState48 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState48 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | INT _v ->\n            _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState48 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState48 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState48 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MINUS ->\n            _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState48 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | UINT _v ->\n            _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState48 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState48) : 'freshtv578)\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState47 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState47 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | ASSIGN | BAR | BARBAR | BITAND | COMMA | CONJUNCTION | CONST | DISJUNCTION | DO | DOT | ELSE | END | EOF | EQUAL | EVENT | EXTERNAL | GREATER | GREATEREQ | IN | LAYER | LESS | LESSEQ | LET | LOGICAL | MINUS | MOD | OBJECT | PLUS | RBRACE | RBRACKET | RPAREN | SEMICOLON | SHL | SHR | SIGNATURE | SLASH | STAR | THEN | TO | TRUSTED | TYPE | UNEQUAL | WITH | XOR ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv579 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _endpos_x_, _menhir_s, (x : 'tv_atom), _startpos_x_) = _menhir_stack in\n        let _startpos = _startpos_x_ in\n        let _endpos = _endpos_x_ in\n        let _v : 'tv_nonempty_list_atom_ = \n# 221 \"<standard.mly>\"\n    ( [ x ] )\n# 12815 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_nonempty_list_atom_ _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv580)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState47) : 'freshtv582)\n\nand _menhir_run281 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | CONST ->\n        _menhir_run292 _menhir_env (Obj.magic _menhir_stack) MenhirState281\n    | CONSTRUCTOR ->\n        _menhir_run287 _menhir_env (Obj.magic _menhir_stack) MenhirState281\n    | GHOST ->\n        _menhir_run285 _menhir_env (Obj.magic _menhir_stack) MenhirState281 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LOGICAL ->\n        _menhir_run284 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState281 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | RBRACE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv575 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_menhir_s : _menhir_state) = MenhirState281 in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv573 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _2 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_object_signature_expr = let _endpos = _endpos__2_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 360 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                   ( mksig ~loc:_sloc (PSconstr []) )\n# 12858 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_object_signature_expr _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv574)) : 'freshtv576)\n    | REFINED ->\n        _menhir_run282 _menhir_env (Obj.magic _menhir_stack) MenhirState281\n    | IDENT _ ->\n        _menhir_reduce169 _menhir_env (Obj.magic _menhir_stack) MenhirState281\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState281\n\nand _menhir_run306 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12873 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv571) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12884 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12888 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _startpos = _startpos__1_ in\n    let _endpos = _endpos__1_ in\n    let _v : 'tv_object_signature_expr = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 359 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( mksig ~loc:_sloc (PSname _1) )\n# 12899 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_object_signature_expr _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv572)\n\nand _menhir_goto_opt_logical_or_trusted : _menhir_env -> 'ttv_tail -> Lexing.position -> 'tv_opt_logical_or_trusted -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv569 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | OBJECT ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv565 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv551 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12926 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | EQUAL ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv535 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12938 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | CLONE ->\n                    _menhir_run365 _menhir_env (Obj.magic _menhir_stack) MenhirState476 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | IDENT _v ->\n                    _menhir_run364 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState476 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LPAREN ->\n                    _menhir_run363 _menhir_env (Obj.magic _menhir_stack) MenhirState476 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState476) : 'freshtv536)\n            | LPAREN ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv545) = Obj.magic _menhir_stack in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_stack = (_menhir_stack, _startpos) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | IDENT _v ->\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : 'freshtv539) = Obj.magic _menhir_stack in\n                    let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                    let (_menhir_s : _menhir_state) = MenhirState463 in\n                    let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12969 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                    )) = _v in\n                    let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                    ((let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n                    let _menhir_env = _menhir_discard _menhir_env in\n                    let _tok = _menhir_env._menhir_token in\n                    match _tok with\n                    | COLON ->\n                        _menhir_run466 _menhir_env (Obj.magic _menhir_stack)\n                    | RPAREN ->\n                        _menhir_reduce143 _menhir_env (Obj.magic _menhir_stack)\n                    | _ ->\n                        assert (not _menhir_env._menhir_error);\n                        _menhir_env._menhir_error <- true;\n                        let (_menhir_env : _menhir_env) = _menhir_env in\n                        let (_menhir_stack : 'freshtv537 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 12987 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                        ) * Lexing.position) = Obj.magic _menhir_stack in\n                        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n                        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv538)) : 'freshtv540)\n                | LBRACE ->\n                    _menhir_run334 _menhir_env (Obj.magic _menhir_stack) MenhirState463 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | RPAREN ->\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : 'freshtv543 * Lexing.position) = Obj.magic _menhir_stack in\n                    let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                    let (_menhir_s : _menhir_state) = MenhirState463 in\n                    ((let _menhir_env = _menhir_discard _menhir_env in\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : 'freshtv541 * Lexing.position) = Obj.magic _menhir_stack in\n                    let (_endpos__2_ : Lexing.position) = _endpos in\n                    let (_ : _menhir_state) = _menhir_s in\n                    ((let (_menhir_stack, _startpos__1_) = _menhir_stack in\n                    let _2 = () in\n                    let _1 = () in\n                    let _v : 'tv_base_layer_signature = let _endpos = _endpos__2_ in\n                    let _symbolstartpos = _startpos__1_ in\n                    let _sloc = (_symbolstartpos, _endpos) in\n                    \n# 664 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                   ( mklayersign ~loc:_sloc (PLSconstr []) )\n# 13012 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                     in\n                    _menhir_goto_base_layer_signature _menhir_env _menhir_stack _v) : 'freshtv542)) : 'freshtv544)\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState463) : 'freshtv546)\n            | COLON ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : 'freshtv547) = Obj.magic _menhir_stack in\n                ((let (_, _endpos__0_) = Obj.magic _menhir_stack in\n                let _v : 'tv_base_layer_signature = let _endpos = _endpos__0_ in\n                let _symbolstartpos = _endpos in\n                let _sloc = (_symbolstartpos, _endpos) in\n                \n# 663 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( mklayersign ~loc:_sloc (PLSconstr []) )\n# 13029 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_base_layer_signature _menhir_env _menhir_stack _v) : 'freshtv548)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv549 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13039 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                (raise _eRR : 'freshtv550)) : 'freshtv552)\n        | SIGNATURE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv561 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv557 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13057 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) = _v in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | EQUAL ->\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : ((('freshtv553 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13069 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                    ) * Lexing.position) = Obj.magic _menhir_stack in\n                    ((let _menhir_env = _menhir_discard _menhir_env in\n                    let _tok = _menhir_env._menhir_token in\n                    match _tok with\n                    | IDENT _v ->\n                        _menhir_run306 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState460 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                    | LBRACE ->\n                        _menhir_run281 _menhir_env (Obj.magic _menhir_stack) MenhirState460 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                    | _ ->\n                        assert (not _menhir_env._menhir_error);\n                        _menhir_env._menhir_error <- true;\n                        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState460) : 'freshtv554)\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : ((('freshtv555 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13089 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                    ) * Lexing.position) = Obj.magic _menhir_stack in\n                    (raise _eRR : 'freshtv556)) : 'freshtv558)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv559 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                (raise _eRR : 'freshtv560)) : 'freshtv562)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv563 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            (raise _eRR : 'freshtv564)) : 'freshtv566)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv567 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv568)) : 'freshtv570)\n\nand _menhir_run334 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        _menhir_run336 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState334 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | RBRACE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv533 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_menhir_s : _menhir_state) = MenhirState334 in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv531 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _2 = () in\n        let _1 = () in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_layer_signature = let _endpos = _endpos__2_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 402 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                   ( mklayersign ~loc:_sloc (PLSconstr []) )\n# 13139 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_layer_signature _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv532)) : 'freshtv534)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState334\n\nand _menhir_run345 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13150 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _v, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    _menhir_reduce143 _menhir_env (Obj.magic _menhir_stack)\n\nand _menhir_reduce19 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let (_, _endpos) = Obj.magic _menhir_stack in\n    let _v : 'tv_annotations = \n# 790 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( [] )\n# 13163 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_annotations _menhir_env _menhir_stack _endpos _menhir_s _v\n\nand _menhir_run5 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LBRACKET ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv527 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run211 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState6 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | EQUAL ->\n            _menhir_run24 _menhir_env (Obj.magic _menhir_stack) MenhirState6\n        | IDENT _v ->\n            _menhir_run14 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState6 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | INT _v ->\n            _menhir_run13 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState6 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | RBRACKET ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv525 * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_menhir_s : _menhir_state) = MenhirState6 in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _menhir_s) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RBRACKET ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv521 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv519 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state) = Obj.magic _menhir_stack in\n                let (_endpos__4_ : Lexing.position) = _endpos in\n                ((let (((_menhir_stack, _menhir_s, _startpos__1_), _startpos__2_), _endpos__3_, _) = _menhir_stack in\n                let _4 = () in\n                let _3 = () in\n                let _2 = () in\n                let _1 = () in\n                let _endpos = _endpos__4_ in\n                let _v : 'tv_annotations = \n# 791 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                                         ( [] )\n# 13215 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_annotations _menhir_env _menhir_stack _endpos _menhir_s _v) : 'freshtv520)) : 'freshtv522)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv523 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _, _menhir_s) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv524)) : 'freshtv526)\n        | STRING _v ->\n            _menhir_run8 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState6 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | UINT _v ->\n            _menhir_run7 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState6 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState6) : 'freshtv528)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv529 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv530)\n\nand _menhir_run229 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LBRACKET ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv515 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState230 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | ARRAY ->\n            _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState230 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState230 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LIST ->\n            _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState230 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState230 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MAPPING ->\n            _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState230 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState230) : 'freshtv516)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv517 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv518)\n\nand _menhir_run231 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState231 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | ARRAY ->\n        _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState231 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState231 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LIST ->\n        _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState231 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState231 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MAPPING ->\n        _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState231 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState231\n\nand _menhir_run232 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState232 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | ARRAY ->\n        _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState232 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState232 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LIST ->\n        _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState232 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState232 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MAPPING ->\n        _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState232 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState232\n\nand _menhir_run233 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13328 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv513) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13339 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13343 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _startpos = _startpos__1_ in\n    let _endpos = _endpos__1_ in\n    let _v : 'tv_type_expression = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 261 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( let x = try Hashtbl.find builtin_type_table _1\n        with Not_found -> PTname _1\n        in \n        mkfotyp ~loc:_sloc (x)  \n       )\n# 13358 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_type_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv514)\n\nand _menhir_run234 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LBRACKET ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv509 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ADDRESS ->\n            _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState235 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BANG ->\n            _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState235 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | BITNOT ->\n            _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState235 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | IDENT _v ->\n            _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState235 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | INT _v ->\n            _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState235 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LBRACE ->\n            _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState235 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LPAREN ->\n            _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState235 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | MINUS ->\n            _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState235 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | UINT _v ->\n            _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState235 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState235) : 'freshtv510)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv511 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv512)\n\nand _menhir_run238 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv507) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _1 = () in\n    let _startpos = _startpos__1_ in\n    let _endpos = _endpos__1_ in\n    let _v : 'tv_type_expression = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 266 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n            ( mkfotyp ~loc:_sloc (PTbuiltin Taddress) )\n# 13423 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_type_expression _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv508)\n\nand _menhir_reduce211 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _v : 'tv_opt_bar = \n# 835 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n         ( () )\n# 13432 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_opt_bar _menhir_env _menhir_stack _menhir_s _v\n\nand _menhir_run112 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv505) = Obj.magic _menhir_stack in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    ((let _1 = () in\n    let _v : 'tv_opt_bar = \n# 836 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n         ( () )\n# 13446 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_opt_bar _menhir_env _menhir_stack _menhir_s _v) : 'freshtv506)\n\nand _menhir_errorcase : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s ->\n    match _menhir_s with\n    | MenhirState515 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv131 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13458 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv132)\n    | MenhirState511 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv133 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13467 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) * _menhir_state * 'tv_object_fields_and_methods) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv134)\n    | MenhirState509 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv135 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13476 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv136)\n    | MenhirState507 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv137 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13485 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_method_param) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv138)\n    | MenhirState505 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv139 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13494 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv140)\n    | MenhirState504 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv141 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13503 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv142)\n    | MenhirState503 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv143 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13512 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv144)\n    | MenhirState502 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv145 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13521 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv146)\n    | MenhirState499 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv147 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state) * _menhir_state * 'tv_method_param) * _menhir_state * 'tv_opt_type_annotation)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv148)\n    | MenhirState497 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv149 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state) * _menhir_state * 'tv_method_param) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv150)\n    | MenhirState493 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv151 * _menhir_state * 'tv_method_parameters)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv152)\n    | MenhirState489 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv153 * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv154)\n    | MenhirState488 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv155 * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv156)\n    | MenhirState487 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv157 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13555 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv158)\n    | MenhirState485 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv159 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv160)\n    | MenhirState484 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv161 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv162)\n    | MenhirState483 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv163 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv164)\n    | MenhirState482 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv165 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv166)\n    | MenhirState481 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv167 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13584 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * 'tv_base_layer_signature)) * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv168)\n    | MenhirState479 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv169 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13593 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * 'tv_base_layer_signature)) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv170)\n    | MenhirState476 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv171 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13601 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv172)\n    | MenhirState472 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv173 * _menhir_state * 'tv_base_slots)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv174)\n    | MenhirState466 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv175 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13614 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv176)\n    | MenhirState463 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv177 * Lexing.position) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv178)\n    | MenhirState460 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv179 * Lexing.position * 'tv_opt_logical_or_trusted * Lexing.position) * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13627 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv180)\n    | MenhirState453 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv181) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13635 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv182)\n    | MenhirState447 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv183 * Lexing.position * _menhir_state * 'tv_event_declarations)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv184)\n    | MenhirState441 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv185 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13648 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv186)\n    | MenhirState440 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv187 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13657 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv188)\n    | MenhirState435 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv189) * _menhir_state * 'tv_opt_bar) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv190)\n    | MenhirState434 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv191) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv192)\n    | MenhirState428 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv193 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13674 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv194)\n    | MenhirState427 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv195 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13683 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv196)\n    | MenhirState420 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv197 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13692 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv198)\n    | MenhirState419 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((('freshtv199 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13701 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv200)\n    | MenhirState418 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv201 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13710 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv202)\n    | MenhirState417 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv203 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13719 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv204)\n    | MenhirState415 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv205 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13728 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv206)\n    | MenhirState410 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv207 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13737 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv208)\n    | MenhirState409 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv209 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13746 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv210)\n    | MenhirState407 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv211 * Lexing.position * Lexing.position) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv212)\n    | MenhirState404 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv213 * Lexing.position) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv214)\n    | MenhirState401 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv215 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv216)\n    | MenhirState399 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv217 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv218)\n    | MenhirState395 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv219 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv220)\n    | MenhirState393 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv221 * Lexing.position * _menhir_state * 'tv_layer_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv222)\n    | MenhirState384 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv223 * _menhir_state * 'tv_layer_slots_plus) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv224)\n    | MenhirState383 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv225 * _menhir_state * 'tv_layer_slots_plus) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv226)\n    | MenhirState379 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv227 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 13793 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let ((((_menhir_stack, _, _menhir_s, _), _), _, _, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv228)\n    | MenhirState375 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv229 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 13802 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let ((((_menhir_stack, _, _menhir_s, _), _), _, _, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv230)\n    | MenhirState369 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv231 * Lexing.position * _menhir_state * 'tv_object_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv232)\n    | MenhirState363 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv233 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv234)\n    | MenhirState362 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv235 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13821 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv236)\n    | MenhirState360 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv237 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv238)\n    | MenhirState359 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv239 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv240)\n    | MenhirState358 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv241 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13840 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * 'tv_layer_signature_annotation)) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv242)\n    | MenhirState354 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv243 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_layer_signature) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv244)\n    | MenhirState351 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv245 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv246)\n    | MenhirState350 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv247 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv248)\n    | MenhirState349 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv249) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv250)\n    | MenhirState347 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv251 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13868 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv252)\n    | MenhirState340 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv253 * _menhir_state * 'tv_layer_signature_fields) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv254)\n    | MenhirState339 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv255 * _menhir_state * Lexing.position) * _menhir_state * 'tv_layer_signature_fields) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv256)\n    | MenhirState337 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv257 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13886 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv258)\n    | MenhirState334 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv259 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv260)\n    | MenhirState333 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv261 * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13900 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv262)\n    | MenhirState325 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv263 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position) * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (((_menhir_stack, _, _menhir_s, _, _), _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv264)\n    | MenhirState320 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv265 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (((_menhir_stack, _, _menhir_s, _, _), _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv266)\n    | MenhirState312 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv267 * _menhir_state * 'tv_idents_semi_sep) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv268)\n    | MenhirState310 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv269 * Lexing.position * _menhir_state * 'tv_object_signature_expr * Lexing.position)) * Lexing.position * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (((_menhir_stack, _, _menhir_s, _, _), _, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv270)\n    | MenhirState302 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv271 * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13928 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv272)\n    | MenhirState301 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv273 * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13937 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv274)\n    | MenhirState300 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv275 * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13946 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv276)\n    | MenhirState299 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv277 * _menhir_state * 'tv_method_kind) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13955 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv278)\n    | MenhirState295 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv279 * _menhir_state * 'tv_object_signature_fields) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv280)\n    | MenhirState294 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv281 * _menhir_state * Lexing.position) * _menhir_state * 'tv_object_signature_fields) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv282)\n    | MenhirState291 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv283 * _menhir_state)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv284)\n    | MenhirState290 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv285 * _menhir_state)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv286)\n    | MenhirState289 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv287 * _menhir_state)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv288)\n    | MenhirState288 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv289 * _menhir_state)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv290)\n    | MenhirState281 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv291 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv292)\n    | MenhirState280 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv293 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 13999 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv294)\n    | MenhirState274 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv295 * Lexing.position * _menhir_state * 'tv_constructor_declarations)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv296)\n    | MenhirState270 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv297 * Lexing.position) * _menhir_state * 'tv_idents)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv298)\n    | MenhirState269 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv299 * Lexing.position) * _menhir_state * 'tv_idents)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv300)\n    | MenhirState267 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv301 * Lexing.position) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv302)\n    | MenhirState264 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv303 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14026 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * 'tv_constructor_params) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _, _), _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv304)\n    | MenhirState262 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv305 * _menhir_state * 'tv_opt_bar) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv306)\n    | MenhirState256 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv307 * _menhir_state * 'tv_field_declarations) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv308)\n    | MenhirState255 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv309 * _menhir_state * Lexing.position) * _menhir_state * 'tv_field_declarations) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv310)\n    | MenhirState254 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv311 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14050 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv312)\n    | MenhirState253 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv313 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14059 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv314)\n    | MenhirState251 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv315 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv316)\n    | MenhirState250 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv317 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14073 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv318)\n    | MenhirState248 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv319 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14082 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv320)\n    | MenhirState247 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv321 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * Lexing.position * _menhir_state) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv322)\n    | MenhirState246 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv323 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * Lexing.position * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv324)\n    | MenhirState245 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv325 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv326)\n    | MenhirState243 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv327 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv328)\n    | MenhirState241 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv329 * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv330)\n    | MenhirState240 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv331 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_type_expression * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv332)\n    | MenhirState237 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv333 * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv334)\n    | MenhirState235 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv335 * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv336)\n    | MenhirState232 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv337 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv338)\n    | MenhirState231 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv339 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv340)\n    | MenhirState230 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv341 * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv342)\n    | MenhirState228 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv343 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14146 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv344)\n    | MenhirState219 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv345 * _menhir_state * 'tv_annotations_plus)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv346)\n    | MenhirState207 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv347 * _menhir_state * 'tv_match_clauses)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv348)\n    | MenhirState203 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv349 * _menhir_state * 'tv_match_pattern)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv350)\n    | MenhirState195 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv351 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14170 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv352)\n    | MenhirState192 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv353 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14179 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv354)\n    | MenhirState189 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv355 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv356)\n    | MenhirState185 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((('freshtv357 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14193 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) * Lexing.position * _menhir_state * 'tv_commands)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv358)\n    | MenhirState180 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((((('freshtv359 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14202 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv360)\n    | MenhirState178 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((((((('freshtv361 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14211 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv362)\n    | MenhirState176 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((((('freshtv363 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14220 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv364)\n    | MenhirState172 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv365 * Lexing.position * _menhir_state * 'tv_command * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv366)\n    | MenhirState164 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv367 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv368)\n    | MenhirState162 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv369 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv370)\n    | MenhirState161 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv371 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv372)\n    | MenhirState160 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv373 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv374)\n    | MenhirState158 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv375 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv376)\n    | MenhirState156 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv377 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14259 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv378)\n    | MenhirState154 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv379 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14268 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv380)\n    | MenhirState152 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv381 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14277 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv382)\n    | MenhirState151 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv383 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14286 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv384)\n    | MenhirState149 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv385 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv386)\n    | MenhirState148 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((((((('freshtv387 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14300 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14304 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv388)\n    | MenhirState146 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((((('freshtv389 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14313 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14317 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv390)\n    | MenhirState145 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (((((((('freshtv391 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14326 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14330 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv392)\n    | MenhirState142 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv393 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14339 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv394)\n    | MenhirState140 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv395 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14348 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv396)\n    | MenhirState139 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv397 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14357 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv398)\n    | MenhirState137 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv399 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv400)\n    | MenhirState136 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((((('freshtv401 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14371 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv402)\n    | MenhirState134 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((((('freshtv403 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14380 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv404)\n    | MenhirState132 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv405 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14389 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) * _menhir_state * 'tv_eq_or_assign) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv406)\n    | MenhirState129 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv407 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_annotations) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14398 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv408)\n    | MenhirState127 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv409 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv410)\n    | MenhirState126 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv411 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14412 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv412)\n    | MenhirState123 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv413 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv414)\n    | MenhirState122 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv415 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv416)\n    | MenhirState120 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv417 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv418)\n    | MenhirState119 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv419 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14436 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _), _, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv420)\n    | MenhirState116 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv421 * _menhir_state * Lexing.position) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv422)\n    | MenhirState113 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ((('freshtv423 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) * _menhir_state * 'tv_opt_bar) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv424)\n    | MenhirState111 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : (('freshtv425 * _menhir_state * Lexing.position) * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv426)\n    | MenhirState109 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv427 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv428)\n    | MenhirState107 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv429 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv430)\n    | MenhirState98 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv431 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv432)\n    | MenhirState92 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv433 * _menhir_state * 'tv_struct_fields) * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv434)\n    | MenhirState91 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv435 * _menhir_state * Lexing.position) * _menhir_state * 'tv_struct_fields) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv436)\n    | MenhirState85 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv437 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv438)\n    | MenhirState83 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv439 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv440)\n    | MenhirState81 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv441 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv442)\n    | MenhirState79 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv443 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv444)\n    | MenhirState77 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv445 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv446)\n    | MenhirState75 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv447 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv448)\n    | MenhirState73 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv449 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv450)\n    | MenhirState70 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv451 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv452)\n    | MenhirState68 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv453 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv454)\n    | MenhirState66 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv455 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv456)\n    | MenhirState64 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv457 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv458)\n    | MenhirState62 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv459 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _, _menhir_s, _, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv460)\n    | MenhirState60 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv461 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv462)\n    | MenhirState58 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv463 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv464)\n    | MenhirState56 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv465 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv466)\n    | MenhirState54 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv467 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv468)\n    | MenhirState52 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv469 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv470)\n    | MenhirState50 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv471 * Lexing.position * _menhir_state * 'tv_expression * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv472)\n    | MenhirState48 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv473 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv474)\n    | MenhirState47 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv475 * Lexing.position * _menhir_state * 'tv_atom * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv476)\n    | MenhirState45 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv477 * Lexing.position * _menhir_state * 'tv_nonempty_list_atom_ * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv478)\n    | MenhirState37 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv479 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv480)\n    | MenhirState36 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv481 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv482)\n    | MenhirState33 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv483 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14600 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position)) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv484)\n    | MenhirState31 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv485 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv486)\n    | MenhirState29 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv487 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv488)\n    | MenhirState28 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv489 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv490)\n    | MenhirState27 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv491 * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv492)\n    | MenhirState24 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv493 * _menhir_state) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv494)\n    | MenhirState14 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv495 * Lexing.position * _menhir_state * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14634 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv496)\n    | MenhirState11 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv497 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv498)\n    | MenhirState8 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv499 * Lexing.position * _menhir_state * (\n# 100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14648 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv500)\n    | MenhirState6 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv501 * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n        ((let ((_menhir_stack, _menhir_s, _), _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv502)\n    | MenhirState4 ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : ('freshtv503 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14662 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) * Lexing.position) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv504)\n\nand _menhir_run25 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14669 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv129) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14680 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14684 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _startpos = _startpos__1_ in\n    let _endpos = _endpos__1_ in\n    let _v : 'tv_atom = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 495 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n          (  mkexp_ ~loc:_sloc (PEconstant (CONuint (int_of_string(_1)))) )\n# 14695 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_atom _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv130)\n\nand _menhir_run28 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState28 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState28 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState28 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState28 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState28 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState28 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState28 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState28 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState28 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState28\n\nand _menhir_run29 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState29 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState29 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState29 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState29 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState29 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState29 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState29 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState29 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | RPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv127 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_menhir_s : _menhir_state) = MenhirState29 in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv125 * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_endpos__2_ : Lexing.position) = _endpos in\n        let (_ : _menhir_state) = _menhir_s in\n        ((let (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in\n        let _2 = () in\n        let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__2_ in\n        let _v : 'tv_atom = let _endpos = _endpos__2_ in\n        let _symbolstartpos = _startpos__1_ in\n        let _sloc = (_symbolstartpos, _endpos) in\n        \n# 498 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                   (  mkexp_ ~loc:_sloc (PEconstant CONunit) )\n# 14771 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_atom _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv126)) : 'freshtv128)\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState29 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState29\n\nand _menhir_run31 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | IDENT _v ->\n        _menhir_run32 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState31 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState31\n\nand _menhir_run34 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14797 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv123) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14808 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14812 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _startpos = _startpos__1_ in\n    let _endpos = _endpos__1_ in\n    let _v : 'tv_atom = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 494 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n         (  mkexp_ ~loc:_sloc (PEconstant (CONint (int_of_string(_1)))) )\n# 14823 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_atom _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv124)\n\nand _menhir_run35 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14830 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _v _startpos ->\n    let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv121) = Obj.magic _menhir_stack in\n    let (_endpos__1_ : Lexing.position) = _endpos in\n    let (_menhir_s : _menhir_state) = _menhir_s in\n    let ((_1 : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14841 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 14845 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n    )) = _v in\n    let (_startpos__1_ : Lexing.position) = _startpos in\n    ((let _startpos = _startpos__1_ in\n    let _endpos = _endpos__1_ in\n    let _v : 'tv_atom = let _endpos = _endpos__1_ in\n    let _symbolstartpos = _startpos__1_ in\n    let _sloc = (_symbolstartpos, _endpos) in\n    \n# 493 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n           ( let x = try Hashtbl.find constant_table _1 with Not_found -> PEglob _1 in  mkexp_ ~loc:_sloc (x) )\n# 14856 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_atom _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv122)\n\nand _menhir_run36 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState36 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState36 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState36 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState36 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState36 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState36 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState36 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState36 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState36 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState36\n\nand _menhir_run37 : _menhir_env -> 'ttv_tail -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | ADDRESS ->\n        _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState37 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BANG ->\n        _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState37 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | BITNOT ->\n        _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState37 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | IDENT _v ->\n        _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState37 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | INT _v ->\n        _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState37 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LBRACE ->\n        _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState37 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | LPAREN ->\n        _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState37 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | MINUS ->\n        _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState37 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | UINT _v ->\n        _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState37 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState37\n\nand _menhir_run38 : _menhir_env -> 'ttv_tail -> Lexing.position -> _menhir_state -> Lexing.position -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _menhir_s _startpos ->\n    let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n    let _menhir_env = _menhir_discard _menhir_env in\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | LPAREN ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv117 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | INT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv105 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14939 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RPAREN ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv101 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14951 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv99 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14959 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos__4_ : Lexing.position) = _endpos in\n                ((let (((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14965 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )), _startpos__3_) = _menhir_stack in\n                let _4 = () in\n                let _2 = () in\n                let _1 = () in\n                let _startpos = _startpos__1_ in\n                let _endpos = _endpos__4_ in\n                let _v : 'tv_atom = let _endpos = _endpos__4_ in\n                let _symbolstartpos = _startpos__1_ in\n                let _sloc = (_symbolstartpos, _endpos) in\n                \n# 496 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                              (  mkexp_ ~loc:_sloc (PEconstant (CONaddress _3)) )\n# 14978 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_atom _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv100)) : 'freshtv102)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv103 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 92 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14988 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (((_menhir_stack, _, _menhir_s, _), _), _, _, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv104)) : 'freshtv106)\n        | UINT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv113 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 14999 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | RPAREN ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv109 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 15011 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv107 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 15019 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos__4_ : Lexing.position) = _endpos in\n                ((let (((_menhir_stack, _endpos__1_, _menhir_s, _startpos__1_), _startpos__2_), _endpos__3_, (_3 : (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 15025 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )), _startpos__3_) = _menhir_stack in\n                let _4 = () in\n                let _2 = () in\n                let _1 = () in\n                let _startpos = _startpos__1_ in\n                let _endpos = _endpos__4_ in\n                let _v : 'tv_atom = let _endpos = _endpos__4_ in\n                let _symbolstartpos = _startpos__1_ in\n                let _sloc = (_symbolstartpos, _endpos) in\n                \n# 497 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                               (  mkexp_ ~loc:_sloc (PEconstant (CONaddress _3)) )\n# 15038 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                 in\n                _menhir_goto_atom _menhir_env _menhir_stack _endpos _menhir_s _v _startpos) : 'freshtv108)) : 'freshtv110)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : (('freshtv111 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) * Lexing.position * (\n# 93 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (string)\n# 15048 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (((_menhir_stack, _, _menhir_s, _), _), _, _, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv112)) : 'freshtv114)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : ('freshtv115 * Lexing.position * _menhir_state * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n            ((let ((_menhir_stack, _, _menhir_s, _), _) = _menhir_stack in\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv116)) : 'freshtv118)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv119 * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv120)\n\nand _menhir_goto_declarations : _menhir_env -> 'ttv_tail -> Lexing.position -> 'tv_declarations -> 'ttv_return =\n  fun _menhir_env _menhir_stack _endpos _v ->\n    let _menhir_stack = (_menhir_stack, _endpos, _v) in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv97 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n    ((assert (not _menhir_env._menhir_error);\n    let _tok = _menhir_env._menhir_token in\n    match _tok with\n    | CONST ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv13) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv9) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15088 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | EQUAL ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv5) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15100 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | ADDRESS ->\n                    _menhir_run38 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState453 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | BANG ->\n                    _menhir_run37 _menhir_env (Obj.magic _menhir_stack) MenhirState453 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | BITNOT ->\n                    _menhir_run36 _menhir_env (Obj.magic _menhir_stack) MenhirState453 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | IDENT _v ->\n                    _menhir_run35 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState453 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | INT _v ->\n                    _menhir_run34 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState453 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LBRACE ->\n                    _menhir_run31 _menhir_env (Obj.magic _menhir_stack) MenhirState453 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LPAREN ->\n                    _menhir_run29 _menhir_env (Obj.magic _menhir_stack) MenhirState453 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | MINUS ->\n                    _menhir_run28 _menhir_env (Obj.magic _menhir_stack) MenhirState453 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | UINT _v ->\n                    _menhir_run25 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState453 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState453) : 'freshtv6)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv7) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15134 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                (raise _eRR : 'freshtv8)) : 'freshtv10)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv11) = Obj.magic _menhir_stack in\n            (raise _eRR : 'freshtv12)) : 'freshtv14)\n    | EOF ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv23 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv21 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n        ((let (_menhir_stack, _endpos__1_, (_1 : 'tv_declarations)) = _menhir_stack in\n        let _2 = () in\n        let _v : (\n# 208 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n     (Parsetree.p_file_structure)\n# 15153 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        ) = \n# 214 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n                      ( List.rev _1 )\n# 15157 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv19) = _menhir_stack in\n        let (_v : (\n# 208 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n     (Parsetree.p_file_structure)\n# 15164 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv17) = Obj.magic _menhir_stack in\n        let (_v : (\n# 208 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n     (Parsetree.p_file_structure)\n# 15171 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) = _v in\n        ((let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv15) = Obj.magic _menhir_stack in\n        let ((_1 : (\n# 208 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n     (Parsetree.p_file_structure)\n# 15178 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) : (\n# 208 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n     (Parsetree.p_file_structure)\n# 15182 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n        )) = _v in\n        (Obj.magic _1 : 'freshtv16)) : 'freshtv18)) : 'freshtv20)) : 'freshtv22)) : 'freshtv24)\n    | EVENT ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv25) = Obj.magic _menhir_stack in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | BAR ->\n            _menhir_run112 _menhir_env (Obj.magic _menhir_stack) MenhirState434\n        | IDENT _ ->\n            _menhir_reduce211 _menhir_env (Obj.magic _menhir_stack) MenhirState434\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState434) : 'freshtv26)\n    | EXTERNAL ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv49) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _endpos, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | ASSERT ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv35 * Lexing.position * Lexing.position) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = MenhirState407 in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv31 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15224 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) = _v in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | COLON ->\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : (('freshtv27 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15236 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                    ) * Lexing.position) = Obj.magic _menhir_stack in\n                    ((let _menhir_env = _menhir_discard _menhir_env in\n                    let _tok = _menhir_env._menhir_token in\n                    match _tok with\n                    | ADDRESS ->\n                        _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState427 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                    | ARRAY ->\n                        _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState427 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                    | IDENT _v ->\n                        _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState427 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                    | LIST ->\n                        _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState427 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                    | LPAREN ->\n                        _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState427 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                    | MAPPING ->\n                        _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState427 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                    | _ ->\n                        assert (not _menhir_env._menhir_error);\n                        _menhir_env._menhir_error <- true;\n                        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState427) : 'freshtv28)\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : (('freshtv29 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15264 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                    ) * Lexing.position) = Obj.magic _menhir_stack in\n                    ((let ((_menhir_stack, _menhir_s, _), _, _, _) = _menhir_stack in\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv30)) : 'freshtv32)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv33 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv34)) : 'freshtv36)\n        | LBRACKET ->\n            _menhir_run5 _menhir_env (Obj.magic _menhir_stack) MenhirState407 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n        | LET ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv41 * Lexing.position * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_menhir_s : _menhir_state) = MenhirState407 in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _menhir_s, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv37 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15294 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) = _v in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | LBRACKET ->\n                    _menhir_run5 _menhir_env (Obj.magic _menhir_stack) MenhirState415 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | COLON ->\n                    _menhir_reduce19 _menhir_env (Obj.magic _menhir_stack) MenhirState415\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState415) : 'freshtv38)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv39 * Lexing.position * Lexing.position) * Lexing.position * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _, _menhir_s, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv40)) : 'freshtv42)\n        | TYPE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv47 * Lexing.position * Lexing.position) = Obj.magic _menhir_stack in\n            let (_menhir_s : _menhir_state) = MenhirState407 in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _menhir_s, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv43 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15332 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) = _v in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | LBRACKET ->\n                    _menhir_run5 _menhir_env (Obj.magic _menhir_stack) MenhirState409 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | ASSIGN | EQUAL ->\n                    _menhir_reduce19 _menhir_env (Obj.magic _menhir_stack) MenhirState409\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState409) : 'freshtv44)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv45 * Lexing.position * Lexing.position) * _menhir_state * Lexing.position) = Obj.magic _menhir_stack in\n                ((let (_menhir_stack, _menhir_s, _) = _menhir_stack in\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) _menhir_s) : 'freshtv46)) : 'freshtv48)\n        | WITH ->\n            _menhir_reduce19 _menhir_env (Obj.magic _menhir_stack) MenhirState407\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState407) : 'freshtv50)\n    | LAYER ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv65) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv51 * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15375 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | LBRACKET ->\n                _menhir_run5 _menhir_env (Obj.magic _menhir_stack) MenhirState347 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | COLON | EQUAL ->\n                _menhir_reduce19 _menhir_env (Obj.magic _menhir_stack) MenhirState347\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState347) : 'freshtv52)\n        | SIGNATURE ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv61 * Lexing.position) = Obj.magic _menhir_stack in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | IDENT _v ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv57 * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n                let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15405 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                )) = _v in\n                let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n                ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | EQUAL ->\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : (('freshtv53 * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15417 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                    ) * Lexing.position) = Obj.magic _menhir_stack in\n                    ((let _menhir_env = _menhir_discard _menhir_env in\n                    let _tok = _menhir_env._menhir_token in\n                    match _tok with\n                    | IDENT _v ->\n                        _menhir_run345 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState333 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                    | LBRACE ->\n                        _menhir_run334 _menhir_env (Obj.magic _menhir_stack) MenhirState333 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                    | _ ->\n                        assert (not _menhir_env._menhir_error);\n                        _menhir_env._menhir_error <- true;\n                        _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState333) : 'freshtv54)\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    let (_menhir_env : _menhir_env) = _menhir_env in\n                    let (_menhir_stack : (('freshtv55 * Lexing.position) * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15437 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                    ) * Lexing.position) = Obj.magic _menhir_stack in\n                    (raise _eRR : 'freshtv56)) : 'freshtv58)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv59 * Lexing.position) * Lexing.position) = Obj.magic _menhir_stack in\n                (raise _eRR : 'freshtv60)) : 'freshtv62)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv63 * Lexing.position) = Obj.magic _menhir_stack in\n            (raise _eRR : 'freshtv64)) : 'freshtv66)\n    | LOGICAL ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv69) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv67) = Obj.magic _menhir_stack in\n        let (_endpos__1_ : Lexing.position) = _endpos in\n        let (_startpos__1_ : Lexing.position) = _startpos in\n        ((let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__1_ in\n        let _v : 'tv_opt_logical_or_trusted = \n# 827 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n             ( POlogical )\n# 15468 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_opt_logical_or_trusted _menhir_env _menhir_stack _endpos _v _startpos) : 'freshtv68)) : 'freshtv70)\n    | SIGNATURE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv79) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv75 * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15486 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | EQUAL ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv71 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15498 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                ((let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | IDENT _v ->\n                    _menhir_run306 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState280 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LBRACE ->\n                    _menhir_run281 _menhir_env (Obj.magic _menhir_stack) MenhirState280 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState280) : 'freshtv72)\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv73 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15518 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                (raise _eRR : 'freshtv74)) : 'freshtv76)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv77 * Lexing.position) = Obj.magic _menhir_stack in\n            (raise _eRR : 'freshtv78)) : 'freshtv80)\n    | TRUSTED ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv83) = Obj.magic _menhir_stack in\n        let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_env = _menhir_discard _menhir_env in\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv81) = Obj.magic _menhir_stack in\n        let (_endpos__1_ : Lexing.position) = _endpos in\n        let (_startpos__1_ : Lexing.position) = _startpos in\n        ((let _1 = () in\n        let _startpos = _startpos__1_ in\n        let _endpos = _endpos__1_ in\n        let _v : 'tv_opt_logical_or_trusted = \n# 828 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n             ( POtrusted )\n# 15543 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_opt_logical_or_trusted _menhir_env _menhir_stack _endpos _v _startpos) : 'freshtv82)) : 'freshtv84)\n    | TYPE ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv91) = Obj.magic _menhir_stack in\n        let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n        ((let _menhir_stack = (_menhir_stack, _startpos) in\n        let _menhir_env = _menhir_discard _menhir_env in\n        let _tok = _menhir_env._menhir_token in\n        match _tok with\n        | IDENT _v ->\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv87 * Lexing.position) = Obj.magic _menhir_stack in\n            let (_endpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_curr_p in\n            let (_v : (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15561 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n            )) = _v in\n            let (_startpos : Lexing.position) = _menhir_env._menhir_lexbuf.Lexing.lex_start_p in\n            ((let _menhir_stack = (_menhir_stack, _endpos, _v, _startpos) in\n            let _menhir_env = _menhir_discard _menhir_env in\n            let _tok = _menhir_env._menhir_token in\n            match _tok with\n            | ASSIGN ->\n                let (_menhir_env : _menhir_env) = _menhir_env in\n                let (_menhir_stack : ('freshtv85 * Lexing.position) * Lexing.position * (\n# 91 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n       (Astcommon.ident)\n# 15573 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n                ) * Lexing.position) = Obj.magic _menhir_stack in\n                let (_menhir_s : _menhir_state) = MenhirState4 in\n                ((let _menhir_stack = (_menhir_stack, _menhir_s) in\n                let _menhir_env = _menhir_discard _menhir_env in\n                let _tok = _menhir_env._menhir_token in\n                match _tok with\n                | ADDRESS ->\n                    _menhir_run238 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState228 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | ARRAY ->\n                    _menhir_run234 _menhir_env (Obj.magic _menhir_stack) MenhirState228 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | IDENT _v ->\n                    _menhir_run233 _menhir_env (Obj.magic _menhir_stack) _menhir_env._menhir_lexbuf.Lexing.lex_curr_p MenhirState228 _v _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LIST ->\n                    _menhir_run232 _menhir_env (Obj.magic _menhir_stack) MenhirState228 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | LPAREN ->\n                    _menhir_run231 _menhir_env (Obj.magic _menhir_stack) MenhirState228 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | MAPPING ->\n                    _menhir_run229 _menhir_env (Obj.magic _menhir_stack) MenhirState228 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n                | _ ->\n                    assert (not _menhir_env._menhir_error);\n                    _menhir_env._menhir_error <- true;\n                    _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState228) : 'freshtv86)\n            | LBRACKET ->\n                _menhir_run5 _menhir_env (Obj.magic _menhir_stack) MenhirState4 _menhir_env._menhir_lexbuf.Lexing.lex_start_p\n            | EQUAL ->\n                _menhir_reduce19 _menhir_env (Obj.magic _menhir_stack) MenhirState4\n            | _ ->\n                assert (not _menhir_env._menhir_error);\n                _menhir_env._menhir_error <- true;\n                _menhir_errorcase _menhir_env (Obj.magic _menhir_stack) MenhirState4) : 'freshtv88)\n        | _ ->\n            assert (not _menhir_env._menhir_error);\n            _menhir_env._menhir_error <- true;\n            let (_menhir_env : _menhir_env) = _menhir_env in\n            let (_menhir_stack : 'freshtv89 * Lexing.position) = Obj.magic _menhir_stack in\n            (raise _eRR : 'freshtv90)) : 'freshtv92)\n    | OBJECT ->\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv93) = Obj.magic _menhir_stack in\n        ((let (_, _startpos) = Obj.magic _menhir_stack in\n        let _endpos = _startpos in\n        let _v : 'tv_opt_logical_or_trusted = \n# 826 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n             ( POnormal )\n# 15618 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n         in\n        _menhir_goto_opt_logical_or_trusted _menhir_env _menhir_stack _endpos _v _startpos) : 'freshtv94)\n    | _ ->\n        assert (not _menhir_env._menhir_error);\n        _menhir_env._menhir_error <- true;\n        let (_menhir_env : _menhir_env) = _menhir_env in\n        let (_menhir_stack : 'freshtv95 * Lexing.position * 'tv_declarations) = Obj.magic _menhir_stack in\n        (raise _eRR : 'freshtv96)) : 'freshtv98)\n\nand _menhir_discard : _menhir_env -> _menhir_env =\n  fun _menhir_env ->\n    let lexer = _menhir_env._menhir_lexer in\n    let lexbuf = _menhir_env._menhir_lexbuf in\n    let _tok = lexer lexbuf in\n    {\n      _menhir_lexer = lexer;\n      _menhir_lexbuf = lexbuf;\n      _menhir_token = _tok;\n      _menhir_error = false;\n    }\n\nand file : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (\n# 208 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n     (Parsetree.p_file_structure)\n# 15643 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n) =\n  fun lexer lexbuf ->\n    let _menhir_env =\n      let (lexer : Lexing.lexbuf -> token) = lexer in\n      let (lexbuf : Lexing.lexbuf) = lexbuf in\n      ((let _tok = Obj.magic () in\n      {\n        _menhir_lexer = lexer;\n        _menhir_lexbuf = lexbuf;\n        _menhir_token = _tok;\n        _menhir_error = false;\n      }) : _menhir_env)\n    in\n    Obj.magic (let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv3) = ((), _menhir_env._menhir_lexbuf.Lexing.lex_curr_p) in\n    ((let _menhir_env = _menhir_discard _menhir_env in\n    let (_menhir_env : _menhir_env) = _menhir_env in\n    let (_menhir_stack : 'freshtv1) = Obj.magic _menhir_stack in\n    ((let (_, _endpos) = Obj.magic _menhir_stack in\n    let _v : 'tv_declarations = \n# 218 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n      ( [] )\n# 15666 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n     in\n    _menhir_goto_declarations _menhir_env _menhir_stack _endpos _v) : 'freshtv2)) : 'freshtv4))\n\n# 838 \"/Users/zachpage/Documents/deepsea/Edsger/parser.mly\"\n  \n\n# 15673 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n\n# 269 \"<standard.mly>\"\n  \n\n# 15678 \"/Users/zachpage/Documents/deepsea/Edsger/parser.ml\"\n"
  },
  {
    "path": "src/Edsger/parser.mli",
    "content": "\n(* The type of tokens. *)\n\ntype token = \n  | XOR\n  | WITH\n  | UNEQUAL\n  | UINT of (string)\n  | TYPE\n  | TRUSTED\n  | TRANSFERETH\n  | TO\n  | THEN\n  | STRING of (string)\n  | STAR\n  | SLASH\n  | SIGNATURE\n  | SHR\n  | SHL\n  | SEMICOLON\n  | RPAREN\n  | REFINED\n  | RBRACKET\n  | RBRACE\n  | PLUS\n  | OBJECT\n  | MOD\n  | MINUS\n  | MATCH\n  | MAPPING\n  | LPAREN\n  | LOGICAL\n  | LIST\n  | LET\n  | LESSEQ\n  | LESS\n  | LBRACKET\n  | LBRACE\n  | LAYER\n  | INT of (string)\n  | INDEXED\n  | IN\n  | IF\n  | IDENT of (Astcommon.ident)\n  | GREATEREQ\n  | GREATER\n  | GHOST\n  | FOR\n  | FOLD\n  | FIRST\n  | FAIL\n  | EXTERNAL\n  | EVENT\n  | EQUAL\n  | EOF\n  | END\n  | EMIT\n  | ELSE\n  | DOUBLEARROW\n  | DOT\n  | DO\n  | DISJUNCTION\n  | DENY\n  | CONSTRUCTOR\n  | CONST\n  | CONJUNCTION\n  | COMMA\n  | COLONLESS\n  | COLONGREATER\n  | COLONCOLON\n  | COLON\n  | CLONE\n  | BITNOT\n  | BITAND\n  | BEGIN\n  | BARBAR\n  | BAR\n  | BANG\n  | AT\n  | ASSIGN\n  | ASSERT\n  | ARROW\n  | ARRAY\n  | ADDRESS\n\n(* This exception is raised by the monolithic API functions. *)\n\nexception Error\n\n(* The monolithic API. *)\n\nval file: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (Parsetree.p_file_structure)\n"
  },
  {
    "path": "src/Edsger/parser.mly",
    "content": "#include \"config.h\"\n\n%{\nopen Astcommon\nopen Parsetree\n\nlet make_loc (startpos, endpos) = {\n  loc_start = startpos;\n  loc_end = endpos;\n}\n\nlet mkexp_ ~loc d =  \n  { p_expression_desc = d; p_expression_loc = make_loc loc; }\nlet mkcmd ~loc d = \n  { p_command_desc = d; p_command_loc = make_loc loc; }\nlet mkfotyp ~loc d = \n  { p_type_FO_desc = d; p_type_FO_loc = make_loc loc; }\nlet mksig ~loc d = \n  { p_signature_desc = d; p_signature_loc = make_loc loc; }\nlet mklayersign ~loc d = \n  { p_layer_signature_desc = d; p_layer_signature_loc = make_loc loc; }\nlet mkobjtyp ~loc objb objs = \n  { pObjectBase = objb; pObjectSignature = objs; pObjectTypLoc = make_loc loc; }\nlet mklayertyp ~loc plbase plsig = \n  { pLayerBase = plbase; pLayerSignature = plsig; pLayerLoc = make_loc loc }\nlet mkmethdef ~loc args rtyp kind body annos =\n  { pMethodArguments = args; pMethodReturnType = rtyp; pMethodKind = kind; pMethodBody = body; pMethodAnnotations = annos; pMethodLoc = make_loc loc; }\nlet mkobjconstr ~loc objtyp objk objfs objms = \n  { pObjType = objtyp; pObjKind = objk; pObjFields = objfs; pObjMethods = objms; pObjLoc = make_loc loc; }\nlet mkobj ~loc d = \n  { p_object_desc = d; p_object_loc = make_loc loc; }\nlet mkobjdef ~loc objtyp obj = \n  { pObjectType = objtyp; pObjectDesc = obj; pObjectLoc = make_loc loc; }\nlet mkobjinst ~loc objinstdesc =\n  { p_object_inst_desc = objinstdesc; p_object_inst_loc = make_loc loc; }\nlet mkprop ~loc d = \n  { p_proposition_desc = d; p_proposition_loc = make_loc loc;}\nlet mklayer ~loc d = \n  { p_layer_desc = d; p_layer_loc = make_loc loc; }\nlet mklayerdef ~loc layer invar annos = \n  { pLayerDesc = layer; pLayerInvariant = invar; pLayerAnnotations = annos; pLayerLoc = make_loc loc}\nlet mkdecl ~loc d = \n  { p_declaration_desc = d; p_declaration_loc = make_loc loc; }\n\n(* let mkanno ~loc d =\n  { p_annotation_desc = d; p_annotation_loc = make_loc loc; } *)\n\nlet builtin_type_table =\n  let tbl = Hashtbl.create 20 in\n  List.iter (fun (key, data) -> Hashtbl.add tbl key data) [\n    \"unit\", (PTbuiltin Tunit);\n    \"bool\", (PTbuiltin Tbool);\n    \"int\", (PTbuiltin Tint);\n    \"uint\", (PTbuiltin Tuint);\n    \"hashvalue\", (PTbuiltin Thashvalue);\n    \"globalpointer\", (PTbuiltin Tglobalpointer) (*;\n    \"val\", PTbuiltin Tval;\n    \"flatmem\", PTbuiltin Tflatmem*)\n  ];\n  tbl\n\nlet constant_table =\n  let tbl = Hashtbl.create 20 in\n  List.iter (fun (key, data) -> Hashtbl.add tbl key data) [\n    \"true\", PEconstant (CONbool true);\n    \"false\", PEconstant (CONbool false);\n    \"null_hash\", PEconstant CONhashvalue;\n    (*\"array_init\", PEconstant CONarray_init;*)\n    \"GLOBUndef\", PEconstant CONglobalpointer_undef (*;\n    \"Vundef\", PEconstant CONval_undef;\n    \"flatmem_empty\", PEconstant CONflatmem_empty*)\n  ];\n  tbl\n\nlet either_to_double_list = function\n  | `Left a -> [a], []\n  | `Right b -> [], [b]\nlet cons_either_double_list e (l1, l2) = match e with\n  | `Left a -> a :: l1, l2\n  | `Right b -> l1, b :: l2\n%}\n\n/* Tokens */\n\n%token ARRAY\n%token MAPPING \n%token CONST\n%token CONSTRUCTOR\n%token EOF\n%token EXTERNAL\n%token GHOST\n%token <Astcommon.ident> IDENT\n%token <string> INT\n%token <string> UINT\n%token LAYER\n%token LOGICAL\n%token REFINED\n%token OBJECT\n/* %token OF */\n%token SIGNATURE\n%token <string> STRING\n%token TRUSTED\n%token TYPE\n%token EVENT\n#ifdef ANT\n%token IDENTITY\n#else\n%token ADDRESS\n#endif\n%token INDEXED\n%token EMIT\n\n%token ASSERT\n%token BEGIN\n%token DENY\n%token DO\n%token ELSE\n%token END\n%token FAIL\n%token FIRST\n%token FOLD\n%token FOR\n%token IF\n%token IN\n%token LET\n%token MATCH\n%token MOD\n/* %token SKIP */\n%token THEN\n%token TO\n%token WITH\n%token CLONE\n%token TRANSFERETH\n\n%token AT\n%token ARROW\n%token ASSIGN\n%token BANG\n%token BITNOT\n%token BAR\n%token BARBAR       \n%token COLON\n%token COLONCOLON       \n%token COLONGREATER\n%token COLONLESS\n%token COMMA\n%token CONJUNCTION\n%token DISJUNCTION\n%token DOT\n%token DOUBLEARROW\n%token EQUAL\n%token GREATER\n%token GREATEREQ\n%token LBRACE\n%token LBRACKET\n%token LESS\n%token LESSEQ\n%token LPAREN\n%token MINUS\n%token PLUS\n%token RBRACE\n%token RBRACKET\n%token RPAREN\n%token SEMICOLON\n%token STAR\n%token SLASH\n%token UNEQUAL\n%token BITAND\n%token XOR\n%token SHL\n%token SHR\n%token LIST\n       \n/* layer calculus level precedences */\n%right AT\n%right COLONGREATER\n%nonassoc COLON\n\n/* object and command level precedences */\n%nonassoc IN /* WITH */\n%nonassoc BAR \n%nonassoc below_SEMICOLON\n%nonassoc SEMICOLON  /* no longer relevant: below EQUAL: { f x = ...; g x = ... } */\n%nonassoc LET  /* above SEMICOLON: ...; let ... in ... */\n/*\n%nonassoc ASSERT DENY\n%nonassoc LET MATCH\n*/\n%nonassoc DO      /* below THEN (first ... = ... to ... do ...) */\n%nonassoc THEN    /* below ELSE (first ... = ... to ... do ... then ...)\n                            and (if ... then ...) */\n%nonassoc ELSE    /* (first ... = ... to ... do ... then ... else ...)\n                 and (if ... then ... else ...) */\n\n/* type and expression level precedences */\n/* (* XXX: rest of the precedences *) */\n/* %right COMMA */\n%right DISJUNCTION\n%right CONJUNCTION\n%nonassoc EQUAL UNEQUAL LESS LESSEQ GREATER GREATEREQ\n%left BARBAR\n%left XOR\n%left BITAND\n%left SHL SHR\n%left PLUS MINUS\n%left STAR SLASH MOD\n%nonassoc above_STAR  /* parse [array[n] int * int] as [(array[n] int) * int] */\n%nonassoc prec_unary_prefix\n%nonassoc below_DOT\n%left DOT LBRACKET\n\n%start file\n%type<Parsetree.p_file_structure> file\n\n%%\n\n/* Top level */\nfile:\n    declarations EOF  { List.rev $1 }\n;\n\ndeclarations:\n      { [] }\n  | declarations declaration  { $2 :: $1 }\n  | declarations events_declaration { $2 @ $1 }\n  | declarations const_declaration  { $1 }\n  | declarations external_declaration  { $2 :: $1 }\n;\ndeclaration:\n    type_declaration  { fst $1, mkdecl ~loc:$sloc (PDtype (snd $1)) }\n  | object_signature_declaration  { fst $1, mkdecl ~loc:$sloc (PDsignature (snd $1)) }\n  | layer_signature_declaration  { fst $1, mkdecl ~loc:$sloc  (PDlayer_sig (snd $1)) }\n  | object_declaration  { fst $1, mkdecl ~loc:$sloc (PDobject (snd $1)) }\n  | layer_declaration  { fst $1, mkdecl ~loc:$sloc (PDlayer (snd $1)) }\n;\nconst_declaration:\n    CONST IDENT EQUAL e=expression\n      { Hashtbl.add constant_table $2 e.p_expression_desc }\n;\nexternal_declaration:\n    EXTERNAL annotations WITH STRING\n      { \"\", mkdecl ~loc:$sloc (PDexternal_with ($4, $2)) }\n  | EXTERNAL TYPE IDENT annotations eq_or_assign STRING\n      { $3, mkdecl ~loc:$sloc (PDexternal_type ($6, None, $4)) }\n  | EXTERNAL TYPE IDENT annotations eq_or_assign STRING STRING\n      { $3, mkdecl ~loc:$sloc (PDexternal_type ($6, Some $7, $4)) }\n  | EXTERNAL LET IDENT annotations COLON type_expression eq_or_assign STRING\n      { $3, mkdecl ~loc:$sloc (PDexternal_const ($8, $6, $4)) }\n  | EXTERNAL LET IDENT annotations COLON type_expression ARROW type_expression\n        eq_or_assign STRING\n      { $3, mkdecl ~loc:$sloc (PDexternal_function ($10, $6, $8, $4)) }\n  | EXTERNAL ASSERT IDENT COLON type_expression eq_or_assign STRING\n      { $3, mkdecl ~loc:$sloc (PDexternal_prop ($7, $5)) }\n;\n\n/* Types */\ntype_declaration:\n    TYPE IDENT ASSIGN te=type_expression\n      {   $2,  mkfotyp ~loc:$sloc te.p_type_FO_desc }\n  | TYPE IDENT annotations EQUAL type_definition\n      { $2, mkfotyp ~loc:$sloc (PTdata ($5, $3)) }\n;\n\ntype_expression:\n    IDENT\n      { let x = try Hashtbl.find builtin_type_table $1\n        with Not_found -> PTname $1\n        in \n        mkfotyp ~loc:$sloc (x)  \n       }\n#ifdef ANT\n  | IDENTITY { mkfotyp ~loc:$sloc (PTbuiltin Taddress) }\n#else\n  | ADDRESS { mkfotyp ~loc:$sloc (PTbuiltin Taddress) }\n#endif\n  | LPAREN type_expression RPAREN\n      { $2 }\n  | type_expression STAR type_expression\n      { mkfotyp ~loc:$sloc (PTprod ($1, $3)) }\n  | ARRAY LBRACKET e=expression RBRACKET type_expression %prec above_STAR\n      { mkfotyp ~loc:$sloc (PTarray (int_of_p_expression e.p_expression_desc, $5)) }\n  | MAPPING LBRACKET type_expression RBRACKET type_expression\n      { mkfotyp ~loc:$sloc (PTmapping ($3, $5)) }\n  | LIST type_expression\n      { mkfotyp ~loc:$sloc (PTlist $2) }\n;\n\ntype_definition:\n    LBRACE field_declarations opt_semi RBRACE  { PTsingleton (List.rev $2) }\n  | opt_bar constructor_declarations           { PTbranches (List.rev $2) }\n;\n\nfield_declarations:\n    field_declaration  { [$1] }\n  | field_declarations SEMICOLON field_declaration  { $3 :: $1 }\n;\nfield_declaration:\n    IDENT COLON type_expression  { $1, $3 }\n;\n\nconstructor_declarations:\n    constructor_declaration  { [$1] }\n  | constructor_declarations BAR constructor_declaration  { $3 :: $1 }\n;\nconstructor_declaration:\n    IDENT constructor_params annotations\n      { { pTypeConstrName = $1;\n          pTypeConstrArgs = $2;\n          pTypeConstrAnnotations = $3;\n          pTypeConstrLoc = (make_loc $sloc ) } }\n;\nconstructor_params:\n constructor_parameters\n      { List.fold_left (fun a b -> List.rev_append b a) [] $1 }\n;\nconstructor_parameters:\n      { [] }\n  | constructor_parameters constructor_parameter  { $2 :: $1 }\n;\nconstructor_parameter:\n    LPAREN idents COLON type_expression RPAREN\n      { List.map (fun i -> i, $4) $2 }\n;\nidents:\n    IDENT  { [$1] }\n  | idents IDENT  { $2 :: $1 }\n;\n\nevents_declaration :\n    EVENT opt_bar event_declarations { $3 }\n;\n\nevent_declarations:\n    event_declaration  { [$1] }\n  | event_declarations BAR event_declaration  { $3 :: $1 }\n\n;\nevent_declaration:\n    IDENT event_parameters\n      { ($1, mkdecl ~loc:$sloc (PDevent (List.rev $2))) }\n\nevent_parameters:\n      { [] }\n  | event_parameters event_parameter  { $2 :: $1 }\n;\n\nindexed_opt :\n  { false }\n| INDEXED { true }\n;\n\nevent_parameter:\n  LPAREN IDENT COLON type_expression indexed_opt RPAREN\n      { ($2, $4, $5) }\n;\n\n/* Object Signature */\nobject_signature_declaration:\n    SIGNATURE IDENT EQUAL object_signature_expr\n      { $2, $4 }\n  | opt_logical_or_trusted  /* allowing factorization with object_declaration */\n    OBJECT SIGNATURE IDENT EQUAL object_signature_expr\n      { if $1 <> POnormal then\n          print_endline \"Warning: object signatures should not be marked logical or trusted\";\n        $4, $6 }\n;\nobject_signature_expr:\n    IDENT  { mksig ~loc:$sloc (PSname $1) }\n  | LBRACE RBRACE  { mksig ~loc:$sloc (PSconstr []) }\n  | LBRACE object_signature_fields opt_semi RBRACE  { mksig ~loc:$sloc (PSconstr (List.rev $2)) }\n  | object_signature_expr WITH GHOST IDENT  { mksig ~loc:$sloc (PSghostize ($1, [$4])) }\n  | object_signature_expr WITH GHOST LBRACE idents_semi RBRACE  { mksig ~loc:$sloc (PSghostize ($1, $5)) }\n  | object_signature_expr WITH LOGICAL IDENT  { mksig ~loc:$sloc (PSlogicize ($1, [$4])) }\n  | object_signature_expr WITH LOGICAL LBRACE idents_semi RBRACE  { mksig ~loc:$sloc (PSlogicize ($1, $5)) }\n  | object_signature_expr MINUS IDENT  { mksig ~loc:$sloc (PSminus ($1, [$3])) }\n  | object_signature_expr MINUS LBRACE idents_semi RBRACE  { mksig ~loc:$sloc (PSminus ($1, $4)) }\nobject_signature_fields:\n    object_signature_field  { [$1] }\n  | object_signature_fields SEMICOLON object_signature_field  { $3 :: $1 }\n;\nobject_signature_field:\n    method_kind IDENT COLON type_expression ARROW type_expression\n      { $2, $4, $6, $1 }\n  | CONSTRUCTOR COLON type_expression ARROW type_expression\n      {  \"constructor\", $3, $5, MKconstructor  }\n;\nmethod_kind:\n             { MKnormal }\n  | CONST    { MKconst }\n  | GHOST    { MKghost }\n  | CONST GHOST { MKconstghost }\n  | GHOST CONST { MKconstghost }\n  | LOGICAL  { MKlogical }\n  | REFINED { MKrefined }\n;\nidents_semi:\n    idents_semi_sep opt_semi  { List.rev $1 }\n;\nidents_semi_sep:\n    IDENT  { [$1] }\n  | idents_semi_sep SEMICOLON IDENT  { $3 :: $1 }\n;\n\n/* Layer Signature */\nlayer_signature_declaration:\n    LAYER SIGNATURE IDENT EQUAL layer_signature\n      { $3, $5 }\n;\nlayer_signature:\n    IDENT  { mklayersign ~loc:$sloc (PLSname $1) }\n  | LBRACE RBRACE  { mklayersign ~loc:$sloc (PLSconstr []) }\n  | LBRACE layer_signature_fields opt_semi RBRACE  { mklayersign ~loc:$sloc (PLSconstr (List.rev $2)) }\nlayer_signature_fields:\n    layer_signature_field  { [$1] }\n  | layer_signature_fields SEMICOLON layer_signature_field  { $3 :: $1 }\n;\nlayer_signature_field:\n    IDENT COLON object_signature_expr  { $1, $3 }\n;\n\n/* Object and layer types */\nlayer_type:\n    LBRACKET layer_signature RBRACKET layer_signature\n      { { pLayerBase = $2; pLayerSignature = $4; pLayerLoc =(make_loc $sloc) } }\n  | LBRACKET RBRACKET layer_signature\n      { { pLayerBase = mklayersign ~loc:$sloc (PLSconstr []); pLayerSignature = $3; pLayerLoc=(make_loc $sloc) } }\n;\n\n/* Expressions and commands */\n\n  /* XXX: LR(1) does not look ahead enough to correctly decide between parse\n          trees\n\n       command -> IDENT DOT IDENT e    (primitive call)\n\n     and\n\n       command -> expression\n               -> expression_atom_head\n               -> expression_atom DOT IDENT   (struct field access)\n               -> IDENT DOT IDENT\n\n     Default behavior: shift DOT in command over reduce expression_atoms ->\n     IDENT, thus the former.\n  */\n  /* Harmless parsing ambiguity introduced by allowing [assert (c)] as in\n     [assert (let x = pe in !x)]: [assert (e)] can be parsed as\n\n       command -> ASSERT command\n               -> ASSERT expression\n               -> ASSERT LPAREN expression LPAREN\n\n     or\n\n       command -> ASSERT LPAREN command RPAREN\n               -> ASSERT LPAREN expression LPAREN\n\n     Either way, the generated parse tree is always [PCassert (PCyield e)],\n     hence harmless.  Default behavior is the former. */\n  /* NOTE: Fixed on 3/17/2015 by restricting [expression] to not accept\n           structure construction, adding a new [expression_or_structure]\n           non-terminal, and changing assignment rule\n\n       command -> expression ASSIGN expression\n\n     into\n\n       command -> expression ASSIGN expression_or_structure\n\n     which is the only usage for structure construct anyway.\n\n     XXX: Ambiguous grammar on input [{ x = e1; y = e2 }]:\n\n       command -> LBRACE commands RBRACE\n               -> LBRACE command SEMICOLON command RBRACE\n               -> LBRACE expression SEMICOLON expression RBRACE\n               -> LBRACE expression EQUAL expression SEMICOLON\n                         expression EQUAL expression RBRACE\n               -> LBRACE IDENT expression_atoms EQUAL expression SEMICOLON\n                         IDENT expression_atoms EQUAL expression RBRACE\n               -> LBRACE IDENT EQUAL expression SEMICOLON\n                         IDENT EQUAL expression RBRACE\n\n     producing [PCsequence (PCyield (PEbin (OPeq, PEglob \"x\", e1)),\n                            PCyield (PEbin (OPeq, PEglob \"y\", e2)))], or\n\n       command -> expression\n               -> expression_atom_head\n               -> LBRACE struct_fields RBRACE\n               -> LBRACE struct_fields SEMICOLON struct_field RBRACE\n               -> LBRACE struct_field SEMICOLON struct_field RBRACE\n               -> LBRACE IDENT EQUAL expression SEMICOLON\n                         IDENT EQUAL expression RBRACE\n\n     producing [PCyield (PEstruct [\"x\", e1; \"y\", e2])].\n\n     Default behavior: shift EQUAL in struct_field over reduce\n     expression_atoms -> epsilon, thus the latter.\n  */\n\natom:\n    IDENT  { let x = try Hashtbl.find constant_table $1 with Not_found -> PEglob $1 in  mkexp_ ~loc:$sloc (x) }\n  | INT  {  mkexp_ ~loc:$sloc (PEconstant (CONint (int_of_string($1)))) }\n  | UINT  {  mkexp_ ~loc:$sloc (PEconstant (CONuint (int_of_string($1)))) }\n#ifdef ANT\n  | IDENTITY LPAREN INT RPAREN {  mkexp_ ~loc:$sloc (PEconstant (CONaddress $3)) }\n  | IDENTITY LPAREN UINT RPAREN {  mkexp_ ~loc:$sloc (PEconstant (CONaddress $3)) }\n#else\n  | ADDRESS LPAREN INT RPAREN {  mkexp_ ~loc:$sloc (PEconstant (CONaddress $3)) }\n  | ADDRESS LPAREN UINT RPAREN {  mkexp_ ~loc:$sloc (PEconstant (CONaddress $3)) }\n#endif\n  | LPAREN RPAREN  {  mkexp_ ~loc:$sloc (PEconstant CONunit) }\n  | LPAREN comma_sep_expressions RPAREN  { $2 }\n  | a=atom LBRACKET e=expression RBRACKET  {  mkexp_ ~loc:$sloc (PEindex (a, e)) }\n  (* | atom LPAREN atom RPAREN { mkexp_ ~loc:$sloc (PEpair (a1, a2))  } *)\n  (* | atom DOT IDENT  {  mkexp_ ~loc:$sloc (PEfield ($1, $3)) } *)\n;\n\nexpression:\n  | a=atom+ { match a with\n      | [hd] -> hd\n      | _ -> mkexp_ ~loc:$sloc (PEapp a)\n    }\n  | a1=atom+ DOT a2=atom+ { let x = mkexp_ ~loc:$sloc (PEfield (a1, a2)) in\n      (* print_endline (\"PEfield: \" ^ (string_of_p_expression x)); *) x\n    }\n  | MINUS e=expression %prec prec_unary_prefix  {  mkexp_ ~loc:$sloc (PEun (OPneg, e)) }\n  | BANG e=expression %prec prec_unary_prefix  {  mkexp_ ~loc:$sloc (PEun (OPnot, e)) }\n  | BITNOT e=expression %prec prec_unary_prefix  {  mkexp_ ~loc:$sloc (PEun (OPbitnot, e)) }\n  | e1=expression BARBAR e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPbitor, e1, e2 )) }\n  | e1=expression XOR e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPxor, e1, e2 )) }\n  | e1=expression BITAND e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPbitand, e1, e2 )) }\n  | e1=expression SHL e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPshl, e1, e2 )) }\n  | e1=expression SHR e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPshr, e1, e2)) }\n  | e1=expression PLUS e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPplus, e1, e2 )) }\n  | e1=expression MINUS e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPminus, e1, e2 )) }\n  | e1=expression STAR e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPtimes, e1, e2 )) }\n  | e1=expression SLASH e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPdivide, e1, e2 )) }\n  | e1=expression MOD e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPremainder, e1, e2 )) }\n  | e1=expression CONJUNCTION e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPand, e1, e2 )) }\n  | e1=expression DISJUNCTION e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPor,e1, e2 )) }\n  | e1=expression EQUAL e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPeq, e1, e2 )) }\n  | e1=expression UNEQUAL e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPne, e1, e2 )) }\n  | e1=expression LESS e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPlt, e1, e2 )) }\n  | e1=expression LESSEQ e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPle, e1, e2 )) }\n  | e1=expression GREATER e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPgt, e1, e2 )) }\n  | e1=expression GREATEREQ e2=expression  {  mkexp_ ~loc:$sloc (PEbin (OPge, e1, e2 )) }\n  | LBRACE struct_fields opt_semi RBRACE  { mkexp_ ~loc:$sloc (PEstruct (List.rev $2)) }\n;\n\ncomma_sep_expressions:\n    e=expression  { mkexp_ ~loc:$sloc e.p_expression_desc }\n  | expression COMMA comma_sep_expressions  {  mkexp_ ~loc:$sloc (PEpair ($1, $3)) }\nstruct_fields:\n    struct_field  { [$1] }\n  | struct_fields SEMICOLON struct_field  { $3 :: $1 }\n;\nstruct_field:\n    IDENT EQUAL e=expression  { $1, mkexp_ ~loc:$sloc e.p_expression_desc }\n;\n\ncommand_core:\n    e=expression  { PCyield e }\n\n\n  | BEGIN c=commands END  { c.p_command_desc }\n  | MATCH e=expression WITH opt_bar match_clauses END  { (PCmatch (mkexp_ ~loc:$sloc e.p_expression_desc, List.rev $5)) }\n  | e1=expression ASSIGN e2=expression  { (PCstore (mkexp_ ~loc:$sloc e1.p_expression_desc, mkexp_ ~loc:$sloc e2.p_expression_desc)) }\n  | FAIL  { PCfail }\n\n  | IF e=expression THEN command  { PCcond (mkexp_ ~loc:$sloc e.p_expression_desc, $4, None) }\n  | IF e=expression THEN command ELSE command  { PCcond (mkexp_ ~loc:$sloc e.p_expression_desc, $4, Some $6) }\n\n  | EMIT e=expression { PCemit (mkexp_ ~loc:$sloc e.p_expression_desc) }\n\n  | FOR annotations IDENT eq_or_assign e1=expression TO e2=expression DO command\n      { PCfor ($3, mkexp_ ~loc:$sloc e1.p_expression_desc, mkexp_ ~loc:$sloc e2.p_expression_desc, $9, $2) }\n  | FIRST annotations IDENT eq_or_assign e1=expression TO e2=expression\n      DO command\n      { PCfirst ($3, mkexp_ ~loc:$sloc e1.p_expression_desc, mkexp_ ~loc:$sloc e2.p_expression_desc, $9, None, None, $2) }\n  | FIRST annotations IDENT eq_or_assign e1=expression TO e2=expression\n      DO command ELSE command\n      { PCfirst ($3, mkexp_ ~loc:$sloc e1.p_expression_desc, mkexp_ ~loc:$sloc e2.p_expression_desc, $9, None, Some $11, $2) }\n  | FIRST annotations IDENT eq_or_assign e1=expression TO e2=expression\n      DO command THEN command\n      { PCfirst ($3,mkexp_ ~loc:$sloc e1.p_expression_desc, mkexp_ ~loc:$sloc e2.p_expression_desc, $9, Some $11, None, $2) }\n  | FIRST annotations IDENT eq_or_assign e1=expression TO e2=expression\n      DO command THEN command ELSE command\n      { PCfirst ($3, mkexp_ ~loc:$sloc e1.p_expression_desc, mkexp_ ~loc:$sloc e2.p_expression_desc, $9, Some $11, Some $13, $2) }\n  | FOLD annotations IDENT eq_or_assign e1=expression TO e2=expression\n     BAR             IDENT eq_or_assign e3=expression DO command\n      { PCfold ($3, mkexp_ ~loc:$sloc e1.p_expression_desc, mkexp_ ~loc:$sloc e2.p_expression_desc, $9, mkexp_ ~loc:$sloc e3.p_expression_desc, $13, $2) }\n  | TRANSFERETH l=delimited(LPAREN, separated_list(COMMA, expression), RPAREN) { PCtransfer l }\n;\ncommand:\n    c=command_core  { mkcmd ~loc:$sloc c }\n\n  | ASSERT annotated_command  { mkcmd ~loc:$sloc (PCassert $2) }\n  | DENY annotated_command  { mkcmd ~loc:$sloc (PCdeny $2) }\n  | GHOST annotated_command  { mkcmd ~loc:$sloc (PCghost $2) }\n\n  | LET IDENT EQUAL commands IN commands  { mkcmd ~loc:$sloc (PClet ($2, $4, $6)) }\n;\nannotated_command:\n    c=command_core  { mkcmd ~loc:$sloc c}\n  | LET IDENT EQUAL commands IN annotated_command  { mkcmd ~loc:$sloc (PClet ($2, $4, $6)) }\n;\neq_or_assign:\n    EQUAL { () }\n  | ASSIGN { () }\n;\ncommands:\n    c=command %prec below_SEMICOLON  { mkcmd ~loc:$sloc c.p_command_desc }\n  | command SEMICOLON commands  { mkcmd ~loc:$sloc (PCsequence ($1, $3)) }\n;\n\n  /* The parsing of clauses is slightly complicated because we have special cases for\n       h :: t => c\n       [] => c\n*/\n\nmatch_clauses:\n    match_clause  { [$1] }\n  | match_clauses BAR match_clause { $3 :: $1 }\n  ;\nmatch_clause:\n    match_pattern DOUBLEARROW commands\n      { let (cnstr, params) = $1 in\n        (cnstr , params, $3) }\n\n  | LBRACKET RBRACKET DOUBLEARROW commands\n      { (\"NIL\", [], $4) }\n  ;\n    \nmatch_pattern:\n  IDENT match_pattern_tail\n      { match $2 with\n        | PPTcons x -> (\"CONS\", [x; $1])\n        | PPTother xs -> ($1, xs) }\n  ;\n    \nmatch_pattern_tail:\n          { PPTother [] }  \n  | COLONCOLON IDENT { PPTcons $2 }\n  | idents { PPTother (List.rev $1) }\n  ;\n    \n/* Object */\nobject_declaration:\n    opt_logical_or_trusted\n    OBJECT IDENT base_layer_signature COLON object_signature_expr LBRACE\n      object_fields_and_methods RBRACE\n      { let fields_rev, methods_rev = $8 in\n        let obj_type = { pObjectBase = $4; pObjectSignature = $6; pObjectTypLoc = (make_loc $sloc) } in\n        $3, {\n          pObjectType = None;\n          pObjectDesc = mkobj ~loc:$sloc (POconstr {\n            pObjType = obj_type;\n            pObjKind = $1;\n            pObjFields = List.rev fields_rev;\n            pObjMethods = List.rev methods_rev;\n            pObjLoc = (make_loc $sloc) });\n          pObjectLoc = (make_loc $sloc) }\n      }\n  | opt_logical_or_trusted\n    OBJECT IDENT base_layer_signature COLON object_signature_expr\n      EQUAL object_expression\n      /* opt_logical_or_trusted are not used, just there to allow parser to factor with\n         the previous rule */\n      { $3, { pObjectType = Some { pObjectBase = $4; pObjectSignature = $6; pObjectTypLoc = (make_loc $sloc) };\n              pObjectDesc = $8; pObjectLoc = (make_loc $sloc) } }\n  | opt_logical_or_trusted OBJECT IDENT EQUAL object_expression\n      { $3, { pObjectType = None; pObjectDesc = $5; pObjectLoc = (make_loc $sloc) } }\n;\n\nbase_layer_signature:\n      { mklayersign ~loc:$sloc (PLSconstr []) }\n  | LPAREN RPAREN  { mklayersign ~loc:$sloc (PLSconstr []) }\n  | LPAREN layer_signature RPAREN  { $2 }\n  | LPAREN base_slots RPAREN  { mklayersign ~loc:$sloc  (PLSconstr (List.rev $2)) }\n;\nbase_slots:\n    base_slot  { [$1] }\n  | base_slots COMMA base_slot  { $3 :: $1 }\n;\nbase_slot:\n    IDENT COLON object_signature_expr  { $1, $3 }\n;\n\nobject_fields_and_methods:\n    object_field_or_method\n      { either_to_double_list $1 }\n  | object_fields_and_methods object_field_or_method\n      { cons_either_double_list $2 $1 }\n;\nobject_field_or_method:\n    LET annotations method_kind IDENT COLON type_expression ASSIGN e=expression\n      { (* annotations are not used and only one (GHOST) method_kind is\n           acceptable, just there to allow parser to factor with\n           the next rule *)\n    let is_ghost = match $3 with\n      | MKnormal -> false\n      | MKghost -> true\n      | MKconstghost ->\n        print_endline (\"Warning: object fields cannot be declared `const ghost': \" ^\n          $4 ^ \" marked as `ghost'.\");\n        true\n      | k ->\n        print_endline (\"Warning: object fields cannot be declared `\" ^\n          string_of_method_kind k ^ \"': \" ^ $4 ^ \" marked as normal.\");\n        false\n      in `Left ($4, $6, (mkexp_ ~loc:$sloc e.p_expression_desc) , is_ghost) }\n  | LET annotations method_kind IDENT method_param opt_type_annotation EQUAL\n      commands\n      { `Right ($4, { pMethodArguments = $5;\n                      pMethodReturnType = $6;\n                      pMethodKind = $3;\n                      pMethodBody = $8;\n                      pMethodAnnotations = $2;\n                      pMethodLoc = (make_loc $sloc) }) }\n  | LET annotations CONSTRUCTOR method_param opt_type_annotation EQUAL\n      commands\n      { `Right (\"constructor\", { pMethodArguments = $4;\n                      pMethodReturnType = $5;\n                      pMethodKind = MKconstructor;\n                      pMethodBody = $7;\n                      pMethodAnnotations = $2;\n                      pMethodLoc = (make_loc $sloc) }) }\n;\n\nmethod_param:\n    IDENT  { [$1, None] }\n  | LPAREN RPAREN  { [\"()\", Some (mkfotyp ~loc:$sloc (PTbuiltin Tunit))] }\n  | LPAREN method_parameters RPAREN  { List.rev $2 }\n;\nmethod_parameters:\n    method_parameter { [$1] }\n  | method_parameters COMMA method_parameter  { $3 :: $1 }\n;\nmethod_parameter:\n    IDENT opt_type_annotation  { $1, $2 }\n;\nopt_type_annotation:\n      { None }\n  | COLON type_expression  { Some $2 }\n\nobject_expression:\n    IDENT  { mkobj ~loc:$sloc (POname $1) }\n  | CLONE IDENT  {mkobj ~loc:$sloc (POclone $2)}\n  | object_expression COLONGREATER layer_signature  { mkobj ~loc:$sloc (POrelax ($1, $3)) }\n  | LPAREN object_expression RPAREN  { $2 }\n;\n\n/* Layer */\nlayer_declaration:\n    LAYER IDENT annotations layer_signature_annotation EQUAL layer_expression\n        layer_invariant_annotation\n      { $2, {  pLayerLoc = (make_loc $sloc); \n              pLayerAnnotations = $3;\n              pLayerInvariant = $7;\n              pLayerDesc = match $4 with\n                | None -> $6\n                | Some t -> mklayer ~loc:$sloc (PLrelax ($6, t));\n             }\n      }\n;\nlayer_signature_annotation:\n      { None }\n  | COLON layer_type  { Some $2 }\n;\nlayer_invariant_annotation:\n      { None }\n  | ASSERT proposition  { Some $2 }\nlayer_expression:\n    IDENT\n      {  mklayer ~loc:$sloc (PLname $1) }\n  | LBRACE layer_slots RBRACE\n      {  mklayer ~loc:$sloc (PLconstr (List.rev $2)) }\n  | layer_expression COLON layer_type\n      {  mklayer ~loc:$sloc (PLrelax ($1, $3)) }\n  | layer_expression AT layer_expression\n      {  mklayer ~loc:$sloc (PLinst ($1, $3)) }\n  | layer_expression COLONGREATER layer_expression WITH proposition\n      {  mklayer ~loc:$sloc (PLrefine ($1, $3, $5)) }\n  | LPAREN layer_expression RPAREN  { $2 }\nlayer_slots:\n      { [] }\n  | layer_slots_plus opt_semi  { $1 }\n;\nlayer_slots_plus:\n    layer_slot  { [$1] }\n  | layer_slots_plus SEMICOLON layer_slot  { $3 :: $1 }\n;\nlayer_slot:\n    IDENT EQUAL layer_obj_inst  { $1, $3 }\n;\nlayer_obj_inst:\n    object_expression { mkobjinst ~loc:$sloc (POinternal $1) }\n#ifdef ANT\n  | IDENTITY LPAREN INT RPAREN COLONLESS object_expression { mkobjinst ~loc:$sloc (POexternal ((CONaddress $3), $6)) }\n  | IDENTITY LPAREN UINT RPAREN COLONLESS object_expression { mkobjinst ~loc:$sloc (POexternal ((CONaddress $3), $6)) }\n#else\n  | ADDRESS LPAREN INT RPAREN COLONLESS object_expression { mkobjinst ~loc:$sloc (POexternal ((CONaddress $3), $6)) }\n  | ADDRESS LPAREN UINT RPAREN COLONLESS object_expression { mkobjinst ~loc:$sloc (POexternal ((CONaddress $3), $6)) }\n#endif\n;\n\nannotations:\n      { [] }\n  | LBRACKET LBRACKET RBRACKET RBRACKET  { [] }\n  | LBRACKET LBRACKET annotations_plus RBRACKET RBRACKET  { List.rev $3 }\n;\nannotations_plus:\n    annotation  { [$1] }\n  | annotations_plus COMMA annotation  { $3 :: $1 }\n;\n\nannotation:\n    EQUAL command  { PAexpr $2 }\n  | INT  { PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc  (PEconstant (CONint (int_of_string($1))))))) }\n  | UINT  { PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc  (PEconstant (CONuint (int_of_string($1))))))) }\n#ifdef ANT\n  | IDENTITY LPAREN INT RPAREN { PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc (PEconstant (CONaddress $3))))) }\n  | IDENTITY LPAREN UINT RPAREN { PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc (PEconstant (CONaddress $3))))) }\n#else\n  | ADDRESS LPAREN INT RPAREN { PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc (PEconstant (CONaddress $3))))) }\n  | ADDRESS LPAREN UINT RPAREN { PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc (PEconstant (CONaddress $3))))) }\n#endif\n  | IDENT annotation_arguments  { PAclause ($1, $2) }\n  | STRING annotation_arguments  { PAclause ($1, $2) }\n;\nannotation_arguments:\n      { [] }\n  | INT  { [PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc (PEconstant (CONint (int_of_string($1)))))))] }\n  | UINT  { [PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc  (PEconstant (CONuint (int_of_string($1)))))))] }\n#ifdef ANT\n  | IDENTITY LPAREN INT RPAREN { [PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc (PEconstant (CONaddress $3)))))] }\n  | IDENTITY LPAREN UINT RPAREN { [PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc (PEconstant (CONaddress $3)))))] }\n#else\n  | ADDRESS LPAREN INT RPAREN { [PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc (PEconstant (CONaddress $3)))))] }\n  | ADDRESS LPAREN UINT RPAREN { [PAexpr (mkcmd ~loc:$loc (PCyield (mkexp_ ~loc:$loc (PEconstant (CONaddress $3)))))] }\n#endif\n  | IDENT  { [PAclause ($1, [])] }\n  | STRING  { [PAclause ($1, [])] }\n  | LPAREN RPAREN  { [] }\n  | LPAREN annotations_plus RPAREN  { List.rev $2 }\n;\n\nproposition:\n    IDENT  { mkprop ~loc:$sloc (PPident $1) }\n  | STRING  { mkprop ~loc:$sloc (PPexternal $1) }\n;\n\nopt_logical_or_trusted:\n             { POnormal }\n  | LOGICAL  { POlogical }\n  | TRUSTED  { POtrusted }\n;\nopt_semi:\n               { () }\n  | SEMICOLON  { () }\n;\nopt_bar:\n         { () }\n  | BAR  { () }\n;\n%%\n"
  },
  {
    "path": "src/Edsger/parsetree.ml",
    "content": "open Astcommon\nopen Lexing\n\ntype location = {loc_start: position; loc_end: position;};;\n\nlet in_file name =\n  let loc = { dummy_pos with pos_fname = name } in\n  { loc_start = loc; loc_end = loc; }\n;;\n\nlet none = in_file \"__none__\";;\n\n\ntype p_expression = \n  {\n    p_expression_desc:  p_expression_desc;\n    p_expression_loc: location;\n  }\nand p_expression_desc =\n  | PEglob of ident\n  | PEconstant of constant\n  | PEun of unop * p_expression\n  | PEbin of binop * p_expression * p_expression\n  | PEpair of p_expression * p_expression\n  | PEapp of p_expression list\n  | PEstruct of (ident * p_expression) list\n  | PEfield of p_expression list * p_expression list\n  | PEindex of p_expression * p_expression\n\n\ntype p_command = \n  {\n    p_command_desc: p_command_desc;\n    p_command_loc: location;\n  }\nand p_command_desc =\n  (* | PCskip *)\n\n  (* How do we distinguish pure expressions from effectful (object variable\n     reading) ones?  To do so some type information is needed, hence they\n     are clumped together when parsing. *)\n  | PCyield of p_expression\n\n  | PClet of ident * p_command * p_command\n  | PCsequence of p_command * p_command\n  (* | PCcall of ident * ident * p_expression *)\n  (* premitive calls now parsed as\n       PCyield (PEapp (PEfield (PEglob \"slot\", PEglob \"method\"),\n                       [argument]))\n  *)\n  | PCcond of p_expression * p_command * p_command option\n  | PCfor of ident * p_expression * p_expression * p_command * p_annotations\n      (* FOR i     = 0           TO n           DO s.run i *)\n  | PCmatch of p_expression * p_clause list\n\n  (* Emitting ethereum events. For now the expression has to be an\n     event constructor directly applied to arguments, but\n     hypothetically you could pass around events as a first-class data type. *)\n  | PCemit of p_expression\n  (* [from; to; value] *)\n  | PCtransfer of p_expression list\n\n  (* extension for certified programming *)\n  | PCstore of p_expression * p_expression\n  | PCfail\n  | PCassert of p_command\n  | PCdeny of p_command\n  | PCghost of p_command\n  | PCfirst of ident * p_expression * p_expression * p_command *\n      (* FIRST i     = 0           TO n           DO s.test i  *)\n               p_command option * p_command option * p_annotations\n       (* THEN i             ELSE FAIL *)\n  | PCfold of ident * p_expression * p_expression *\n      (* FOLD i     = 0           TO n            *)\n              ident * p_expression * p_command    * p_annotations\n         (* | sum   = 0           DO sum + i      *)\n\nand p_clause = ident * ident list * p_command\n\nand p_annotation =\n  | PAexpr of p_command\n  | PAclause of ident * p_annotation list\n  (*| PArecord of (ident * p_annotation) list*)\nand p_annotations = p_annotation list\n\n(* This is just a hack to factor the grammar. *)\ntype p_pattern_tail =\n  | PPTcons of ident \n  | PPTother of ident list\n\ntype p_type_FO = \n  {\n    p_type_FO_desc: p_type_FO_desc;\n    p_type_FO_loc: location;\n  }\nand p_type_FO_desc =\n  | PTname of ident\n  | PTbuiltin of builtin_type\n  | PTdata of p_type_data * p_annotations\n  | PTprod of p_type_FO * p_type_FO\n  | PTarray of int * p_type_FO\n  | PTmapping of p_type_FO * p_type_FO\n  | PTlist of p_type_FO\n           \nand p_type_data =\n  | PTsingleton of (ident * p_type_FO) list\n  | PTbranches of p_type_constr list\n\nand p_type_constr = {\n  pTypeConstrName : ident;\n  pTypeConstrArgs : (ident * p_type_FO) list;\n  pTypeConstrAnnotations : p_annotations;\n  pTypeConstrLoc: location\n}\n\ntype p_signature =\n  {\n    p_signature_desc: p_signature_desc;\n    p_signature_loc: location;\n  }\nand p_signature_desc =\n  | PSname of ident\n  | PSconstr of (ident * p_type_FO * p_type_FO * method_kind) list\n  | PSghostize of p_signature * ident list\n  | PSlogicize of p_signature * ident list\n  | PSminus of p_signature * ident list\n\ntype p_layer_signature =\n  {\n    p_layer_signature_desc: p_layer_signature_desc;\n    p_layer_signature_loc: location;\n  }\nand p_layer_signature_desc =\n  | PLSname of ident\n  | PLSconstr of (ident * p_signature) list\n\ntype p_object_type = {\n  pObjectBase : p_layer_signature;\n  pObjectSignature : p_signature;\n  pObjectTypLoc: location;\n}\n\ntype p_layer_type = {\n  pLayerBase : p_layer_signature;\n  pLayerSignature : p_layer_signature;\n  pLayerLoc: location\n}\n\ntype p_method_definition = {\n  pMethodArguments : (ident * p_type_FO option) list;\n  pMethodReturnType : p_type_FO option;\n  pMethodKind : method_kind;\n  pMethodBody : p_command;\n  pMethodAnnotations : p_annotations;\n  pMethodLoc: location;\n}\n\ntype p_object_kind =\n  | POnormal\n  | POlogical\n  | POtrusted\n\ntype p_object_construct = {\n  pObjType : p_object_type;\n  pObjKind : p_object_kind;\n  pObjFields : (ident * p_type_FO * p_expression * bool (* is_ghost *)) list;\n  pObjMethods : (ident * p_method_definition) list;\n  pObjLoc: location;\n}\n\n\ntype p_object = \n  {\n    p_object_desc: p_object_desc;\n    p_object_loc: location\n  }\nand p_object_desc =\n  | POname of ident\n  | POclone of ident\n  | POconstr of p_object_construct\n  | POrelax of p_object * p_layer_signature\n\ntype p_object_definition = {\n  pObjectType : p_object_type option;\n  pObjectDesc : p_object;\n  pObjectLoc: location;\n}\n\ntype p_object_inst =\n  {\n    p_object_inst_desc: p_object_inst_desc;\n    p_object_inst_loc: location\n  }\nand p_object_inst_desc = \n  | POinternal of p_object\n  | POexternal of constant * p_object\n\ntype p_layer_construct = (ident * p_object_inst) list\n\ntype p_proposition =\n  {\n    p_proposition_desc: p_proposition_desc;\n    p_proposition_loc: location;\n  }\nand p_proposition_desc =\n  | PPident of ident\n  | PPexternal of string\n\ntype p_layer = \n  {\n    p_layer_desc: p_layer_desc;\n    p_layer_loc: location;\n  }\nand p_layer_desc =\n  | PLname of ident\n  | PLconstr of p_layer_construct\n  | PLrelax of p_layer * p_layer_type\n  | PLinst of p_layer * p_layer\n  | PLrefine of p_layer * p_layer * p_proposition\n\ntype p_invariant = ident * location\n\ntype p_layer_definition = {\n  (* pLayerType : p_layer_type option; *)\n  pLayerDesc : p_layer;\n  pLayerInvariant : p_proposition option;\n  pLayerAnnotations : p_annotations;\n  pLayerLoc: location;\n}\n\ntype p_declaration = \n  {\n    p_declaration_desc: p_declaration_desc;\n    p_declaration_loc: location;\n  }\nand p_declaration_desc =\n  | PDtype of p_type_FO\n  | PDevent of (ident * p_type_FO * bool) list\n  | PDsignature of p_signature\n  | PDlayer_sig of p_layer_signature\n  | PDobject of p_object_definition\n  | PDlayer of p_layer_definition\n  | PDexternal_with of string * p_annotations\n  | PDexternal_type of string * string option * p_annotations\n  | PDexternal_const of string * p_type_FO * p_annotations\n  | PDexternal_function of string * (* arg : *) p_type_FO * (* ret : *) p_type_FO\n                         * p_annotations\n  | PDexternal_prop of string * p_type_FO\n\ntype p_file_structure = (ident * p_declaration) list\n\nlet rec int_of_p_expression = function\n  | PEconstant (CONint n) -> n\n  | PEun (OPneg, e) -> - int_of_p_expression e.p_expression_desc\n  | PEun (OPbitnot, e) -> lnot (int_of_p_expression e.p_expression_desc)\n  | PEbin (op, e1, e2) ->\n    let n1 = int_of_p_expression e1.p_expression_desc in\n    let n2 = int_of_p_expression e2.p_expression_desc in\n    begin match op with\n    | OPplus -> n1 + n2\n    | OPminus -> n1 - n2\n    | OPtimes -> n1 * n2\n    | OPdivide -> n1 / n2\n    | OPremainder -> n1 mod n2\n    | OPbitand -> n1 land n2\n    | OPbitor -> n1 lor n2\n    | OPxor -> n1 lxor n2\n    | OPshl -> n1 lsl n2\n    | OPshr -> n1 lsr n2\n    | _ -> raise (Invalid_argument \"int_of_p_expression\")\n    end\n  | _ -> raise (Invalid_argument \"int_of_p_expression\")\n\n\nlet string_of_location loc =\n  let sloc_start_posfname = loc.loc_start.pos_fname in\n  let sloc_satart_poslnum = loc.loc_start.pos_lnum in\n  let sloc_satart_posbol = loc.loc_start.pos_bol in\n  let sloc_satart_poscnum = loc.loc_start.pos_cnum in\n  let eloc_end_posfname = loc.loc_end.pos_fname in\n  let eloc_end_poslnum = loc.loc_end.pos_lnum in\n  let eloc_end_posbol = loc.loc_end.pos_bol in\n  let eloc_end_poscnum = loc.loc_end.pos_cnum in\n  \"\\n\" ^\"filename1: \" ^ sloc_start_posfname  ^ \"pos_lnum1: \" ^( string_of_int sloc_satart_poslnum) ^ \"posbol1: \" ^ (string_of_int sloc_satart_posbol)\n  ^ \"poscnum1: \" ^ (string_of_int sloc_satart_poscnum) ^ \"filename2: \" ^\n  eloc_end_posfname ^ \"poslnum2: \" ^ (string_of_int eloc_end_poslnum) ^ \"posbo2: \" ^ (string_of_int eloc_end_posbol) \n   ^ \"poscnum2: \" ^ (string_of_int eloc_end_poscnum) ^ \"\\n\"\n\nlet rec string_of_p_expression pexp =\n  (string_of_p_expression_desc pexp.p_expression_desc) (* ^ (string_of_location pexp.p_expression_loc) *)\nand string_of_p_expression_desc = function\n  | PEglob i -> \"global(\" ^ i ^ \")\"\n  | PEconstant c -> string_of_constant c\n  | PEun (op, e) -> string_of_unop op ^ (string_of_p_expression e)\n  | PEbin (op, e1, e2) ->\n    \"(\" ^ string_of_p_expression e1 ^ \" \" ^ string_of_binop op ^ \" \" ^ string_of_p_expression e2 ^ \")\"\n  | PEpair (e1, e2) -> \"PEpair:\" ^\n    \"(\" ^ string_of_p_expression e1 ^ \", \" ^ string_of_p_expression e2 ^  \")\"\n  | PEapp (e::es) ->\n    string_of_p_expression_desc e.p_expression_desc ^ \"location info: \" ^ string_of_location e.p_expression_loc ^\n    \" (\" ^ String.concat \") (\" (List.map string_of_p_expression es) ^ \")\"\n  | PEstruct ls -> \"{\" ^\n    String.concat \"; \"\n      (List.map (fun (i, e) -> i ^ \" = \" ^ string_of_p_expression e) ls) ^ \"}\"\n  | PEfield (e1, e2) -> \"(\" ^ String.concat \") (\" (List.map string_of_p_expression e1) ^ \")\" ^ \".{\" ^ \n    \"(\" ^ String.concat \") (\" (List.map string_of_p_expression e2) \n    ^ \"}\"\n  | PEindex (e1, e2) -> string_of_p_expression e1 ^ \"[\" ^ string_of_p_expression e2 ^ \"]\"\n  | PEapp [] -> raise Exit\n\nlet rec string_of_p_command pcmd =\n    (string_of_p_command_desc pcmd.p_command_desc) (* ^ (string_of_location pcmd.p_command_loc) *) \nand string_of_p_command_desc = function\n  (* | PCskip -> \"skip\" *)\n  | PCyield e -> \"val (\" ^ string_of_p_expression e ^ \")\"\n  | PClet (x, c1, c2) -> \"let \" ^ x ^ \" = \" ^ string_of_p_command c1 ^\n                         \"\\nin \" ^ string_of_p_command c2\n  | PCsequence (c1, c2) -> string_of_p_command c1 ^ \";\\n\" ^\n                           string_of_p_command c2\n  (* | PCcall (s, f, e) -> \"call \" ^ s ^ \".\" ^ f ^ \" \" ^ string_of_p_expression e *)\n  | PCcond (e, c, None) -> \"if \" ^ string_of_p_expression e ^\n                           \"\\n  then \" ^ string_of_p_command c\n  | PCcond (e, c1, Some c2) -> \"if \" ^ string_of_p_expression e ^\n                          \"\\n  then \" ^ string_of_p_command c1 ^\n                          \"\\n  else \" ^ string_of_p_command c2\n  | PCfor (i, l, h, c, annos) ->\n    \"for\" ^ string_of_p_annotations annos ^ \" \" ^ i ^ \" = \" ^ string_of_p_expression l ^\n    \" to \" ^ string_of_p_expression h ^\n    \"\\ndo \" ^ string_of_p_command c\n  | PCmatch (e, cls) -> \"match \" ^ string_of_p_expression e ^ \" with\\n\" ^\n                          string_of_p_clause_list cls ^ \"\\nend\"\n  | PCemit e -> \"emit (\" ^ string_of_p_expression e ^ \")\"\n  | PCstore (v, e) -> string_of_p_expression v ^ \" := \" ^\n                      string_of_p_expression e\n  | PCfail -> \"fail\"\n  | PCassert c -> \"assert (\" ^ string_of_p_command c ^ \")\"\n  | PCdeny c -> \"deny (\" ^ string_of_p_command c ^ \")\"\n  | PCghost c -> \"ghost (\" ^ string_of_p_command c ^ \")\"\n  | PCfirst (i, l, h, c1, c2o, c3o, annos) ->\n    \"first\" ^ string_of_p_annotations annos ^ \" \" ^ i ^ \" = \" ^\n    string_of_p_expression l ^ \" to \" ^ string_of_p_expression h ^\n    \"\\ndo \" ^ string_of_p_command c1 ^\n    begin match c2o with\n    | Some c2 -> \"\\nthen \" ^ string_of_p_command c2\n    | None -> \"\"\n    end ^\n    begin match c3o with\n    | Some c3 -> \"\\nelse \" ^ string_of_p_command c3\n    | None -> \"\"\n    end\n  | PCfold (i, l, h, a, s, c, annos) ->\n    \"fold\" ^ string_of_p_annotations annos ^ \" \" ^ i ^ \" = \" ^\n    string_of_p_expression l ^ \" to \" ^ string_of_p_expression h ^\n    \"\\n| \" ^ a ^ \" = \" ^ string_of_p_expression s ^\n    \"\\ndo \" ^ string_of_p_command c\n  | PCtransfer l -> \"transfer(\" ^ String.concat \", \" (List.map string_of_p_expression l)  ^ \")\"\nand string_of_p_clause_list cls = String.concat \"\\n\"\n      (List.map (fun (i, vs, c) -> \"| \" ^ i ^ \" \" ^ String.concat \" \" vs ^\n                                   \" => \" ^ string_of_p_command c) cls)\n\nand string_of_p_annotations a =\n  let rec anno = function\n        | PAexpr c -> string_of_p_command c\n        | PAclause (i, []) -> i\n        | PAclause (i, a) -> i ^ \" (\" ^ annos a ^ \")\"\n  (*\n        | PArecord lst -> \" {\" ^\n          String.concat \"; \" (List.map (fun (i, a) -> i ^ \" = \" ^ anno a) lst) ^\n          \" }\"\n        *)\n      and annos a = String.concat \", \" (List.map anno a)\n  in if a = [] then \"\"\n               else \" [[\" ^ annos a ^ \"]] \"\n\nlet rec string_of_p_type_FO foptyp=\n  (string_of_p_type_FO_desc foptyp.p_type_FO_desc) (* ^ (string_of_location foptyp.p_type_FO_loc) *)\nand string_of_p_type_FO_desc = function\n  | PTname i -> \"TN (\" ^ i ^ \")\"\n  | PTbuiltin t -> string_of_builtin_type t\n  | PTdata (d, a) -> string_of_p_type_data d ^ string_of_p_annotations a\n  | PTprod (t1, t2) -> \"(\" ^ string_of_p_type_FO t1 ^ \" * \" ^ string_of_p_type_FO t2 ^ \")\"\n  | PTarray (n, t) -> \"array[\" ^ string_of_int n ^ \"] (\" ^ string_of_p_type_FO t ^ \")\"\n  | PTmapping (t1, t2) -> \"mapping[\" ^ string_of_p_type_FO t1 ^ \", \" ^ string_of_p_type_FO t2 ^ \"]\"\n  | PTlist t -> \"list[\" ^ string_of_p_type_FO t ^ \"]\"\n\n\nand string_of_p_type_constr c =\n  c.pTypeConstrName ^\n  String.concat \" \"\n    (List.map (fun (i, t) -> \"(\" ^ i ^ \" : \" ^ string_of_p_type_FO t ^ \")\")\n              c.pTypeConstrArgs) ^\n  string_of_p_annotations c.pTypeConstrAnnotations ^ string_of_location c.pTypeConstrLoc\n\nand string_of_p_type_data = function\n  | PTsingleton lst -> \"{T{{ \" ^\n      String.concat \";\\n  \"\n        (List.map (fun (i, t) -> i ^ \" : \" ^ string_of_p_type_FO t) lst) ^\n    \" }}}\"\n  | PTbranches lst -> \"[T[[ \" ^\n      String.concat \"\\n  | \" (List.map string_of_p_type_constr lst) ^\n    \" ]]]\"\n\nlet rec string_of_p_signature_aux indent psig =\n  (string_of_p_signature_aux_desc indent psig.p_signature_desc) (* ^ (string_of_location psig.p_signature_loc) *)\nand string_of_p_signature_aux_desc indent = function\n  | PSname i ->  i \n  | PSconstr lst -> \"{R{{ \" ^\n      String.concat (\";\\n  \" ^ indent)\n        (List.map (fun (i, t1, t2, k) ->\n    string_of_method_kind k ^ i ^\n      \" : \" ^ string_of_p_type_FO t1 ^\n      \" -> \" ^ string_of_p_type_FO t2) lst) ^\n    \" }}}\"\n  | PSghostize (s, lst) ->\n    string_of_p_signature_aux indent s ^ \" with ghost {\" ^\n      String.concat \"; \" lst ^ \"}\"\n  | PSlogicize (s, lst) ->\n    string_of_p_signature_aux indent s ^ \" with logical {\" ^\n      String.concat \"; \" lst ^ \"}\"\n  | PSminus (s, lst) ->\n    string_of_p_signature_aux indent s ^ \" minus {\" ^\n      String.concat \"; \" lst ^ \"}\"\n\nlet string_of_p_signature = string_of_p_signature_aux \"\"\n\nlet rec string_of_p_layer_signature pls =\n  string_of_p_layer_signature_desc pls.p_layer_signature_desc (* ^ string_of_location pls.p_layer_signature_loc *)\nand string_of_p_layer_signature_desc = function\n  | PLSname i -> i\n  | PLSconstr lst -> \"{I{{ \" ^\n      String.concat \";\\n  \"\n        (List.map (fun (i, r) -> i ^ \" : \" ^ string_of_p_signature_aux \"  \" r) lst) ^\n    \" }}}\"\n\nlet string_of_p_object_type t =\n  (if t.pObjectBase.p_layer_signature_desc = (PLSconstr [])\n     then \"[]\"\n     else \"[\" ^ string_of_p_layer_signature t.pObjectBase ^ \"]\") ^\n  \" \" ^ string_of_p_signature t.pObjectSignature\n    (* ^ string_of_location t.pObjectTypLoc *)\n\nlet string_of_p_layer_type t =\n  (if t.pLayerBase.p_layer_signature_desc = PLSconstr []\n     then \"[]\"\n     else \"[\" ^ string_of_p_layer_signature t.pLayerBase ^ \"]\") ^\n  \" \" ^ string_of_p_layer_signature t.pLayerSignature (* ^ string_of_location t.pLayerLoc *)\n\nlet string_of_pMethodArguments = function\n  | [] -> \"pMethodArguments[unexpected empty list]\"\n  | [i, None] -> i\n  | [i, Some t] -> \"(\" ^ i ^ \" : \" ^ string_of_p_type_FO t ^ \")\"\n  | lst -> \"(\" ^ String.concat \", \" (List.map (function\n         | i, None -> i\n         | i, Some t -> i ^ \" : \" ^ string_of_p_type_FO t) lst) ^ \")\"\n\nlet string_of_p_object_kind = function\n  | POnormal -> \"\"\n  | POlogical -> \"logical \"\n  | POtrusted -> \"trusted \"\n\nlet rec string_of_p_object pobj =\n  string_of_p_object_desc pobj.p_object_desc (* ^ string_of_location pobj.p_object_loc *)\nand string_of_p_object_desc = function\n  | POname i -> (* begin match d.pObjectType with\n    | None -> *) \"ON (\" ^ i ^ \")\" (*\n    | Some t -> \"ON (\" ^ i ^ \" : \" ^ string_of_p_object_type t ^ \")\"\n    end *)\n  | POclone i -> \n    \"CLONE ON (\" ^ i ^ \")\"\n  | POconstr c -> \"{O{\" ^ string_of_p_object_type c.pObjType ^\n      string_of_p_object_kind c.pObjKind ^ \"{ \" ^\n      String.concat \";\\n  \"\n        (List.map (fun (i, t, e, is_ghost) -> (if is_ghost then \"ghost \" else \"\") ^\n                 i ^ \" : \" ^ string_of_p_type_FO t ^\n                       \" := \" ^ string_of_p_expression e) c.pObjFields @\n         List.map (fun (i, m) -> string_of_p_annotations m.pMethodAnnotations ^\n                       i ^ \" \" ^ string_of_pMethodArguments m.pMethodArguments ^\n                       \" = \" ^ string_of_p_command m.pMethodBody) c.pObjMethods) ^\n    \"}}}\"\n  | POrelax (o, t) -> string_of_p_object o ^ \" :> \" ^\n                      string_of_p_layer_signature t\n\nlet string_of_p_object_definition d = string_of_p_object d.pObjectDesc (* ^ string_of_location d.pObjectLoc *)\n\n(*\nlet string_of_p_collection_type_option = function\n  | None -> \"\"\n  | Some t -> string_of_p_collection_type t\n*)\n\nlet rec string_of_p_proposition prop = \n  string_of_p_proposition_desc prop.p_proposition_desc (* ^ string_of_location prop.p_proposition_loc *)\nand string_of_p_proposition_desc = function\n  | PPident i -> i\n  | PPexternal s -> \"\\\"\" ^ String.escaped s ^ \"\\\"\"\n\nlet rec string_of_p_layer p_layer = \n  string_of_p_layer_desc p_layer.p_layer_desc (* ^ string_of_location p_layer.p_layer_loc *)\nand string_of_p_layer_desc = function\n  | PLname i -> (* begin match d.pLayerType with\n    | None -> *) \"CN (\" ^ i ^ \")\" (*\n    | Some t -> \"CN (\" ^ i ^ \" : \" ^ string_of_p_layer_type t ^ \")\"\n    end *)\n  | PLconstr c -> \n    \"{C{\" ^ (* string_of_p_layer_type_option d.pLayerType ^ *)\n      (* string_of_p_annotations d.pLayerAnnotations ^ *) \"{ \" ^\n      String.concat \";\\n  \"\n        (List.map (fun (i, o) -> \n          let o = match o.p_object_inst_desc with\n          | POinternal io -> io\n          | POexternal (_, eo) -> eo\n          in\n          i ^ \" = \" ^ string_of_p_object o) c) ^\n    \"}}}\"\n  | PLrelax (c, t) -> \"(\" ^ string_of_p_layer c ^ \" : \" ^\n                      string_of_p_layer_type t ^ \")\"\n  | PLinst (c1, c2) -> \"(\" ^ string_of_p_layer c1 ^ \" @ \" ^\n                       string_of_p_layer c2 ^ \")\"\n  | PLrefine (c1, c2, p) -> \"(\" ^ string_of_p_layer c1 ^ \" :> \" ^\n    string_of_p_layer c2 ^ \" with \" ^ string_of_p_proposition p ^ \")\"\n\nlet string_of_p_layer_definition d =\n (* string_of_location d.pLayerLoc ^ *) string_of_p_annotations d.pLayerAnnotations ^\n  string_of_p_layer d.pLayerDesc ^\n  match d.pLayerInvariant with\n  | None -> \"\"\n  | Some p -> \" assert \" ^ string_of_p_proposition p \n\n\n"
  },
  {
    "path": "src/Edsger/parsetree.mli",
    "content": "open Astcommon\nopen Lexing\n\ntype location = {\n  loc_start : Lexing.position;\n  loc_end : Lexing.position;\n}\n\nval in_file : string -> location\nval none : location\n\n\ntype p_expression = {\n  p_expression_desc : p_expression_desc;\n  p_expression_loc : location;\n}\nand p_expression_desc =\n    PEglob of Astcommon.ident\n  | PEconstant of Astcommon.constant\n  | PEun of Astcommon.unop * p_expression\n  | PEbin of Astcommon.binop * p_expression * p_expression\n  | PEpair of p_expression * p_expression\n  | PEapp of p_expression list\n  | PEstruct of (Astcommon.ident * p_expression) list\n  | PEfield of p_expression list * p_expression list\n  | PEindex of p_expression * p_expression\n\n\ntype p_command = {\n  p_command_desc : p_command_desc;\n  p_command_loc : location;\n}\nand p_command_desc =\n    PCyield of p_expression\n  | PClet of Astcommon.ident * p_command * p_command\n  | PCsequence of p_command * p_command\n  | PCcond of p_expression * p_command * p_command option\n  | PCfor of Astcommon.ident * p_expression * p_expression * p_command * p_annotations\n        (* FOR i     = 0           TO n           DO s.run i *)\n  | PCmatch of p_expression * p_clause list\n  | PCemit of p_expression\n  | PCtransfer of p_expression list\n\n  (* extension for certified programming *)\n  | PCstore of p_expression * p_expression\n  | PCfail\n  | PCassert of p_command\n  | PCdeny of p_command\n  | PCghost of p_command\n  | PCfirst of Astcommon.ident * p_expression * p_expression * p_command *\n        (* FIRST i     = 0           TO n           DO s.test i  *)\n      p_command option * p_command option * p_annotations\n             (* THEN i             ELSE FAIL *)\n\n  | PCfold of Astcommon.ident * p_expression * p_expression *\n        (* FOLD i     = 0           TO n            *)\n      Astcommon.ident * p_expression * p_command * p_annotations\n          (* | sum   = 0           DO sum + i      *)\n\nand p_clause = Astcommon.ident * Astcommon.ident list * p_command\n\n(* and p_annotation = \n  { p_annotation_desc: p_annotation_desc; p_annotation_loc: location;} *)\nand p_annotation =\n  | PAexpr of p_command\n  | PAclause of ident * p_annotation list\n  (*| PArecord of (ident * p_annotation) list*)\n\nand p_annotations = p_annotation list\n\ntype p_pattern_tail =\n    PPTcons of Astcommon.ident\n  | PPTother of Astcommon.ident list\n\ntype p_type_FO = {\n  p_type_FO_desc : p_type_FO_desc;\n  p_type_FO_loc : location;\n}\n\nand p_type_FO_desc =\n    PTname of Astcommon.ident\n  | PTbuiltin of Astcommon.builtin_type\n  | PTdata of p_type_data * p_annotations\n  | PTprod of p_type_FO * p_type_FO\n  | PTarray of int * p_type_FO\n  | PTmapping of p_type_FO * p_type_FO\n  | PTlist of p_type_FO\n\nand p_type_data =\n    PTsingleton of (Astcommon.ident * p_type_FO) list\n  | PTbranches of p_type_constr list\n\nand p_type_constr = {\n  pTypeConstrName : Astcommon.ident;\n  pTypeConstrArgs : (Astcommon.ident * p_type_FO) list;\n  pTypeConstrAnnotations : p_annotations;\n  pTypeConstrLoc : location;\n}\n\ntype p_signature = {\n  p_signature_desc : p_signature_desc;\n  p_signature_loc : location;\n}\n\nand p_signature_desc =\n    PSname of Astcommon.ident\n  | PSconstr of\n      (Astcommon.ident * p_type_FO * p_type_FO * Astcommon.method_kind) list\n  | PSghostize of p_signature * Astcommon.ident list\n  | PSlogicize of p_signature * Astcommon.ident list\n  | PSminus of p_signature * Astcommon.ident list\n\ntype p_layer_signature = {\n  p_layer_signature_desc : p_layer_signature_desc;\n  p_layer_signature_loc : location;\n}\n\nand p_layer_signature_desc =\n    PLSname of Astcommon.ident\n  | PLSconstr of (Astcommon.ident * p_signature) list\n\ntype p_object_type = {\n  pObjectBase : p_layer_signature;\n  pObjectSignature : p_signature;\n  pObjectTypLoc : location;\n}\n\ntype p_layer_type = {\n  pLayerBase : p_layer_signature;\n  pLayerSignature : p_layer_signature;\n  pLayerLoc : location;\n}\n\ntype p_method_definition = {\n  pMethodArguments : (Astcommon.ident * p_type_FO option) list;\n  pMethodReturnType : p_type_FO option;\n  pMethodKind : Astcommon.method_kind;\n  pMethodBody : p_command;\n  pMethodAnnotations : p_annotations;\n  pMethodLoc : location;\n}\n\ntype p_object_kind = POnormal | POlogical | POtrusted\n\ntype p_object_construct = {\n  pObjType : p_object_type;\n  pObjKind : p_object_kind;\n  pObjFields : (Astcommon.ident * p_type_FO * p_expression * bool (* is_ghost *) ) list;\n  pObjMethods : (Astcommon.ident * p_method_definition) list;\n  pObjLoc : location;\n}\n\ntype p_object = { p_object_desc : p_object_desc; p_object_loc : location; }\n\nand p_object_desc =\n    POname of Astcommon.ident\n  | POclone of Astcommon.ident\n  | POconstr of p_object_construct\n  | POrelax of p_object * p_layer_signature\n\ntype p_object_definition = {\n  pObjectType : p_object_type option;\n  pObjectDesc : p_object;\n  pObjectLoc : location;\n}\n\ntype p_object_inst =\n  {\n    p_object_inst_desc: p_object_inst_desc;\n    p_object_inst_loc: location\n  }\nand p_object_inst_desc = \n  | POinternal of p_object\n  | POexternal of constant * p_object\n\ntype p_layer_construct = (Astcommon.ident * p_object_inst) list\n\ntype p_proposition = {\n  p_proposition_desc : p_proposition_desc;\n  p_proposition_loc : location;\n}\nand p_proposition_desc = PPident of Astcommon.ident | PPexternal of string\n\ntype p_layer = { p_layer_desc : p_layer_desc; p_layer_loc : location; }\nand p_layer_desc =\n    PLname of Astcommon.ident\n  | PLconstr of p_layer_construct\n  | PLrelax of p_layer * p_layer_type\n  | PLinst of p_layer * p_layer\n  | PLrefine of p_layer * p_layer * p_proposition\n\ntype p_invariant = Astcommon.ident * location\n\ntype p_layer_definition = {\n  (* pLayerType : p_layer_type option; *)\n  pLayerDesc : p_layer;\n  pLayerInvariant : p_proposition option;\n  pLayerAnnotations : p_annotations;\n  pLayerLoc : location;\n}\n\ntype p_declaration = {\n  p_declaration_desc : p_declaration_desc;\n  p_declaration_loc : location;\n}\nand p_declaration_desc =\n    PDtype of p_type_FO\n  | PDevent of (Astcommon.ident * p_type_FO * bool) list\n  | PDsignature of p_signature\n  | PDlayer_sig of p_layer_signature\n  | PDobject of p_object_definition\n  | PDlayer of p_layer_definition\n  | PDexternal_with of string * p_annotations\n  | PDexternal_type of string * string option * p_annotations\n  | PDexternal_const of string * p_type_FO * p_annotations\n  | PDexternal_function of string * p_type_FO * p_type_FO * p_annotations\n  | PDexternal_prop of string * p_type_FO\n\n\ntype p_file_structure = (Astcommon.ident * p_declaration) list\n\n(* Evaluating a constant value expression to an integer raising exception\n   [Invalid_argument] for ill-typed or non-constant expressions.  Used by\n   array type parsing. *)\n(* TODO: Change [PTarray] to store an expression instead of an [int] to remove\n         this (failing gracefully at typecheck instead of raising exception\n         during parsing). *)\nval int_of_p_expression : p_expression_desc -> int\nval string_of_location : location -> string\nval string_of_p_expression : p_expression -> string\nval string_of_p_expression_desc : p_expression_desc -> string\nval string_of_p_command : p_command -> Astcommon.ident\nval string_of_p_command_desc : p_command_desc -> string\nval string_of_p_clause_list : p_clause list -> string\nval string_of_p_annotations : p_annotations -> string\nval string_of_p_type_FO : p_type_FO -> string\nval string_of_p_type_FO_desc : p_type_FO_desc -> string\nval string_of_p_type_constr : p_type_constr -> string\nval string_of_p_type_data : p_type_data -> string\nval string_of_p_signature_aux : string -> p_signature -> string\nval string_of_p_signature_aux_desc : string -> p_signature_desc -> Astcommon.ident\nval string_of_p_signature : p_signature -> string\nval string_of_p_layer_signature : p_layer_signature -> string\nval string_of_p_layer_signature_desc : p_layer_signature_desc -> Astcommon.ident\nval string_of_p_object_type : p_object_type -> string\nval string_of_p_layer_type : p_layer_type -> string\nval string_of_pMethodArguments : (string * p_type_FO option) list -> string\nval string_of_p_object_kind : p_object_kind -> string\nval string_of_p_object : p_object -> string\nval string_of_p_object_desc : p_object_desc -> string\nval string_of_p_object_definition : p_object_definition -> string\nval string_of_p_proposition : p_proposition -> string\nval string_of_p_proposition_desc : p_proposition_desc -> Astcommon.ident\nval string_of_p_layer : p_layer -> string\nval string_of_p_layer_desc : p_layer_desc -> string\nval string_of_p_layer_definition : p_layer_definition -> string\n"
  },
  {
    "path": "src/Edsger/typecheck.ml",
    "content": "#include \"config.h\"\n\nopen Ast\nopen Astcommon\nopen Parsetree\n\n\n(* Like a boolean, but \"false\" carries an error message. *)\ntype check =\n | OK\n | Error of string\n\nlet check_and c1 c2 = match c1 with\n  | Error _ -> c1\n  | OK -> c2\n\nlet rec check_for_all f xs = match xs with\n  | [] -> OK\n  | x::xs -> check_and (f x) (check_for_all f xs)\n\nlet fresh_serial = ref 0 (* I know this is an ugly hack *)\n\nlet fresh id = \n  fresh_serial := !fresh_serial + 1;\n  id ^ string_of_int !fresh_serial\n\n(* These are \"static\" because they remain constant when checking an\n   entire function body (although they are different for different functions). *)\ntype cmd_static_env_t = {\n  variable_env : (ident, a_lexpr) Hashtbl.t;\n  base_layer_signature : (ident * a_signature) list;\n  function_env : a_method_definition list;\n  procedure_env : a_method_definition list\n}\n\nlet locationinfo_print loc filename =\n    if loc == none then \"File \" ^ \"'\" ^ filename ^ \"'\" ^ \":\"\n    else if loc.loc_start.pos_lnum == loc.loc_end.pos_lnum \n      then \"File \\\"\" ^ filename ^ \"\\\"\" ^ \",\" ^ \" line \" ^ (string_of_int (loc.loc_end.pos_lnum)) ^ \",\" ^ \" characters \" ^ (string_of_int (loc.loc_start.pos_cnum - loc.loc_start.pos_bol)) ^ \"-\" ^ (string_of_int (loc.loc_end.pos_cnum - loc.loc_end.pos_bol)) ^ \":\"\n    else \"File \\\"\" ^ filename ^ \"\\\"\" ^ \",\" ^ \" line \" ^ ((string_of_int loc.loc_start.pos_lnum) ^ \" between \" ^ (string_of_int loc.loc_end.pos_lnum)) ^ \":\" ;;\n\n(* The length of an address, this is 20 bytes in Ethereum and 32 bytes in Ant Chain. *)\n#ifdef ANT\nlet address_length = 32\n#else\nlet address_length = 20\n#endif\n\n(* Does not belong here *)\nlet function_start_id_num = 10\nlet constructor_start_id_num = 10\n\n(* We will combine code from all the constructors in a program into a\n   single EVM constructor, so parameter names must be globally unique, \n   this variable tracks which ids have been allocated. *)\nlet constructor_current_id_num = ref constructor_start_id_num\n\n(* The temp identifiers inside the constructor must not clash with the param names,\n   so start from a high number.  *)\nlet constructor_temp_identifier_start = 100\n\nlet debug_endline _ = () (*print_endline*)\nlet catch_not_found f v = try Some (f v) with Not_found -> None\nlet default_not_found f v d = try f v with Not_found -> d ()\n\nlet mk_cmd_static_env v i f p = {\n  variable_env = v; base_layer_signature = i; function_env = f; procedure_env = p\n}\n\nlet find_method env s m =\n  match catch_not_found (List.assoc s) env.base_layer_signature with\n  | None -> `Not_found (s ^ \" is not a defined slot\")\n  | Some sg -> match catch_not_found (List.find (fun (i, _) -> i = m))\n                       sg.aSignatureMethods with\n  | None -> `Not_found (\"Signature \" ^ sg.aSignatureName ^ \" (bound to \" ^ s ^\n                        \") does not contain method \" ^ m)\n  | Some (_, mt) -> `Found mt\n\nlet globalpointer_GLOBP =\n  { aTypeConstrName = \"GLOBP\";\n    aTypeConstrArgs = [\n      \"b\", { aTypeDesc = ATbuiltin Tint; aTypeCtype = ACtvoid;\n             aTypePairIdent = \"tint_ident\"; aTypeProvable = false };\n      \"ofs\", { aTypeDesc = ATbuiltin Tint; aTypeCtype = ACtvoid;\n             aTypePairIdent = \"tint_Z32\"; aTypeProvable = false } ];\n    aTypeConstrImpl = Some {\n      aImplDesc = ACint 0;\n      aImplType = ACtpointer ACtchar\n    }\n  }\n\nlet globalpointer_GLOBUndef =\n  { aTypeConstrName = \"GLOBUndef\";\n    aTypeConstrArgs = [];\n    aTypeConstrImpl = Some {\n      aImplDesc = ACdefault;\n      aImplType = ACtpointer ACtchar\n    }\n  }\n\nlet tchar_pointer_globalpointer =\n  { aTypeDesc = ATdata (\"globalpointer\", ATbranches [\n      globalpointer_GLOBP; globalpointer_GLOBUndef\n    ]);\n    aTypeCtype = ACtpointer ACtchar;\n    aTypePairIdent = \"tchar_pointer_globalpointer\";\n    aTypeProvable = true\n  }\n  \nlet builtin_type_a_type t =\n  match t with\n  | Tglobalpointer -> tchar_pointer_globalpointer\n  | _ ->\n  let ct, tp, pf = match t with\n    | Tint -> ACtint, \"tint_Z32\", true\n    | Tuint -> ACtint, \"tint_U\", true\n    | Tbool -> ACtint, \"tint_bool\", true\n    | Taddress -> ACtint, \"tint_U\", true\n    | Tunit -> ACtvoid, \"tvoid_unit\", true\n    | Thashvalue -> ACtint, \"tint_hashvalue\", true\n    | Tglobalpointer -> assert false\n    (*\n    | Tval -> ACtint, \"tint_val\", true\n    | Tflatmem -> ACtint, \"tint_flatmem\", false\n    *)\n  in { aTypeDesc = ATbuiltin t; aTypeCtype = ct;\n       aTypePairIdent = tp; aTypeProvable = pf }\n\nlet tvoid_unit = builtin_type_a_type Tunit\nlet tint_bool = builtin_type_a_type Tbool\nlet tint_Z32 = builtin_type_a_type Tint\nlet tint_U = builtin_type_a_type Tuint\nlet tint_address = builtin_type_a_type Taddress\nlet tint_hashvalue = builtin_type_a_type Thashvalue           \n\nlet rec type_pair_ident_ctype = function\n  | ACtint -> \"int\"\n  | ACtchar -> \"char\"\n  | ACtvoid -> \"void\"\n  | ACtpointer ct -> \"pointer_\" ^ type_pair_ident_ctype ct\n  | ACtarray (_, ct) -> \"array_\" ^ type_pair_ident_ctype ct\n  | ACtmapping (_, ct) -> \"hash_\" ^ type_pair_ident_ctype ct\n  | ACtstruct (i, _) -> i\n\nexception ConstAddressOverflow\n\nlet constant_type = function\n  | CONint _ -> tint_Z32\n  | CONuint _ -> tint_U\n  | CONbool _ -> tint_bool\n  | CONaddress _ -> tint_address\n  | CONunit -> tvoid_unit\n  | CONhashvalue ->  tint_hashvalue\n  | CONglobalpointer_undef -> builtin_type_a_type Tglobalpointer\n\nlet unop_type op t = match op, t.aTypeDesc with\n  | OPneg, ATbuiltin Tint -> Some t\n  | OPneg, ATbuiltin Tuint -> Some t\n  | OPnot, ATbuiltin Tbool -> Some t\n  | OPbitnot, ATbuiltin Tuint -> Some t\n  | OPsha_1, ATbuiltin Thashvalue -> Some tint_hashvalue\n  | OPsha_1, ATbuiltin Tuint -> Some tint_hashvalue\n  | OPsha_1, ATbuiltin Taddress -> Some tint_hashvalue\n  | _ -> None\n\nlet binop_type op t1 t2 = match op with\n  | OPplus | OPminus | OPtimes | OPdivide | OPremainder ->\n    if t1.aTypeDesc = ATbuiltin Tint && t2.aTypeDesc = ATbuiltin Tint || t1.aTypeDesc = ATbuiltin Tuint && t2.aTypeDesc = ATbuiltin Tuint\n      then Some t1 else None\n  | OPbitand | OPbitor | OPxor ->\n    if t1.aTypeDesc = ATbuiltin Tuint && t2.aTypeDesc = ATbuiltin Tuint\n      then Some t1 else None\n  | OPshl | OPshr ->\n    if t1.aTypeDesc = ATbuiltin Tuint && t2.aTypeDesc = ATbuiltin Tint\n      then Some t1 else None\n  | OPand | OPor ->\n    if t1.aTypeDesc = ATbuiltin Tbool && t2.aTypeDesc = ATbuiltin Tbool\n      then Some t1 else None\n  | OPeq | OPne ->\n    if t1.aTypeDesc = t2.aTypeDesc then Some tint_bool else None\n  | OPlt | OPle | OPgt | OPge ->\n    if (t1.aTypeDesc = ATbuiltin Tint && t2.aTypeDesc = ATbuiltin Tint) ||\n       (t1.aTypeDesc = ATbuiltin Tuint && t2.aTypeDesc = ATbuiltin Tuint)\n    then Some tint_bool else None\n  | OPsha_2 ->\n     let is_hashable t = match t.aTypeDesc with\n       | ATbuiltin Tuint -> true\n       | ATbuiltin Taddress -> true\n       | ATbuiltin Thashvalue -> true\n       | _ -> false\n     in\n    if (is_hashable t1 && is_hashable t2)\n    then Some tint_hashvalue else None\n\nlet dummy_type i =\n  { aTypeDesc = ATdata (i, ATbranches []); aTypeCtype = ACtint;\n    aTypePairIdent = \"tint_unit\"; aTypeProvable = false }\nlet dummy_signature i =\n  { aSignatureName = i; aSignatureMethods = []; aSignatureSuppressError = true }\nlet dummy_layer_signature i =\n  { aLayerSignatureName = i; aLayerSignatureSlots = []; aLayerSignatureSuppressError = true }\nlet dummy_layer_type i =\n  { aLayerBase = dummy_layer_signature (i ^ \"_base\");\n    aLayerSignature = dummy_layer_signature (i ^ \"_inter\") }\nlet dummy_rexpr =\n  { aRexprDesc = AEtemp (-1, \"*DUMMY*\"); aRexprType = dummy_type \"*DUMMY*\" }\nlet dummy_lexpr =\n  { aLexprDesc = AEglob \"*DUMMY*\"; aLexprType = dummy_type \"*DUMMY*\"; aLexprIsGhost = false }\nlet dummy_big_expr =\n  { aBigExprDesc = AErexpr dummy_rexpr; aBigExprType = dummy_rexpr.aRexprType }\nlet dummy_object i =\n  let t = { aObjectBase = dummy_layer_signature (i ^ \"_base\");\n            aObjectSignature = dummy_signature (i ^ \"_rec\") }\n  in { aObjectName = i; (*aObjectSerial = -1;*)\n       aObjectAddress = None;\n       aObjectCoreType = t; aObjectType = t;\n       aObjectRequireImpl = true; aObjectIsTrusted = false;\n       aObjectFields = []; aObjectMethods = [];\n       aObjectProcedures = []; aObjectFunctions = [] }\n\nlet empty_var_env () = (Hashtbl.create 10 : (ident, a_lexpr) Hashtbl.t)\nlet empty_tmp_env () = ([] : tmp_env_t)\nlet empty_layer_signature =\n  { aLayerSignatureName = \"LSEmpty\"; aLayerSignatureSlots = []; aLayerSignatureSuppressError = false }\n\nlet error_string_struct_unimplementable i name lst =\n  \"Structure type \" ^ i ^ (if i = name then \"\" else \" (struct \" ^ name ^ \")\") ^\n  \" contains unimplementable field(s):\\n  \" ^\n  String.concat \"\\n  \"\n    (List.map (fun (f, t) -> f ^ \" : \" ^ string_of_a_type false t) lst)\n\nlet parse_type_annotations ctype_env =\n  let rec f = function\n    | [] -> None\n    | (PAclause (\"struct\", [PAclause (cname, [])])) :: _ ->\n      Some (ACtstruct (cname, []))\n    | (PAclause (\"int\", [])) :: _ -> Some ACtint\n    | (PAclause (\"char\", [])) :: _ -> Some ACtchar\n    | (PAclause (name, [])) :: rest ->\n      default_not_found (fun _ -> Some (Hashtbl.find ctype_env name)) ()\n                        (fun _ -> f rest)\n    | _ :: rest -> f rest\n  in f\n\nexception UnsupportedConstrAnnotation\n\nlet parse_constr_annotations ctype_env annos =\n  let rec parse_expression e = match e.p_expression_desc with\n    | PEglob i ->\n      begin match Hashtbl.find_opt ctype_env i with\n      | None -> raise UnsupportedConstrAnnotation\n      | Some ct -> { aImplDesc = ACvar i; aImplType = ct }\n      end\n    | PEconstant (CONint n) -> { aImplDesc = ACint n; aImplType = ACtint }\n    | PEbin (OPplus, e1, e2) ->\n      let e1' = parse_expression e1 in\n      let e2' = parse_expression e2 in\n      if e1'.aImplType = ACtint && e2'.aImplType = ACtint\n        then { aImplDesc = ACplus (e1', e2'); aImplType = ACtint }\n        else raise UnsupportedConstrAnnotation\n    | PEbin (OPtimes, e1, e2) ->\n      let e1' = parse_expression e1 in\n      let e2' = parse_expression e2 in\n      if e1'.aImplType = ACtint && e2'.aImplType = ACtint\n        then { aImplDesc = ACtimes (e1', e2'); aImplType = ACtint }\n        else raise UnsupportedConstrAnnotation\n    | PEapp ({p_expression_desc = (PEglob \"array_init\"); p_expression_loc = _} :: [e]) -> (* PEglob \"array_init\"  *)\n      let e' = parse_expression e in\n      { aImplDesc = ACarray e'; aImplType = ACtarray (0, e'.aImplType) }\n    | PEstruct lst ->\n      let str_impl, str_flds = List.split @@ List.map (fun (i, e) ->\n          let e' = parse_expression e in (i, e'), (i, e'.aImplType)\n        ) lst\n      in { aImplDesc = ACstruct str_impl; aImplType = ACtstruct (\"\", str_flds) }\n    | _ -> raise UnsupportedConstrAnnotation in\n  let rec parse_command c = match c.p_command_desc with\n    | PCyield e -> parse_expression e\n    | PCcond (e, c1, Some c2) ->\n      let e' = parse_expression e in\n      let c1' = parse_command c1 in\n      let c2' = parse_command c2 in\n      if e'.aImplType = ACtint && c1'.aImplType = c2'.aImplType\n        then { aImplDesc = ACcond (e', c1', c2'); aImplType = c1'.aImplType }\n        else raise UnsupportedConstrAnnotation\n    | _ -> raise UnsupportedConstrAnnotation in\n  let rec f = function\n    | [] -> raise UnsupportedConstrAnnotation\n    | (PAexpr c) :: _ -> parse_command c\n    (*\n    | (PAint n) :: _ -> Some { aImplDesc = ACint n; aImplType = ACtint }\n    *)\n    | (PAclause (\"default\", [])) :: _ ->\n      { aImplDesc = ACdefault; aImplType = ACtvoid }\n    (*\n    | (PAclause (i, [])) :: rest ->\n      begin match catch_not_found (Hashtbl.find ctype_env) i with\n      | None -> f rest\n      | Some ct -> Some { aImplDesc = ACvar i; aImplType = ct }\n      end\n    | (PAclause (\"plus\", [ a1; a2 ])) :: _ -> begin\n      match f [a1], f [a2] with\n      | Some c1, Some c2 ->\n        if c1.aImplType = ACtint && c2.aImplType = ACtint\n          then Some { aImplDesc = ACplus (c1, c2);\n                      aImplType = ACtint }\n          else None\n      | _ -> None\n      end\n    | (PAclause (\"cond\", [ a_cond; a_then; a_else ])) :: _ -> begin\n      match f [a_cond], f [a_then], f [a_else] with\n      | Some c_cond, Some c_then, Some c_else ->\n        if c_cond.aImplType = ACtint && c_then.aImplType = c_else.aImplType\n          then Some { aImplDesc = ACcond (c_cond, c_then, c_else);\n                      aImplType = c_then.aImplType }\n          else None\n      | _ -> None\n      end\n    | (PAclause (\"array_init\", [a])) :: _ -> begin\n      match f [a] with\n      | Some c -> Some { aImplDesc = ACarray c;\n                         aImplType = ACtarray (0, c.aImplType) }\n      | None -> None\n      end\n    | (PArecord lst) :: _ ->\n      let impl_flds = List.fold_right (fun (i, a) flds ->\n        match flds with None -> None | Some flds ->\n        match f [a] with\n        | None -> None\n        | Some c -> Some ((i, c) :: fst flds,\n                          (i, c.aImplType) :: snd flds)\n        ) lst (Some ([], []))\n      in begin match impl_flds with\n         | None -> None\n         | Some (impl, flds) -> Some { aImplDesc = ACstruct impl;\n                                       aImplType = ACtstruct (\"\", flds) }\n         end\n    *)\n    | _ :: rest -> f rest\n  in try Some (f annos)\n     with UnsupportedConstrAnnotation -> None\n\nlet rec cimpl_respects_ctype i ct = match i.aImplDesc with\n  | ACdefault -> Some { aImplDesc = ACdefault; aImplType = ct }\n  | ACarray elem -> begin match ct with\n    | ACtarray (n, telem) -> begin match cimpl_respects_ctype elem telem with\n      | Some elem' -> Some { aImplDesc = ACarray elem';\n                             aImplType = ACtarray (n, elem'.aImplType) }\n      | None -> None\n      end\n    | _ -> None\n    end\n  | ACstruct lst -> begin match ct with\n    | ACtstruct (name, tlst) ->\n      let tlst_map = Hashtbl.create (List.length tlst) in\n      let _ = List.iter (fun (i, ct) -> Hashtbl.add tlst_map i ct) tlst in\n      let lst_extra = List.fold_right (fun (f, elem) acc ->\n        match acc with None -> None | Some (lst, extra) ->\n        match Hashtbl.find_opt tlst_map f with\n        | Some ct -> begin match cimpl_respects_ctype elem ct with\n          | Some elem' -> Hashtbl.replace tlst_map f elem'.aImplType;\n                          Some ((f, elem') :: lst, extra)\n          | None -> None\n          end\n        | None -> Some ((f, elem) :: lst, (f, elem.aImplType) :: extra)\n        ) lst (Some ([], [])) in\n      begin match lst_extra with\n      | Some (lst', extra) ->\n        Some { aImplDesc = ACstruct lst';\n               aImplType = ACtstruct (name, extra @\n                 List.map (fun (i, _) -> i, Hashtbl.find tlst_map i) tlst) }\n      | None -> None\n      end\n    | _ -> None\n    end\n  | _ -> if i.aImplType = ct then Some i else None\n\nlet ctype_is_small = function\n  | ACtstruct _ -> false\n  | _ -> true  (* ACtarray considered small because there is no construction *)\n\nlet type_is_big t = match t.aTypeDesc with\n  | ATbuiltin _ -> false\n  | _ -> true\n\nlet rexpr_respects_type e t =\n  if e.aRexprType = t then Some e\n  else match t.aTypeDesc, e.aRexprDesc with\n    | ATarray (_, t'),\n      AEconstr_val ({ aTypeConstrName = \"array_init\" } as cstr, []) ->\n      let cstr' = { cstr with aTypeConstrArgs = [\"_\", t'] } in\n      Some { aRexprDesc = AEconstr_val (cstr', []); aRexprType = t }\n    | ATmapping (_, t'),\n      AEconstr_val ({ aTypeConstrName = \"mapping_init\" } as cstr, []) ->\n      let cstr' = { cstr with aTypeConstrArgs = [\"_\", t'] } in\n      Some { aRexprDesc = AEconstr_val (cstr', []); aRexprType = t }   \n    | _ -> None\n\nlet big_expr_respects_type e t =\n  if e.aBigExprType = t then Some e\n  else match e.aBigExprDesc with\n    | AErexpr e' -> begin match rexpr_respects_type e' t with\n      | Some e'' ->\n        Some { aBigExprDesc = AErexpr e''; aBigExprType = e''.aRexprType }\n      | _ -> None\n      end\n    | _ -> None\n\nlet side_effect_pure = {\n  affectsAbstraction = false;\n  affectsImplementation = false;\n  dependsOnAbstraction = false;\n  invokesLogical = false\n}\n\nlet side_effect_store ghost = {\n  affectsAbstraction = ghost;\n  affectsImplementation = not ghost;\n  dependsOnAbstraction = false;\n  invokesLogical = false\n}\n\nlet side_effect_join e1 e2 = {\n  affectsAbstraction = e1.affectsAbstraction || e2.affectsAbstraction;\n  affectsImplementation = e1.affectsImplementation || e2.affectsImplementation;\n  dependsOnAbstraction = e1.dependsOnAbstraction || e2.dependsOnAbstraction;\n  invokesLogical = e1.invokesLogical || e2.invokesLogical\n}\n\nlet method_side_effect mt =\n  let has_return_value = mt.aMethodReturnType <> tvoid_unit in\n  match mt.aMethodKind with\n  | MKnormal ->\n    { affectsAbstraction = true; affectsImplementation = true;\n      dependsOnAbstraction = false; invokesLogical = false }\n  | MKrefined ->\n    { affectsAbstraction = true; affectsImplementation = true;\n      dependsOnAbstraction = false; invokesLogical = false }\n  | MKlogical ->\n    { affectsAbstraction = true; affectsImplementation = true;\n      dependsOnAbstraction = false; invokesLogical = true }\n  | MKconst -> side_effect_pure\n  | MKconstructor -> \n    { affectsAbstraction = true; affectsImplementation = true;\n      dependsOnAbstraction = false; invokesLogical = true }\n  | MKghost ->\n    { affectsAbstraction = true; affectsImplementation = false;\n      dependsOnAbstraction = has_return_value; invokesLogical = false }\n  | MKconstghost ->\n    { affectsAbstraction = false; affectsImplementation = false;\n      dependsOnAbstraction = has_return_value; invokesLogical = false }\n\n(*\nlet rec command_is_pure c = match c.aCmdDesc with\n  | ACyield _ -> true\n  | AClet (_, _, c1, c2) -> command_is_pure c1 && command_is_pure c2\n  | ACcond (_, c1, c2) -> command_is_pure c1 && command_is_pure c2\n  | _ -> false\n*)\n\nlet rec commandList_helper cmd_list typ env effect = match cmd_list with\n    | [] -> {aCmdDesc = ACskip; aCmdType = typ; aCmdEnv = env; aCmdEffect = effect}\n    | hd :: tl -> {aCmdDesc = ACsequence(hd, (commandList_helper tl typ env effect)); aCmdType = typ; aCmdEnv = env; aCmdEffect = effect}\n\nlet rec command_polymorphic c = match c.aCmdDesc with\n  | ACfail -> true\n  | AClet (_, _, _, c2) -> command_polymorphic c2\n  | ACsequence (_, c2) -> command_polymorphic c2\n  | ACcond (_, c1, c2) -> command_polymorphic c1 && command_polymorphic c2\n  | ACmatch (_, cls) ->\n    List.for_all (fun (_, _, c) -> command_polymorphic c) cls\n  | ACfirst (_, _, _, _, _, _, _, c2, c3, _) ->\n    command_polymorphic c2 && command_polymorphic c3\n  | _ -> false\n\nlet rec command_poly_retype c t = match c.aCmdDesc with\n  | ACfail -> { c with aCmdType = t }\n  | AClet (n, i, c1, c2) ->\n    { c with aCmdDesc = AClet (n, i, c1, command_poly_retype c2 t); aCmdType = t }\n  | ACsequence (c1, c2) ->\n    { c with aCmdDesc = ACsequence (c1, command_poly_retype c2 t); aCmdType = t }\n  | ACcond (e, c1, c2) ->\n    { c with aCmdDesc = ACcond (e, command_poly_retype c1 t, command_poly_retype c2 t);\n             aCmdType = t }\n  | ACmatch (e, cls) ->\n    { c with aCmdDesc = ACmatch (e,\n               List.map (fun (i, v, c) -> i, v, command_poly_retype c t) cls);\n             aCmdType = t }\n  | _ -> c\n\nlet command_respects_type c t =\n  if c.aCmdType = t\n    then Some c\n    else if command_polymorphic c\n      then Some (command_poly_retype c t)\n      else None\n\nlet unify_commands cs =\n  match catch_not_found (List.find (fun c -> not (command_polymorphic c))) cs with\n  | None -> Some (cs, tvoid_unit)\n  | Some c0 ->\n    List.fold_right (fun c res -> match res with\n      | None -> None\n      | Some (res', t) -> match command_respects_type c t with\n      | None -> None\n      | Some c' -> Some (c' :: res', t)\n    ) cs (Some ([], c0.aCmdType))\n\nlet command_remove_negation =\n  let rec rec_rexpr e = match e.aRexprDesc with\n    | AEunop (OPneg, e1) -> let rev, e1' = rec_rexpr e1 in not rev, e1'\n    | _ -> false, e in\n  let rec rec_cmd c = match c.aCmdDesc with\n    | ACyield e ->\n      let rev, e' = rec_rexpr e in rev, { c with aCmdDesc = ACyield e' }\n    | AClet (n, i, c1, c2) ->\n      let rev, c2' = rec_cmd c2 in rev, { c with aCmdDesc = AClet (n, i, c1, c2') }\n    | ACsequence (c1, c2) ->\n      let rev, c2' = rec_cmd c2 in rev, { c with aCmdDesc = ACsequence (c1, c2') }\n    | _ -> false, c\n  in rec_cmd\n\nlet expression_to_compile_time_constant =\n  let rec from_rexpr e = match e.aRexprDesc with\n    | AEconst c -> Some (ACONconst c)\n    | AEconstr_val (c, ls) ->\n      let ls' = List.fold_right (fun (i, e) res ->\n        match res with None -> None\n        | Some rest -> match from_rexpr e with None -> None\n        | Some e' -> Some ((i, e') :: rest)\n      ) ls (Some []) in\n      begin match ls' with\n      | None -> None\n      | Some ls'' -> Some (ACONconstr (c, ls''))\n      end\n    | _ -> None in\n  let rec from_big_expr e = match e.aBigExprDesc with\n    | AErexpr e' -> from_rexpr e'\n    | AEstruct (_, ls) ->\n      let ls' = List.fold_right (fun (i, e') res ->\n        match res with None -> None\n        | Some rest -> match from_big_expr e' with None -> None\n        | Some e'' -> Some ((i, e'') :: rest)\n      ) ls (Some []) in\n      begin match ls' with\n      | None -> None\n      | Some ls'' -> Some (ACONstruct ls'')\n      end\n    | AEconstr (c, ls) ->\n      let ls' = List.fold_right (fun (i, e) res ->\n        match res with None -> None\n        | Some rest -> match from_big_expr e with None -> None\n        | Some e' -> Some ((i, e') :: rest)\n      ) ls (Some []) in\n      begin match ls' with\n      | None -> None\n      | Some ls'' -> Some (ACONconstr (c, ls''))\n      end\n    | AEexternal_const (s, i) -> Some (ACONexternal_const (s, i))\n    (*\n    | AEexternal_call (s, i, args) ->\n      let args' = List.fold_right (fun e res ->\n        match res with None -> None\n        | Some rest -> match from_big_expr e with None -> None\n        | Some e' -> Some (e' :: rest)\n      ) args (Some []) in\n      begin match args' with\n      | None -> None\n      | Some args'' -> Some (ACONexternal_call (s, i, args''))\n      end\n    *)\n  in from_big_expr\n\nlet method_kind_realizing k = k = MKnormal || k = MKconst || k = MKrefined\n\nlet method_kind_realized_by k1 k2 =\n  match k1, k2 with\n  | _,            (MKlogical | MKghost | MKconstghost) -> k1\n  | MKlogical,    _        -> k2\n  | MKghost,      _        -> MKnormal\n  | MKconstghost, MKnormal -> MKnormal\n  | MKconstghost, MKconst  -> MKconst\n  | _,            _        -> k1\n\nlet method_type_weakereq i m1 m2 =\n  if  m1.aMethodArgumentTypes <> m2.aMethodArgumentTypes \n    then Error (\"For method \" ^ i ^\", srgument types \" ^ string_of_method_arg_types m1.aMethodArgumentTypes\n                ^ \" and \" ^ string_of_method_arg_types m2.aMethodArgumentTypes ^ \" do not match\")\n  else if  m1.aMethodReturnType <> m2.aMethodReturnType\n    then Error (\"For method \" ^i ^\", return types \" ^ string_of_a_type false m1.aMethodReturnType\n                ^ \" and \" ^ string_of_a_type false m2.aMethodReturnType ^ \" do not match\")\n  else match m1.aMethodKind, m2.aMethodKind with\n       | MKlogical, _ -> OK\n       | MKnormal, (MKnormal | MKconst) -> OK\n       | MKghost, (MKghost | MKconst | MKconstghost) -> OK\n       | MKconstghost, (MKconst | MKconstghost) -> OK\n       | MKconst, MKconst -> OK\n       | MKconstructor, MKconstructor -> OK\n       | MKrefined, MKrefined -> OK\n       | _ -> Error (\"For method \" ^ i ^ \", incompatible method qualifiers \\\"\" ^ string_of_method_kind m1.aMethodKind\n                     ^ \"\\\" and \\\"\" ^ string_of_method_kind m2.aMethodKind ^ \"\\\"\")\n\nlet method_type_realized_by m1 m2 =\n  if m1.aMethodArgumentTypes = m2.aMethodArgumentTypes &&\n     m1.aMethodReturnType = m2.aMethodReturnType then\n    { m1 with\n      aMethodKind = method_kind_realized_by m1.aMethodKind m2.aMethodKind }\n  else\n    m1\n\nlet signature_subseteq s1 s2 =\n  if s1.aSignatureSuppressError || s2.aSignatureSuppressError\n    then OK\n    else check_for_all (fun (i1, m1) ->\n           match catch_not_found (List.assoc i1) s2.aSignatureMethods with\n           | Some m2 -> method_type_weakereq i1 m1 m2\n           | None -> Error (\"Method \" ^ i1 ^ \" not found.\")\n         ) s1.aSignatureMethods\n\nlet signature_join sg1 sg2 = {\n  aSignatureName = sg1.aSignatureName ^ \"_\\\\/_\" ^ sg2.aSignatureName;\n  aSignatureMethods =\n    List.map\n      (fun (i, m) ->\n        match catch_not_found (List.assoc i) sg2.aSignatureMethods with\n        | None -> i, m\n        | Some m' -> i, method_type_realized_by m m'\n      )\n      sg1.aSignatureMethods;\n  aSignatureSuppressError = sg1.aSignatureSuppressError || sg2.aSignatureSuppressError\n}\n\nlet layer_signature_subseteq i1 i2 =\n  if i1.aLayerSignatureSuppressError || i2.aLayerSignatureSuppressError\n    then OK\n    else check_for_all (fun (s, sg) ->\n      match catch_not_found (List.assoc s) i2.aLayerSignatureSlots with\n      | None -> Error (\"Object \" ^ s ^ \" not found.\")\n      | Some sg' -> signature_subseteq sg sg') i1.aLayerSignatureSlots\n\nlet layer_signature_disjoint i1 i2 =\n  if i1.aLayerSignatureSuppressError || i2.aLayerSignatureSuppressError\n    then true\n    else not (List.exists (fun (s, _) -> List.mem_assoc s i2.aLayerSignatureSlots)\n      i1.aLayerSignatureSlots)\n\nlet layer_signature_union i1 i2 =\n  { aLayerSignatureName = i1.aLayerSignatureName ^ \"_U_\" ^ i2.aLayerSignatureName;\n    aLayerSignatureSlots =\n      List.map\n        (fun (s, sg) ->\n          match catch_not_found (List.assoc s) i2.aLayerSignatureSlots with\n          | None -> s, sg\n          | Some sg' -> s, signature_join sg sg'\n        )\n        i1.aLayerSignatureSlots @\n      List.filter\n        (fun (s, _) -> not (List.mem_assoc s i1.aLayerSignatureSlots))\n        i2.aLayerSignatureSlots;\n    aLayerSignatureSuppressError =\n      i1.aLayerSignatureSuppressError || i2.aLayerSignatureSuppressError }\n\nlet layer_signature_minus i1 i2 =\n  { aLayerSignatureName = i1.aLayerSignatureName ^ \"_\\\\_\" ^ i2.aLayerSignatureName;\n    aLayerSignatureSlots = List.filter\n      (fun (s, _) -> not (List.mem_assoc s i2.aLayerSignatureSlots))\n      i1.aLayerSignatureSlots;\n    aLayerSignatureSuppressError =\n      i1.aLayerSignatureSuppressError || i2.aLayerSignatureSuppressError }\n\nlet object_type_equal t1 t2 = true  (* XXX *)\nlet layer_signature_equal t1 t2 = true  (* XXX *)\nlet layer_type_equal t1 t2 = true  (* XXX *)\nlet default_constructor_signatureMethod = \n    [(\"constructor\", {\n                      aMethodArgumentTypes = [tvoid_unit];\n                      aMethodReturnType = tvoid_unit;\n                      aMethodKind = MKconstructor\n                     })]\n\nlet typecheck parsed filename =\n  let has_failure = ref false in\n  let report_error s loc = print_endline ((locationinfo_print loc filename) ^ \"\\n\" ^ \"Error: \" ^ s ^ \"\\n\"); has_failure := true in\n  let report_warning s loc = print_endline ((locationinfo_print loc filename) ^ \"\\n\" ^ \"Warning: \" ^ s ^ \"\\n\") in\n\n  let check c msg loc = match c with\n    | OK -> ()\n    | Error msg' -> report_error (msg ^ \" \" ^ msg') loc in\n\n  let declarations = ref [] in\n  let add_declaration i d = declarations := (i, d) :: !declarations in\n  let get_declarations _ = List.rev !declarations in\n\n  let global_abstract_data_type_store = ref None in\n\n  let external_verbatim = ref [] in\n  let get_external_verbatim _ = List.rev !external_verbatim in\n  let add_external_verabtim s exc =\n        external_verbatim := (s, exc) :: !external_verbatim in\n\n  let external_symbols = ref [] in\n  let get_external_symbols _ = List.rev !external_symbols in\n\n  let add_folded_unfolding_symbol ann s loc =\n    let part = List.mem (PAclause (\"partial\", [])) ann in\n    if List.mem (PAclause (\"unfold\", [PAclause (\"disallowed\", [])])) ann then\n      external_symbols := { aExtConstName=s; aExtConstUnfolding=false; aExtConstPartial=part} :: !external_symbols\n    else if List.mem (PAclause (\"unfold\", [PAclause (\"always\", [])])) ann then\n      external_symbols := { aExtConstName=s; aExtConstUnfolding=true; aExtConstPartial=part} :: !external_symbols\n    else\n      report_error (\"external symbol \" ^ s ^\": must specify either [[unfold disallowed]] or [[unfold always]].\") loc in \n\n  let declaration_num = List.length parsed in\n  let type_environment = Hashtbl.create declaration_num in\n  let struct_field_environment = Hashtbl.create declaration_num in\n  let type_constr_environment = Hashtbl.create declaration_num in\n  let ctype_environment = Hashtbl.create declaration_num in\n  let event_environment = Hashtbl.create declaration_num in\n  let signature_environment = Hashtbl.create declaration_num in\n  let layer_signature_environment = Hashtbl.create declaration_num in\n  let object_environment = Hashtbl.create declaration_num in\n  let layer_environment = Hashtbl.create declaration_num in\n  let layer_declarations = Hashtbl.create declaration_num in\n\n  let external_const_environment = Hashtbl.create declaration_num in\n  let external_function_environment = Hashtbl.create declaration_num in\n  let external_prop_environment = Hashtbl.create declaration_num in\n  let ethbuiltins_environment = Hashtbl.create declaration_num in\n\n  let _ = List.iter (fun (constr_name, data_type, constr) ->\n      Hashtbl.add type_constr_environment constr_name (data_type, constr)) [\n    \"array_init\",\n    { aTypeDesc = ATarray (-1, tvoid_unit); aTypeCtype = ACtarray (-1, ACtvoid);\n      aTypePairIdent = \"\"; aTypeProvable = true },\n    { aTypeConstrName = \"array_init\"; aTypeConstrArgs = [];\n       aTypeConstrImpl = None };\n    \"mapping_init\",\n    { aTypeDesc = ATmapping (tvoid_unit, tvoid_unit); aTypeCtype = ACtmapping (ACtvoid, ACtvoid);\n      aTypePairIdent = \"\"; aTypeProvable = true },\n    { aTypeConstrName = \"mapping_init\"; aTypeConstrArgs = [];\n       aTypeConstrImpl = None };\n    \"GLOBP\", tchar_pointer_globalpointer, globalpointer_GLOBP;\n    \"GLOBUndef\", tchar_pointer_globalpointer, globalpointer_GLOBUndef ] in\n\n  \n  let _ = List.iter (fun (name, defn) ->\n      Hashtbl.add ethbuiltins_environment name defn) [\n                    \"this_address\",\n                    ([], { aRexprDesc = AEbuiltin (\"address\", []); aRexprType = builtin_type_a_type Taddress });\n                    \"tx_origin\",\n                    ([], { aRexprDesc = AEbuiltin (\"origin\", []); aRexprType = builtin_type_a_type Taddress });\n                    \"msg_sender\",\n                    ([], { aRexprDesc = AEbuiltin (\"caller\", []); aRexprType = builtin_type_a_type Taddress });\n                    \"msg_value\",\n                    ([], { aRexprDesc = AEbuiltin (\"callvalue\", []) ; aRexprType = builtin_type_a_type Tuint });\n                    \"block_coinbase\",\n                    ([], { aRexprDesc = AEbuiltin (\"coinbase\", []); aRexprType = builtin_type_a_type Tuint });\n                    \"block_timestamp\",\n                    ([], { aRexprDesc = AEbuiltin (\"timestamp\", []); aRexprType = builtin_type_a_type Tuint });\n                    \"block_number\",\n                    ([],{ aRexprDesc = AEbuiltin (\"number\", []); aRexprType = builtin_type_a_type Tuint });\n                    \"chain_id\",\n                    ([],{ aRexprDesc = AEbuiltin (\"chainid\", []); aRexprType = builtin_type_a_type Tuint });\n                    \"self_balance\",\n                    ([],{ aRexprDesc = AEbuiltin (\"selfbalance\", []); aRexprType = builtin_type_a_type Tuint });\n                    \"balance\",\n                    ([builtin_type_a_type Taddress],{ aRexprDesc = AEbuiltin (\"balance\", []); aRexprType = builtin_type_a_type Tuint });\n                    \"blockhash\",\n                    ([builtin_type_a_type Tuint],{ aRexprDesc = AEbuiltin (\"blockhash\", []); aRexprType = builtin_type_a_type Tuint });\n          \n                  ] in\n\n  let get_field_ident e loc = match e with\n    | hd::_ -> (match hd with\n      | { p_expression_desc = PEglob s'; p_expression_loc = _ } -> s'\n      | _ -> report_error (\"First atom of field must be ident\")\n        loc; \"\"\n      )\n    | [] -> report_error (\"Unreachable: empty atom list should not be possible\")\n      loc; \"\" in\n  \n  let get_type i loc =\n    try Hashtbl.find type_environment i\n    with Not_found -> begin\n      report_error (\"Type name `\" ^ i ^ \"' unrecognized\") loc;\n      dummy_type i\n    end in\n\n  let construct_ATprod t1 t2 =\n    let desc = ATprod (t1, t2) in\n    let prod_ident = a_type_desc_to_ident desc in\n    default_not_found (Hashtbl.find type_environment) prod_ident (fun _ ->\n      let provable = t1.aTypeProvable && t2.aTypeProvable in\n      let ctype = if provable\n        then ACtstruct (\"struct_\" ^ prod_ident,\n               [\"fst\", t1.aTypeCtype; \"snd\", t2.aTypeCtype])\n        else ACtint in\n      let type_pair_ident = if provable\n        then \"tstruct_\" ^ prod_ident (* ^ \"_\" ^ prod_ident *)\n        else \"tint_\" ^ prod_ident in\n      let t = { aTypeDesc = desc; aTypeCtype = ctype;\n                aTypePairIdent = type_pair_ident; aTypeProvable = provable }\n      in Hashtbl.add type_environment prod_ident t;\n         add_declaration prod_ident (ADtype t);\n         t\n    ) in\n\n  let construct_ATarray n t =\n    let desc = ATarray (n, t) in\n    let array_ident = a_type_desc_to_ident desc in\n    default_not_found (Hashtbl.find type_environment) array_ident (fun _ ->\n      let ct = ACtarray (n, t.aTypeCtype) in\n      let t = {\n          aTypeDesc = desc;\n          aTypeCtype = ct;\n          aTypePairIdent = \"t\" ^ type_pair_ident_ctype ct ^ \"_\" ^ array_ident;\n          aTypeProvable = t.aTypeProvable\n        }\n      in Hashtbl.add type_environment array_ident t;\n         add_declaration array_ident (ADtype t);\n         t\n    ) in\n\n  let construct_ATmapping t1 t2 =\n    let desc = ATmapping (t1, t2) in\n    let mapping_ident = a_type_desc_to_ident desc in\n    default_not_found (Hashtbl.find type_environment) mapping_ident (fun _ ->\n      let ct = ACtmapping (t1.aTypeCtype, t2.aTypeCtype) in\n      let t = {\n          aTypeDesc = desc;\n          aTypeCtype = ct;\n          aTypePairIdent = \"t\" ^ type_pair_ident_ctype ct ^ \"_\" ^ mapping_ident;\n          aTypeProvable = t1.aTypeProvable && t2.aTypeProvable\n        }\n      in Hashtbl.add type_environment mapping_ident t;\n         add_declaration mapping_ident (ADtype t);\n         t\n    ) in\n  \n  \n  let construct_ATlist  t =\n    let desc = ATlist t in\n    let list_ident = a_type_desc_to_ident desc in\n    default_not_found (Hashtbl.find type_environment) list_ident (fun _ ->\n      let provable = false in\n      let ctype = ACtint in\n      let type_pair_ident = \"tint_\" ^ list_ident in\n      let t = { aTypeDesc = desc; aTypeCtype = ctype;\n                aTypePairIdent = type_pair_ident; aTypeProvable = provable }\n      in Hashtbl.add type_environment list_ident t;\n         add_declaration list_ident (ADtype t);\n         t\n    ) in\n  \n  let rec translate_type typ = match typ.p_type_FO_desc with \n    | PTname i -> get_type i typ.p_type_FO_loc\n    | PTbuiltin t -> builtin_type_a_type t\n    | PTprod (t1, t2) -> construct_ATprod (translate_type t1) (translate_type t2)\n    | PTarray (n, t) ->\n      if n <= 0 then report_error (\"Array has nonpositive dimensions\") typ.p_type_FO_loc;\n      construct_ATarray n (translate_type t)\n    | PTmapping (t1,t2) ->\n       construct_ATmapping (translate_type t1) (translate_type t2)\n    | PTlist t -> construct_ATlist (translate_type t)\n    | _ -> report_error (\"Internal error: data type in non-definition\") typ.p_type_FO_loc; tint_Z32 in\n\n  let translate_constructor i c =\n    let arg_type_env = Hashtbl.create (List.length c.pTypeConstrArgs) in\n    let counter = ref 0 in\n    let args' = List.map (fun (f, t) ->\n        let f' = if f = \"_\" then (incr counter; \"fld\" ^ string_of_int !counter)\n                            else f in\n        let t' = translate_type t\n        in if t'.aTypeProvable && f <> \"_\"\n             then Hashtbl.add arg_type_env f t'.aTypeCtype;\n           f', t')\n      c.pTypeConstrArgs in\n    let ct = parse_constr_annotations arg_type_env c.pTypeConstrAnnotations\n    in { aTypeConstrName = c.pTypeConstrName;\n         aTypeConstrArgs = args';\n         aTypeConstrImpl = ct } in\n\n  let translate_type_def i typ = match typ.p_type_FO_desc with\n    | PTdata (PTsingleton [], a) ->\n      report_error (\"Structure type \" ^ i ^ \" has no fields\") typ.p_type_FO_loc;\n      dummy_type i\n\n    | PTdata (PTsingleton lst, a) ->\n      let cname, require_impl =\n        match parse_type_annotations ctype_environment a with\n        | Some (ACtstruct (cname, _)) -> cname, true\n        | Some _ -> report_warning (\"Structure type \" ^ i ^\n                      \" can only have structure C type, default to type name\") typ.p_type_FO_loc;\n                    i, false\n        | _ -> i, false in\n\n      let flds, struct_lst = List.fold_right (fun (f, t) (flds, struct_lst) ->\n        let t' = translate_type t in\n        (f, t') :: flds, match struct_lst, t'.aTypeProvable with\n          | `Valid_struct lst, true -> `Valid_struct ((f, t'.aTypeCtype) :: lst)\n          | `Valid_struct lst, false -> `Missing_ctype [f, t']\n          | `Missing_ctype lst, true -> struct_lst\n          | `Missing_ctype lst, false -> `Missing_ctype ((f, t') :: lst)\n        ) lst ([], `Valid_struct []) in\n\n      let impl, ct, cname', provable = match struct_lst with\n        | `Valid_struct lst ->\n          let ct = ACtstruct (cname, lst) in\n          Some { aImplDesc = ACstruct (List.map (fun (f, ct) ->\n                               f, { aImplDesc = ACvar f; aImplType = ct }) lst);\n                 aImplType = ct },\n          ct, cname, true\n        | `Missing_ctype lst ->\n          if require_impl then\n             report_error (error_string_struct_unimplementable i cname lst) typ.p_type_FO_loc;\n          None, ACtint, \"int\", false in\n      let constr = { aTypeConstrName = \"Build_\" ^ i;\n                     aTypeConstrArgs = flds;\n                     aTypeConstrImpl = impl } in\n\n      let t = { aTypeDesc = ATdata (i, ATsingleton constr);\n                aTypeCtype = ct;\n                aTypePairIdent = \"t\" ^ cname' ^ \"_\" ^ i;\n                aTypeProvable = provable\n              }\n      in List.iter (fun (f, _) -> match\n                                    Hashtbl.find_opt struct_field_environment f with\n           | Some t' -> (report_error (\"Structure field \" ^ f ^\n                \" for type \" ^ i ^ \" is already that of type \" ^\n                match t'.aTypeDesc with ATdata (i', _) -> i' | _ -> \"UNKNOWN\") typ.p_type_FO_loc)\n           | None -> Hashtbl.add struct_field_environment f t\n         ) flds;\n         t\n\n    | PTdata (PTbranches [], _) ->\n      report_error (\"Data type \" ^ i ^ \" has no constructors\") typ.p_type_FO_loc;\n      dummy_type i\n\n(*    | PTdata (PTbranches [PTbuiltin t], _a) ->\n       translate_type (PTbuiltin t) *)\n\n    | PTdata (PTbranches lst, a) ->\n      let lst' = List.map (translate_constructor i) lst in\n      let t, lst'' = match parse_type_annotations ctype_environment a with\n        | None ->\n          { aTypeDesc = ATdata (i, ATbranches lst'); aTypeCtype = ACtint;\n            aTypePairIdent = \"tint_\" ^ i; aTypeProvable = false }, lst'\n        | Some ct ->\n          let lst'', ct' = List.fold_right (fun c (lst', ct) ->\n            match c.aTypeConstrImpl with\n            | None ->\n              (report_error (\"Data type \" ^ i ^ \" annotated with \" ^\n                \"implementation type but constructor \" ^ c.aTypeConstrName ^\n                \" cannot be implemented\") (typ.p_type_FO_loc));\n              c :: lst', ct\n            | Some impl -> match cimpl_respects_ctype impl ct with\n              | None ->\n                (report_error (\"Data constructor \" ^ c.aTypeConstrName ^ \" is \" ^\n                  \"annotated with implement of type `\" ^\n                  string_of_a_ctype impl.aImplType ^ \"' but type \" ^ i ^\n                  \" requires `\" ^ string_of_a_ctype ct ^ \"'\") (typ.p_type_FO_loc));\n                c :: lst', ct\n              | Some impl' ->\n                { c with aTypeConstrImpl = Some impl' } :: lst', impl'.aImplType\n          ) lst' ([], ct)\n          in { aTypeDesc = ATdata (i, ATbranches lst''); aTypeCtype = ct';\n               aTypePairIdent = \"t\" ^ type_pair_ident_ctype ct' ^ \"_\" ^ i;\n               aTypeProvable = true },\n             lst''\n      in List.iter (fun c -> match \n             Hashtbl.find_opt type_constr_environment c.aTypeConstrName with\n           | Some (t', _) -> (report_error (\"Constructor \" ^ c.aTypeConstrName ^\n                \" for type \" ^ i ^ \" is already that of type \" ^\n                match t'.aTypeDesc with ATdata (i', _) -> i' | _ -> \"UNKNOWN\") typ.p_type_FO_loc)\n           | None -> Hashtbl.add type_constr_environment c.aTypeConstrName (t, c)\n         ) lst'';\n         t\n\n    | t ->\n       translate_type {p_type_FO_desc = t; p_type_FO_loc = typ.p_type_FO_loc} in\n\n\n  let translate_event_def i args =\n    let args' = List.map (fun (f, t, b) ->\n                           let t' = translate_type t in\n                           (if not t'.aTypeProvable then\n                              report_error (\"The type of the argument \" ^ f ^ \" of event \" ^ i ^ \" can not be represented at runtime.\") none);\n                           (f, t', b))\n                         args in\n    { aEventName = i;\n      aEventArgs = args' } in\n\n  let unfold_arg_type =\n    let rec f acc = function\n      | { p_type_FO_desc = PTprod (res, t); p_type_FO_loc = loc }->\n        f (translate_type t :: acc) res\n      | {p_type_FO_desc= t; p_type_FO_loc= l} -> translate_type {p_type_FO_desc = t; p_type_FO_loc= l  } :: acc\n    in f [] in\n\n  let rec translate_signature i s = match s.p_signature_desc with\n    | PSconstr lst ->\n      if (List.exists (fun (f, arg, ret, kind) -> kind == MKconstructor) lst) then\n          { aSignatureName = i;\n            aSignatureMethods = List.map (fun (f, arg, ret, kind) -> \n                (if kind == MKconstructor && ret.p_type_FO_desc <> (PTbuiltin Tunit) then (report_error (f ^ \"is defined as constructor. \" ^ \"The return type should be unit\") ret.p_type_FO_loc));\n                f, { aMethodArgumentTypes = unfold_arg_type arg ;\n                     aMethodReturnType = translate_type ret;\n                     aMethodKind = kind }\n              ) lst;\n            aSignatureSuppressError = false\n          }\n      else\n          { aSignatureName = i;          \n            aSignatureMethods = (List.append (List.map (fun (f, arg, ret, kind) -> \n                (if kind == MKconstructor && ret.p_type_FO_desc <> (PTbuiltin Tunit) then (report_error (f ^ \"is defined as constructor. \" ^ \"The return type should be unit\") ret.p_type_FO_loc));\n                f, { aMethodArgumentTypes = unfold_arg_type arg ;\n                     aMethodReturnType = translate_type ret;\n                     aMethodKind = kind }\n              ) lst) default_constructor_signatureMethod);\n            aSignatureSuppressError = false\n          }\n    | PSghostize (sg, idents) ->\n      let sg' = translate_signature (i ^ \"_ghosting\") sg in\n      let mask = Hashtbl.create 10 in\n      let _ = List.iter (fun i -> Hashtbl.add mask i true) idents in\n      let suppress_error = ref sg'.aSignatureSuppressError in\n      let methods = List.map (fun (name, m) -> name,\n          if Hashtbl.mem mask name then\n            match m.aMethodKind with\n            | MKnormal -> (report_error (name ^ \" is a normal method in \" ^\n                sg'.aSignatureName ^ \" and cannot be changed to ghost\") sg.p_signature_loc);\n              suppress_error := true;\n              m\n            | MKlogical -> (report_error (name ^ \" is a logical method in \" ^\n                sg'.aSignatureName ^ \" and cannot be changed to ghost\") sg.p_signature_loc);\n              suppress_error := true;\n              m\n            | _ -> let _ = Hashtbl.remove mask name in\n                   if m.aMethodKind = MKconst\n                     then { m with aMethodKind = MKconstghost }\n                     else m\n          else m\n        ) sg'.aSignatureMethods\n      in Hashtbl.iter (fun m _ ->\n             (report_warning (\"Attempt to ghostize \" ^ m ^ \" not in \" ^\n               sg'.aSignatureName) s.p_signature_loc)\n           ) mask;\n         { aSignatureName = i;\n           aSignatureMethods = methods;\n           aSignatureSuppressError = !suppress_error }\n    | PSlogicize (sg, idents) ->\n      let sg' = translate_signature (i ^ \"_logicizing\") sg in\n      let mask = Hashtbl.create 10 in\n      let _ = List.iter (fun i -> Hashtbl.add mask i true) idents in\n      let methods = List.map (fun (name, m) -> name,\n          if Hashtbl.mem mask name\n            then let _ = Hashtbl.remove mask name\n                 in { m with aMethodKind = MKlogical }\n            else m\n        ) sg'.aSignatureMethods\n      in Hashtbl.iter (fun m _ ->\n             (report_warning (\"Attempt to logicize \" ^ m ^ \" not in \" ^\n               sg'.aSignatureName) s.p_signature_loc)\n           ) mask;\n         { aSignatureName = i;\n           aSignatureMethods = methods;\n           aSignatureSuppressError = sg'.aSignatureSuppressError }\n    | PSminus (sg, idents) ->\n      let sg' = translate_signature (i ^ \"_minusing\") sg in\n      let mask = Hashtbl.create 10 in\n      let _ = List.iter (fun i -> Hashtbl.add mask i true) idents in\n      let methods = List.concat @@ List.map (fun (name, m) ->\n          if Hashtbl.mem mask name\n            then let _ = Hashtbl.remove mask name\n                 in []\n            else [name, m]\n        ) sg'.aSignatureMethods\n      in Hashtbl.iter (fun m _ ->\n             (report_warning (\"Attempt to remove \" ^ m ^ \" not in \" ^\n               sg'.aSignatureName) s.p_signature_loc)\n           ) mask;\n         { aSignatureName = i;\n           aSignatureMethods = methods;\n           aSignatureSuppressError = sg'.aSignatureSuppressError }\n    | PSname i' ->\n      try Hashtbl.find signature_environment i'\n      with Not_found ->\n        report_error (\"Signature type \" ^ i' ^ \" not defined\") s.p_signature_loc;\n        dummy_signature i in\n\n  let translate_layer_signature i plsig = match plsig.p_layer_signature_desc with\n    | PLSconstr lst -> {\n        aLayerSignatureName = i;\n        aLayerSignatureSlots =\n          List.map (fun (s, sg) -> s, translate_signature (i ^ \"_\" ^ s) sg) lst;\n        aLayerSignatureSuppressError = false\n      }\n    | PLSname i' ->\n      try Hashtbl.find layer_signature_environment i'\n      with Not_found ->\n        (report_error (\"Layer signature \" ^ i' ^ \" not defined\") plsig.p_layer_signature_loc);\n        dummy_layer_signature i in\n\n  let translate_object_type i t =\n    { aObjectBase = translate_layer_signature (i ^ \"_base\") t.pObjectBase;\n      aObjectSignature = translate_signature (i ^ \"_sig\") t.pObjectSignature } in\n\n  let translate_layer_type i t =\n    { aLayerBase = translate_layer_signature (i ^ \"_base\") t.pLayerBase;\n      aLayerSignature = translate_layer_signature (i ^ \"_ifc\") t.pLayerSignature } in\n\n  let rec translate_expression var_env tmp_env exp = match exp.p_expression_desc with\n    | PEglob \"keccak256\" ->\n         (report_error (\"keccak256 requires 1 or 2 arguments, but were given 0.\") exp.p_expression_loc);\n         `RExpr dummy_rexpr\n    | PEglob i -> begin\n      try let tmp_id, t = List.assoc i tmp_env\n          in `RExpr { aRexprDesc = AEtemp (tmp_id, i); aRexprType = t }\n      with Not_found ->\n      try `LExpr (Hashtbl.find var_env i) with Not_found ->\n      try `BigExpr (Hashtbl.find external_const_environment i) with Not_found ->\n      match Hashtbl.find_opt ethbuiltins_environment i with\n      | Some ([], v) -> `RExpr v\n      | Some (argtypes, v) ->\n         (report_error (\"Ethereum builtin \" ^ i ^ \" requires \" ^ string_of_int (List.length argtypes) ^ \"arguments, but were given 0.\") exp.p_expression_loc);\n         `RExpr dummy_rexpr\n      | None ->\n         match catch_not_found (Hashtbl.find type_constr_environment) i with\n         | None -> (print_endline (string_of_p_expression_desc exp.p_expression_desc)); report_error (\"Unknown identifier `\" ^ i ^ \"'\") exp.p_expression_loc;\n                   `RExpr dummy_rexpr\n         | Some (t, c) ->\n            if c.aTypeConstrArgs <> [] then\n              (report_error (\"Constructor \" ^ c.aTypeConstrName ^ \" expects \" ^\n                              string_of_int (List.length c.aTypeConstrArgs) ^\n                                \" arguments but none supplied\" ) exp.p_expression_loc);\n            if t.aTypeProvable && not (ctype_is_small t.aTypeCtype)\n            then `BigExpr { aBigExprDesc = AEconstr (c, []); aBigExprType = t }\n            else `RExpr { aRexprDesc = AEconstr_val (c, []); aRexprType = t }\n      end\n\n    | PEconstant c ->\n      begin \n      match c with\n      | CONaddress addr -> \n          let c' = \n          if String.length addr > 2 then\n          begin\n          let num_prefix =  String.sub addr 0 2 in\n            match num_prefix with \n            | \"0x\" -> if String.length addr > address_length * 2 + 2 then None else Some c\n            | \"0o\" -> if String.length addr > address_length * 4 + 2 then None else Some c\n            | \"0b\" -> if String.length addr > address_length * 8 + 2 then None else Some c\n            (* decimal integer overflow will not pass to this step *)\n            | _ -> \n            let binary_string = Backend.BinNumsExt.decimalstring2binarystring addr in\n              if String.length binary_string > address_length * 8 + 2 then None else Some c \n          end\n          else Some c\n          in\n          begin\n          match c' with\n          | Some c -> `RExpr { aRexprDesc = AEconst c; aRexprType = constant_type c }\n          | None -> report_error (\"Identity constant overflow: address(\" ^ addr ^ \")\" ) exp.p_expression_loc;\n            `RExpr { aRexprDesc = AEconst c; aRexprType = constant_type c }\n          end\n      | _ ->\n      `RExpr { aRexprDesc = AEconst c; aRexprType = constant_type c }\n      end\n    | PEun (op, e) ->\n      let e' = translate_rexpr var_env tmp_env e in\n      begin match unop_type op e'.aRexprType with\n      | Some t -> `RExpr { aRexprDesc = AEunop (op, e'); aRexprType = t }\n      | None ->\n        report_error (\"Unary operator \" ^ string_of_unop op ^\n          \" not defined on type \" ^ (string_of_a_type false e'.aRexprType)) exp.p_expression_loc;\n        `RExpr { aRexprDesc = AEunop (op, e'); aRexprType = dummy_type \"*UNOP*\" }\n      end\n\n    | PEbin (op, e1, e2) ->\n      let e1' = translate_rexpr var_env tmp_env e1 in\n      let e2' = translate_rexpr var_env tmp_env e2 in\n      begin match binop_type op e1'.aRexprType e2'.aRexprType with\n      | Some t -> `RExpr { aRexprDesc = AEbinop (op, e1', e2'); aRexprType = t }\n      | None ->\n        report_error (\"Binary operator \" ^ string_of_binop op ^\n          \" not defined on type \" ^ string_of_a_type false e1'.aRexprType ^\n          \" and \"^ (string_of_a_type false e2'.aRexprType)) exp.p_expression_loc ;\n        `RExpr { aRexprDesc = AEbinop (op, e1', e2');\n                 aRexprType = dummy_type \"*BINOP*\" }\n      end\n\n    | PEpair (e1, e2) ->\n      let e1' = translate_big_expr var_env tmp_env e1 in\n      let e2' = translate_big_expr var_env tmp_env e2 in\n      let t1 = e1'.aBigExprType in\n      let t2 = e2'.aBigExprType in\n      let t = construct_ATprod t1 t2 in\n      let constr = {\n        aTypeConstrName = \"pair\";\n        aTypeConstrArgs = [\"fst\", t1; \"snd\", t2];\n        aTypeConstrImpl = if t.aTypeProvable then\n          Some {\n            aImplDesc = ACstruct\n              [\"fst\", { aImplDesc = ACvar \"fst\"; aImplType = t1.aTypeCtype };\n               \"snd\", { aImplDesc = ACvar \"snd\"; aImplType = t2.aTypeCtype }];\n            aImplType = t.aTypeCtype }\n        else\n          None\n      }\n      in `BigExpr {\n        aBigExprDesc = AEconstr (constr, [\"fst\", e1'; \"snd\", e2']);\n        aBigExprType = t\n      }\n\n    | PEapp ({p_expression_desc = (PEglob \"keccak256\"); p_expression_loc = _ } :: [{p_expression_desc = PEpair (e1, e2); p_expression_loc = _ }]) ->\n      let e1' = translate_rexpr var_env tmp_env e1 in\n      let e2' = translate_rexpr var_env tmp_env e2 in\n      begin match binop_type OPsha_2 e1'.aRexprType e2'.aRexprType with\n      | Some t -> `RExpr { aRexprDesc = AEbinop (OPsha_2, e1', e2'); aRexprType = t }\n      | None ->\n         report_error (\"Unary operator keccak256 not defined on types \"\n                       ^ string_of_a_type false e1'.aRexprType ^ \" and \" ^ string_of_a_type false e2'.aRexprType) exp.p_expression_loc; \n        `RExpr { aRexprDesc = AEbinop (OPsha_2, e1', e2'); aRexprType = dummy_type \"*BINOP*\" }\n      end\n\n    | PEapp ({p_expression_desc = (PEglob \"keccak256\"); p_expression_loc = _} :: [e]) ->\n      let e' = translate_rexpr var_env tmp_env e in\n      begin match unop_type OPsha_1 e'.aRexprType with\n      | Some t -> `RExpr { aRexprDesc = AEunop (OPsha_1, e'); aRexprType = t }\n      | None ->\n         report_error (\"Unary operator keccak256 not defined on type \"\n                       ^ string_of_a_type false e'.aRexprType) exp.p_expression_loc;\n        `RExpr { aRexprDesc = AEunop (OPsha_1, e'); aRexprType = dummy_type \"*UNOP*\" }\n      end\n\n    | PEapp ({p_expression_desc = (PEglob i); p_expression_loc = _} :: es) when i = \"fst\" || i = \"snd\" -> begin\n      match es with\n      | [] | _ :: _ :: _ ->\n        report_error (i ^ \" only takes one argument; \" ^\n                      string_of_int (List.length es) ^ \" given\") exp.p_expression_loc;\n        `LExpr dummy_lexpr\n      | [e] ->\n        let e' = translate_lexpr var_env tmp_env e in\n        match e'.aLexprType.aTypeDesc with\n        | ATprod (tfst, tsnd) ->\n          `LExpr { aLexprDesc = AEfield (e', i);\n                   aLexprType = if i = \"fst\" then tfst else tsnd;\n                   aLexprIsGhost = e'.aLexprIsGhost }\n        | _ ->\n          report_error (i ^ \" can only apply to a product type; \" ^\n                        string_of_a_type false e'.aLexprType ^ \" given\")  exp.p_expression_loc;\n          `LExpr dummy_lexpr\n      end\n\n    (* TODO: *)\n    | PEapp ({p_expression_desc = (PEglob i); p_expression_loc = _} :: es) when i = \"array_sets\" -> begin\n        let ct = begin match es with\n        | e::_ -> \n          let e' = translate_big_expr var_env tmp_env e in\n          e'.aBigExprType\n        | [] -> {\n            aTypeDesc = ATarray(-1, tvoid_unit);\n            aTypeCtype = ACtarray(-1, ACtvoid);\n            aTypePairIdent = \"\";\n            aTypeProvable = true }\n        end in\n        let c = {\n            aTypeConstrName = \"array_sets\";\n            aTypeConstrArgs = [\"_\", ct];\n            aTypeConstrImpl = None } in\n        let t = {\n            aTypeDesc = ATarray(-1, tvoid_unit);\n            aTypeCtype = ACtarray(-1, ACtvoid);\n            aTypePairIdent = \"\";\n            aTypeProvable = true } in\n        let params = List.map (fun e ->\n          let e' = translate_big_expr var_env tmp_env e in\n          \"\", e') es\n        in `BigExpr { aBigExprDesc = AEconstr (c, params); aBigExprType = t }\n    end\n\n    | PEapp ({p_expression_desc = (PEglob i); p_expression_loc = _} :: es) ->\n       begin\n       match Hashtbl.find_opt ethbuiltins_environment i with\n       | Some (argtypes, {aRexprDesc=AEbuiltin (bi,_); aRexprType=rt})  ->\n          let params = try List.map2 (fun et e ->\n                               let e' = translate_rexpr var_env tmp_env e in\n                               match rexpr_respects_type e' et with\n                               | None ->\n                                  report_error (\"Ethereum builtin \" ^ i ^ \" requires an argument of type \" ^ string_of_a_type false et  ^ \" but supplied \" ^\n              \"expression of type \" ^ string_of_a_type false e'.aRexprType) exp.p_expression_loc;\n                                  dummy_rexpr\n                               | Some e'' -> e'') argtypes es\n                     with Invalid_argument _ (*\"List.map2\"*) ->\n            report_error (\"Ethereum builint \" ^ i ^ \" expects \" ^\n              string_of_int (List.length argtypes) ^\n              \" arguments but \" ^ string_of_int (List.length es) ^ \" supplied\") exp.p_expression_loc;\n            []\n          in\n           `RExpr {aRexprDesc=AEbuiltin (bi,params); aRexprType=rt}          \n       | Some (_, _) ->\n          report_error (\"internal error, not a AEbuiltin\") exp.p_expression_loc;\n         `RExpr dummy_rexpr\n\n       | None ->\n       begin match Hashtbl.find_opt type_constr_environment i with\n        (* We can make this a store even for non-provable big types in order\n           to compile ghost expressions.\n\n           TODO: It would make sense to actually check if we are in a ghost context.\n           One way to do so would be to use the side_effect system, and classify\n           constructing constructors of non-provable datatypes as a dependsOnAbstraction effect. *)\n      | Some (t, c) when t.aTypeProvable && not (ctype_is_small t.aTypeCtype) ->\n        let params = try List.map2 (fun (f, ft) e ->\n          let e' = translate_big_expr var_env tmp_env e in\n          match big_expr_respects_type e' ft with\n          | None ->\n            report_error (\"Field \" ^ f ^ \" of constructor \" ^ c.aTypeConstrName ^\n              \" has type \" ^ string_of_a_type false ft ^ \" but supplied \" ^\n              \"expression of type \" ^ string_of_a_type false e'.aBigExprType)  exp.p_expression_loc;\n            f, e'\n          | Some e'' -> f, e'') c.aTypeConstrArgs es\n                     with Invalid_argument _ (*\"List.map2\"*) ->\n            report_error (\"Constructor \" ^ c.aTypeConstrName ^ \" expects \" ^\n              string_of_int (List.length c.aTypeConstrArgs) ^\n              \" arguments but \" ^ string_of_int (List.length es) ^ \" supplied\") exp.p_expression_loc;\n            []\n        in `BigExpr { aBigExprDesc = AEconstr (c, params); aBigExprType = t }\n      | Some (t, c) ->\n        let params = try List.map2 (fun (f, ft) e ->\n          let e' = translate_rexpr var_env tmp_env e in\n          match rexpr_respects_type e' ft with\n          | None ->\n            report_error (\"Field \" ^ f ^ \" of constructor \" ^ c.aTypeConstrName ^\n              \" has type \" ^ string_of_a_type false ft ^ \" but supplied \" ^\n              \"expression of type \" ^ string_of_a_type false e'.aRexprType) exp.p_expression_loc;\n            f, e'\n          | Some e'' -> f, e'') c.aTypeConstrArgs es\n          with Invalid_argument _ (*\"List.map2\"*) ->\n            report_error (\"Constructor \" ^ c.aTypeConstrName ^ \" expects \" ^\n              string_of_int (List.length c.aTypeConstrArgs) ^\n              \" arguments but \" ^ string_of_int (List.length es) ^ \" supplied\") exp.p_expression_loc;\n            []\n        in `RExpr { aRexprDesc = AEconstr_val (c, params); aRexprType = t }\n\n      (*\n      | None -> match catch_not_found (Hashtbl.find external_function_environment) i with\n      | Some (s, m) ->\n        let rec unfold_arg e = function\n          | [] -> report_error \"Internal error: argument list empty\"; []\n          | [t] -> [translate_big_expr_typed var_env tmp_env e t (\"External call\" ^ i)]\n          | t :: tres -> match e with\n            | PEpair (e', eres) ->\n              translate_big_expr_typed var_env tmp_env e' t (\"External call\" ^ i)\n                :: unfold_arg eres tres\n            | _ -> report_error \"Insuffecient number of argument supplied\"; []\n        in begin match es with\n        | [] -> report_error \"Internal error: no argument supplied\";\n                `BigExpr dummy_big_expr\n        | [e] ->\n          `BigExpr { aBigExprDesc = AEexternal_call (s, i,\n                                      unfold_arg e m.aMethodArgumentTypes);\n                     aBigExprType = m.aMethodReturnType }\n        | _ -> report_warning (\"More than one (currying) argument for \" ^\n                 \"external function call \" ^ i ^ \"(\" ^ s ^\"): ignored\");\n               `BigExpr dummy_big_expr\n        end\n      *)\n\n      | None -> report_error (\"Unknown identifier `\" ^ i ^ \"'\")  exp.p_expression_loc;\n                `RExpr dummy_rexpr\n       end\n       end\n\n    | PEapp _ -> report_error (\"Application of complex head illegally appears in expressions\")  exp.p_expression_loc;\n                 `RExpr dummy_rexpr\n\n    | PEstruct [] -> report_error (\"Empty structure construction is not allowed\")  exp.p_expression_loc;\n                     `BigExpr dummy_big_expr\n    | PEstruct (((f1, _) :: _) as lst) -> begin match \n        Hashtbl.find_opt struct_field_environment f1 with\n      | Some ({ aTypeDesc = ATdata (i, ATsingleton c) } as t) ->\n        List.iter (fun (i', _) ->\n          if not (List.mem_assoc i' c.aTypeConstrArgs) then\n            (report_error (\"Type \" ^ i ^ \" does not contain field \" ^ i') exp.p_expression_loc)\n        ) lst;\n        let lst' = List.map (fun (f, ft) ->\n          match catch_not_found (List.assoc f) lst with\n          | None -> report_error (\"Field \" ^ f ^ \" not initialized when \" ^\n                      \"constructing structure type \" ^ i) exp.p_expression_loc;\n                    f, dummy_big_expr\n          | Some e' ->\n            let e'' = translate_big_expr var_env tmp_env e' in\n            match big_expr_respects_type e'' ft with\n            | None ->\n              report_error (\"Field \" ^ f ^ \" of structure type \" ^ i ^ \" has type \" ^\n                string_of_a_type false ft ^ \" but supplied expression of type \" ^\n                string_of_a_type false e''.aBigExprType) exp.p_expression_loc;\n              f, e''\n            | Some e''' -> f, e'''\n          ) c.aTypeConstrArgs\n        in `BigExpr { aBigExprDesc = AEstruct (c, lst'); aBigExprType = t }\n      | Some t -> report_error (\"Internal error: constructor \" ^ f1 ^\n                    \" mapped to non-structure type \" ^ string_of_a_type false t) exp.p_expression_loc;\n                  `BigExpr dummy_big_expr\n      | None -> report_error (\"Unknown structure field name \" ^ f1) exp.p_expression_loc;\n                `BigExpr dummy_big_expr\n      end\n\n    | PEfield (a1, a2) ->\n      let e = List.hd a1 in\n      let e' = translate_lexpr var_env tmp_env e in\n      let f = get_field_ident a2 e.p_expression_loc in\n      begin match e'.aLexprType.aTypeDesc with\n      | ATdata (i, ATsingleton c) ->\n        begin match catch_not_found (List.assoc f) c.aTypeConstrArgs with\n        | None ->\n          report_error (\"Data type \" ^ i ^ \" does not have the field \" ^ f) exp.p_expression_loc;\n          `LExpr dummy_lexpr\n        | Some t ->\n          `LExpr { aLexprDesc = AEfield (e', f);\n                   aLexprType = t;\n                   aLexprIsGhost = e'.aLexprIsGhost }\n        end\n      | _ -> report_error (string_of_a_type false e'.aLexprType ^ \" is not a\" ^\n               \" structure type; only structure types can be accessed through fields\") exp.p_expression_loc;\n             `LExpr dummy_lexpr\n      end\n\n    | PEindex (e, idx) ->\n      let e' = translate_lexpr var_env tmp_env e in\n      let idx' = translate_rexpr var_env tmp_env idx in\n      begin match e'.aLexprType.aTypeDesc, idx'.aRexprType.aTypeDesc with\n      | ATarray (n, t), ATbuiltin Tint ->\n        `LExpr { aLexprDesc = AEindex (e', idx');\n                 aLexprType = t;\n                 aLexprIsGhost = e'.aLexprIsGhost }\n      | ATarray _, _ ->\n        report_error (string_of_a_type false idx'.aRexprType ^ \" is not integer;\" ^\n          \" arrays can only be indexed by integers\") exp.p_expression_loc;\n        `LExpr dummy_lexpr\n      | ATmapping (tkey, tval), t ->\n\t if tkey.aTypeDesc <> t then \n\t   begin report_error (\"The index expression has type \" ^ (string_of_a_type false idx'.aRexprType)\n\t\t\t  ^ \" but should have type \" ^ (string_of_a_type false tkey) ^ \".\");\n\t\t `LExpr dummy_lexpr end\n\t else\n\t   `LExpr { aLexprDesc = AEindex (e', idx');\n\t\t    aLexprType = tval;\n        aLexprIsGhost = e'.aLexprIsGhost }                   \n      | _ -> report_error (string_of_a_type false e'.aLexprType ^ \" is not an\" ^\n               \" array type; only array types can be accessed through indexing\") exp.p_expression_loc;\n             `LExpr dummy_lexpr\n      end\n\n  and translate_rexpr var_env tmp_env e =\n    match translate_expression var_env tmp_env e with\n    | `RExpr e' -> e'\n    | `LExpr e' ->\n      report_error (\"Normal expression expected but found an L-value\") e.p_expression_loc ;\n      { dummy_rexpr with aRexprType = e'.aLexprType }\n    | `BigExpr e' ->\n       report_error (\"Normal expression expected but found a data constructor\") e.p_expression_loc;\n      { dummy_rexpr with aRexprType = e'.aBigExprType }\n  and translate_lexpr var_env tmp_env e =\n    match translate_expression var_env tmp_env e with\n    | `RExpr e' ->\n      report_error (\"L-value expression expected but found an R-value\") e.p_expression_loc;\n      { dummy_lexpr with aLexprType = e'.aRexprType }\n    | `LExpr e' -> e'\n    | `BigExpr e' ->\n      report_error (\"L-value expression expected but found a data constructor\")  e.p_expression_loc;\n      { dummy_lexpr with aLexprType = e'.aBigExprType }\n  and translate_big_expr var_env tmp_env e =\n    match translate_expression var_env tmp_env e with\n    | `RExpr e' -> { aBigExprDesc = AErexpr e'; aBigExprType = e'.aRexprType }\n    | `LExpr e' ->\n      report_error (\"Data constructor expected but found an L-value\")  e.p_expression_loc;\n      { dummy_big_expr with aBigExprType = e'.aLexprType }\n    | `BigExpr e' -> e' in\n\n  let translate_object_field i logical_object (f, t, e, is_ghost) =\n    let t' = translate_type t in\n    let e' = translate_big_expr (empty_var_env ()) (empty_tmp_env ()) e in\n    let e'' =\n        let is_array_sets e =\n            match e.aBigExprDesc with\n            | AEconstr (ty, el) -> 0 = String.compare ty.aTypeConstrName \"array_sets\"\n            | _ -> false\n        in\n        if is_array_sets e' then e'\n        else\n        match big_expr_respects_type e' t' with\n      | None ->\n        report_error (\"Object field \" ^ i ^ \".\" ^ f ^ \" has type \" ^\n          string_of_a_type false t' ^ \" but initialized to a value of type \" ^\n          string_of_a_type false e'.aBigExprType)  e.p_expression_loc;\n        e'\n      | Some e'' -> e'' in\n    match expression_to_compile_time_constant e'' with\n    | Some e3 -> { aObjectFieldName = f; aObjectFieldType = t';\n                   aObjectFieldInitial = e3;\n                   aObjectFieldIsLogical = logical_object || is_ghost }\n    | None -> report_error (\"Object field \" ^ i ^ \".\" ^ f ^\n                            \" initialized with non-constant\")  e.p_expression_loc;\n      { aObjectFieldName = f; aObjectFieldType = t';\n        aObjectFieldInitial = ACONconst CONunit;\n        aObjectFieldIsLogical = logical_object || is_ghost } in\n\n  let translate_object_field_to_Constructor i logical_object (ident, t, e, is_ghost) =\n    let lexpr_list = match e.p_expression_desc with\n                        | PEstruct lst ->\n                            List.map (fun (id, pe) ->\n                                (let le = {\n                                          aLexprDesc = AEglob(ident);\n                                          aLexprType = translate_type t;\n                                          aLexprIsGhost = is_ghost\n                                        } in \n                                  {aLexprDesc = AEfield(le, id); aLexprType = translate_type t; aLexprIsGhost = is_ghost; })) lst\n                        | PEglob(\"array_init\") -> []\n                        | PEconstant(CONhashvalue) -> []\n                        | PEglob(\"mapping_init\") -> []\n                        | _ -> [{aLexprDesc = AEglob(ident); aLexprType = translate_type t; aLexprIsGhost = is_ghost; }]\n                      in\n    let rexpr_list = match e.p_expression_desc with\n                        | PEstruct lst -> \n                            List.map (fun (id, pe) -> (translate_rexpr (empty_var_env ()) (empty_tmp_env ()) pe)) lst\n                        | PEglob(\"array_init\") -> []\n                        | PEconstant(CONhashvalue) -> []\n                        | PEglob(\"mapping_init\") -> []  \n                        | _ ->\n                            let e_toConstructor = translate_rexpr (empty_var_env ()) (empty_tmp_env ()) e in\n                                        [e_toConstructor] \n              in\n        let fields_to_commands = \n            if (List.length(lexpr_list) > 1) then\n                (List.map2 (fun lexpr rexpr -> \n                            {\n                              aCmdDesc = ACstore(lexpr, rexpr);\n                              aCmdType = translate_type t;\n                              aCmdEnv = [] ; \n                              aCmdEffect = side_effect_pure;\n                            } \n                   ) lexpr_list rexpr_list)\n            else if (List.length(lexpr_list) == 0) then begin\n                [{\n                  aCmdDesc = ACskip;\n                  aCmdType = translate_type t;\n                  aCmdEnv = [] ; \n                  aCmdEffect = side_effect_pure;\n                }]\n              end\n            else\n                [{\n                  aCmdDesc = ACstore((List.hd lexpr_list), (List.hd rexpr_list));\n                  aCmdType = translate_type t;\n                  aCmdEnv = [] ; \n                  aCmdEffect = side_effect_pure;\n                }]\n              in\n        if List.length(fields_to_commands) = 1 then\n            (List.hd fields_to_commands)\n        else\n            (commandList_helper fields_to_commands (List.hd fields_to_commands).aCmdType [] side_effect_pure)\n      in\n\n  let translate_rexpr_typed var_env tmp_env e t msg =\n    let e' = translate_rexpr var_env tmp_env e in\n    match rexpr_respects_type e' t with\n    | None ->\n      report_error (msg ^ \": expression of type \" ^ string_of_a_type false t ^\n        \" required; \" ^ string_of_a_type false e'.aRexprType ^ \" given\")  e.p_expression_loc;\n      e'\n    | Some e'' -> e'' in\n\n  let rec unfold_call_arg var_env tmp_env e = function\n    | [] -> report_error (\"Internal error: argument list empty\")  e.p_expression_loc; []\n    | [t] -> [translate_rexpr_typed var_env tmp_env e t \"Method call\"]\n    | t :: tres -> match e with\n      | {p_expression_desc = PEpair (e', eres); p_expression_loc = _} ->\n        translate_rexpr_typed var_env tmp_env e' t \"Method call\"\n          :: unfold_call_arg var_env tmp_env eres tres\n      | _ -> report_error (\"Insufficient number of argument supplied\") e.p_expression_loc; [] in\n\n  let rec unfold_event_arg var_env tmp_env e = function\n    | [] -> []\n    | [_,t,_] -> [translate_rexpr_typed var_env tmp_env e t \"Event call\"]\n    | (_,t,_) :: tres -> match e with\n      | {p_expression_desc = PEpair (e', eres); p_expression_loc = _} ->\n        (translate_rexpr_typed var_env tmp_env e' t \"Event call\")\n          :: unfold_event_arg var_env tmp_env eres tres\n      | _ -> report_error (\"Insufficient number of argument supplied\") e.p_expression_loc; [] in\n\n\n  let unfold_extcall_arg var_env tmp_env =\n    let trans_expr e t = match translate_expression var_env tmp_env e with\n      | `RExpr e' -> AEXrexer (match rexpr_respects_type e' t with\n        | None ->\n          report_error (\"External call: expression of type \" ^ string_of_a_type false t ^\n            \" required; \" ^ string_of_a_type false e'.aRexprType ^ \" given\") e.p_expression_loc;\n          e'\n        | Some e'' -> e'')\n      | `LExpr e' ->\n        if e'.aLexprType <> t then\n          report_error (\"External call: expression of type \" ^ string_of_a_type false t ^\n            \" required; \" ^ string_of_a_type false e'.aLexprType ^ \" given\") e.p_expression_loc;\n        AEXlexpr e'\n      | `BigExpr _ ->\n        report_error (\"External function call cannot take data constructors\") e.p_expression_loc;\n        AEXrexer { dummy_rexpr with aRexprType = t } in\n    let rec f e = function\n      | [] -> report_error (\"Internal error: argument list empty\") e.p_expression_loc; []\n      | [t] -> [trans_expr e t]\n      | t :: tres -> match e with\n        | {p_expression_desc = PEpair (e', eres); p_expression_loc = _} ->\n          trans_expr e' t :: f eres tres\n        | _ -> report_error (\"Insuffecient number of argument supplied\")  e.p_expression_loc; []\n    in f in\n\n  let parse_captured_command_annotations tmp_env = function\n    | PAclause (name, tmps) :: _ ->\n      let captured_tmps = List.rev @@ List.fold_left (fun res a -> match a with\n          | PAclause (tmp, _) ->\n            begin match catch_not_found (List.assoc tmp) tmp_env with\n            | Some info -> (tmp, info) :: res\n            | None ->\n              report_warning (\"Capturing unknown variable `\" ^ tmp ^ \"' is ignored\" ) none;\n              res\n            end\n          | _ -> res\n        ) [] tmps\n      in Some { aCapturedName = name; aCapturedTemp = captured_tmps }\n    | _ -> None in\n\n  let rec translate_command mk env expect_bool next_id tmp_env cmd  =\n    let return next_id' t eff d =\n      { aCmdDesc = d; aCmdType = t; aCmdEnv = tmp_env; aCmdEffect = eff },\n      next_id'\n    in match cmd.p_command_desc with\n      (* | PCskip -> ACskip, tvoid_unit, next_id *)\n      | PCyield ({\n          p_expression_desc = PEfield (a1, a2);\n          p_expression_loc = _\n        }) when (List.length a2 <> 1) (* only process method calls, not struct access *) ->\n        let s1 = get_field_ident a1 cmd.p_command_loc in (* contract/layer name *)\n        let s2 = get_field_ident a2 cmd.p_command_loc in (* method name *)\n        let value, gas = ( (* Both optional. If `gas` is given, `value` must be too. *)\n          let invalid () = report_error \"Invalid value/gas arguments\" cmd.p_command_loc; None, None in\n          match List.length a1 with\n          | 1 -> None, None\n          | 2 -> (let e = List.nth a1 1 in\n              match e.p_expression_desc with\n              | PEglob v -> Some e, None\n              | PEpair (v, g) -> (\n                match v.p_expression_desc, g.p_expression_desc with\n                  | PEglob _, PEglob _ -> Some v, Some g\n                  | _ -> invalid ()\n                )\n              | _ -> invalid ()\n            )\n          | _ -> report_error \"More than two atoms in field\" cmd.p_command_loc; None, None\n        )\n        in\n        let translate_option = function\n        | None -> None\n        | Some v -> Some (translate_rexpr env.variable_env tmp_env v) in\n        let value', gas' = translate_option value, translate_option gas in\n        begin match find_method env s1 s2 with  \n        | `Not_found msg ->\n          report_error msg cmd.p_command_loc; return next_id tvoid_unit side_effect_pure ACskip\n        | `Found mt ->\n          if mk = MKconstructor then\n              begin\n              report_error (\"Method call in constructor is not working in current version of compiler\") cmd.p_command_loc;\n              end;\n          return next_id mt.aMethodReturnType (method_side_effect mt) @@\n            ACcall (s1, s2, unfold_call_arg env.variable_env tmp_env\n              (* TODO: catch n too large *)\n              (* TODO: check that s1 and s2 don't have any extra atoms *)\n              (List.nth a2 1) mt.aMethodArgumentTypes, \n              value', gas') \n        end\n\n      | PCyield ({p_expression_desc = (PEglob v); p_expression_loc = _})\n      | PCstore (_, ({p_expression_desc = (PEglob v); p_expression_loc = _}))\n          when Hashtbl.mem external_const_environment v ->\n        let s, i, t = match Hashtbl.find external_const_environment v with\n          | { aBigExprDesc = AEexternal_const (s, i); aBigExprType = t } ->\n            s, i, t\n          | _ -> assert false in\n        let dest, res_t, eff = match cmd.p_command_desc with\n          | PCstore (el, _) ->\n            let el' = translate_lexpr env.variable_env tmp_env el\n            (*XXX: type check*)\n            in Some el', tvoid_unit, side_effect_store el'.aLexprIsGhost\n          | _ -> None, t, side_effect_pure in\n        return next_id res_t { eff with invokesLogical = true } @@\n          ACexternal (dest, s, i, [])\n\n      | PCyield ({p_expression_desc = PEapp ({p_expression_desc =  (PEglob f); p_expression_loc = _ } :: (arg :: rest)); p_expression_loc = _})\n      | PCstore (_, {p_expression_desc = PEapp ({p_expression_desc = (PEglob f); p_expression_loc = _ } :: (arg :: rest)); p_expression_loc = _ })\n          when Hashtbl.mem external_function_environment f ->\n        let (s, mt) = Hashtbl.find external_function_environment f in\n        let dest, res_t, eff = match cmd.p_command_desc with\n          | PCstore (el, _) ->\n            let el' = translate_lexpr env.variable_env tmp_env el\n            (*XXX: type check*)\n            in Some el', tvoid_unit, side_effect_store el'.aLexprIsGhost\n          | _ -> None, mt.aMethodReturnType, side_effect_pure in\n        if rest <> [] then\n          report_warning (\"More than one (currying) argument for external function call \" ^\n            f ^ \": ignored\") cmd.p_command_loc;\n        return next_id res_t { eff with invokesLogical = true } @@\n          ACexternal (dest, s, f, unfold_extcall_arg env.variable_env tmp_env\n                                                     arg mt.aMethodArgumentTypes)\n\n      | PCyield e ->\n        begin match e.p_expression_desc with\n        | PEbin (OPeq, _, _) when not expect_bool ->\n          report_warning (\"Found an equality test as return value--did you mean to do an assignment using `:='?\") cmd.p_command_loc\n        | _ -> ()\n        end;\n        begin match translate_expression env.variable_env tmp_env e with\n        | `RExpr e' -> return next_id e'.aRexprType side_effect_pure @@ ACyield e'\n        | `LExpr e' -> return next_id e'.aLexprType\n            { side_effect_pure with dependsOnAbstraction = e'.aLexprIsGhost } @@\n            ACload e'\n        | `BigExpr _ -> report_error (\"Not allowed to return data type constructs\") cmd.p_command_loc; \n                        return next_id tvoid_unit side_effect_pure ACskip\n        end\n\n      | PClet (i, c1, c2) ->\n         let c1', id1 = translate_command mk env false (next_id + 1) tmp_env c1 in\n         let c2', id2 = translate_command mk env expect_bool id1\n                          ((i, (next_id, c1'.aCmdType)) :: tmp_env) c2\n         in return id2 c2'.aCmdType\n              (side_effect_join c1'.aCmdEffect c2'.aCmdEffect) @@\n              AClet (next_id, i, c1', c2')\n\n      | PCsequence (c1, c2) ->\n        let c1', id1 = translate_command mk env false next_id tmp_env c1 in\n        let c2', id2 = translate_command mk env expect_bool id1 tmp_env c2 in\n        let c1'' = match command_respects_type c1' tvoid_unit with\n          | None -> report_error (\"Command on the left of a sequence must not return values\") c1.p_command_loc; \n                    c1'\n          | Some c1'' -> c1''\n        in return id2 c2'.aCmdType\n             (side_effect_join c1''.aCmdEffect c2'.aCmdEffect) @@\n             ACsequence (c1'', c2')\n\n      (*\n      | PCcall (s, f, arg) -> begin\n        match find_method env s f with\n        | `Not_found msg -> report_error msg; ACskip, tvoid_unit, next_id\n        | `Found (targ, tret, kind) ->\n          (* XXX: check kind *)\n          ACcall (s, f, unfold_argument_expr env.variable_env tmp_env arg targ),\n          tret, next_id\n        end\n      *)\n\n      | PCcond (e, c, None) ->\n        let e' = translate_rexpr_typed env.variable_env tmp_env e tint_bool\n                   \"Condition\" in\n        let c', next_id' = translate_command mk env false next_id tmp_env c in\n        let c'' = match command_respects_type c' tvoid_unit with\n          | None -> report_error (\"The true branch of an if statement without a falsebranch must not return values\") cmd.p_command_loc; \n                    c'\n          | Some c'' -> c'' in\n        let cskip = { aCmdDesc = ACskip; aCmdType = tvoid_unit;\n                      aCmdEnv = tmp_env; aCmdEffect = side_effect_pure }\n        in return next_id' tvoid_unit c'.aCmdEffect @@ ACcond (e', c'', cskip)\n      | PCcond (e, c1, Some c2) ->\n        let e' = translate_rexpr_typed env.variable_env tmp_env e tint_bool\n                   \"Condition\" in\n        let c1', id1 = translate_command mk env expect_bool next_id tmp_env c1 in\n        let c2', id2 = translate_command mk env expect_bool id1 tmp_env c2 in\n        let c1'', c2'', t = match unify_commands [c1'; c2'] with\n          | Some ([c1''; c2''], t) -> c1'', c2'', t\n          | _ ->\n            report_error (\"Two branches of a condition have to have the same\" ^\n              \" type but the then branch has type \" ^\n              string_of_a_type false c1'.aCmdType ^ \" and the else branch has \" ^\n              string_of_a_type false c2'.aCmdType) cmd.p_command_loc; \n            c1', c2', c1'.aCmdType\n        (*\n        let c1'', c2'' = match command_respects_type c1' c2'.aCmdType with\n          | Some c1'' -> c1'', c2'\n          | None -> match command_respects_type c2' c1'.aCmdType with\n          | Some c2'' -> c1', c2''\n          | None ->\n            report_error (\"Two branches of a condition have to have the same\" ^\n              \" type but the then branch has type \" ^\n              string_of_a_type false c1'.aCmdType ^ \" and the else branch has \" ^\n              string_of_a_type false c2'.aCmdType);\n            c1', c2'\n        *)\n        in return id2 t (side_effect_join c1''.aCmdEffect c2''.aCmdEffect) @@\n             ACcond (e', c1'', c2'')\n\n      | PCfor (i, e1, e2, c, a) ->\n        let e1' = translate_rexpr_typed env.variable_env tmp_env e1 tint_Z32\n                    \"Starting value of a for loop\" in\n        let e2' = translate_rexpr_typed env.variable_env tmp_env e2 tint_Z32\n                    \"Ending value of a for loop\" in\n        let n_iter, n_end = next_id, next_id + 1 in\n        let c', next_id' = translate_command mk env false (n_end + 1)\n          ((i, (n_iter, tint_Z32)) :: ((\"_e_\" ^ string_of_int n_end, (n_end, tint_Z32)) :: tmp_env)) c in\n        let c'' = match command_respects_type c' tvoid_unit with\n          | None -> report_error (\"For loop body cannot return a value\") cmd.p_command_loc;\n                    c'\n          | Some c'' -> c''\n        in return next_id' tvoid_unit c''.aCmdEffect @@\n             ACfor (n_iter, i, e1', n_end, e2', c'',\n                    parse_captured_command_annotations tmp_env a)\n\n      | PCmatch (e, ls) ->\n        let e', is_ghost = match translate_expression env.variable_env tmp_env e with\n          | `RExpr { aRexprDesc = AEtemp (n, i); aRexprType = t } ->\n            { aMatchableDesc = AMtemp (n, i); aMatchableType = t }, false\n          | `RExpr e' ->\n            (*XXX*)\n            (* We could do two things here: either relax the syntax of a_matchable to allow\n               general r-expressions, or make up a new temporary variable, and elaborate\n               the match into a let-expression binding the tempvar, followed by a match on the tempvar. *)\n            report_error (\"Pattern matching on arbitrary expression not implemented yet\") cmd.p_command_loc; \n            { aMatchableDesc = AMtemp (-1, \"*DUMMY*\");\n              aMatchableType = e'.aRexprType }, false\n          | `LExpr e' ->\n            { aMatchableDesc = AMlexpr e'; aMatchableType = e'.aLexprType },\n            e'.aLexprIsGhost\n          | `BigExpr e' ->\n            report_error (\"Data constructor not allowed for pattern matching\") cmd.p_command_loc;\n            { aMatchableDesc = AMtemp (-1, \"*DUMMY*\");\n              aMatchableType = e'.aBigExprType }, false in\n        let cvs, cs, next_id' = List.fold_right (fun cl (cvs, cs, next_id) ->\n          match translate_clause mk env expect_bool next_id tmp_env e' cl with\n          | None -> cvs, cs, next_id\n          | Some ((con, v, c), next_id') ->\n            if con = None && cvs <> [] then\n              report_error (\"Only the last clause of a match can be a wildcard\") cmd.p_command_loc; \n            (con, v) :: cvs, c :: cs, next_id'\n          ) ls ([], [], next_id) in\n        let ls', t = match unify_commands cs with\n          | Some (cs', t) -> List.map2 (fun (con, v) c -> con, v, c) cvs cs', t\n          | None -> match cs with\n            | [] -> report_error (\"Pattern matching with no clauses\") cmd.p_command_loc;\n                    [], tvoid_unit\n            | c :: _ ->\n              report_error (\"Pattern matching clauses have to return the same type\") cmd.p_command_loc; \n              List.map2 (fun (con, v) c -> con, v, c) cvs cs, c.aCmdType in\n        let eff = List.fold_left (fun eff (_, _, c) ->\n                    side_effect_join eff c.aCmdEffect\n                  ) side_effect_pure ls'\n        in return next_id' t { eff with dependsOnAbstraction = is_ghost } @@\n             ACmatch (e', ls')\n\n      | PCstore (el, er) ->\n        let el' = translate_lexpr env.variable_env tmp_env el in\n        let eff = side_effect_store el'.aLexprIsGhost in\n        begin match translate_expression env.variable_env tmp_env er with\n        | `RExpr er' ->\n          let er'' = match rexpr_respects_type er' el'.aLexprType with\n            | None ->\n              report_error (\"RHS of an assignment has type \" ^\n                string_of_a_type false er'.aRexprType ^ \" but LHS requires \" ^\n                string_of_a_type false el'.aLexprType) cmd.p_command_loc;\n              er'\n            | Some er'' -> er''\n          in return next_id tvoid_unit eff @@ ACstore (el', er'')\n        | `LExpr _ -> report_error (\"RHS of an assignment cannot be an L-value\") cmd.p_command_loc;\n                      return next_id tvoid_unit eff @@ ACstore (el', dummy_rexpr)\n        | `BigExpr er' ->\n          let er'' = match big_expr_respects_type er' el'.aLexprType with\n            | None ->\n              report_error (\"RHS of a construction assignment has type \" ^\n                string_of_a_type false er'.aBigExprType ^ \" but LHS requires \" ^\n                string_of_a_type false el'.aLexprType) cmd.p_command_loc;\n              er'\n            | Some er'' -> begin match er''.aBigExprDesc with\n              | AEstruct (_, ls) | AEconstr (_, ls) ->\n                List.iter (fun (i, e) -> match e.aBigExprDesc with\n                  | AErexpr _ | AEconstr ({ aTypeConstrName = \"array_init\" }, _)\n                  | AEexternal_const _ -> ()\n                  | _ ->\n                    (* NOTE: Coqgen relies on this restriction *)\n                    (report_error (\"Nested data type construction on field \" ^\n                      i ^ \" not supported yet\")  cmd.p_command_loc)\n                ) ls\n              | _ -> ()\n              end;\n              er''\n          in return next_id tvoid_unit eff @@ ACconstr (el', er'')\n        end\n\n      | PCemit ({p_expression_desc = PEapp ({p_expression_desc = (PEglob f); p_expression_loc = _ } :: (args :: rest)); p_expression_loc = _}) -> begin\n        if rest <> [] then\n          report_warning (\"More than one (currying) argument for event \" ^\n            f ^\": ignored\") cmd.p_command_loc;\n\n         match Hashtbl.find_opt event_environment f with\n         | None -> report_error (\"Unknown event name \"^ f ^ \".\") cmd.p_command_loc;\n            return next_id tvoid_unit side_effect_pure @@ ACskip\n         | Some et ->\n            return next_id tvoid_unit side_effect_pure @@\n              ACemit (et, unfold_event_arg env.variable_env tmp_env args et.aEventArgs)\n        end\n\n      | PCemit _ ->\n         report_error (\"The argument of an emit-statement must be an explicit application of the form `EventName(arg1, ... argn)`.\") cmd.p_command_loc;\n            return next_id tvoid_unit side_effect_pure @@ ACskip\n\n\n      | PCfail -> return next_id tvoid_unit side_effect_pure ACfail\n      | PCassert c -> translate_assertion mk env next_id tmp_env true c\n      | PCdeny c -> translate_assertion mk env next_id tmp_env false c\n\n      | PCghost c ->\n        let c', next_id' = translate_command mk env false next_id tmp_env c in\n        let c'' = match command_respects_type c' tvoid_unit with\n          (* The runtime in the backend relies on these being void, but we could\n             make the typechecker insert extra code to return a unit value here.*)\n          | None -> report_error (\"Ghost commands must not return values\") cmd.p_command_loc;\n                    c'\n          | Some c'' -> c''\n        in return next_id' tvoid_unit side_effect_pure @@ ACghost c''\n\n      | PCfirst (i, e1, e2, c1, c2o, c3o, a) ->\n        let e1' = translate_rexpr_typed env.variable_env tmp_env e1 tint_Z32\n                    \"Starting value of a first loop\" in\n        let e2' = translate_rexpr_typed env.variable_env tmp_env e2 tint_Z32\n                    \"Ending value of a first loop\" in\n        let n_iter, n_end, n_c = next_id, next_id + 1, next_id + 2 in\n        let new_tmp_env = (i, (n_iter, tint_Z32)) :: (\"_e_\" ^ string_of_int n_end, (n_end, tint_Z32)) :: tmp_env in\n        let c1', id1 = translate_command mk env true (n_c + 1) new_tmp_env c1 in\n        let c1'' = match command_respects_type c1' tint_bool with\n          | None -> report_error (\"First loop body must return a boolean\") cmd.p_command_loc;\n                    c1'\n          | Some c1'' -> c1'' in\n        let _ = if c1''.aCmdEffect.affectsAbstraction ||\n                   c1''.aCmdEffect.affectsImplementation ||\n                   c1''.aCmdEffect.invokesLogical then\n                  (report_error (\"First loop body cannot have side-effects\") cmd.p_command_loc) in\n        let c2', id2 = match c2o with\n          | Some c2 -> translate_command mk env expect_bool id1 new_tmp_env c2\n          | None -> { aCmdDesc = ACyield { aRexprDesc = AEtemp (n_iter, i);\n                                           aRexprType = tint_Z32 };\n                      aCmdType = tint_Z32;\n                      aCmdEnv = new_tmp_env;\n                      aCmdEffect = side_effect_pure },\n                    id1 in\n        let c3', id3 = match c3o with\n          | Some c3 -> translate_command mk env expect_bool id2 new_tmp_env c3\n          | None ->\n            if c2'.aCmdType = tint_Z32 then\n              { aCmdDesc = ACyield { aRexprDesc = AEtemp (n_iter, i);\n                                     aRexprType = tint_Z32 };\n                aCmdType = tint_Z32;\n                aCmdEnv = new_tmp_env;\n                aCmdEffect = side_effect_pure },\n              id2\n            else begin\n              if c2'.aCmdType <> tvoid_unit then\n                report_error (\"First loop's found branch must either return \" ^\n                  \"an integer or not return anything when there is no else branch\") cmd.p_command_loc;\n              { aCmdDesc = ACskip; aCmdType = c2'.aCmdType;\n                aCmdEnv = tmp_env; aCmdEffect = side_effect_pure },\n              id2\n            end in\n        let c2'', c3'', t = match unify_commands [c2'; c3'] with\n          | Some ([c2''; c3''], t) -> c2'', c3'', t\n          | _ ->\n            report_error (\"Two branches of a first loop have to have the same\" ^\n              \" type but the found branch has type \" ^\n              string_of_a_type false c2'.aCmdType ^ \" and the else branch has \" ^\n              string_of_a_type false c3'.aCmdType) cmd.p_command_loc;\n            c2', c3', c2'.aCmdType\n        in return id3 t\n             (side_effect_join c1''.aCmdEffect\n               (side_effect_join c2''.aCmdEffect c3''.aCmdEffect)) @@\n             ACfirst (n_iter, i, e1', n_end, e2', n_c, c1'', c2'', c3'',\n                      parse_captured_command_annotations tmp_env a)\n\n      | PCfold (i_iter, e1, e2, i_acc, e3, c, a) ->\n        let e1' = translate_rexpr_typed env.variable_env tmp_env e1 tint_Z32\n                    \"Starting value of a fold\" in\n        let e2' = translate_rexpr_typed env.variable_env tmp_env e2 tint_Z32\n                    \"Ending value of a fold\" in\n        let e3' = translate_rexpr env.variable_env tmp_env e3 in\n        let n_iter, n_end, n_acc, n_c = next_id, next_id + 1, next_id + 2, next_id + 3 in\n        let t = e3'.aRexprType in\n        let new_tmp_env =\n          (i_acc, (n_acc, t)) :: (i_iter, (n_iter, tint_Z32)) ::\n            (\"_e_\" ^ string_of_int n_end, (n_end, tint_Z32)) :: tmp_env in\n        let c', next_id' = translate_command mk env expect_bool (n_c + 1) new_tmp_env c in\n        let c'' = match command_respects_type c' t with\n          | None ->\n            report_error (\"Body of a fold must have the same type as the \" ^\n              \" initial value: \" ^ string_of_a_type false t) cmd.p_command_loc;\n            c'\n          | Some c'' -> c''\n        in if c''.aCmdEffect.affectsAbstraction ||\n              c''.aCmdEffect.affectsImplementation ||\n              c''.aCmdEffect.invokesLogical then\n             report_error (\"Body of a fold cannot have side-effects\") cmd.p_command_loc;\n           return next_id' t c''.aCmdEffect @@\n             ACfold (n_iter, i_iter, e1', n_end, e2', n_acc, i_acc, e3', n_c, c'',\n                     parse_captured_command_annotations tmp_env a)\n      | PCtransfer l ->\n        if List.length l <> 2 then report_error (\"transfer takes exactly 2 argumemts\") cmd.p_command_loc;\n        let to_addr = translate_rexpr env.variable_env tmp_env (List.nth l 0) in\n        let value = translate_rexpr env.variable_env tmp_env (List.nth l 1) in\n        return next_id tvoid_unit side_effect_pure (ACtransfer (to_addr, value))\n\n  and translate_assertion mk env next_id tmp_env is_assert c =\n    let c', next_id' = translate_command mk env true (next_id + 1) tmp_env c in\n    let _ = if c'.aCmdEffect.affectsAbstraction ||\n               c'.aCmdEffect.affectsImplementation ||\n               c'.aCmdEffect.invokesLogical then\n                report_error (\"Assertions cannot have side-effects\") c.p_command_loc in\n    let c'' = match command_respects_type c' tint_bool with\n      | None -> report_error ((if is_assert then \"Assertion\" else \"Denial\") ^\n                              \" has to be of boolean type\") c.p_command_loc;\n                c'\n      | Some c'' -> c'' in\n    let rev, c_assertion = command_remove_negation c'' in\n    let assert_possitive = is_assert <> rev (* is_assert xor rev *)\n    in { aCmdDesc = if assert_possitive then ACassert c_assertion\n                                        else ACdeny c_assertion;\n         aCmdType = tvoid_unit;\n         aCmdEnv = tmp_env;\n         aCmdEffect = side_effect_pure },\n       next_id'\n\n  and translate_clause mk env expect_bool next_id tmp_env e (cid, vs, c) =\n    if cid = \"_\" then\n      let c', next_id' = translate_command mk env expect_bool next_id tmp_env c\n      in Some ((None, [], c'), next_id')\n    else if cid = \"CONS\" then begin  (* special cased because we want lists to be a little bit polymorphic. *)\n      match e.aMatchableType.aTypeDesc with\n      | ATlist t -> begin\n          match vs with\n                | [v1;v0] ->\n                     let variable_env' = Hashtbl.copy env.variable_env in\n                     let env' = { env with variable_env = variable_env' } in\n                     let v_env = (v1, (next_id+1,e.aMatchableType))::(v0, (next_id, t))::[] in\n                     let tmp_env'= (v1, (next_id+1,e.aMatchableType))::(v0, (next_id,t))::tmp_env in\n                     let next_id' = next_id+2 in\n                     let con = {aTypeConstrName = \"CONS\"; aTypeConstrArgs = [(v0, t); (v1, e.aMatchableType)]; aTypeConstrImpl = None} in\n                     let c', next_id'' = translate_command mk env' expect_bool next_id' tmp_env' c in\n                        Some ((Some con, v_env, c'), next_id'')\n                | _ -> report_error (\"incorrect number of arguments for CONS constructor\") c.p_command_loc; None\n                end\n      | _ -> begin\n             report_error (\"The matched expression is of type \" ^ string_of_a_type false e.aMatchableType\n                           ^ \" but pattern requires a list type \") c.p_command_loc;\n             None end\n      end\n    else if cid = \"NIL\" then begin  (* special cased because we want lists to be a little bit polymorphic. *)\n      match e.aMatchableType.aTypeDesc with\n      | ATlist t -> begin\n                    match vs with\n                    | [] ->\n                         let variable_env' = Hashtbl.copy env.variable_env in\n                         let env' = { env with variable_env = variable_env' } in\n                         let v_env = [] in\n                         let con = {aTypeConstrName = \"NIL\"; aTypeConstrArgs = []; aTypeConstrImpl = None} in\n                         let c', next_id'' = translate_command mk env' expect_bool next_id tmp_env c in\n                          Some ((Some con, v_env, c'), next_id'')\n                  | _ -> report_error (\"incorrect number of arguments for NIL constructor.\") c.p_command_loc; None\n                  end\n      | _ -> begin\n             report_error (\"The matched expression is of type \" ^ string_of_a_type false e.aMatchableType\n                           ^ \" but pattern requires a list type \") c.p_command_loc;\n             None end\n      end\n    else match catch_not_found (Hashtbl.find type_constr_environment) cid with\n    | None ->\n      report_error (\"Constructor \" ^ cid ^ \" not defined (constructor for type \" ^\n        string_of_a_type false e.aMatchableType ^ \" required)\") c.p_command_loc;\n      None\n    | Some (t', con) -> if t' <> e.aMatchableType\n      then begin\n        report_error (\"Constructor \" ^ cid ^ \" is for type \" ^\n          string_of_a_type false t' ^ \" but pattern requires type \" ^\n          string_of_a_type false e.aMatchableType) c.p_command_loc;\n        None end\n      else try\n        let variable_env' = Hashtbl.copy env.variable_env in\n        let env' = { env with variable_env = variable_env' } in\n        let next_id', v_env, tmp_env' =\n          List.fold_left2 (fun (next_id, v_env, tmp_env) i (_, t) ->\n            if i = \"_\" then\n              next_id, (\"_\", (-1, t)) ::v_env, tmp_env (* Note that the this returns a \"junk\" environment, use discerningly. *)\n            else next_id + 1, (i, (next_id, t)) :: v_env,\n                              (i, (next_id, t)) :: tmp_env\n          ) (next_id, [], tmp_env) vs con.aTypeConstrArgs in\n        let c', next_id'' = translate_command mk env' expect_bool next_id' tmp_env' c in\n        let _ = match con.aTypeConstrImpl with\n          | Some { aImplDesc = ACdefault } ->\n            if c'.aCmdDesc <> ACfail then\n              report_error (\"Pattern matching branch for default constructor can only be ``fail''\") c.p_command_loc;\n          | _ -> ()\n        in Some ((Some con, v_env, c'), next_id'')\n      with Invalid_argument _ (* \"List.fold_left2\" *) ->\n        report_error (\"Constructor \" ^ cid ^ \" has \" ^\n          string_of_int (List.length con.aTypeConstrArgs) ^ \" arguments, but \" ^\n          string_of_int (List.length vs) ^ \" given\")  c.p_command_loc;\n        None\n  in\n\n  let rec fields_helper objfields = match objfields with\n    | [] -> {aCmdDesc = ACskip; aCmdType = builtin_type_a_type Tunit; aCmdEnv = []; aCmdEffect = side_effect_pure}\n    | hd :: tl -> { aCmdDesc = ACsequence(hd, (fields_helper tl)); aCmdType = hd.aCmdType; aCmdEnv = hd.aCmdEnv; aCmdEffect = hd.aCmdEffect}\n    in\n\n  let generate_default_constructor objfields =\n    let method_cmd = {\n                      aCmdDesc = ACskip;\n                      aCmdType = tvoid_unit;\n                      aCmdEnv = [];\n                      aCmdEffect = side_effect_pure\n                    } in\n    let fields = fields_helper objfields in \n    let method_body = { aCmdDesc = ACsequence(fields, method_cmd); aCmdType =  builtin_type_a_type Tunit; aCmdEnv = []; aCmdEffect = side_effect_pure} in\n            [{ aMethodName = \"constructor\";\n              aMethodType = { aMethodArgumentTypes = [];\n                              aMethodReturnType = tvoid_unit;\n                              aMethodKind = MKconstructor };\n              aMethodArguments = [];\n              aMethodSemantics = ASdefault;\n              aMethodBody = method_body;\n              aMethodParamEnv = []\n            }] in\n\n  let translate_method_body env name semantics body params kind ret_opt logical_object meloc objfields =\n    let next_id, param_tmp_env = \n      if kind == MKconstructor then\n            constructor_temp_identifier_start, \n            List.fold_left (fun (env : tmp_env_t) (a, t) ->\n                (incr constructor_current_id_num);\n                if a<>\"_\" && a<>\"()\" then (a, (constructor_current_id_num.contents, t)) :: env else env) \n              (empty_tmp_env ()) params\n        else\n            List.fold_left (fun (next_id, env) (a, t) ->\n              next_id + 1, if a<>\"_\" && a<>\"()\" then (a, (next_id, t)) :: env else env)\n            (function_start_id_num + 1, empty_tmp_env ()) params in\n    let c, _ = \n              if kind == MKconstructor \n                then let method_cmd, temp_id = translate_command MKconstructor env false next_id param_tmp_env body in\n                    let fields = fields_helper objfields in \n                    { aCmdDesc = ACsequence(fields, method_cmd); aCmdType =  builtin_type_a_type Tunit; aCmdEnv = []; aCmdEffect = side_effect_pure}, temp_id\n                else translate_command kind env false next_id param_tmp_env body in\n    let c' = match ret_opt with\n      | None -> c\n      | Some t -> match command_respects_type c t with\n      | None ->\n        report_error (\"Body of method \" ^ name ^ \" has type \" ^\n          string_of_a_type false c.aCmdType ^ \" but \" ^\n          string_of_a_type false t ^ \" required\") meloc;\n        c\n      | Some c' -> c' in\n    if c'.aCmdEffect.invokesLogical && not logical_object && kind <> MKlogical then\n      report_error (\"Method \" ^ name ^\n        \" is not declared logical but calls logical primitives\") meloc;\n    if c'.aCmdEffect.dependsOnAbstraction && not logical_object && (kind = MKconst || kind = MKnormal) then\n      report_error (\"Method \" ^ name ^\n        \" is not declared a ghost but reads ghost fields or return values from ghost primitive\") meloc;\n    if c'.aCmdEffect.affectsImplementation && not logical_object && kind <> MKnormal && kind <> MKlogical && kind <> MKconstructor && kind <> MKrefined then\n      report_error (\"Method \" ^ name ^ \" is declared to be \" ^\n        string_of_method_kind kind ^ \"but modifies the program state\") meloc;\n    if c'.aCmdEffect.affectsAbstraction && (kind = MKconst || kind = MKconstghost) then\n      report_error (\"Method \" ^ name ^ \" is declared to be \" ^\n        string_of_method_kind kind ^ \"but modifies the abstract state\") meloc;\n    let param_names, param_types = List.split params in\n    { aMethodName = name;\n      aMethodType = { aMethodArgumentTypes = param_types;\n                      aMethodReturnType = c'.aCmdType;\n                      aMethodKind = kind };\n      aMethodArguments = param_names;\n      aMethodSemantics = semantics;\n      aMethodBody = c';\n      aMethodParamEnv = param_tmp_env\n    } in\n\n  let translate_method objname var_env base func_env proc_env name m mt logical_object mloc objfields =\n    let sem = try\n      match List.find (function PAclause (\"semantics\", _) -> true\n                              | _ -> false) m.pMethodAnnotations with\n      | PAclause (_, [PAclause (\"setCR3\", _)]) -> ASsetCR3\n      | PAclause (_, [PAclause (\"assembly\", _)]) -> ASassembly\n      | PAclause (_, [PAclause (\"assembly'\", _)]) -> ASassembly'\n      | PAclause (_, [PAclause (\"trap_info_get\", _)]) -> AStrap_info_get\n      | PAclause (_, [PAclause (\"trap_info_ret\", _)]) -> AStrap_info_ret\n      | PAclause (_, []) ->\n        report_warning (\"Incomplete semantics directive given; \" ^\n          \"using default wrapper\") mloc;\n        raise Not_found\n      | PAclause (_, [PAclause (name, _)]) ->\n        report_warning (\"Unknown semantic wrapper: \" ^ name ^\n          \"; using default wrapper instead\") mloc;\n        raise Not_found\n      | _ -> assert false\n      with Not_found -> ASdefault in\n\n    let _ = match m.pMethodReturnType with\n      | Some ret' when translate_type ret' <> mt.aMethodReturnType ->\n        report_error (\"Method \" ^ name ^ \" is annotated with a type \" ^\n                        \"incompatible to the record; annotation ignored\") mloc\n      | _ -> () in\n    let params = try List.map2 (fun (a, t_opt) t -> begin match t_opt with\n      | Some t' when translate_type t' <> t ->\n        report_error (\"Argument \" ^ a ^ \" of method \" ^ name ^\n          \" is annotated as \" ^ string_of_a_type false (translate_type t') ^\n          \" but is \" ^ string_of_a_type false t ^\n          \" in the record; annotation ignored\") mloc\n      | _ -> ()\n      end;\n      a, t\n      ) m.pMethodArguments mt.aMethodArgumentTypes\n      with Invalid_argument _ (* \"List.map2\" *) ->\n        report_error (\"Method \" ^ name ^ \" expects \" ^\n          string_of_int (List.length mt.aMethodArgumentTypes) ^\n          \" arguments in the record type but \" ^\n          string_of_int (List.length m.pMethodArguments) ^ \" assumed\") mloc;\n        [] in\n    let res = translate_method_body\n         (mk_cmd_static_env var_env base func_env proc_env)\n         name sem m.pMethodBody\n         params mt.aMethodKind (Some mt.aMethodReturnType) logical_object m.pMethodLoc objfields\n\n    (* TODO: type check for other semantic wrappers *)\n    (* (We check for cases where the proof obligations would not be satisfiable,\n        e.g. if the user tries to use a \"raw type\" (one which has a non-trivial injection)\n        as a method return type. But the check is not complete, e.g. if you try to\n        annotate a method with set_cr3, then the type of the method must be (globalpointer -> unit)\n        or the generated Coq layer file will not typecheck. *)\n    in if sem = ASdefault && method_kind_realizing mt.aMethodKind &&\n            (a_type_contains_raw_type res.aMethodType.aMethodReturnType ||\n             List.exists a_type_contains_raw_type\n                         res.aMethodType.aMethodArgumentTypes) then\n         report_error (\"Method \" ^ name ^ \" in object \" ^ objname ^\n           \" has a signature containing raw types: \" ^\n           \"requires non-default semantic wrapper\") mloc;\n       res in\n  (*\n  let translate_procedure var_env interface func_env proc_env name m =\n    let params = List.map (fun (i, t_opt) -> match t_opt with\n      | None when i = \"_\" -> i, tvoid_unit\n      | None (* when i <> \"_\" *) ->\n        report_error (name ^ \" is a procedure or function whose argument \" ^\n                      i ^ \" must be annotated with types\");\n        i, dummy_type (name ^ \"_\" ^ i)\n      | Some t -> i, translate_type t\n      ) m.pMethodArguments in\n    let ret = match m.pMethodReturnType with\n      | None -> None\n      | Some t -> Some (translate_type t)\n    in translate_method_body\n         (mk_cmd_static_env var_env interface func_env proc_env)\n         name ASdefault m.pMethodBody params ret in\n  let translate_function func_env name m =\n    let m' = translate_procedure (empty_var_env ()) [] func_env [] name m\n    in if not (command_is_pure m'.aMethodBody) then\n         report_error (\"Function \" ^ name ^ \" has non-pure body\");\n       m' in\n  *)\n\n  (*\n  let object_next_serial = ref 0 in\n  let get_object_serial _ =\n    let n = !object_next_serial in object_next_serial := n + 1; n in\n  *)\n\n  let translate_object_constr i c =\n    let fields = List.map (translate_object_field i (c.pObjKind <> POnormal))\n                          c.pObjFields in\n    let fields_to_constructorMethod =\n      if c.pObjKind = POnormal then\n        List.map (translate_object_field_to_Constructor i (c.pObjKind <> POnormal))\n          c.pObjFields\n      else\n        []  (* Don't need constructor code for logical object fields *)\n    in\n    let var_env = empty_var_env () in\n    let _ = List.iter (fun f -> Hashtbl.add var_env f.aObjectFieldName\n        { aLexprDesc = AEglob f.aObjectFieldName;\n          aLexprType = f.aObjectFieldType;\n          aLexprIsGhost = f.aObjectFieldIsLogical }\n      ) fields in\n\n    let base = translate_layer_signature (i ^ \"_base\") c.pObjType.pObjectBase in\n    let signature = translate_signature (i ^ \"_signature\") c.pObjType.pObjectSignature in\n\n    (*\n    let method_def_type_translate =\n      if c.pObjKind = POnormal then\n        fun mt -> mt\n      else\n        fun mt -> if method_kind_realizing mt.aMethodKind\n          then { mt with aMethodKind = MKlogical }\n          else mt in\n    *)\n\n    let methods, procedures, functions =\n      List.fold_left (fun (m_res, p_res, f_res) (name, m) ->\n        (*\n        if List.mem (PAclause (\"function\", [])) m.pMethodAnnotations then\n          m_res, p_res, (translate_function f_res name m) :: f_res\n        else if List.mem (PAclause (\"procedure\", [])) m.pMethodAnnotations then\n          m_res,\n          (translate_procedure var_env base.aLayerSignatureSlots f_res p_res\n                               name m) :: p_res,\n          f_res\n        else *) match catch_not_found (List.find (fun (i, _) -> i = name))\n                     signature.aSignatureMethods with\n          | None -> report_warning (\"Unknown method \" ^ name ^ \" for record type \" ^\n                      signature.aSignatureName ^ \" in object \" ^ i ^ \" ignored\") c.pObjLoc;\n                    m_res, p_res, f_res\n          | Some (_, mt) ->\n            (translate_method i var_env base.aLayerSignatureSlots f_res p_res\n                    name m mt (c.pObjKind <> POnormal) c.pObjLoc fields_to_constructorMethod) :: m_res,\n            p_res, f_res\n      ) ([], [], []) c.pObjMethods in\n\n    let methods = if (List.exists (fun (m) -> m.aMethodType.aMethodKind == MKconstructor) methods) then \n                      methods\n                  else \n                      methods @ (generate_default_constructor fields_to_constructorMethod)\n                    in\n    if (List.length (List.find_all (fun m -> m.aMethodType.aMethodKind == MKconstructor) methods)) > 1 then\n        report_error (\"Only one constructor in a layer is allowed\") c.pObjLoc;\n\n    let method_sig_type_translate =\n      if c.pObjKind <> POlogical then\n        fun mt -> mt\n      else\n        fun mt -> match mt.aMethodKind with\n          | MKconst -> { mt with aMethodKind = MKconstghost }\n          | MKnormal -> { mt with aMethodKind = MKlogical }\n          | _ -> mt in\n    let method_types = List.map (fun (name, mt) ->\n              if List.for_all (fun m -> m.aMethodName <> name) methods then\n                report_error (\"Method \" ^ name ^ \" for record type \" ^\n                  signature.aSignatureName ^ \" undefined in object \" ^ i) c.pObjLoc;\n              (name, method_sig_type_translate mt)\n            ) signature.aSignatureMethods in\n    let signature' = { signature with aSignatureMethods = method_types } in\n    let t = { aObjectBase = base; aObjectSignature = signature' } in\n    { aObjectName = i;\n      aObjectAddress = None;\n      (*aObjectSerial = get_object_serial ();*)\n      aObjectCoreType = t;\n      aObjectType = t;\n      aObjectRequireImpl = c.pObjKind = POnormal;\n      aObjectIsTrusted = c.pObjKind = POtrusted;\n      aObjectFields = fields;\n      aObjectMethods = List.rev methods;\n      aObjectProcedures = List.rev procedures;\n      aObjectFunctions = List.rev functions } in\n\n  let rec translate_object i obj = match obj.p_object_desc with\n      | POconstr c -> translate_object_constr i c\n      | POrelax (o0, layer_sig) ->\n        let o0' = translate_object (i ^ \"_src\") o0 in\n        let layer_sig' = translate_layer_signature (i ^ \"_relax\") layer_sig in\n        check (layer_signature_subseteq o0'.aObjectType.aObjectBase layer_sig')\n              (\"In definition of object \" ^ i ^ \" attempt to relax \" ^\n                string_of_a_layer_signature o0'.aObjectType.aObjectBase ^ \" to \" ^\n                  string_of_a_layer_signature layer_sig' ^ \", which is not a superset\") obj.p_object_loc;\n        { o0' with aObjectType = { o0'.aObjectType with aObjectBase = layer_sig' } }\n      | POclone i' -> \n        (try \n          (* find the original object *)\n          let origo = Hashtbl.find object_environment i' in\n          (* (if origo.aObjectAddress = None then\n            report_error (\"Object \" ^ i' ^ \" cloned with no address attached\") obj.p_object_loc\n          else ()); *)\n          (* create aliased new object *)\n          let i'' = fresh i' in\n          let no = { origo with aObjectName = i'' } in \n          (* FIXME: we should force every cloned object to have an address instantiation *)\n          (* store new object in hashtable *)\n          Hashtbl.add object_environment i'' no;\n          (* return new object *)\n          try Hashtbl.find object_environment i''\n          with Not_found ->\n            report_error (\"Object \" ^ i'' ^ \" not defined\") obj.p_object_loc;\n            dummy_object i\n        with Not_found ->\n          report_error (\"Object \" ^ i' ^ \" not defined\") obj.p_object_loc;\n          dummy_object i )\n      | POname i' ->\n        try Hashtbl.find object_environment i'\n        with Not_found ->\n          report_error (\"Object \" ^ i' ^ \" not defined\") obj.p_object_loc;\n          dummy_object i in\n\n  let translate_object_definition i o =\n    let o' = translate_object i o.pObjectDesc in\n    begin match o.pObjectType with\n    | Some t ->\n      let t' = translate_object_type i t in\n      if not (object_type_equal t' o'.aObjectType) then\n        report_error (\"Object \" ^ i ^ \" annotated with type \" ^\n          string_of_a_object_type t' ^ \" but is bound to that of \" ^\n          \"type \" ^ string_of_a_object_type o'.aObjectType) o.pObjectLoc\n    | None -> ()\n    end;\n    o' in\n\n  (*\n  let layer_next_serial = ref 0 in\n  let get_layer_serial _ =\n    let n = !layer_next_serial in layer_next_serial := n + 1; n in\n  *)\n  let translate_proposition pprop = match pprop.p_proposition_desc with\n    | PPexternal s -> s\n    | PPident i ->\n      match catch_not_found (Hashtbl.find external_prop_environment) i with\n      | None ->\n        report_error (\"Unrecognized proposition name: \" ^ i) pprop.p_proposition_loc;\n        \"***UNRECOGNIZED PROP***\"\n      | Some s -> s in\n\n  (* Layers are handled in two steps.\n     First we typecheck the definitions, creating an a_checked_layer,\n     translate_layer_constr and translate_layer_definition. *)\n\n  let translate_layer_constr i l de_loc = match l with \n    | [] -> report_error (\"Layer \" ^ i ^ \" has no members\") de_loc;\n      let dummy_type = dummy_layer_type i in\n      { aCheckedLayerName = i;\n        (*aCheckedLayerSerial = -1;*)\n        (*aCheckedLayerCoreType = dummy_type;*)\n        aCheckedLayerType = dummy_type;\n        aCheckedLayerAccessor = AAnone;\n        aCheckedLayerInvariant = None;\n        aCheckedLayerPassthroughs = dummy_layer_signature i;\n        aCheckedLayerTipObjectSet = IdentSet.empty;\n        aCheckedLayerKeelObjectSet = IdentSet.empty;\n        aCheckedLayerDesc = ALconstr []\n      }\n    | (s0, o0) :: lst ->\n      let dsgo0 = match o0.p_object_inst_desc with \n        | POinternal o0_in -> o0_in\n        | POexternal (_, o0_ext) -> o0_ext\n      in\n      let o0' = translate_object (i ^ \"_\" ^ s0) dsgo0 in\n      (* need to update o0' information with the new address *)\n      let o0_addr = match o0.p_object_inst_desc with \n        | POinternal o0_in -> \n          (* report_warning (\"Object \" ^ o0'.aObjectName ^ \" is internal. \") de_loc; *)\n          None\n        | POexternal ((CONaddress addr), o0_ext) -> \n          (* report_warning (\"Object \" ^ o0'.aObjectName ^ \" is external. \") de_loc; *)\n          Some addr\n        | _ -> \n          (* report_error (\"Object \" ^ o0'.aObjectName ^ \" have bad address linking \") de_loc; *)\n          None\n      in\n      (if Hashtbl.mem object_environment o0'.aObjectName then () else \n      report_error (\"Object \" ^ o0'.aObjectName ^ \" does not exist. \") de_loc;\n      ());\n      let o0' = { o0' with aObjectAddress = o0_addr } in \n      Hashtbl.replace object_environment o0'.aObjectName o0';\n      \n      (* (try \n          let dummy = Hashtbl.find object_environment o0'.aObjectName in\n          (* store new object in hashtable *)\n          \n          ()\n        with Not_found ->\n          report_error (\"Object \" ^ i ^ \" linked with an address but is uninstantiated. \") de_loc;\n          ()); *)\n      \n      let base = o0'.aObjectType.aObjectBase in\n      let lst' = (s0, o0') :: List.map (fun (s, o) ->\n        let dsgo' = match o.p_object_inst_desc with \n          | POinternal o_in -> o_in\n          | POexternal (_, o_ext) -> o_ext\n        in\n        let o' = translate_object (i ^ \"_\" ^ s) dsgo' in\n        let o_addr = match o.p_object_inst_desc with \n          | POinternal o_in -> \n            (* report_warning (\"Object \" ^ o'.aObjectName ^ \" is internal. \") de_loc; *)\n            None\n          | POexternal ((CONaddress addr), o0_ext) -> \n            (* report_warning (\"Object \" ^ o'.aObjectName ^ \" is external. \") de_loc; *)\n            Some addr\n          | _ -> \n            report_error (\"Object \" ^ o0'.aObjectName ^ \" have bad address linking \") de_loc;\n            None\n        in\n\n        let o' = { o' with aObjectAddress = o_addr } in\n        Hashtbl.replace object_environment o'.aObjectName  o';\n        (* let oid_opt = match dsgo'.p_object_desc with\n          | POname i' -> Some i'\n          (* | POclone i' -> Some i' *)\n          | _ -> None in\n        (match oid_opt with\n        | Some i -> \n          (try \n            let dummy = Hashtbl.find object_environment i in\n            (* store new object in hashtable *)\n            \n            ()\n          with Not_found ->\n            report_error (\"Object \" ^ i ^ \" linked with an address but is uninstantiated. \") de_loc;\n            ())\n        | None -> ()); *)\n\n        if not (object_type_equal base o'.aObjectType.aObjectBase) then\n          report_error (\"In layer \" ^ i ^ \", slot \" ^ s ^ \" (object \" ^\n            o'.aObjectName ^ \") has different base type to slot \" ^ s0 ^\n            \"(object \" ^ o'.aObjectName ^ \"); \" ^\n            string_of_a_layer_signature o'.aObjectType.aObjectBase ^ \" vs \" ^\n            string_of_a_layer_signature base) dsgo0.p_object_loc;\n        s, o') lst in\n      let object_set = IdentSet.of_list (List.map\n             (fun (_, { aObjectName = name }) -> name) lst') in\n      let layer_type = {\n            aLayerBase = base;\n            aLayerSignature = {\n              aLayerSignatureName = i ^ \"_layer_sig\";\n              aLayerSignatureSlots =\n                List.map (fun (s, o) -> s, o.aObjectType.aObjectSignature) lst';\n              aLayerSignatureSuppressError = false\n            }\n          }\n      in { aCheckedLayerName = i;\n           (*aCheckedLayerSerial = get_layer_serial ();*)\n           (*aCheckedLayerCoreType = layer_type;*)\n           aCheckedLayerType = layer_type;\n           aCheckedLayerAccessor = AAnone;\n           aCheckedLayerInvariant = None;\n           aCheckedLayerPassthroughs = empty_layer_signature;\n           aCheckedLayerTipObjectSet = object_set;\n           aCheckedLayerKeelObjectSet = object_set;\n           aCheckedLayerDesc = ALconstr lst'\n         } in\n\n  let translate_layer_definition i l =\n    let default_loc = l.pLayerLoc in \n    let rec checklayer i layer = match layer.p_layer_desc with\n      | PLconstr l -> translate_layer_constr i l default_loc\n      | PLrelax (l0, t) ->\n        let l0' = checklayer (i (* ^ \"_src\" *)) l0 in\n        let t' = translate_layer_type (i ^ \"_relax\") t in\n        (* rename to match the typing rule on paper *)\n        let i1, i2 = l0'.aCheckedLayerType.aLayerBase,\n                     l0'.aCheckedLayerType.aLayerSignature in\n        let i1', i2' = t'.aLayerBase, t'.aLayerSignature in\n\n        let msg = \"Relaxing layer \" ^ i ^ \": \" in begin\n        check (layer_signature_subseteq i1 i1')\n              (msg ^ \"base layer signature not a subset.\") l0.p_layer_loc;\n        check (layer_signature_subseteq i2' (layer_signature_union i2 i1'))\n              (msg ^ \"exporting layer signature is bigger than provided.\") l0.p_layer_loc;\n        (* New layer refinement mechanism requires this\n        else if not (layer_signature_disjoint i2 (layer_signature_minus i1' i1)) then\n          report_error (msg ^ \"ambiguous source of exporting slot\");\n        *)\n        { l0' with\n          aCheckedLayerName = i;\n          aCheckedLayerType = t';\n          aCheckedLayerPassthroughs = layer_signature_minus i2' i2;\n          aCheckedLayerDesc = ALrelax l0' }\n        end\n      | PLinst (l1, l2) ->\n        let l1' = checklayer (i ^ \"_top\") l1 in\n        let l2' = checklayer (i ^ \"_bot\") l2 in\n        if not (layer_signature_equal l1'.aCheckedLayerType.aLayerBase\n                                 l2'.aCheckedLayerType.aLayerSignature) then\n          report_error (\"Instantiating layer \" ^ i ^ \" but signatures mismatch: \" ^\n            \"top layer \" ^ l1'.aCheckedLayerName ^ \" requires \" ^\n            string_of_a_layer_signature l1'.aCheckedLayerType.aLayerBase ^ \" but \" ^\n            \"bottom layer \" ^ l2'.aCheckedLayerName ^ \" provides \" ^\n            string_of_a_layer_signature l2'.aCheckedLayerType.aLayerSignature) none;\n        let tip_intersection =\n              IdentSet.inter l1'.aCheckedLayerTipObjectSet\n                             l2'.aCheckedLayerTipObjectSet in\n        let keel_intersection =\n              IdentSet.inter l1'.aCheckedLayerKeelObjectSet\n                             l2'.aCheckedLayerKeelObjectSet in\n        let layer_type =\n          { aLayerBase = l2'.aCheckedLayerType.aLayerBase;\n            aLayerSignature = l1'.aCheckedLayerType.aLayerSignature } in\n        if not (IdentSet.is_empty tip_intersection) then\n          report_error (\"Instantiating layer \" ^ i ^ \" with overlapping tip objects: \" ^\n            String.concat \", \" (IdentSet.elements tip_intersection)) layer.p_layer_loc;\n        if not (IdentSet.is_empty keel_intersection) then\n          report_error (\"Instantiating layer \" ^ i ^ \" with overlapping keel objects: \" ^\n            String.concat \", \" (IdentSet.elements keel_intersection)) layer.p_layer_loc;\n        { aCheckedLayerName = i;\n          (*aCheckedLayerSerial = get_layer_serial ();*)\n          (*aCheckedLayerCoreType = layer_type;*)\n          aCheckedLayerType = layer_type;\n          aCheckedLayerAccessor = l1'.aCheckedLayerAccessor;\n          aCheckedLayerInvariant = l1'.aCheckedLayerInvariant;\n          aCheckedLayerPassthroughs = empty_layer_signature;\n          (*aCheckedLayerObjects = l1'.aCheckedLayerObjects @ l2'.aCheckedLayerObjects;*)\n          aCheckedLayerTipObjectSet =\n            IdentSet.union l1'.aCheckedLayerTipObjectSet l2'.aCheckedLayerTipObjectSet;\n          aCheckedLayerKeelObjectSet =\n            IdentSet.union l1'.aCheckedLayerKeelObjectSet l2'.aCheckedLayerKeelObjectSet;\n          aCheckedLayerDesc = ALinst (l1', l2')\n        }\n      | PLrefine (l1, l2, p) ->\n        let l1' = checklayer (i ^ \"_logic\") l1 in\n        let l2' = checklayer (i ^ \"_impl\") l2 in\n        if not (layer_signature_equal l1'.aCheckedLayerType.aLayerBase\n                                      l2'.aCheckedLayerType.aLayerSignature) then\n          report_error (\"Layer refinement for \" ^ i ^ \" but signatures mismatch: \" ^\n            \"logical layer \" ^ l1'.aCheckedLayerName ^ \" requires \" ^\n            string_of_a_layer_signature l1'.aCheckedLayerType.aLayerBase ^ \" but \" ^\n            \"implementation layer \" ^ l2'.aCheckedLayerName ^ \" provides \" ^\n            string_of_a_layer_signature l2'.aCheckedLayerType.aLayerSignature) layer.p_layer_loc;\n        check (layer_signature_subseteq l1'.aCheckedLayerType.aLayerSignature\n                                         l1'.aCheckedLayerType.aLayerBase)\n              (\"Layer refinement for \" ^ i ^ \" failed: logical layer \" ^\n                 l1'.aCheckedLayerName ^ \" exports not a subset of what it requires \" ^\n                   \" (\" ^ string_of_a_layer_signature l1'.aCheckedLayerType.aLayerSignature ^ \" vs \" ^\n                     string_of_a_layer_signature l1'.aCheckedLayerType.aLayerBase ^ \")\") layer.p_layer_loc;\n        (*\n        if not (layer_type_equal l1'.aCheckedLayerType\n                                 l2'.aCheckedLayerType) then\n          report_error (\"Layer refinement for \" ^ i ^ \" failed: logical layer \" ^\n            l1'.aCheckedLayerName ^ \" does not have the same type as \" ^\n            l2'.aCheckedLayerName ^\n            \" (\" ^ string_of_a_layer_type l1'.aCheckedLayerType ^ \" vs \" ^\n            string_of_a_layer_type l2'.aCheckedLayerType ^ \")\");\n        *)\n        (* XXX: what are the typecheck criteria now? *)\n        (*\n        if l1'.aCheckedLayerType.aLayerBase.aLayerSignatureSlots <> [] then\n          report_error (\"Layer refinement for \" ^ i ^ \" failed: \" ^\n            \"currently only support grounded layer refinements\");\n        *)\n        { aCheckedLayerName = i;\n          (*aCheckedLayerSerial = get_layer_serial ();*)\n          (*aCheckedLayerCoreType = l1'.aCheckedLayerType;*)\n          aCheckedLayerType = l2'.aCheckedLayerType;\n          aCheckedLayerAccessor = l1'.aCheckedLayerAccessor;\n          aCheckedLayerInvariant = l1'.aCheckedLayerInvariant;\n          aCheckedLayerPassthroughs = empty_layer_signature;\n          (*aCheckedLayerObjects = l1'.aCheckedLayerObjects @ l2'.aCheckedLayerObjects;*)\n          aCheckedLayerTipObjectSet = l1'.aCheckedLayerTipObjectSet;\n          aCheckedLayerKeelObjectSet = l2'.aCheckedLayerKeelObjectSet;\n          aCheckedLayerDesc = ALrefine (l1', l2', translate_proposition p)\n        }\n      | PLname i' ->\n        try Hashtbl.find layer_environment i'\n        with Not_found ->\n          report_error (\"Layer \" ^ i' ^ \" not defined\") layer.p_layer_loc;\n          let dummy_type = dummy_layer_type i in\n          { aCheckedLayerName = i';\n            (*aCheckedLayerSerial = -1;*)\n            (*aCheckedLayerCoreType = dummy_type;*)\n            aCheckedLayerType = dummy_type;\n            aCheckedLayerAccessor = AAnone;\n            aCheckedLayerInvariant = None;\n            aCheckedLayerPassthroughs = dummy_layer_signature i;\n            aCheckedLayerTipObjectSet = IdentSet.empty;\n            aCheckedLayerKeelObjectSet = IdentSet.empty;\n            aCheckedLayerDesc = ALconstr []\n          } in\n\n\n    (* In the second step, we \"normalize\" the layer by re-associating all layer instantiations to the right,\n       and by pushing down layer relaxations to create passthrough.\n\n       Finally we call generate_declarations on the normalized layer.\n      *)\n\n    let rec push_relax l passthroughs =\n      if not (layer_signature_disjoint l.aCheckedLayerType.aLayerSignature\n                                       passthroughs) then\n        report_error (\"Layer \" ^ l.aCheckedLayerName ^ \" is pushed with passthroughs \" ^\n          \"overlapping with exported layer signature.\\nLayer signature: \" ^\n          string_of_a_layer_signature l.aCheckedLayerType.aLayerSignature ^\n          \"\\nPassthroughs: \" ^ string_of_a_layer_signature passthroughs) none;\n      let layer_type = {\n        aLayerBase =\n          layer_signature_union l.aCheckedLayerType.aLayerBase passthroughs;\n        aLayerSignature =\n          layer_signature_union l.aCheckedLayerType.aLayerSignature passthroughs } in\n      debug_endline (\"push_relax [\" ^ l.aCheckedLayerName ^ \"] w/ type \" ^\n        string_of_a_layer_type l.aCheckedLayerType);\n      debug_endline (\"push_relax [\" ^ l.aCheckedLayerName ^ \"] w/ ps \" ^\n        string_of_a_layer_signature passthroughs);\n      debug_endline (\"push_relax [\" ^ l.aCheckedLayerName ^ \"] ret type \" ^\n        string_of_a_layer_type layer_type);\n      match l.aCheckedLayerDesc with\n      | ALconstr _ ->\n        { l with\n          aCheckedLayerPassthroughs =\n            layer_signature_union l.aCheckedLayerPassthroughs passthroughs;\n          aCheckedLayerType = layer_type\n        }\n      | ALrelax l' ->\n        let l'' = push_relax l' @@ layer_signature_union l.aCheckedLayerPassthroughs passthroughs (*base @@ Some (infered_interface ())*)\n        in { l'' with aCheckedLayerType = layer_type }\n      | ALinst (l1, l2) ->\n        let l1' = push_relax l1 passthroughs in\n        let l2' = push_relax l2 passthroughs\n        in { l with\n             aCheckedLayerType = layer_type;\n             aCheckedLayerDesc = ALinst (l1', l2') }\n      | ALrefine (l1, l2, p) ->\n        let l1' = push_relax l1 passthroughs in\n        let l2' = push_relax l2 passthroughs\n        in { l with\n             aCheckedLayerType = layer_type;\n             aCheckedLayerDesc = ALrefine (l1', l2', p) } in\n\n    let remove_relax l =\n      push_relax l { aLayerSignatureName = \"*empty passthrough*\";\n                     aLayerSignatureSlots = [];\n                     aLayerSignatureSuppressError = false } in\n    (*\n    let rec remove_relax l = match l.aCheckedLayerDesc with\n      | ALconstr _ -> l\n      | ALrelax l' -> push_relax l' l.aCheckedLayerPassthroughs\n      | ALinst (l1, l2) ->\n        { l with aCheckedLayerDesc = ALinst (remove_relax l1, remove_relax l2) }\n      | ALrefine (l1, l2) ->\n        { l with aCheckedLayerDesc = ALrefine (remove_relax l1, remove_relax l2) } in\n    *)\n\n    let l' = checklayer i l.pLayerDesc in\n\n    let _ =\n      debug_endline (\"Pre remove \" ^ l'.aCheckedLayerName ^ \": \" ^\n        string_of_a_checked_layer l') in\n\n    let l' =\n      let l' = remove_relax l' in\n      match catch_not_found (List.find\n          (function (PAclause (\"accessor\", [_])) -> true | _ -> false))\n          l.pLayerAnnotations with\n      | None -> l'\n      | Some (PAclause (_, PAclause (\"LoadStoreSem1\", _) :: _)) ->\n        { l' with aCheckedLayerAccessor = AALoadStoreSem1 }\n      | Some (PAclause (_, PAclause (\"LoadStoreSem2\", _) :: _)) ->\n        { l' with aCheckedLayerAccessor = AALoadStoreSem2 }\n      | Some (PAclause (_, PAclause (\"LoadStoreSem3\", _) :: _)) ->\n        { l' with aCheckedLayerAccessor = AALoadStoreSem3 }\n      | Some (PAclause (_, name)) ->\n        report_warning (\"Unrecognized accessor \\\"\" ^\n                          string_of_p_annotations name ^ \"\\\" ignored\") none;\n        l'\n      | _ -> assert false in\n\n    let l' = match l.pLayerInvariant with\n      | None -> l'\n      | Some p -> { l' with\n                    aCheckedLayerInvariant = Some (translate_proposition p) }\n\n    in let _ =\n      debug_endline (\"Post remove \" ^ l'.aCheckedLayerName ^ \": \" ^\n        string_of_a_checked_layer l')\n\n    in l' in\n\n  let generate_layer l =\n    let rec normalize_checked_layer l base_opt refined_opt =\n      match l.aCheckedLayerDesc with\n      | ALrelax _ -> assert false\n\n      | ALinst (l1, l2) ->\n        let l1' = { l1 with\n                    aCheckedLayerTipObjectSet = l.aCheckedLayerTipObjectSet;\n                    aCheckedLayerKeelObjectSet = l.aCheckedLayerKeelObjectSet } in\n        let l1' = if l.aCheckedLayerAccessor = AAnone\n                    then l1'\n                    else { l1' with aCheckedLayerAccessor = l.aCheckedLayerAccessor } in\n        let l1' = if l.aCheckedLayerInvariant = None\n                    then l1'\n                    else { l1' with aCheckedLayerInvariant = l.aCheckedLayerInvariant }\n        in normalize_checked_layer l1'\n             (Some (normalize_checked_layer l2 base_opt None))\n             refined_opt\n      | ALrefine (l1, l2, p) ->\n        let l1' = { l1 with\n                    aCheckedLayerTipObjectSet = l.aCheckedLayerTipObjectSet;\n                    aCheckedLayerKeelObjectSet = l.aCheckedLayerKeelObjectSet } in\n        let l1' = if l.aCheckedLayerAccessor = AAnone\n                    then l1'\n                    else { l1' with aCheckedLayerAccessor = l.aCheckedLayerAccessor } in\n        let l1' = if l.aCheckedLayerInvariant = None\n                    then l1'\n                    else { l1' with aCheckedLayerInvariant = l.aCheckedLayerInvariant }\n        in normalize_checked_layer l1' None\n             (Some (normalize_checked_layer l2 base_opt refined_opt, p))\n\n      | ALconstr lst -> match base_opt, refined_opt with\n        | Some _, Some _ ->\n          report_error (\"Refining with composed layers not supported\") none;\n          {\n            aLayerName = l.aCheckedLayerName;\n            (*aLayerSerial = get_layer_serial ();*)\n            aLayerType = l.aCheckedLayerType;\n            aLayerAccessor = l.aCheckedLayerAccessor;\n            aLayerInvariant = l.aCheckedLayerInvariant;\n\n            aLayerFreshObjects = lst;\n            aLayerPassthroughObjects = [];\n            aLayerAllObjects = lst;\n\n            aLayerTipObjectSet = l.aCheckedLayerTipObjectSet;\n            aLayerKeelObjectSet = l.aCheckedLayerKeelObjectSet;\n\n            aLayerDesc = ALbottom\n          }\n        | None, None -> assert (l.aCheckedLayerPassthroughs.aLayerSignatureSlots = []);\n          {\n            aLayerName = l.aCheckedLayerName;\n            (*aLayerSerial = get_layer_serial ();*)\n            aLayerType = l.aCheckedLayerType;\n            aLayerAccessor = l.aCheckedLayerAccessor;\n            aLayerInvariant = l.aCheckedLayerInvariant;\n\n            aLayerFreshObjects = lst;\n            aLayerPassthroughObjects = [];\n            aLayerAllObjects = lst;\n\n            aLayerTipObjectSet = l.aCheckedLayerTipObjectSet;\n            aLayerKeelObjectSet = l.aCheckedLayerKeelObjectSet;\n\n            aLayerDesc = ALbottom\n          }\n        | Some base, None | None, Some (base, _) ->\n          let base_objects = base.aLayerFreshObjects @ base.aLayerPassthroughObjects in\n          let passthroughs = List.map (fun (s, sg) ->\n            match catch_not_found (List.assoc s) base_objects with\n            | None ->\n              report_error (\"Layer \" ^ base.aLayerName ^\n                \": does not contain or depend on slot \" ^ s ^ \"\\nslots = [\" ^\n                String.concat \"; \" (List.map fst base_objects) ^ \"]\") none;\n              s, dummy_object s\n            | Some obj ->\n              (* (* broke our totally fine MContainerImpl, likely would have\n                    caught any problem in translate_layer_definition any way *)\n              if not (signature_subseteq sg obj.aObjectType.aObjectSignature) then\n                report_error (\"Layer \" ^ l.aCheckedLayerName ^\n                  \": object under slot \" ^ s ^ \" has signature \" ^\n                  string_of_a_signature obj.aObjectType.aObjectSignature ^\n                  \" which is incompatible with passthrough requirement \" ^\n                  string_of_a_signature sg);\n              *)\n              s, obj\n            ) l.aCheckedLayerPassthroughs.aLayerSignatureSlots in\n          {\n            aLayerName = l.aCheckedLayerName;\n            (*aLayerSerial = get_layer_serial ();*)\n            aLayerType = l.aCheckedLayerType;\n            aLayerAccessor = if l.aCheckedLayerAccessor = AAnone\n                               then base.aLayerAccessor\n                               else l.aCheckedLayerAccessor;\n            aLayerInvariant = l.aCheckedLayerInvariant;\n\n            aLayerFreshObjects = lst;\n            aLayerPassthroughObjects = passthroughs;\n            aLayerAllObjects = lst @ base.aLayerAllObjects;\n\n            aLayerTipObjectSet = l.aCheckedLayerTipObjectSet;\n            aLayerKeelObjectSet = l.aCheckedLayerKeelObjectSet;\n\n            aLayerDesc = match refined_opt with\n              | None -> ALontop base\n              | Some (refined, p) -> ALrefine_bottom (refined, p)\n          } in\n\n    (* Spit out all grounded layers that need C verification. *)\n    let rec generate_declarations l =\n      if not (Hashtbl.mem layer_declarations l.aLayerName) then\n        let _ = Hashtbl.add layer_declarations l.aLayerName true in\n        let _ = match l.aLayerDesc with\n          | ALbottom -> ()\n          | ALontop base -> generate_declarations base\n          | ALrefine_bottom (impl, _) -> generate_declarations impl\n          (*\n          | ALrefine_ontop (_, impl) -> generate_declarations impl\n          *)\n        in add_declaration l.aLayerName (ADlayer l)\n    in assert (l.aCheckedLayerType.aLayerBase.aLayerSignatureSlots = []);\n       generate_declarations (normalize_checked_layer l None None) in\n\n  let layer_generated = ref false in\n  let last_layer = ref None in\n  let _ = List.iter (function\n    | i, {p_declaration_desc = (PDtype t); p_declaration_loc = _ } ->\n      let t' = translate_type_def i t\n      in if Hashtbl.mem type_environment i\n           then report_error (\"Type \" ^ i ^ \" already defined\") t.p_type_FO_loc;\n         Hashtbl.add type_environment i t';\n         if t'.aTypeProvable\n           then Hashtbl.add ctype_environment i t'.aTypeCtype;\n         add_declaration i (ADtype t')\n    | i, {p_declaration_desc = (PDevent e); p_declaration_loc = _ } ->\n       let e' = translate_event_def i e in\n       (if Hashtbl.mem event_environment i\n        then (report_error (\"Event \" ^ i ^ \" already defined\") none)\n        else Hashtbl.add event_environment i e');\n       add_declaration i (ADevent e')\n    | i, {p_declaration_desc =  (PDsignature s); p_declaration_loc = _ } ->\n      if Hashtbl.mem signature_environment i\n        then report_error (\"Signature \" ^ i ^ \" already defined\") s.p_signature_loc;\n      Hashtbl.add signature_environment i (translate_signature i s)\n    | i, {p_declaration_desc =  (PDlayer_sig s); p_declaration_loc = _ } ->\n      if Hashtbl.mem layer_signature_environment i\n        then report_error (\"Layer signature \" ^ i ^ \" already defined\") s.p_layer_signature_loc;\n      Hashtbl.add layer_signature_environment i (translate_layer_signature i s)\n    | i,{p_declaration_desc =  (PDobject o); p_declaration_loc = _ } ->\n      let o' = translate_object_definition i o (* in\n      let _ = match o.pObjectDesc with\n        | POconstr _ -> add_declaration i (ADobject o')\n        | _ -> ()\n      *)\n      in if Hashtbl.mem object_environment i\n           then report_error (\"Object \" ^ i ^ \" already defined\") o.pObjectLoc;\n         Hashtbl.add object_environment i o'\n    | i, {p_declaration_desc =  (PDlayer l); p_declaration_loc = _ } -> begin\n      if Hashtbl.mem layer_environment i\n        then report_error (\"Layer \" ^ i ^ \" already defined\") l.pLayerLoc;\n      let l' = translate_layer_definition i l\n      in Hashtbl.add layer_environment i l';\n         match List.mem (PAclause (\"codegen\", [])) l.pLayerAnnotations,\n               l'.aCheckedLayerType.aLayerBase.aLayerSignatureSlots = [] with\n         | true, true ->\n           generate_layer l';\n           layer_generated := true;\n           last_layer := None\n         | true, false ->\n           report_warning (\"Layer \" ^ i ^\n             \" is not ground hence cannot do codegen yet marked so\") none\n         | false, true ->\n           last_layer := Some l'\n         | _, _ -> ()\n      end\n    | _, {p_declaration_desc =  PDexternal_with (s, ann) ; p_declaration_loc = _} ->\n      let rec scrape_clauses acc = function\n        | [] -> acc\n        | PAclause (c, ls) :: res -> scrape_clauses (c :: acc) (ls @ res)\n        | _ :: res -> scrape_clauses acc res in\n      let rec find_exceptions = function\n        | [] -> []\n        | PAclause (\"except\", ls) :: res -> scrape_clauses [] (ls @ res)\n        | _ :: res -> find_exceptions res\n      in add_external_verabtim s (find_exceptions ann)\n    | i, {p_declaration_desc =  PDexternal_type (s, ill_opt, ann) ; p_declaration_loc = loc }->\n      if Hashtbl.mem type_environment i\n        then report_error (\"Type \" ^ i ^ \" already defined\") loc;\n      if List.mem (PAclause (\"as\", [PAclause (\"global_abstract_data_type\", [])]))\n                  ann\n        then global_abstract_data_type_store := Some i;\n      Hashtbl.add type_environment i\n        { aTypeDesc = ATexternal {\n            aEXTypeName = i;\n            aEXTypeString = s;\n            aEXTypeLowLevelInv = ill_opt;\n            aEXTypeDefault = None };\n          aTypeCtype = ACtint;\n          aTypePairIdent = \"t\" ^ i;\n          aTypeProvable = false\n        }\n    | i, {p_declaration_desc =  PDexternal_const (s, t, ann) ; p_declaration_loc = loc } ->\n      if Hashtbl.mem external_const_environment i\n        then report_error (\"External constant \" ^ i ^ \" already defined\") loc;\n      let t' = translate_type t in\n      (* Check if the type [t'] is an external type without a default value yet *)\n      let _ = match t'.aTypeDesc with\n        | ATexternal ({ aEXTypeDefault = None } as extype) ->\n          (* None found--set ourselves as one *)\n          extype.aEXTypeDefault <- Some (s, i);\n          (* global_abstract_data_type is the universe and can't contain itself\n             --don't generate declaration like other small types *)\n          begin match !global_abstract_data_type_store with\n          | Some glb_i when glb_i = extype.aEXTypeName -> ()\n          | _ -> add_declaration extype.aEXTypeName (ADtype t')\n          end\n        | _ -> ()\n      in Hashtbl.add external_const_environment i\n           { aBigExprDesc = AEexternal_const (s, i);\n             aBigExprType = t'\n           };\n         add_folded_unfolding_symbol ann s loc\n    | i, {p_declaration_desc =  PDexternal_function (s, arg, ret, ann); p_declaration_loc = loc } ->\n      if Hashtbl.mem external_function_environment i\n        then report_error (\"External function \" ^ i ^ \" already defined\") loc;\n      Hashtbl.add external_function_environment i\n        (s, { aMethodArgumentTypes = unfold_arg_type arg;\n              aMethodReturnType = translate_type ret;\n              aMethodKind = MKconst\n            });\n      add_folded_unfolding_symbol ann s loc\n    | i, {p_declaration_desc =  PDexternal_prop (s, _) ; p_declaration_loc = _ } ->  (* ignoring the type given *)\n      Hashtbl.add external_prop_environment i s\n  ) parsed in\n\n  let _ = match !last_layer with\n    | Some l -> generate_layer l\n    | None ->\n      if not !layer_generated then\n        (report_warning \"No layer eligible for codegen\" none) in\n  let _ = Hashtbl.iter (fun i t -> match t.aTypeDesc with\n    | ATexternal ({ aEXTypeDefault = None } as extype) ->\n      (report_error (\"No value of external type \" ^ extype.aEXTypeName ^ \" (\" ^\n        extype.aEXTypeString ^ \") supplied, cannot pick a default value\") none)\n    | _ -> ()) type_environment in\n  let global_abstract_data_type = match !global_abstract_data_type_store with\n    | None -> None\n    | Some i -> match catch_not_found (Hashtbl.find type_environment) i with\n      | Some { aTypeDesc = ATexternal ({ aEXTypeDefault = Some _ } as extype) }\n        -> Some extype\n      | Some { aTypeDesc = ATexternal _ } ->\n        None  (* Already reported error for external type w/o default value *)\n      | _ ->\n        report_error \"Internal error: global_abstract_data_type not external/not found\" none;\n        None\n\n  in !has_failure,\n     { aFileDeclarations = get_declarations ();\n       aFileGlobalAbstractDataType = global_abstract_data_type;\n       aFileExternalVerbatim = get_external_verbatim ();\n       aFileExternalSymbols = get_external_symbols ();\n      }\n"
  },
  {
    "path": "src/Edsger/uclidgen.ml",
    "content": "(* this file should generate UCLID5 code for the defi-verification project *)\n(* print from Ast*)\n\n(* type utype = \n  | UTinteger\n  | UTboolean\n  | UTrecord of ident * (ident * utype) list (* type result_t = record {valid : boolean, value : integer} *)\n  | UTmapping of utype * utype\n\ntype uval = \n  | UVinteger of int\n  | UVboolean of bool\n  | UVident of string\n  | UVfield of string * string *)\n\n(* write string printing first, then write ast *)\n\nopen Ast\nopen Astcommon\nopen Abi\n\ntype uclidgen_env = {\n  project_name : string;\n}\n\nlet module_name_regexp = Str.regexp \"[a-zA-Z_][a-zA-Z0-9_']*\"\nlet default_module_name = \"EdsgerGen\"\n\nlet new_uclidgen_env filename  ast =\n  let project_name =\n    let basename = Filename.basename filename in\n    if Str.string_match module_name_regexp basename 0 then\n      Str.matched_string basename\n    else begin\n      print_endline (\"Cannot use prefix of file name '\" ^ basename ^\n        \"' as Coq module name: default to '\" ^ default_module_name ^ \"'\");\n      default_module_name\n    end in\n  let _ = try Unix.mkdir project_name 0o777\n          with Unix.Unix_error (Unix.EEXIST, _, _) -> () in\n  (*make the extract dir*)\n#ifndef REDACTED\n  (* let __ = try Unix.mkdir (project_name ^ \"/\" ^ \"extraction\") 0o777\n          with Unix.Unix_error (Unix.EEXIST, _, _) -> () in *)\n#endif\n  {\n    project_name = project_name;\n  }\n\nlet uclidgen_fatal_error loc func msg =\n  print_endline (\"CoqGen error at \" ^ loc ^ \" (\" ^ func ^ \"): \" ^ msg);\n  assert false\n\n let builtin_base_layer_name = \"BuiltinBase\"\n\n let builtin_base_layer =\n  { aLayerName = builtin_base_layer_name;\n    aLayerType = {\n      aLayerBase = {\n        aLayerSignatureName = builtin_base_layer_name ^ \"_base\";\n        aLayerSignatureSlots = [];\n        aLayerSignatureSuppressError = false\n      };\n      aLayerSignature = {\n        aLayerSignatureName = builtin_base_layer_name ^ \"_inter\";\n        aLayerSignatureSlots = [];\n        aLayerSignatureSuppressError = false\n      }\n    };\n\n    aLayerAccessor = AAnone;\n    aLayerInvariant = None;\n\n    aLayerFreshObjects = [];\n    aLayerPassthroughObjects = [];\n    aLayerAllObjects = [];\n\n    aLayerTipObjectSet = IdentSet.empty;\n    aLayerKeelObjectSet = IdentSet.empty;\n\n    aLayerDesc = ALbottom\n  }\n\n\nlet unmingledFieldName l o f = \n  (* l.aLayerName ^ \"_\" ^   *)\n  o.aObjectName ^ \"_\" ^ f.aObjectFieldName\n\nlet is_map a =\n  match a with\n  | ATmapping (t1, t2) -> true\n  | _ -> false\n\nmodule SS = Set.Make(String)\n\nlet str_binop_uclid = function\n  | OPplus -> \"+\"\n  | OPminus -> \"-\"\n  | OPtimes -> \"*\"\n  | OPdivide -> \"/\"\n  | OPremainder -> \"%\"\n  | OPand -> \"&&\"\n  | OPor -> \"||\"\n  | OPeq -> \"=\"\n  | OPne -> \"!=\"\n  | OPlt -> \"<\"\n  | OPle -> \"<=\"\n  | OPgt -> \">\"\n  | OPge -> \">=\"\n  | OPshl -> \"<<\"\n  | OPshr -> \">>\"\n  | OPxor -> \"^\"\n  | OPbitand -> \"&\"\n  | OPbitor -> \"|\"\n  | OPsha_2 -> \"keccak256\"\n\nlet rec str_atype_uclid a =\n  match a with\n  | ATbuiltin Tint -> \"integer\"\n  | ATbuiltin Tuint -> \"integer\" (* TODO: use clight builtin type *)\n  | ATbuiltin Tbool -> \"boolean\"\n  | ATbuiltin Tunit -> \"()\"\n  | ATbuiltin Taddress -> \"address\"\n  | ATbuiltin Thashvalue -> \"hashvalue\"\n  | ATbuiltin Tglobalpointer -> \"globalpointer\"\n  (*\n  | ATbuiltin Tval -> \"val\"\n  | ATbuiltin Tflatmem -> \"flatmem\"\n  *)\n  | ATdata (i, _) -> i\n  | ATprod (t1, t2) -> \"(\" ^ str_atype_uclid t1.aTypeDesc ^ \", \"\n                              ^ str_atype_uclid t2.aTypeDesc ^ \")\"\n  (* | ATarray (n, t) -> \"AR\" ^ string_of_int n ^ \"_\" ^ a_type_desc_to_ident t.aTypeDesc *)\n  | ATmapping (t1, t2) -> \"[\" ^ str_atype_uclid t1.aTypeDesc ^ \"] \" ^ str_atype_uclid t2.aTypeDesc\n  | ATlist t -> \"list_\" ^ str_atype_uclid t.aTypeDesc\n  | ATexternal extype -> extype.aEXTypeName\n\nlet get_map_idx_type a =\n  match a with\n  | ATmapping (t1, t2) -> str_atype_uclid t1.aTypeDesc\n  | _ -> uclidgen_fatal_error __LOC__ \"get_map_idx_type\"\n  \"getting index of non-mapping\"\n\nlet str_constant c =\n  match c with\n  | CONint n -> string_of_int n\n  | CONuint n -> string_of_int n\n  | CONbool b -> if b then \"true\" else \"false\"\n  | CONunit -> \"()\"\n  (* initial constant is the same as uint 0 *)\n  | CONaddress addr -> Backend.BinNumsExt.numstring2decimalstring addr\n  | _ -> uclidgen_fatal_error __LOC__ \"str_constant\"\n  \"constant type not supported\"\n\nlet rec str_a_compile_time_constant = function\n  | ACONconst c -> str_constant c\n  | _ -> uclidgen_fatal_error __LOC__ \"str_a_compile_time_constant\"\n  \"does not support complex compile time constants\"\n\nlet rec str_rexpr_uclid e o = \n  match e.aRexprDesc with\n  | AEconst c -> str_constant c\n  | AEconstr_val (c, ls) -> uclidgen_fatal_error __LOC__ \"str_rexpr_uclid\"\n    \"AEconstr_val  not supported\"\n  | AEtemp (n, i) -> \n    if String.equal i \"resultU\" then\n      \"    r = resultU;\"\n    else\n      i\n  | AEunop (op, e) -> \n    string_of_unop op ^ str_rexpr_uclid e o\n  | AEbinop (op, e1, e2) ->\n      (\"(\" ^ str_rexpr_uclid e1 o ^ \" \" ^ str_binop_uclid op ^ \" \" ^\n      str_rexpr_uclid e2 o ^ \")\")\n  | AEbuiltin (\"address\",[]) ->\n    (* need walk ast to insert actual addresses*)\n    (match o.aObjectAddress with\n    | Some addr -> \n      o.aObjectName ^ \"_address\"\n      (* Backend.BinNumsExt.numstring2decimalstring addr *)\n    | None -> \n      uclidgen_fatal_error __LOC__ \"str_rexpr_uclid\"\n      (\"does not support unlinked (address) object\"))\n  | AEbuiltin (\"caller\",[]) ->\n     \"msg_caller\"\n  | AEbuiltin (other,args) -> uclidgen_fatal_error __LOC__ \"output_rexpr\"\n               (\"Internal error, encountered unknown builtin \\\"\"^other^\"\\\".\")\n\nexception PrimitiveNotFound of string\n\nlet rec str_lexpr_uclid e o = \n  match e.aLexprDesc with\n  | AEglob i -> o.aObjectName ^ \"_\" ^ i\n  | AEfield (e, i) -> str_lexpr_uclid e o ^ \".\" ^ i\n  | AEindex (e1, e2) -> str_lexpr_uclid e1 o ^ \"[\" ^ str_rexpr_uclid e2 o ^ \"]\"\n\nlet rec str_lexpr_modified_uclid e o modified = \n  match e.aLexprDesc with\n  | AEglob i -> SS.add (o.aObjectName ^ \"_\" ^ i) modified\n  | AEfield (e, i) -> str_lexpr_modified_uclid e o modified\n  | AEindex (e1, e2) -> \n    (str_lexpr_modified_uclid e1 o modified)\n\nlet rec str_cmd_uclid acmd base_layer o idnt = \n  let prefix = o.aObjectName ^ \"_\" in \n  match acmd.aCmdDesc with\n  | ACskip -> \n    \"\"\n    (* idnt ^ \"skip;\\n\" *)\n  | ACyield e -> \n    (* UCLID does not have the distinction *)\n    str_rexpr_uclid e o\n  | AClet (n, x, c1, c2) ->\n    (* match c1 with ACcond here to hack if-then-else *)\n    (* match c1 with ACcall here to hack function calling *)\n    (* let declp = (if String.equal (str_atype_uclid c1.aCmdType.aTypeDesc) \"()\" then\n      \"\"\n    else \n      idnt ^ \"var \" ^ x ^ \" : \" ^ str_atype_uclid c1.aCmdType.aTypeDesc ^ \";\\n\")\n    in *)\n    let declp = \"\" in\n    (match c1.aCmdDesc with\n    | ACcond (e, c1', c2') -> \n      declp ^\n      idnt ^ \"if (\" ^ str_rexpr_uclid e o ^ \")\\n\" ^ \n      idnt ^ \"{\\n\" ^ \n      idnt ^ str_cmd_uclid c1' base_layer o (idnt ^ \"  \") ^ \"\\n\" ^ \n      idnt ^ \"  \" ^ x ^ \" = ;\\n\" ^ \n      idnt ^ \"}\\n\" ^ \n      idnt ^ \"else\\n\" ^ \n      idnt ^ \"{\\n\" ^ \n      idnt ^ str_cmd_uclid c2' base_layer o (idnt ^ \"  \") ^ \"\\n\" ^\n      idnt ^ \"  \" ^ x ^ \" = ;\\n\" ^ \n      idnt ^ \"}\\n\"\n    | ACcall (s, f, es, _, _) -> \n      (match o.aObjectAddress with\n      | Some addr -> \n        let o' = try (List.assoc s base_layer.aLayerAllObjects)\n                with Not_found -> raise (PrimitiveNotFound s) in\n        \n        \n        let x' = (if String.equal (str_atype_uclid (List.find (fun m -> m.aMethodName = f) o'.aObjectMethods).aMethodType.aMethodReturnType.aTypeDesc) \"()\" then\n          idnt ^ \"call () = \" ^ (o'.aObjectName ^ \"_\" ^ f ^ \" (\")\n        else \n          idnt ^ \"call \" ^ \"(\" ^ x ^ \")\") ^ \" = \" ^ (o'.aObjectName ^ \"_\" ^ f ^ \" (\")\n        in\n\n        declp ^ x' ^ \n        String.concat \", \" (List.map (fun e -> let p = (str_rexpr_uclid e o) in if String.equal p \"()\" then \"\" else p) es) ^ \", \" ^ \n        (* (Backend.BinNumsExt.numstring2decimalstring addr) *)\n        prefix ^ \"address\"\n        ^ \");\\n\"\n      | None -> \n        uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n        (\"does not support unlinked (address) object\"))\n    | _ -> \n      declp ^\n      idnt ^ x ^ \" = \" ^ str_cmd_uclid c1 base_layer o idnt ^ \";\\n\") ^ \n\n    str_cmd_uclid c2 base_layer o idnt\n  | ACsequence (c1, c2) -> \n    str_cmd_uclid c1 base_layer o idnt ^\n    str_cmd_uclid c2 base_layer o idnt\n    | ACcall (s, f, es, _, _) -> \n    (match o.aObjectAddress with\n    | Some addr -> \n      let o' = try (List.assoc s base_layer.aLayerAllObjects)\n              with Not_found -> raise (PrimitiveNotFound s) in\n      let calledt = (if String.equal (str_atype_uclid acmd.aCmdType.aTypeDesc) \"()\" then\n          \"()\"\n        else \n          \"(XXXXX)\")\n      in\n      idnt ^ \"call \" ^ calledt ^ \" = \" ^ (o'.aObjectName ^ \"_\" ^ f ^ \" (\") ^ \n      String.concat \", \" (List.map (fun e -> \n        let p = (str_rexpr_uclid e o) in if String.equal p \"()\" then \"\" else p) es) ^ \", \" ^ \n      (* (Backend.BinNumsExt.numstring2decimalstring addr) *)\n      prefix ^ \"address\"\n       ^ \");\\n\"\n    | None -> \n      uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n      (\"does not support unlinked (address) object\"))\n      (* \"call \" ^ s ^ \".\" ^ f ^ \" (\" ^\n      String.concat \", \" (List.map string_of_a_rexpr es) ^ \")\" *)\n  | ACcond (e, c1, c2) -> \n    idnt ^ \"if (\" ^ str_rexpr_uclid e o ^ \")\\n\" ^ \n    idnt ^ \"{\\n\" ^ \n    idnt ^ str_cmd_uclid c1 base_layer o (idnt ^ \"  \") ^ \"\\n\" ^ \n    idnt ^ \"}\\n\" ^ \n    idnt ^ \"else\\n\" ^ \n    idnt ^ \"{\\n\" ^ \n    idnt ^ str_cmd_uclid c2 base_layer o (idnt ^ \"  \") ^ \"\\n\" ^\n    idnt ^ \"}\\n\"\n  | ACfor (ni, i, l, nh, h, c, occ) ->\n    idnt ^ \"var \" ^ i ^ \" : integer;\\n\" ^ \n    idnt ^ i ^ \" = \" ^ str_rexpr_uclid l o ^ \";\\n\" ^ \n    idnt ^ \"while (\" ^ i ^ \" < \" ^ str_rexpr_uclid h o ^ \") { \\n\" ^ \n    str_cmd_uclid c base_layer o (idnt ^ \"  \") ^ \n    idnt ^ \"}\\n\"\n  | ACmatch (e, cls) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACmatch\")\n  | ACemit (et, es) -> \n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACemit\")\n  | ACload e -> \n    str_lexpr_uclid e o\n  | ACstore (v, e) -> \n    (* should be same as normal assign *)\n    idnt ^ str_lexpr_uclid v o ^ \" = \" ^ str_rexpr_uclid e o ^ \";\\n\"\n  | ACconstr (v, e) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACconstr\")\n  | ACfail ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACfail\")\n  | ACassert c -> \n    idnt ^ \"assume (\" ^ str_cmd_uclid c base_layer o idnt ^ \");\\n\"\n  | ACdeny c ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACdeny\")\n  | ACghost c ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACghost\")\n  | ACfirst (ni, i, l, nh, h, nc, c1, c2, c3, occ) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACfirst\")\n  | ACfold (ni, i, l, nh, h, na, a, s, nc, c, occ) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACfold\")\n  | ACexternal (dest, s, i, args) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACexternal\")\n\nlet rec get_modified_uclid acmd base_layer o modified =\n  let prefix = o.aObjectName ^ \"_\" in \n  match acmd.aCmdDesc with\n  | ACskip -> \n    modified\n  | ACyield e -> \n    (* UCLID does not have the distinction *)\n    modified\n  | AClet (n, x, c1, c2) ->\n    SS.union (get_modified_uclid c1 base_layer o modified) (get_modified_uclid c2 base_layer o modified)\n  | ACsequence (c1, c2) -> \n    SS.union (get_modified_uclid c1 base_layer o modified) (get_modified_uclid c2 base_layer o modified)\n  | ACcall (s, f, es, _, _) -> \n    let o' = try (List.assoc s base_layer.aLayerAllObjects)\n            with Not_found -> raise (PrimitiveNotFound s) in\n    get_modified_uclid (List.find (fun m -> m.aMethodName = f) o'.aObjectMethods).aMethodBody base_layer o' modified\n  | ACcond (e, c1, c2) -> \n    SS.union (get_modified_uclid c1 base_layer o modified) (get_modified_uclid c2 base_layer o modified)\n  | ACfor (ni, i, l, nh, h, c, occ) ->\n    (get_modified_uclid c base_layer o modified)\n  | ACmatch (e, cls) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACmatch\")\n  | ACemit (et, es) -> \n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACemit\")\n  | ACload e -> \n    modified\n  | ACstore (v, e) -> \n    (* should be same as normal assign *)\n    str_lexpr_modified_uclid v o modified\n  | ACconstr (v, e) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACconstr\")\n  | ACfail ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACfail\")\n  | ACassert c -> \n    (get_modified_uclid c base_layer o modified)\n  | ACdeny c ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACdeny\")\n  | ACghost c ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACghost\")\n  | ACfirst (ni, i, l, nh, h, nc, c1, c2, c3, occ) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACfirst\")\n  | ACfold (ni, i, l, nh, h, na, a, s, nc, c, occ) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACfold\")\n  | ACexternal (dest, s, i, args) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACexternal\")\n\nlet rec get_vardecl_uclid acmd base_layer o modified = \n  let prefix = o.aObjectName ^ \"_\" in \n  match acmd.aCmdDesc with\n  | ACskip -> \n    modified\n  | ACyield e -> \n    (* UCLID does not have the distinction *)\n    modified\n  | AClet (n, x, c1, c2) ->\n    let mod' = if String.equal x \"_\" then modified else\n      SS.add (\"    var \" ^ x ^ \" : \" ^ str_atype_uclid c1.aCmdType.aTypeDesc ^ \";\\n\") modified \n    in\n    SS.union (get_vardecl_uclid c1 base_layer o mod') (get_vardecl_uclid c2 base_layer o mod')\n  | ACsequence (c1, c2) -> \n    SS.union (get_vardecl_uclid c1 base_layer o modified) (get_vardecl_uclid c2 base_layer o modified)\n  | ACcall (s, f, es, _, _) -> \n    modified\n  | ACcond (e, c1, c2) -> \n    SS.union (get_vardecl_uclid c1 base_layer o modified) (get_vardecl_uclid c2 base_layer o modified)\n  | ACfor (ni, i, l, nh, h, c, occ) ->\n    (get_vardecl_uclid c base_layer o modified)\n  | ACmatch (e, cls) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACmatch\")\n  | ACemit (et, es) -> \n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACemit\")\n  | ACload e -> \n    modified\n  | ACstore (v, e) -> \n    (* should be same as normal assign *)\n    modified\n  | ACconstr (v, e) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACconstr\")\n  | ACfail ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACfail\")\n  | ACassert c -> \n    (get_vardecl_uclid c base_layer o modified)\n  | ACdeny c ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACdeny\")\n  | ACghost c ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACghost\")\n  | ACfirst (ni, i, l, nh, h, nc, c1, c2, c3, occ) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACfirst\")\n  | ACfold (ni, i, l, nh, h, na, a, s, nc, c, occ) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACfold\")\n  | ACexternal (dest, s, i, args) ->\n    uclidgen_fatal_error __LOC__ \"str_cmd_uclid\"\n    (\"does not support ACexternal\")\n\nlet gen_uclid env final_layer fileDeclarations = \n  let out = open_out (env.project_name ^ \"/dsmodel.ucl\") in\n\n  let rec indent lvl = \n    if lvl = 0 then \"\" else \"  \"  ^ indent (lvl - 1)\n  in\n  let iter_fields action =\n    List.iter (fun (_, o) ->\n      List.iter (fun f -> action o f\n    ) o.aObjectFields\n   ) final_layer.aLayerAllObjects\n in\n let has_fields =\n   List.exists (fun (_,o) ->\n       List.exists (fun f -> true\n         ) o.aObjectFields\n     ) final_layer.aLayerAllObjects\n in\n let unmingledFieldName _o f = \n   unmingledFieldName final_layer _o f\n in\n\n let record_field_leftover = ref \"\\n  \" in\n\n output_string out\n\"\n/* file automatically generated by DeepSEA */\n\nmodule dsmodel {\n\n  type address = integer;\n\n  input me_caller : address;\n  input hackaux : address;\n  input victim : address;\n\n\";\n\n (* print the this_address declarations *)\n List.iter (function\n | i, ADlayer l ->\n   List.iter (fun (_, o) ->\n     match o.aObjectAddress with\n     | Some ad -> \n     output_string out (\"  const \" ^ o.aObjectName ^ \n       \"_address : address = \" ^ (Backend.BinNumsExt.numstring2decimalstring ad) ^ \";\\n\")\n     | None -> \n       ()\n   ) l.aLayerFreshObjects\n | _, _ -> ()\n ) fileDeclarations;\n\n (* print the state variable declarations, need to also generate axioms *)\n (* TODO: add axioms generation *)\n iter_fields (fun _o f ->\n     output_string out (\"  var \" ^ unmingledFieldName _o f ^ \" : \");\n     output_string out (str_atype_uclid f.aObjectFieldType.aTypeDesc);\n     output_string out \";\\n\"\n     (* output_type_expr out \"    \" f.aObjectFieldType; *)\n );\n output_string out \"  var dummy : integer;\\n\";\n\n (* print the actual procedures *)\n List.iter (function\n | i, ADlayer l ->\n  let has_base_layer, base_layer =\n    match l.aLayerDesc with\n    | ALbottom ->                false, builtin_base_layer\n    | ALontop l' ->              true,  l'\n    | ALrefine_bottom (l', p) -> true,  l' in\n\n   List.iter (fun (_, o) ->\n     List.iter (fun m ->\n       let method_full_name = o.aObjectName ^ \"_\" ^ m.aMethodName in\n       let mt = m.aMethodType in\n       (* prepare_command env out base_layer o.aObjectName method_full_name\n                       false [] Typecheck.function_start_id_num m.aMethodBody; *)\n       output_string out (\"\\n  procedure \" ^ method_full_name ^ \" (\");\n       (if (List.length m.aMethodArguments = 1) && (String.equal \"()\" (List.hd m.aMethodArguments))\n       then \n        ()\n       else\n          List.iteri (\n            fun idx arg -> \n              output_string out arg;\n              output_string out (\" : \");\n              output_string out (str_atype_uclid (List.nth mt.aMethodArgumentTypes idx).aTypeDesc);\n              (* (if idx + 1 != (List.length m.aMethodArguments) then  *)\n                output_string out \", \"\n              (* else \n                ()) *)\n          ) m.aMethodArguments;\n          output_string out \"msg_caller : address\"\n          );\n\n       (* ouput_params out m.aMethodArguments mt.aMethodArgumentTypes; *)\n       \n       output_string out (if String.equal (str_atype_uclid mt.aMethodReturnType.aTypeDesc) \"()\" then\n       \")\\n\"\n      else \n       \")\\n    returns (r : \" ^ str_atype_uclid mt.aMethodReturnType.aTypeDesc ^ \")\\n\");\n       let modd = (get_modified_uclid m.aMethodBody base_layer o SS.empty) in\n       (if SS.cardinal modd = 0 then\n        output_string out \"\"\n       else\n        (output_string out \"    modifies \";\n        SS.iter (fun e -> output_string out (e ^ \", \")) modd;\n        output_string out \"dummy\";\n        output_string out \";\\n\"));\n       output_string out \"  {\\n\";\n\n       let vardecls = (get_vardecl_uclid m.aMethodBody base_layer o SS.empty) in\n       SS.iter (fun e -> output_string out (e)) vardecls;\n\n       output_string out (str_cmd_uclid m.aMethodBody base_layer o (indent 2));\n       (* output_command env out base_layer i method_full_name \"      \" false [] m.aMethodBody; *)\n       output_string out \"\\n  }\\n\"   \n       (* output_string out (\"unfold \" ^ method_full_name ^ \"_opt in *;\\n\") *)\n     ) o.aObjectMethods\n   ) l.aLayerFreshObjects\n | _, _ -> ()\n) fileDeclarations;\n\n (* print the init section *)\n output_string out\n\"\\n  init {\n\";\n\n (* print the state variable definitions in init {} *)\n if has_fields then begin\n  iter_fields (fun _o f ->\n      (if is_map f.aObjectFieldType.aTypeDesc then\n        (* assume (forall (i : integer) :: balances[i] == 0); *)\n        (output_string out \"    assume (forall (i : \";\n        output_string out (get_map_idx_type f.aObjectFieldType.aTypeDesc);\n        output_string out \") :: \";\n        output_string out (unmingledFieldName _o f ^ \"[i] == 0);\\n\");\n        ())\n      else\n        (output_string out (\"    \" ^ unmingledFieldName _o f ^ \" = \");\n        (* output_compile_time_constant out \"      \" f.aObjectFieldInitial; *)\n        output_string out (str_a_compile_time_constant f.aObjectFieldInitial);\n        output_string out \";\\n\";\n        ()))\n  )\n  end;\n  output_string out\n\"  }\\n\";\n\n  (* print the transitions, need function signatures *)\n  let transfl = List.fold_left (fun acc ee ->\n    match ee with\n    | i, ADlayer l ->\n    let has_base_layer, base_layer =\n      match l.aLayerDesc with\n      | ALbottom ->                false, builtin_base_layer\n      | ALontop l' ->              true,  l'\n      | ALrefine_bottom (l', p) -> true,  l' in\n      List.fold_left (fun acc' (_, o) ->\n        List.fold_left (fun acc'' m ->\n          let method_full_name = o.aObjectName ^ \"_\" ^ m.aMethodName in\n          (* (m, string_of_method_kind m.aMethodType.aMethodKind) :: acc'' *)\n          match m.aMethodType.aMethodKind with\n          (* find-grained search that only considers functions annotated with logical *)\n          | MKrefined -> (m, method_full_name) :: acc''\n          | _ -> acc''\n        ) acc' o.aObjectMethods\n      ) acc l.aLayerFreshObjects\n    | _, _ -> acc\n  ) [] fileDeclarations \n  in\n\n  (* print the this_address declarations *)\n  let possible_addrs = List.fold_left (fun acc ee ->\n    match ee with\n    | i, ADlayer l ->\n      List.fold_left (fun acc' (_, o) ->\n        match o.aObjectAddress with\n        | Some ad -> \n          (o.aObjectName ^ \"_address\") :: acc'\n        | None -> \n          acc'\n      ) acc l.aLayerFreshObjects\n    | _, _ -> acc\n    ) [] fileDeclarations\n  in\n\n  output_string out \n(\"\n  next {\n    var i : integer;\n    assume (i >= 1 && i <= \" ^ string_of_int (List.length transfl) ^ \");\n\n    case \n\");\n\n  let idnt = indent 3 in\n\n  List.iteri (fun idx e ->\n    match e with\n    | (ee, eename) ->\n      output_string out (\"    (i == \" ^ string_of_int (idx+1) ^ \") : {\\n\");\n      (* generate dummy return values *)\n      output_string out (if String.equal (str_atype_uclid ee.aMethodType.aMethodReturnType.aTypeDesc) \"()\" then\n        \"\"\n        else \n        (idnt ^ \"var r : \" ^ str_atype_uclid ee.aMethodType.aMethodReturnType.aTypeDesc ^ \";\\n\"));\n      (* traverse the parameter declarations *)\n      (if (List.length ee.aMethodArguments = 1) && (String.equal \"()\" (List.hd ee.aMethodArguments))\n        then \n        () (* if thre is no parameter needed *)\n        else\n        List.iteri (\n          fun idx arg -> \n            output_string out (idnt ^ \"var \");\n            output_string out arg;\n            output_string out (\" : \");\n            output_string out (str_atype_uclid (List.nth ee.aMethodType.aMethodArgumentTypes idx).aTypeDesc);\n            (* (if idx + 1 != (List.length m.aMethodArguments) then  *)\n              output_string out \";\\n\"\n            (* else \n              ()) *)\n        ) ee.aMethodArguments;\n      );\n      (* traverse the parameter assumptions *)\n      (if (List.length ee.aMethodArguments = 1) && (String.equal \"()\" (List.hd ee.aMethodArguments))\n        then \n        () (* if thre is no parameter needed *)\n        else\n        List.iteri (\n          fun idx arg -> \n            let type_str = (str_atype_uclid (List.nth ee.aMethodType.aMethodArgumentTypes idx).aTypeDesc) in\n            (if String.equal type_str \"integer\"\n            then \n              output_string out (idnt ^ \"assume (\" ^ arg ^ \" >= 0 && \" ^ arg ^ \" <= 100000000);\\n\")\n            else \n              (if String.equal type_str \"address\"\n              then \n                (* (output_string out (idnt ^ \"// MANUAL : need to iterate through all possible addresses (oracle)\\n\"); *)\n                (output_string out (idnt ^ \"assume (\");\n                List.iter (\n                  fun eee -> output_string out (\"(\" ^ arg ^ \" == \" ^ eee ^ \") || \")\n                ) possible_addrs;\n                output_string out (\"(\" ^ arg ^ \" == hackaux) || \" ^ \"(\" ^ arg ^ \" == victim)\" ^ \");\\n\"))\n              else\n                uclidgen_fatal_error __LOC__ \"uclidgen\"\n                (\"only address and integer params are permitted for now\")))\n        ) ee.aMethodArguments;\n      );\n      (* make the actual call *)\n      output_string out (idnt ^ \"call \" ^ \n        (if String.equal (str_atype_uclid ee.aMethodType.aMethodReturnType.aTypeDesc) \"()\" then\n          \"()\"\n        else \n          \"(r)\") ^ \" = \" ^ eename);\n      (if (List.length ee.aMethodArguments = 1) && (String.equal \"()\" (List.hd ee.aMethodArguments))\n        then \n          output_string out \"(me_caller);\\n\" (* if thre is no parameter needed *)\n        else\n          (output_string out \" (\";\n          List.iteri (\n            fun idx arg -> \n              output_string out arg;\n                output_string out \", \"\n          ) ee.aMethodArguments;\n          output_string out \"me_caller);\\n\")\n      );\n      output_string out \"    }\\n\"\n    | _ -> uclidgen_fatal_error __LOC__ \"uclidgen\"\n      (\"illegal pattern when emitting transition calls in next{} \")\n  ) transfl;\n\n  output_string out \"    esac\n  }\n\";\n  output_string out \"\\n}\\n\\n\";\n\n  (* print the main module which does the search *)\n  output_string out\n\"module main {\n \n  type address = integer;\n\n  // MANUAL : set the actual hacker address\n  const me_caller : address = XXXXX;\n  const hackaux : address = XXXXX;\n  const victim : address = XXXXX;\n\n  instance m : dsmodel (me_caller : (me_caller), hackaux : (hackaux), victim : (victim));\n\n  init {\n    // give initial values\n    // init (m);\n\n    // MANUAL :  set initial capital, need manual input\n    assume (m.token_balances[me_caller] == XXXXX);\n    assume (m.token1_balances[me_caller] == XXXXX);\n  }\n\n  next {\n    next (m);\n  }\n\n  // does not exist a state where after that state the hacker's money is more than before\n  // this models a flashloan attack, where everything happens in one single moment\n  // we should also add an axiom saying that no simple arbitrage exists, that CEX price is same as DEX\n  // CANNOT 10x in 5 steps\n  invariant no_arb : m.token_balances[me_caller] < (XXXXX * 10);\n\n  // if there is no_arbitrage condition in state s, (meaning symbolically every asset is balanced with each other)\n  //  then there is no_arbitrage in any future state unless somebody does a stupic thing, but there is no one stupid\n  //  since we are only targeting flash-loan attacks here\n  property[LTL] no_arbitrage : !F(m.token_balances[me_caller] > (XXXXX * 10));\n\n  control {\n    v = bmc(6); // what is difference between bmc and unroll?\n    unroll (5);\n    check;\n    print_results;\n  }\n\n}\\n\"\n\nlet uclidgen filename ast =\n  let final_layer = ref None in\n  let env = new_uclidgen_env filename ast\n  in \n     List.iter (function\n     | i, ADtype t -> ()\n     | i, ADevent _ -> ()\n     | i, ADlayer l ->\n       final_layer := Some l\n     ) ast.aFileDeclarations;\n     begin match !final_layer with\n     | None -> ()\n     | Some l -> gen_uclid env l ast.aFileDeclarations;\n      (* gen_global_abstract_data_type env l ast.aFileGlobalAbstractDataType ast.aFileDeclarations *)\n     end\n     (* delete_uclidgen_env env *)\n"
  },
  {
    "path": "src/Makefile",
    "content": "core: core.make\n\tmake -f core.make\n\nclean: core.make\n\tmake -f core.make clean\n\trm -r _build\n\ncore.make: _CoqProject\n\tcoq_makefile -f _CoqProject -o core.make\n\nedsger: Edsger/parser.ml\n\tcd Edsger && dune build edsger.bc\n\nedsger.exe: Edsger/parser.ml\n\tcd Edsger && dune build edsger.exe\n\nEdsger/parser.ml: Edsger/config.h Edsger/parser.mly Edsger/make_parser.sh\n\tcd Edsger && ./make_parser.sh\n\nminicc:\n\tcd minic && dune build minicc.bc\n\nminicc.exe:\n\tcd minic && dune build minicc.exe\n\n.PHONY: clean core edsger edsger.exe\n"
  },
  {
    "path": "src/OpenSC/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 OpenSC\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "src/OpenSC/README.md",
    "content": "# OpenSC\nA toy project of programming language for smart contract written in `Ocaml`. \nThis is final project for COMS W4115 programming language & translator @ Columbia.\n\n## Introduction\n\n[`OpenSC`](https://github.com/JackSnowWolf/OpenSC) \nis a functional programming language which has similar functionality \ncompared to [`Scilla`](https://scilla.readthedocs.io/en/latest/) \nand [`Pact`](https://github.com/kadena-io/pact). \nIt is statically typed and will support several features. \nIt is a high-level language that will be primarily used to implement smart contracts,\n which are programs that provide protocol for handling account behavior in Ethereum.\n\nCompared to other languages, we model contracts as some simple transition systems, \nwith the transitions being pure functions of the contract state. These functions \nare expressed from one state to another state in a list of storage mutations.\n\nInspired by the `MiniC` language, part of the \n[`DeepSEA`](https://certik.io/blog/technology/an-introduction-to-deepsea) compiler, \nwe aim to develop a language which allows interactive formal verification of \nsmart contracts with security guarantees. From a specific input program, the \ncompiler generates executable bytecode, as well as a model of the program that \ncan be loaded into the [`Coq`](https://coq.inria.fr/)\nproof assistant. Our eventual goal is that smart contracts like storage, \nauction and token can be written by `OpenSC`, and that these contracts \ncan be compiled via the translator into binary codes that can be executed on `EVM`.\n\n## Usage\n\n### Environment Dependencies\n\n- Install `ocaml`, which is what our translator is written in.\n- Install `opam`, the ocaml package manager\n- `opam install cryptokit`,  which is used in the `Minic` (IR code) generation phase of the compiler front-end for cryptographic hashing\n\n\n### Synopsis\n\n```bash\n# at root directory of OpenSC\n# in the OpenSC/src directory\n% dune build opensc.bc\n% ../../_build/default/OpenSC/src/opensc.bc [source.sc] [mode]\n```\n\n### Modes\n\n- `ast`\n    - generate raw AST and print its structure\n- `sast`\n    - generate SAST (semantically checked AST) and print its structure\n- `bytecode`\n    - generate EVM bytecode and print it\n\n### How to test\n#### command\n```bash\n% opensc.bc [path to source.sc] [mode] \n# mode : ast | sast | minic | bytecode\n```\n#### example program sources for test\n* example_contract/simpleStorage.sc\n* example_contract/simpleToken.sc\n\n#### run bytecode on EVM\n##### install dependencies\n* install and use node 12\n* install ganache-cli, ethers\n* open ganache-cli\n##### run bytecode on EVM\n```bash\n# at root directory of OpenSC\n% cd src/example_contract\n./test-simpleStorage.js simpleStorage.bytecode\n./test-simpleToken.js simpleToken.bytecode\n```\n\n\n### Reference Manual\n\nCheck our [Language Reference Manual](OpenSC_Reference_Manual.pdf) for\n detailed usage\n\n> WARNING: We are not supporting multi-key mapping, events and log functions.\n\n\n## Acknowledgements\n\nThanks to Professor Ronghui Gu, the instructor of our course, who brought us to the PLT world and let us realize the charm of functional programming and formal verification, both of which are what our project is based on. \n\nThanks to River Dillon Keefer and Amanda Liu, TAs of our course, who introduced the DeepSEA project to us and provided very inspiring and helpful ideas on the OpenSC language syntax among other project details. \n\nThanks to Vilhelm Sjöberg, our project advisor, researcher at Yale and the primary creator of the DeepSEA project, who provided us with great information on everything about the DeepSEA project, and answered our many questions, which has been super helpful. \n\n## Contact\n\n- Jun Sha `js5506`: [email](mailto:js5506@columbia.edu.com)\n- Linghan Kong `lk2811`: [email](mailto:lk2811@columbia.edu)\n- Ruibin Ma `rm3708`: [email](mailto:rm3708@columbia.edu)\n- Chong Hu `ch3467`: [email](mailto:ch3467@columbia.edu)\n\n## License\n\nCopyright (c) 2020, `OpenSC`. All rights reserved.\n\nThe code is distributed under a MIT license. See [`LICENSE`](LICENSE) for information.\n"
  },
  {
    "path": "src/OpenSC/src/.gitignore",
    "content": "# extra ocaml file\nparser.ml\nparser.mli\n"
  },
  {
    "path": "src/OpenSC/src/Makefile",
    "content": ".PHONY: opensc\n\nall: opensc\n\nopensc:\n\tocamlbuild -pkg cryptokit -I backend opensc.native\n\nclean:\n\trm -f *.cmo *.cmi *.native"
  },
  {
    "path": "src/OpenSC/src/abi.ml",
    "content": "(* Methods related to the Solidity ABI. Right now, the only thing here is the code to compute the method name hashes. \n\nSee https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html for the spec. *)\n\n\nopen Ast\nopen Sast\n\n(* String.sub s start len  *)\n\n(* Todo: Solidity uses a primitive type \"address\", which is an\n   unsigned 160-bit integer. So in order to be ABI-compatible with\n   token contracts etc, we will need to support that. *)\n\t\t    \nlet eth_string_of_builtin_type = function\n  | Int  -> \"uint256\"\n  | Uint(_) -> \"uint256\"\n  | Bool -> \"bool\"\n  | Address x -> \"uint256\"\n  | Void x -> \"UNIT\"  (* The capitalized types will not be ABI-compatible with Solidity. *)\n  | _ -> \"UNSUPPORTED\"\n\t\t      \nlet eth_string_of_method_type pt =\n  if List.length pt = 0\n  then \"\"\n  else String.concat \",\" (List.map eth_string_of_builtin_type pt)\n\t\t      \nlet eth_string_of_method_definition m = \n  let name_of_method = function\n  (_, (SStrLit s)) -> s in\n  let params_types_of_method declist = \n    List.map (fun (Var(e,t)) -> t) declist in\n  (name_of_method m.smethodname) ^ \"(\" ^ eth_string_of_method_type (params_types_of_method m.sparams) ^ \")\"\n\n(* let json_string_of_arg i t =\n    Printf.sprintf \"{\\\"name\\\":\\\"%s\\\", \\\"type\\\":\\\"%s\\\"}\" i (eth_string_of_a_type t)\n\t\t\t\t\t\t\t\t      \nlet json_inputs_of_method idents argtypes =\n    if List.length argtypes = 1 && (List.nth argtypes 0).aTypeDesc = ATbuiltin Tunit\n    then \"[]\"\t\t\t\t\t\t\t\t\t      \n    else \"[\"\n\t ^ (String.concat \",\" (List.map2 json_string_of_arg idents argtypes))\n\t ^ \"]\"\n\nlet json_stateMutability_of_method_kind mk =\n  match mk with\n  | MKconst    \n  | MKconstghost -> \"view\"\n  | _ -> \"payable\"\n\nlet json_constantness_of_method_kind mk = \n  match mk with\n  | MKconst    \n  | MKconstghost -> \"true\"\n  | _ -> \"false\"\n\nlet json_outputs_of_method_type mt =\n  if (mt.aMethodReturnType.aTypeDesc = ATbuiltin Tunit)\n  then \"[]\"\n  else Printf.sprintf \"[{\\\"name\\\":\\\"\\\", \\\"type\\\":\\\"%s\\\"}]\" (eth_string_of_a_type mt.aMethodReturnType)\n\t   \nlet json_of_method_definition md =\n  Printf.sprintf\n\" {\\\"type\\\":\\\"function\\\",\n   \\\"name\\\":\\\"%s\\\",\n   \\\"inputs\\\":%s,\n   \\\"outputs\\\":%s,\n   \\\"payable\\\":true,\n   \\\"constant\\\":%s,\n   \\\"stateMutability\\\":\\\"%s\\\"}\"\n  md.aMethodName\n  (json_inputs_of_method md.aMethodArguments md.aMethodType.aMethodArgumentTypes)\n  (json_outputs_of_method_type md.aMethodType)\n  (json_constantness_of_method_kind md.aMethodType.aMethodKind)\t\t\t       \n  (json_stateMutability_of_method_kind md.aMethodType.aMethodKind)\n\nlet json_of_layer l =\n  \"[\" ^\n  (String.concat \",\\n\"\n    (List.concat ((List.map (fun (_,o) -> List.map json_of_method_definition o.aObjectMethods)\n\t\t\t     l.aLayerFreshObjects)\n\t\t @(List.map (fun (_,o) -> List.map json_of_method_definition o.aObjectMethods)\n\t\t\t     l.aLayerPassthroughObjects))))\n    ^ \"]\" *)\n  \nopen Cryptokit\n\nlet keccak_string (str: string) : string =\n  let hashval = hash_string (Hash.keccak 256) str in\n  Printf.sprintf \"0x%02x%02x%02x%02x\" (Char.code (String.get hashval 0)) (Char.code (String.get hashval 1)) (Char.code (String.get hashval 2))(Char.code (String.get hashval 3))\n(*    (0x01000000) * Char.code (String.get hashval 0)\n  + (0x00010000) * Char.code (String.get hashval 1)\n  + (0x00001000) * Char.code (String.get hashval 2)\n  +                Char.code (String.get hashval 3) *)\n\n\nlet keccak_intval (str: string) : int =\n  let hashval = hash_string (Hash.keccak 256) str in\n    (0x01000000) * Char.code (String.get hashval 0)\n  + (0x00010000) * Char.code (String.get hashval 1)\n  + (0x00000100) * Char.code (String.get hashval 2)\n  +                Char.code (String.get hashval 3) \n\n\t\t \nlet function_selector_of_method md : string =\n  let str = eth_string_of_method_definition md in\n  keccak_string str ^ \" = \\\"\" ^ str ^\"\\\"\" \n\nlet function_selector_intval_of_method md : int =\n  keccak_intval (eth_string_of_method_definition md)\n"
  },
  {
    "path": "src/OpenSC/src/ast.ml",
    "content": "type op = Add | Sub | Times | Divide | Equal | Neq |  And | Or | LGT | RGT | LGTEQ | RGTEQ | PASSIGN\n\ntype typ = \n\t| Bool \n\t| Int\n\t| Uint of string \n\t| Address of string\n\t| Void of string\n\t| Mapstruct of typ list * typ\n\n\n(* Need change *)\n(* type ocamlbuiltin = Int | Bool | String *)\n\n(* type param =  *)\n\n\ntype expr =\n\t| NumLit of int  (* number literal *)\n\t| BoolLit of bool\n\t| StrLit of string\n\t| Id of string\n\t| EnvLit of string * string\n\t| Mapexpr of expr * expr list \n\t| Binop of expr * op * expr\n\t| Logexpr of expr * expr list\n\t| Storageassign of expr * expr \n\t| Comparsion of expr * op * expr\n\t| Voidlit of string\n\ntype decls = \n\t| Var of expr * typ\n\t| TypeAssigndecl of expr * typ\n\t| MapAssigndecl of expr * typ \n\t| Eventdecl of expr * typ list\n\t| Constructordecl of expr * typ list * typ \n\t| Methodecls of expr * typ list * typ\n\n(* control flow statement: if, while ?? *)\n(* type stmt =\n\t  Block of stmt list\n\t| Expr of expr\n\t| Return of expr *)\n\ntype consturctor_def ={\n\tname: expr;\n\tparams: decls list;\n\tconsturctor_body: expr list;\n\treturn_type: typ;\n}\n\n\ntype method_def = {\n\tmethodname: expr;\n\tparams: decls list;\n\tguard_body: expr list;\n\tstorage_body: expr list;\n\teffects_body: expr list;\n\treturns: expr;\n}\n\ntype interface_def = {\n\tsignaturename: expr;\n\tinterfacebody: decls list;\n}\n\ntype implementation_def = {\n\tconsturctor: consturctor_def;\n\tmethods: method_def list;\n}\n\n(* type program = interface_def list * consturctor_def list *)\n(* consturctor list is bad ! *)\ntype program = interface_def * implementation_def\n(* type program = interface_def list * consturctor_def list * method_def list  *)\n\n(* pretty printing *)\nlet string_of_op = function\n    Add -> \"+\"\n  | Sub -> \"-\"\n  | Times -> \"*\"\n  | Divide -> \"/\"\n  | Equal -> \"==\"\n  | Neq -> \"!=\"\n  | And -> \"&&\"\n  | Or -> \"||\"\n\t| LGT -> \">\"\n\t| RGT -> \"<\"\n\t| LGTEQ -> \">=\"\n\t| RGTEQ -> \"<=\"\n\t| PASSIGN -> \"|->\"\n\n(* let string_of_builtin = function\n\t\tInt -> \"int\"\n\t|\tBool -> \"boolean\"\n\t|\tString -> \"string\" *)\nlet unit_to_string () = \"unit\"\t\n\nlet rec string_of_typ = function\n\t\tBool-> \"bool\"\n\t| Int -> \"int\"\n\t| Uint(x) ->  \"uint(\" ^ x ^ \")\"\n\t| Address(x) ->  \"address(\" ^ x ^ \")\"\n\t| Void(x) ->  \"void(\" ^ x ^ \")\"\n\t| Mapstruct(x, y) ->  \"Mapstruct(\" ^ String.concat \" \" (List.map string_of_typ x) ^ string_of_typ y ^ \")\"\n\nlet rec string_of_expr = function\n\t| NumLit(l) -> \"NumLit(\" ^ string_of_int l ^ \")\"\n\t| BoolLit(l) -> \"BoolLit(\" ^ string_of_bool l ^ \")\"\n\t| StrLit(l) -> \"StrLit(\" ^ l ^ \")\"\n\t| Id(x) -> x\n\t| EnvLit(l, l2) -> \"EnvLit(\" ^ l ^ (l2) ^ \")\"\n\t| Mapexpr (l1, l2) -> \"Mapexpr(\" ^ string_of_expr l1 ^ \" elements:\" ^ String.concat \" \" (List.map string_of_expr l2) ^ \")\"\n\t| Binop(e1, op, e2) ->  \"Binop(\" ^ (string_of_expr e1) ^ \" \"  ^ (string_of_op op) ^ \" \" ^ (string_of_expr e2) ^ \")\"\n\t| Logexpr(e, el) -> \"Logexpr(\" ^ \" \" ^ string_of_expr e ^ \" \" ^ String.concat \" \" (List.map string_of_expr el) ^ \")\"\n\t| Storageassign (e1, e2) -> \"StorageAssign: \" ^ string_of_expr e1 ^ \" PASSIGN: |->\" ^ string_of_expr e2 ^ \")\"\n\t| Comparsion (e1, op, e2) ->\" Comparsion: \" ^ string_of_expr e1 ^ \" \" ^ string_of_op op ^ \" \" ^ string_of_expr e2\n\t| Voidlit(s) -> \"Void: \" ^ s\n\n\nlet rec string_of_decl = function\n\t| Var(x , t) -> \"Var(\" ^ string_of_expr x ^ \": \" ^ string_of_typ t ^ \")\"\n\t| TypeAssigndecl(l, t) -> \"TypeAssign(\" ^ string_of_expr l  ^ \": \" ^ string_of_typ t ^ \")\\n\"\n\t| MapAssigndecl (l, t) -> \"map \" ^ string_of_expr l ^ \" \" ^ (string_of_typ t) ^ \"\\n\"\n\t| Eventdecl(l ,t) ->  \"event(\" ^ (string_of_expr l) ^  String.concat \" \" (List.map string_of_typ t) ^ \")\\n\"\n\t| Constructordecl(l, t1, t2) ->\"constructor \" ^ \" \" ^ string_of_expr l ^  String.concat \" \" (List.map string_of_typ t1) ^ \" \" ^  string_of_typ t2 ^ \"\\n\"\n\t| Methodecls (l, t1, t2) -> \"method \" ^ string_of_expr l ^ \" \"  ^ String.concat \" \" (List.map string_of_typ t1)  ^ (string_of_typ t2) ^ \" \" ^ \"\\n\"\n\n\nlet string_of_interfacedef interfacedecl =\n\t\"--interface\\n\\n\" ^\n\t\"signature \" ^\n\tstring_of_expr interfacedecl.signaturename ^ \"\\n \" ^\n\tString.concat \"\\n \" (List.map string_of_decl interfacedecl.interfacebody)\n\nlet string_of_constructordef constructordecl = \n\t\"constructor \" ^ \n\tstring_of_expr constructordecl.name ^ \n\t\"(\" ^ String.concat \" \\n \" (List.map string_of_decl constructordecl.params) ^ \")\\n \" ^\n\tString.concat \" \\n \" (List.map string_of_expr constructordecl.consturctor_body) ^\n\t\"\\n returns \" ^ string_of_typ constructordecl.return_type ^ \"\\n\\n\"\n\nlet string_of_methoddef methoddecl = \n\t\"method \" ^\n\tstring_of_expr methoddecl.methodname ^ \n\t\"(\" ^  String.concat \", \" (List.map string_of_decl methoddecl.params) ^ \")\" ^\n\t\"\\n guard\\n  \" ^ String.concat \"\\n  \" (List.map string_of_expr methoddecl.guard_body) ^\n\t\"\\n storage\\n  \" ^ String.concat \"\\n  \" (List.map string_of_expr methoddecl.storage_body) ^\n\t\"\\n effects\\n  \" ^ String.concat \"\\n  \" (List.map string_of_expr methoddecl.effects_body) ^\n\t\"\\n returns \" ^ string_of_expr methoddecl.returns ^ \"\\n\\n\"\n\n\nlet string_of_implementation implementdecl =\n\t\"--implementation\\n\\n\" ^\n\tstring_of_constructordef implementdecl.consturctor ^ \n\tString.concat \"\\n\" (List.map string_of_methoddef implementdecl.methods)\n\nlet string_of_program (interfaces, implementations) =\n\t\"\\n\\n-------------------\\n  Parsed program \\n-------------------\\n\\n\" ^\n\tstring_of_interfacedef interfaces ^ \"\\n\"  ^\n\tstring_of_implementation implementations ^ \"\\n\\n***Yeah!***\"\n"
  },
  {
    "path": "src/OpenSC/src/dune",
    "content": "(executable\n  (name opensc)\n  (modes byte exe)\n  (libraries backend cryptokit yojson extlib str)\n) \n\n(ocamllex scanner)\n\n(menhir\n(modules parser)\n)"
  },
  {
    "path": "src/OpenSC/src/example_contract/auction.sc",
    "content": "/- simple open auction -/\n/- https://solidity.readthedocs.io/en/v0.4.24/solidity-by-example.html#simple-open-auction -/\n\n\nsignature AUCTION{\n  /- parameters -/\n  storage beneficiary : Address;\n  storage end : UInt;\n\n  /- current state of the auction -/\n  storage leader : Address;  /- leading bidder; -/\n  storage lead : UInt;       /- highest bid; -/\n\n  /- allowed withdrawals of previous bids -/\n  map withdrawals : (Address) => UInt;\n\n  /- events -/\n  event HighestBidIncreased = HighestBidIncreased of (Address, UInt);\n  event AuctionEnded        = AuctionEnded  of (Address, UInt);\n\n  /- methods -/\n  constructor c : (UInt, Address) -> void;\n  method bid : (void) -> void;\n  method withdraw : (void) -> void;\n  method terminate : (void) -> void;\n\n}\n\n\nconstructor c (t : UInt, a : Address){\n  storage\n    end          |-> (Env.now) + t; \n    beneficiary  |-> a;\n  returns void;\n}\n\n\nmethod bid (){\n  guard{\n    Env.now    <= end;\n    Env.value  >  lead;\n    withdrawals[leader] >= withdrawals[leader] - lead;\n  }\n  storage{\n    withdrawals[leader]  |-> withdrawals[leader] + lead;\n    leader               |-> Env.sender;\n    lead                 |-> Env.value;\n  }\n  effects{\n    logs HighestBidIncreased (Env.sender, Env.value);\n  }\n  returns voidlit;\n}\n\nmethod withdraw (){\n  guard{\n    withdrawals[Env.sender]  != 0;\n  }\n  storage{\n    withdrawals[Env.sender]  |-> 0;\n  }\n  effects{\n    /- sends Env.sender withdrawals[Env.sender]; -/\n  }\n  returns voidlit;\n}\n\nmethod terminate (){\n  guard{\n    Env.now  >= end;\n  }\n  storage{}\n  effects{\n    logs AuctionEnded (leader, lead);\n  }\n  returns voidlit;\n}\n"
  },
  {
    "path": "src/OpenSC/src/example_contract/simpleStorage.sc",
    "content": "/- A simple storage program -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n\n\tconstructor c : (void) -> void;\n\tmethod get : () -> int;\n\tmethod set : (int) -> void;\n}\n\nconstructor c (){\n\tstorage\n\treturns void;\n}\n\nmethod get(){\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns storedData;\n}\n\nmethod set(x: int) {\n\tguard{\n\t\tx > 0;\n\t}\n\tstorage{\n    \tstoredData |-> x;\n\t}\n\teffects{}\n\treturns voidlit;\n}\n"
  },
  {
    "path": "src/OpenSC/src/example_contract/simpleToken.sc",
    "content": "/- \n  token implementation satisfying the ERC20 standard:\n   https://eips.ethereum.org/EIPS/eip-20\n\n   interface\n-/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Address) => UInt;\n\n  constructor c : (UInt) -> void;\n  \n  method initialize : (void) -> UInt;\n  method set : (Address, UInt) -> UInt;\n  method totalSupply : (void) -> UInt;\n  method balanceOf : (Address) -> UInt;\n  method transfer : (Address, UInt) -> Bool;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod initialize () {\n  guard{}\n  storage{\n    balances[Env.sender] |-> 100000;\n  }\n  effects{}\n  returns balances[Env.sender];\n}\n\nmethod set (a:Address, v: UInt){\n  guard{}\n  storage{\n    balances[a] |-> v;\n  }\n  effects{}\n  returns balances[a];\n}\n\nmethod totalSupply (){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns supply;\n}\n\nmethod balanceOf (a : Address){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns balances[a];\n  }\n\nmethod transfer (a : Address, v : UInt){\n  guard{\n    Env.value == 0;\n    \n    /- overflow checking -/\n    balances[Env.sender] >= v;\n  }\n  storage{\n    balances[Env.sender] |-> balances[Env.sender] - v;\n    balances[a]          |-> (balances[a] + v);\n  }\n  effects{}\n  returns True;\n}\n"
  },
  {
    "path": "src/OpenSC/src/example_contract/test-simpleStorage.js",
    "content": "#!/usr/bin/env node\n\n// const net = require('net');\n// const solc = require('solc');\nconst fs = require('fs');\nconst ethers = require(\"ethers\");\n\nif (process.argv.length != 3) {\n    console.log(\"invalid args\");\n    process.exit(1);\n}\n\nconst endpoint = \"http://localhost:8545\";\nconst provider = new ethers.providers.JsonRpcProvider(endpoint);\n\n// const abi = [\n//   \"constructor()\",\n//   \"function initialize () public returns (uint)\",\n//   \"function totalSupply() view returns (uint)\",\n//   \"function balanceOf(uint) view returns (uint)\",\n//   \"function transfer(uint, int) returns (bool)\"\n// ];\n\nconst abi = [\n  {\"type\":\"function\",\n  \"name\":\"get\",\n  \"inputs\":[],\n  \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n  \"payable\":false,\n  \"constant\":true,\n  \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"set\",\n   \"inputs\":[{\"name\":\"x\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"}];\n\nconst bytecode = fs.readFileSync(process.argv[2]).toString().replace(/\\n|\\t|\\r| /g, \"\");\nconst signer = provider.getSigner(0);\nconst creator = signer.getAddress();\n\nasync function deploy() {\n  console.log(\"sending creation transaction...\")\n  let factory = new ethers.ContractFactory(abi, bytecode, signer);\n  let contract = await factory.deploy();\n  await contract.deployed();\n  console.log(\"contract address: \" + contract.address);\n  console.log(\"transaction hash: \" + contract.deployTransaction.hash);\n  let deployedBytecode = await provider.getCode(contract.address);\n  // console.log(\"deployed bytecode: \" + deployedBytecode);\n\n  console.log(\"calling get...\");\n  let getval = await contract.get();\n  console.log(\"value get as: \" + getval);\n\n  let setv = 240; // arbitrary uint\n  console.log(\"calling set...\");\n  setval = await contract.set(setv);\n  console.log(\"value set as: \" + setval);\n\n  console.log(\"calling get...\");\n  getval = await contract.get();\n  console.log(\"value get as: \" + getval);\n}\n\ndeploy();\n"
  },
  {
    "path": "src/OpenSC/src/example_contract/test-simpleToken.js",
    "content": "#!/usr/bin/env node\n\n// const net = require('net');\n// const solc = require('solc');\nconst fs = require('fs');\nconst ethers = require(\"ethers\");\n\nif (process.argv.length != 3) {\n    console.log(\"invalid args\");\n    process.exit(1);\n}\n\nconst endpoint = \"http://localhost:8545\";\nconst provider = new ethers.providers.JsonRpcProvider(endpoint);\n\n// const abi = [\n//   \"constructor()\",\n//   \"function initialize () public returns (uint)\",\n//   \"function totalSupply() view returns (uint)\",\n//   \"function balanceOf(uint) view returns (uint)\",\n//   \"function transfer(uint, int) returns (bool)\"\n// ];\n\nconst abi = [ \n  {\"type\":\"function\",\n   \"name\":\"initialize\",\n   \"inputs\":[],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n   {\"type\":\"function\",\n   \"name\":\"set\",\n   \"inputs\":[{\"name\":\"a\", \"type\":\"uint256\"},{\"name\":\"v\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":\"true\",\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n {\"type\":\"function\",\n   \"name\":\"totalSupply\",\n   \"inputs\":[],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"balanceOf\",\n   \"inputs\":[{\"name\":\"a\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"transfer\",\n   \"inputs\":[{\"name\":\"a\", \"type\":\"uint256\"},{\"name\":\"v\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"}\n  ];\n\nconst bytecode = fs.readFileSync(process.argv[2]).toString().replace(/\\n|\\t|\\r| /g, \"\");\nconst signer = provider.getSigner(0);\nconst creator = signer.getAddress();\n\nasync function deploy() {\n  console.log(\"sending creation transaction...\")\n  let factory = new ethers.ContractFactory(abi, bytecode, signer);\n  let contract = await factory.deploy();\n  await contract.deployed();\n  console.log(\"contract address: \" + contract.address);\n  console.log(\"transaction hash: \" + contract.deployTransaction.hash);\n  let deployedBytecode = await provider.getCode(contract.address);\n  // console.log(\"deployed bytecode: \" + deployedBytecode);\n  \n  console.log(\"calling initalize...\");\n  let tx = await contract.initialize();\n  console.log(\"transaction hash: \" + tx.hash);\n\n  let alice = 24; // arbitrary address\n  console.log(\"calling set...\");\n  tx = await contract.set(alice, 100);\n\n  console.log(\"calling totalSupply...\");\n  let supply = await contract.totalSupply();\n  console.log(\"total supply: \" + supply);\n\n  console.log(\"calling balanceof...\");\n  let aliceBalance = await contract.balanceOf(alice);\n  let creatorBalance = await contract.balanceOf(creator);\n  console.log(\"creator balance: \" + creatorBalance);\n  console.log(\"alice balance: \" + aliceBalance);\n\n  console.log(\"calling transfer...\");\n  tx = await contract.transfer(alice, 100);\n  console.log(\"transaction hash: \" + tx.hash);\n\n  aliceBalance = await contract.balanceOf(alice);\n  creatorBalance = await contract.balanceOf(creator);\n  console.log(\"creator balance: \" + creatorBalance);\n  console.log(\"alice balance: \" + aliceBalance);\n}\n\ndeploy();\n"
  },
  {
    "path": "src/OpenSC/src/example_contract/test-token.js",
    "content": "#!/usr/bin/env node\n\n// const net = require('net');\n// const solc = require('solc');\nconst fs = require('fs');\nconst ethers = require(\"ethers\");\n\nif (process.argv.length != 3) {\n    console.log(\"invalid args\");\n    process.exit(1);\n}\n\nconst endpoint = \"http://localhost:8545\";\nconst provider = new ethers.providers.JsonRpcProvider(endpoint);\n\n// const abi = [\n//   \"constructor()\",\n//   \"function initialize () public returns (uint)\",\n//   \"function totalSupply() view returns (uint)\",\n//   \"function balanceOf(uint) view returns (uint)\",\n//   \"function transfer(uint, int) returns (bool)\"\n// ];\n\nconst abi = [ \n {\"type\":\"function\",\n   \"name\":\"totalSupply\",\n   \"inputs\":[],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"balanceOf\",\n   \"inputs\":[{\"name\":\"a\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n   {\"type\":\"function\",\n   \"name\":\"allowance\",\n   \"inputs\":[{\"name\":\"owner\", \"type\":\"uint256\"},{\"name\":\"spender\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"uint256\"}],\n   \"payable\":false,\n   \"constant\":true,\n   \"stateMutability\":\"view\"},\n {\"type\":\"function\",\n   \"name\":\"transfer\",\n   \"inputs\":[{\"name\":\"a\", \"type\":\"uint256\"},{\"name\":\"v\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n   {\"type\":\"function\",\n   \"name\":\"approve\",\n   \"inputs\":[{\"name\":\"spender\", \"type\":\"uint256\"},{\"name\":\"v\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n   {\"type\":\"function\",\n   \"name\":\"transferFrom\",\n   \"inputs\":[{\"name\":\"from\", \"type\":\"uint256\"},{\"name\":\"to\", \"type\":\"uint256\"},{\"name\":\"v\", \"type\":\"uint256\"}],\n   \"outputs\":[{\"name\":\"\", \"type\":\"bool\"}],\n   \"payable\":true,\n   \"constant\":false,\n   \"stateMutability\":\"payable\"},\n  ];\n\nconst bytecode = fs.readFileSync(process.argv[2]).toString().replace(/\\n|\\t|\\r| /g, \"\");\nconst signer = provider.getSigner(0);\nconst creator = signer.getAddress();\n\nasync function deploy() {\n  console.log(\"sending creation transaction...\")\n  let factory = new ethers.ContractFactory(abi, bytecode, signer);\n  let contract = await factory.deploy();\n  await contract.deployed();\n  console.log(\"contract address: \" + contract.address);\n  console.log(\"transaction hash: \" + contract.deployTransaction.hash);\n  let deployedBytecode = await provider.getCode(contract.address);\n  // console.log(\"deployed bytecode: \" + deployedBytecode);\n\n  let alice = 24; // arbitrary address\n  console.log(\"calling transfer...\");\n  tx = await contract.transfer(alice, 100);\n  console.log(\"transaction hash: \" + tx.hash);\n  let supply = await contract.totalSupply();\n  let aliceBalance = await contract.balanceOf(alice);\n  let creatorBalance = await contract.balanceOf(creator);\n  console.log(\"total supply: \" + supply);\n  console.log(\"creator balance: \" + creatorBalance);\n  console.log(\"alice balance: \" + aliceBalance);\n}\n\ndeploy();\n"
  },
  {
    "path": "src/OpenSC/src/example_contract/test.sc",
    "content": "/- A simple storage program -/\n\nsignature SimpleStorage {\n    storage amount : UInt;\n    map balances : (Address) => UInt;\n\tconstructor c : (void) -> void;\n\tmethod set : (Address) -> UInt;\n}\n\nconstructor c (){\n\tstorage\n\treturns void;\n}\n\nmethod set(x: Address) {\n\tguard{\n        True;\n    }\n\tstorage{\n        amount |-> balances[(x)]\n    }\n\teffects{}\n\treturns amount;\n}\n"
  },
  {
    "path": "src/OpenSC/src/example_contract/token.sc",
    "content": "/- \n  token implementation satisfying the ERC20 standard:\n   https://eips.ethereum.org/EIPS/eip-20\n\n   interface\n-/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Address) => UInt;\n  map allowances : (Address, Address) => UInt;\n\n  event Transfer = Transfer of (Address, Address, UInt);\n  event Approval = Approval of (Address, Address, UInt);\n\n  constructor c : (UInt) -> void;\n  method totalSupply : (void) -> UInt;\n  method balanceOf : (Address) -> UInt;\n  method transfer : (Address, UInt) -> Bool;\n  method transferFrom : (Address, Address, UInt) -> Bool;\n  method approve : (Address, UInt) -> Bool;\n  method allowance : (Address, Address) -> UInt;\n}\n\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod totalSupply (){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns supply;\n}\n\nmethod balanceOf (a : Address){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns balances[a];\n  }\n\nmethod allowance (owner : Address, spender : Address){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns allowances[spender, owner];\n}\n\nmethod transfer (a : Address, v : UInt){\n\n  guard{\n    Env.value == 0;\n    balances[Env.sender] >= v;\n    /- overflow checking -/\n    balances[a] > balances[a] - v;\n    balances[Env.sender] > balances[Env.sender] + v;\n  }\n  storage{\n    balances[Env.sender] |-> balances[Env.sender] - v;\n    balances[a]          |-> (balances[a] + v);\n  }\n  effects{\n\n    logs Transfer (Env.sender, a, v);\n  }\n  returns True;\n}\n\nmethod approve (spender : Address, v : UInt){\n\n  guard{\n    Env.value == 0;\n  }\n  storage{\n    allowances[spender, Env.sender] |-> v;\n  }\n  effects{\n    logs Approval (Env.sender, spender, v);\n  }\n  returns True;\n}\n\nmethod transferFrom (from : Address, to : Address, v : UInt){\n\n  guard{ \n    Env.value == 0;\n    balances[from] >= v;\n    allowances[Env.sender, from] >= v;\n    \n    /- overflow checking -/\n    \n    allowances[Env.sender, from] - v < allowances[Env.sender, from];\n    balances[from] - v < balances[from];\n    balances[to] + v > balances[to];\n  }\n  storage{\n    allowances[Env.sender, from]  |-> allowances[Env.sender, from] - v;\n    balances[from]                  |-> balances[from] - v;\n    balances[to]                    |-> balances[to] + v;\n  }\n  effects{}\n  returns True;\n}\n"
  },
  {
    "path": "src/OpenSC/src/opensc.ml",
    "content": "open Sast\nopen TranslateMinic\nopen Ast \n\ntype mode = AST | SAST (*| MINIC*) | BYTECODE\n\n\nlet usage () = \n  prerr_endline ( \"usage: ./opensc.native program.sc (ast | sast | bytecode) \\n\");\n  exit 1\n\nlet main argv = \n  let open Backend.LanguageExt in\n  let open Backend.Datatypes in \n  let open Backend.Glue in\n  let open Backend.ASM in\n  let open Backend.DatatypesExt in\n  (if (Array.length argv <> 3) then usage());\n  let filename = argv.(1) in\n  let mode_flag = match Array.get argv 2 with\n    | \"ast\" -> AST\n    | \"sast\" -> SAST\n    (*    | \"minic\" -> MINIC *)\n    | \"bytecode\" -> BYTECODE\n    | _ -> usage() in\n  let ch = open_in filename in\n  let lexbuf = Lexing.from_channel ch in\n  let program = Parser.program Scanner.token lexbuf in\n  let sprogram = Semant.check program in\n(*   print_endline (string_of_sprogram sprogram) in *)\n  let minicAST = TranslateMinic.minicgen sprogram in\n    match mode_flag with\n    | AST ->   print_endline (string_of_program program)\n    | SAST -> print_endline (string_of_sprogram sprogram)\n    (* | MINIC -> print_endline (show_genv minicAST) *)\n    | BYTECODE ->  print_endline (Backend.BytecodeExt.bytecode false minicAST)\n            \n            \n            \nlet _ = main Sys.argv\n"
  },
  {
    "path": "src/OpenSC/src/parser.mly",
    "content": "%{ open Ast\n%}\n\n%token SIGNATURE STROAGE EVENT OF METHOD CONSTRUCTOR GUARD EFFECTS LOGS RETURNS MAP UINTType STORAGE\n%token ASSIGN ARROW MAPASSIGN COLON SEMI PASSIGN COMMA POINT\n%token LBRACE RBRACE LPAREN RPAREN LBRACK RBRACK \n%token EQ NEQ LGT ADD SUB MUL DIVIDE AND OR BOOL LGTEQ RGTEQ RGT\n%token INT\n%token <int> NUMLITERAL \n%token <string> ID ADDRESSTYPE END STRLIT UINTTYPE \n%token <string> UNIT ENVIRONMENT VOID\n%token <bool> BooLit\n%token EOF\n\n%start program\n%type <Ast.program> program\n\n\n\n/* %left OR\n%left AND\n\n%left LT  */\n%right PASSIGN\n%left EQ NEQ LGT LGTEQ RGTEQ RGT \n%left OR AND\n\n%left ADD SUB\n%left MUL DIVIDE\n\n%%\n\nprogram:\n\t defs EOF {$1}\n\ndefs:\n   /* nothing */ \n\t| interfacedecl implementationdecl { $1, $2 }\n\n\ninterfacedecl:\n\tSIGNATURE id_ok LBRACE interfaceBody_list RBRACE\n\t{\n\t\t{\n\t\t\tsignaturename = $2;\n\t\t\tinterfacebody =  $4\n\t\t}\n\t}\n\ninterfaceBody_list:\n\t\t{ [] }\n\t|interfaceBody interfaceBody_list { $1::$2 }\n\n\ninterfaceBody:\n\t| STORAGE ID COLON type_ok SEMI {TypeAssigndecl (Id($2), $4)}\n\t| MAP ID COLON LPAREN type_list RPAREN MAPASSIGN type_ok SEMI{MapAssigndecl (Id($2), Mapstruct($5, $8))}\n\t| EVENT ID ASSIGN ID OF LPAREN type_list RPAREN SEMI {Eventdecl (Id($2), $7)}\n\t| CONSTRUCTOR ID COLON LPAREN type_list RPAREN ARROW type_ok SEMI{Constructordecl (Id($2), $5, $8)}\n\t| METHOD ID COLON LPAREN type_list RPAREN ARROW type_ok SEMI{Methodecls (Id($2), $5, $8)} \n\n\narg_list:\n  /*nothing*/ { [] }\n\t| argument { [$1] }\n  | argument COMMA arg_list  { $1 :: $3 }\n\nargument:\n\t| ID {Id($1)}\n\t| ENVIRONMENT POINT ID {EnvLit($1, $3)}\n\n/* (owner : Address, spender : Address) */\nparam_list:\n  /*nothing*/ { [] }\n\t| param { [$1] }\n  | param COMMA param_list  { $1 :: $3 }\n\n\nparam:\n  ID COLON type_ok { Var(Id($1), $3) }\n\nid_ok:\n\t| ID {Id($1)}\n\nexpr_list:\n  /*nothing*/ { [] }\n\t| expr { [$1] }\n  | expr SEMI expr_list  { $1 :: $3 }\n\nexpr:\n\t| NUMLITERAL { NumLit($1) }\n  | BooLit { BoolLit($1) }\n\t| ID LBRACK arg_list RBRACK {Mapexpr(Id($1), $3)}\n\t| ID {Id($1)}\n\t| VOID {Voidlit($1) }\n\t| ENVIRONMENT POINT ID {EnvLit($1, $3)}\n\t| expr ADD expr   {Binop ($1, Add, $3) }\n\t| expr SUB expr   {Binop ($1, Sub, $3) }\n\t| expr MUL expr   {Binop ($1, Times, $3) }\n\t| expr DIVIDE expr   {Binop ($1, Divide, $3) }\n\t| expr OR expr   {Binop ($1, Or, $3) }\n\t| expr AND expr   {Binop ($1, And, $3) }\n\t| expr LGT expr  {Comparsion ($1, LGT, $3)}\n\t| expr EQ expr  {Comparsion ($1, Equal, $3)}\n\t| expr NEQ expr  {Comparsion ($1, Neq, $3)}\n\t| expr RGT expr  {Comparsion ($1, RGT, $3)}\n\t| expr LGTEQ expr  {Comparsion ($1, LGTEQ, $3)}\n\t| expr RGTEQ expr  {Comparsion ($1, RGTEQ, $3)}\n\t| expr PASSIGN expr { Storageassign($1, $3) }\n\t| LPAREN expr RPAREN {$2}\n\n\n\ntype_list:\n  /*nothing*/ { [] }\n\t|\ttype_ok {[$1]}\n\t| type_ok COMMA type_list { $1 :: $3 }\n\ntype_ok:\n    INT   { Int  }\n   | UINTTYPE { Uint($1) }\n   | BOOL  { Bool }\n   | ADDRESSTYPE {Address($1)}\n   | UNIT { Void($1) }\n\n\n\nimplementationdecl:\n\tconstructordecl methoddecls\n\t{\n\t\t{\n\t\t\tconsturctor = $1;\n\t\t\tmethods =  $2\n\t\t}\n\t}\n\nconstructordecl:\n\tCONSTRUCTOR id_ok LPAREN param_list RPAREN LBRACE STORAGE expr_list RETURNS type_ok SEMI RBRACE\n\t{\n\t\t{\n\t\t\tname = $2;\n\t\t\tparams = $4;\n\t\t\tconsturctor_body = $8;\n\t\t\treturn_type = $10;\n\t\t}\n\t}\n\nmethoddecls:\n\t\t{ [] }\n\t|\tmethoddecl methoddecls {$1 :: $2 }\n\nmethoddecl:\n\tMETHOD id_ok LPAREN param_list RPAREN LBRACE \n\tGUARD LBRACE expr_list RBRACE \n\tSTORAGE LBRACE expr_list RBRACE\n\tEFFECTS LBRACE effects_bodylist RBRACE\n\tRETURNS expr SEMI RBRACE\n\t{\n\t\t{\n\t\t\tmethodname = $2;\n\t\t\tparams = $4;\n\t\t\tguard_body = $9;\n\t\t\tstorage_body = $13;\n\t\t\teffects_body = $17;\n\t\t\treturns = $20;\n\t\t}\n\t}\n\n\neffects_bodylist:\n\t\t{ [] }\n\t|effects_body effects_bodylist { $1::$2 }\n\neffects_body:\n\t| LOGS id_ok LPAREN arg_list RPAREN SEMI { Logexpr($2, $4) } \n\n"
  },
  {
    "path": "src/OpenSC/src/sast.ml",
    "content": "open Ast \n\n\n(* type sparam =  *)\ntype varscope = \n\t| Sglobal \n\t| Slocal\n\ntype sexpr = typ * sx\nand sx = \n\t| SNumLit of int  (* number literal *)\n\t| SBoolLit of bool\n\t| SStrLit of string\n\t| SId of varscope * string\n\t(* | SVar of sexpr * typ *)\n\t| SEnvLit of string * string\n\t| SMapexpr of sexpr * sexpr list \n\t| SBinop of sexpr * op * sexpr\n\t| SLogexpr of sexpr * sexpr list\n\t| SStorageassign of sexpr * sexpr \n\t| SComparsion of sexpr * op * sexpr\n\t| SVoidlit of string\n\n\ntype sconsturctor_def ={\n\tsname: sexpr;\n\tsparams: decls list;\n\tsconsturctor_body: sexpr list;\n\tsreturn_type: typ;\n}\n\n\ntype smethod_def = {\n\tsmethodname: sexpr;\n\tsparams: decls list;\n\tsguard_body: sexpr list;\n\tsstorage_body: sexpr list;\n\tseffects_body: sexpr list;\n\tsreturns: sexpr;\n}\n\ntype sinterface_def = {\n\tssignaturename: sexpr;\n\tsinterfacebody: decls list;\n}\n\ntype simplementation_def = {\n\tsconsturctor: sconsturctor_def;\n\tsmethods: smethod_def list;\n}\n\ntype sprogram = sinterface_def * simplementation_def\n\nlet string_of_scope s = match s with\n\t| Slocal -> \":(local)\"\n\t| Sglobal -> \":(global)\"\n\nlet rec string_of_sexpr (t, e) = \n  \"(\" ^ string_of_typ t ^ \": \" ^ \n  (match e with \n\t\tSNumLit(x) -> string_of_int x\n\t| SBoolLit(x) -> string_of_bool x\n\t| SStrLit(x) -> \"SStrLit(\" ^ x ^ \")\"\n  | SId(s, x) -> \"SId(\" ^ x ^ string_of_scope s ^ \")\"\n  | SEnvLit(l, l2) -> \"EnvLit(\" ^ l ^ (l2) ^ \")\"\n\t| SMapexpr (l1, l2) -> \"Mapexpr(\" ^ string_of_sexpr l1 ^ String.concat \" \" (List.map string_of_sexpr l2) ^ \")\"\n\t| SBinop(e1, op, e2) ->  \"Binop(\" ^ (string_of_sexpr e1) ^ \" \" ^ (string_of_op op) ^ \" \" ^ (string_of_sexpr e2) ^ \")\"\n\t| SLogexpr(e, el) -> \"Log(\" ^ string_of_sexpr e ^ \" \" ^ String.concat \" \" (List.map string_of_sexpr el) ^ \")\"\n\t| SStorageassign(e1, e2) -> \"Assign: \" ^ (string_of_sexpr e1) ^ \" <- \" ^ (string_of_sexpr e2)\n\t| SComparsion(e1, op, e2) ->  \"Comparsion: \" ^ (string_of_sexpr e1) ^ \" \" ^ (string_of_op op) ^ \" \" ^ (string_of_sexpr e2)\n\t| SVoidlit(s) -> \"Void: \" ^ s\n\t(* | Svar(x, t) -> x ^ string_of_typ t *)\n\t(* | StypeAssign(x, y)-> \"Type Assign: \" ^ string_of_sexpr x  ^ \" \" ^ string_of_typ y ^ \"\\n\" *)\n\t(* | SmapAssign(x, t1, t2) -> \"Map assign: \" ^ string_of_sexpr x ^ \" \" ^ (string_of_typ t1) ^ (string_of_typ t2) ^ \"\\n\" *)\n\t(* | SpointAssign(x, e) -> \"pointer assign: \" ^string_of_sexpr x ^ \" \" ^ (string_of_sexpr e) ^ \"\\n\" *)\n\t(* | Sevent(x, ty) -> x ^ \"Event: \" ^ String.concat \" \" (List.map string_of_typ ty) ^ \"\\n\" *)\n\t(* | Sconstructorexpr(x, ty1, ty2) -> \"constructor expr: \" ^ \" \" ^ x ^ \" \" ^ string_of_typ ty1 ^ \" \" ^  string_of_typ ty2 ^ \"\\n\" *)\n\t(* | Smethodexpr(x, ty1, ty2) -> \"Method expr: \" ^ x ^ \" \"  ^ string_of_typ ty1 ^ \" \" ^ string_of_typ ty2 ^ \" \" ^ \"\\n\" *)\n  ) ^ \")\"\n\nlet string_of_sinterfacedef sinterfacedecl =\n  \"--interface\\n\\n\" ^\n  \"signature \" ^\n  string_of_sexpr sinterfacedecl.ssignaturename ^ \"\\n \" ^\n  String.concat \"\\n \" (List.map string_of_decl sinterfacedecl.sinterfacebody)\n  \n\nlet string_of_sconstructordef constructordecl = \n  \"constructor \" ^\n\tstring_of_sexpr constructordecl.sname ^ \n\t\"(\" ^ String.concat \" \\n \" (List.map string_of_decl constructordecl.sparams) ^ \")\\n \" ^\n\tString.concat \" \\n \" (List.map string_of_sexpr constructordecl.sconsturctor_body) ^\n\t\"\\n returns \" ^ string_of_typ constructordecl.sreturn_type ^ \"\\n\\n\"\n\nlet string_of_smethoddef methoddecl = \n  \"method \" ^\n\tstring_of_sexpr methoddecl.smethodname ^ \n\t\"(\" ^  String.concat \"\\n  \" (List.map string_of_decl methoddecl.sparams) ^ \")\" ^\n\t\"\\n guard\\n  \" ^ String.concat \"\\n  \" (List.map string_of_sexpr methoddecl.sguard_body) ^\n\t\"\\n storage\\n  \" ^ String.concat \"\\n  \" (List.map string_of_sexpr methoddecl.sstorage_body) ^\n\t\"\\n effects\\n  \" ^ String.concat \"\\n  \" (List.map string_of_sexpr methoddecl.seffects_body) ^\n\t\"\\n returns \" ^ string_of_sexpr methoddecl.sreturns ^ \"\\n\\n\"\n\nlet string_of_simplementation implementdecl =\n  \"--implementation\\n\\n\" ^\n\tstring_of_sconstructordef implementdecl.sconsturctor ^ \n\tString.concat \"\\n\" (List.map string_of_smethoddef implementdecl.smethods)\n\nlet string_of_sprogram (interfaces, implementations) =\n\t\"\\n\\n--------------------------------\\n  Semantically checked program \\n--------------------------------\\n\\n\" ^\n\t\"\" ^ ( string_of_sinterfacedef interfaces) ^ \"\\n\"  ^\n\t\"\\n\" ^ (string_of_simplementation implementations) ^ \"\\n\\n***Yeah!***\"\n"
  },
  {
    "path": "src/OpenSC/src/scanner.mll",
    "content": "{open Parser}\n\nlet digits = ['0'-'9']\nlet letter = ['a'-'z' 'A'-'Z']\n\nrule token = parse\n   [' ' '\\t' '\\r' '\\n'] \t{ token lexbuf }\n  |\"/-\"\t\t\t\t \t\t\t\t\t{multicomment lexbuf} (* multiple comment *)\n  | '('             \t { LPAREN }\n\t| ')'             \t { RPAREN }\n\t| '{'             \t { LBRACE }\n\t| '}'             \t { RBRACE }\n\t| '['             \t { LBRACK }\n\t| ']'             \t { RBRACK }\n\t(*  General op *)\n\t| \"==\"\t\t\t\t \t\t\t { EQ }\n\t| \"!=\"\t\t\t\t \t\t\t { NEQ }\n\t| \">\"\t\t\t\t \t\t\t\t { LGT } \n\t| \">=\"\t\t\t\t\t\t\t { LGTEQ }\n\t| \"<=\"\t\t\t\t\t\t\t { RGTEQ }\n\t| \"<\"\t\t\t\t\t\t\t\t { RGT} \n\t| \"+\"\t\t\t\t \t\t\t\t { ADD }\n\t| \"-\"\t\t\t\t \t\t\t\t { SUB }\n\t| \"*\"\t\t\t\t \t\t\t\t { MUL }\n\t| \"/\"\t\t\t\t \t\t\t\t { DIVIDE }\n\t| \"and\"\t\t\t\t \t\t\t\t { AND }\n\t| \"or\"\t\t\t\t \t\t\t\t { OR }\t\t\t\n\t(* end of general ops *)\n\t(*  Types *)\n\t| \"UInt\"\t\t\t \t\t\t { UINTTYPE(\"uint\") }\n\t| \"True\"          \t { BooLit(true)  }\n\t| \"False\"         \t { BooLit(false) }\n\t| \"Bool\"          \t { BOOL }\n\t| \"Address\"\t\t\t \t\t { ADDRESSTYPE(\"ADDRESS\") }\n\t| \"map\"\t\t\t\t \t\t\t { MAP } (* as hash table *)\n\t| \"voidlit\"\t\t\t\t\t {VOID(\"voidlit\")} (* void is a literal type ... *)\n\t| \"void\"\t\t\t\t \t\t\t { UNIT(\"void\") } (* instead of () use void *)\n\t(* end of types *)\n\t(* type of assignement*)\n\t| \"->\"\t\t\t\t \t\t\t { ARROW }\n\t| \"|->\"\t\t\t\t \t\t\t { PASSIGN }\n\t| \"=>\"\t\t\t\t\t\t\t { MAPASSIGN }\n\t| '='\t\t\t\t \t\t\t\t { ASSIGN }\n\t| ':'             \t { COLON } (* Type declaration *)\n\t(* end of type of assignments *)\n\t| '.'\t\t\t\t \t\t\t\t { POINT } (* Point for extract information *)\n\t| ';'\t\t\t\t\t\t\t\t { SEMI }\n\t| ','\t\t\t\t\t\t\t\t { COMMA } \n\t(*  ==========================================================  *)\n\t| \"signature\"\t\t \t\t { SIGNATURE }\t\t\n\t(* | \"end\"\t\t\t\t       { END(\"END\") }\tseparation op *)\n\t| \"storage\"\t\t\t     { STORAGE }\n\t| \"event\"\t\t\t \t\t\t { EVENT }\n\t| \"of\"\t\t\t\t \t\t\t { OF }\n\t| \"method\"\t\t\t \t\t { METHOD }\n\t| \"constructor\"\t\t \t { CONSTRUCTOR }\n\t| \"Env\"\t\t\t\t \t\t\t { ENVIRONMENT(\"Env\") }\n\t| \"guard\"\t\t\t \t\t\t { GUARD }\n\t| \"effects\"\t\t\t\t \t { EFFECTS }\n\t| \"logs\"\t\t\t  \t\t { LOGS }\n\t| \"returns\"\t\t\t \t\t { RETURNS }\n\t(* NEED more type *)\n\t| '\"' (([^'\"']*) as s) '\"'  { STRLIT(s) }\n\t| \"int\"    \t\t\t\t\t{ INT }\n\t| digits+ as lem  { NUMLITERAL(int_of_string lem) }\n\t| letter (digits | letter | '_')* as lem { ID(lem) }\n\t| eof { EOF }\n\n\tand multicomment = parse\n\t  \"-/\"  { token lexbuf }\n\t| _     { multicomment lexbuf }\n"
  },
  {
    "path": "src/OpenSC/src/semant.ml",
    "content": "open Ast \nopen Sast\nopen List\n\nmodule StringMap = Map.Make(String)\n\n\n(* \nlet strore_ids ta = function *)\n\n\n(* need to implement *)\nlet check (signature, implementation) =\n\n  (* Add variable id in interface to symbol table *)\n  let add_var map var =\n    let dup_err v = \"duplicate variable \" ^ (string_of_expr v) ^ \" in interface\"\n    and make_err er = raise (Failure er)\n    in match var with (* No duplicate variables or redefinitions of built-ins *)\n      Var(x, t) when StringMap.mem (string_of_expr x) map -> make_err (dup_err x)\n    | Var(x, t) ->  StringMap.add (string_of_expr x) var map\n    | TypeAssigndecl(x, t) when StringMap.mem (string_of_expr x) map -> make_err (dup_err x)\n    | TypeAssigndecl(x, t) ->  StringMap.add (string_of_expr x) var map\n    | MapAssigndecl(x, t) when StringMap.mem (string_of_expr x) map -> make_err (dup_err x)\n    | MapAssigndecl(x, t) ->  StringMap.add (string_of_expr x) var map\n    | Eventdecl(x, t) when StringMap.mem (string_of_expr x) map -> make_err (dup_err x)\n    | Eventdecl(x, t) ->  StringMap.add (string_of_expr x) var map\n    | _ -> map\n  in\n\n  (* Collect all variable names into one symbol table *)\n  let var_decls = List.fold_left add_var StringMap.empty signature.interfacebody in\n\n  (* Add method name in interface to symbol table *)\n  let add_func map func =\n    let dup_err v = \"duplicate method \" ^ (string_of_expr v) ^ \" in interface\"\n    and make_err er = raise (Failure er)\n    in match func with (* No duplicate variables or redefinitions of built-ins *)\n      Constructordecl(l, t1, t2) when StringMap.mem (string_of_expr l) map -> make_err (dup_err l)\n    | Constructordecl(l, t1, t2) ->  StringMap.add (string_of_expr l) func map\n    | Methodecls (l, t1, t2) when StringMap.mem (string_of_expr l) map -> make_err (dup_err l)\n    | Methodecls (l, t1, t2) ->  StringMap.add (string_of_expr l) func map\n    | _ -> map\n  in\n\n  (* Collect all function names into one symbol table *)\n  let func_decls = List.fold_left add_func StringMap.empty signature.interfacebody in\n\n  (* Return a function from our symbol table *)\n  let find_func s =\n    try StringMap.find s func_decls\n    with Not_found -> raise (Failure (\"unrecognized method \" ^ s))\n  in\n\n  let count_constructor num func =\n    match func with\n      Constructordecl(l, t1, t2) -> num +1\n      | _ -> num\n  in\n\n  (* check constructor only announce once in interface *)\n  let _  = \n    let constructor_num = List.fold_left count_constructor 0 signature.interfacebody in\n    match constructor_num with\n    0 -> raise (Failure \"No constructor in interface\")\n    | 1 -> constructor_num\n    | _ -> raise (Failure \"Multiple constructors in interface\")\n  in\n  \n  (* Check all methods are implemented only once *)\n\n  let add_implement map impl = \n    let dup_err v = \"duplicate method \" ^ (string_of_expr v) ^ \" in implementation\"\n    and make_err er = raise (Failure er)\n    in match impl with\n      impl when StringMap.mem (string_of_expr impl.methodname) map -> make_err (dup_err impl.methodname)\n      | impl ->  StringMap.add (string_of_expr impl.methodname) impl map\n  in\n\n  let _ = List.fold_left add_implement StringMap.empty  implementation.methods in\n\n  let rec check_expr = function\n    | NumLit l -> (Int, SNumLit l)\n    | BoolLit l -> (Bool, SBoolLit l)\n    | StrLit l -> (Void(\"void\"), SStrLit l)\n    (* check Id retrun with the correct type, keep Int for now *)\n    | Id x -> (Int, SId(Sglobal, x))\n    | EnvLit(x, y) -> (Void(\"Env\"), SEnvLit(x,y))\n    | Mapexpr(e1, e2) -> (Int, SMapexpr(check_expr e1, List.map check_expr e2))\n    | Binop(e1, op, e2) -> (Int, SBinop(check_expr e1, op, check_expr e2))\n    | Logexpr(e1, e2) -> (Void(\"void\"), SLogexpr(check_expr e1, List.map check_expr e2))\n    | Storageassign (e1, e2) -> (Int, SStorageassign(check_expr e1, check_expr e2))\n    | Comparsion (e1, op, e2) -> (Int, SComparsion(check_expr e1, op, check_expr e2))\n    | Voidlit(s) -> (Void(\"void\"), SVoidlit(s) )\n  in\n\n  let check_func func = \n\n    let check_args_type var1 t2 = \n      let check_type x1 t1 t2 =  let tag = (t1 = t2)\n      and unmatch_err = \"function argument \" ^ string_of_expr x1 ^ \" has type \" \n      ^ string_of_typ t1 ^ \" ,which is unmatch with declaration type \" ^ string_of_typ t2 in\n        match tag with \n        true -> t1\n        | false -> raise (Failure unmatch_err)\n      in\n      match var1, t2 with\n      Var(x1, t1), t2 -> check_type x1 t1 t2\n      | _, _ -> raise (Failure \"Not a legal variables in arguments\")\n\n    in\n\n    let sfunc = function\n       | Id l -> (Void(\"void\"), SStrLit l)\n       | e -> raise (Failure (\"Not a function name \" ^ string_of_expr e))\n    in\n\n    let func_decl = find_func (string_of_expr func.methodname) in\n\n    let params_types, return_type = match func_decl with \n      Methodecls(expr, typli, typ) -> (typli, typ)\n      | _ -> raise (Failure \"Not legal method\")\n    in\n    \n    (* If the only arg is void and no arguments in method, then skip check args *)\n    let skip_check_args =  \n      if List.length params_types = 1 then \n        let first_arg = List.hd params_types in \n        match first_arg with \n        Void(\"void\") -> if List.length func.params = 0 then true else false\n        | _ -> false\n      else false\n\n\n    in\n\n    let _ = if skip_check_args then true else\n\n      (* Check argument types length matches with declaration  *)\n      let _ = let typ_len_func = List.length func.params\n        in let typ_len_decl = List.length params_types in\n        match typ_len_func, typ_len_decl with\n        typ_len_func, typ_len_decl when (typ_len_func > typ_len_decl)\n        -> raise (Failure (\"Redundant arguments in method \" ^ string_of_expr func.methodname))\n        | typ_len_func, typ_len_decl when (typ_len_func < typ_len_decl)\n        -> raise (Failure (\"Missing arguments in method \" ^ string_of_expr func.methodname))\n        | _, _ -> typ_len_func\n      in\n\n      (* Check whether variable argument type matches with declaration *)\n      let _ = (List.map2 check_args_type func.params params_types) in false\n\n    in\n    let add_var_args map var =\n      let dup_err v = \"duplicate variable \" ^ (string_of_expr v) ^ \" in method arguments\"\n      and make_err er = raise (Failure er)\n      in match var with (* No duplicate variables or redefinitions of built-ins *)\n        Var(x, t) when StringMap.mem (string_of_expr x) map -> make_err (dup_err x)\n      | Var(x, t) ->  StringMap.add (string_of_expr x) var map\n      | _ -> raise (Failure \"Only variable allows in method arguments\")\n    in\n\n    let var_sym = List.fold_left add_var_args var_decls func.params in\n\n    (* Return a variable from our symbol table *)\n    let find_var s = let s_type = \n      try StringMap.find s var_sym\n      with Not_found -> raise (Failure (\"unrecognized variable \" ^ s))\n      in\n      match s_type with\n      Var(x, t) -> t\n      | TypeAssigndecl(x, t) -> t\n      | MapAssigndecl(x, t) -> t\n      | Eventdecl(x, t) -> Void(\"void\")\n      | _ -> raise (Failure (\"unrecognized variable \" ^ string_of_decl s_type ))\n    in\n\n    let rec check_expr = function\n      | NumLit l -> (Int, SNumLit l)\n      | BoolLit l -> (Bool, SBoolLit l)\n      | StrLit l -> (Void(\"void\"), SStrLit l)\n      (* check Id retrun with the correct type, keep Int for now *)\n      | Id x -> \n        let t = find_var x in\n        if StringMap.mem x var_decls then\n          (find_var x, SId(Sglobal, x))\n        else (find_var x, SId(Slocal, x))\n      | EnvLit(x, y) -> (Void(\"Env\"), SEnvLit(x,y))\n      | Mapexpr(e1, e2) as e -> \n        let id_err = string_of_expr e1 ^ \" is not a id in \" ^ string_of_expr e in\n        let (t1, e1') = match e1 with \n          Id(id) -> check_expr e1\n          | _ -> raise (Failure id_err)\n        in\n        let type_err = \"Id \" ^ string_of_expr e1 ^ \" \" ^\n                      \" is \" ^ string_of_typ t1 ^ \n                      \" type, not a map struct in \" ^ string_of_expr e in\n        let e2' = List.map check_expr e2 in\n        let check_map_key_type key_type sexpr2 = \n          match sexpr2 with\n            (type2, sx2) -> \n            let key_err = \"Expresion \"  ^ (string_of_sexpr sexpr2) \n                      ^ \" has type \" ^ (string_of_typ type2) ^ \", but type \"\n                      ^ (string_of_typ key_type) ^ \" is required in \"\n                      ^ string_of_expr e\n            in \n            \n            if type2 = Void(\"Env\") then sexpr2\n            else if key_type = type2 then \n            match key_type with\n             Int | Uint(\"uint\") | Address(\"ADDRESS\") -> sexpr2\n            | _ -> raise (Failure (\"Type \" ^ string_of_typ key_type ^\n            \" is not allowed as key type in map \" ^ string_of_expr e ))\n            else\n              raise (Failure key_err)\n        in\n        let value_type = match t1 with\n          Mapstruct(key_typli, value_type) -> \n          (* Check map query types length matches with map declaration  *)\n          let key_type_ls_len = List.length key_typli\n          and query_type_ls_len = List.length e2' in\n          let _ =\n          match key_type_ls_len, query_type_ls_len with\n          key_type_ls_len, query_type_ls_len when \n          (key_type_ls_len > query_type_ls_len) ->\n          raise (Failure (\"Missing query value in map \" ^ string_of_expr e))\n          | key_type_ls_len, query_type_ls_len when \n          (key_type_ls_len < query_type_ls_len) ->\n          raise (Failure (\"Redundant query value in map \" ^ string_of_expr e))\n          | _ -> key_type_ls_len\n          in\n          let _ = List.map2 check_map_key_type key_typli e2' in\n          value_type\n          | _ -> raise (Failure type_err)\n        in \n        (value_type, SMapexpr((t1, e1'), e2'))\n      (* Binop : Add | Sub | Times | Divide | And | Or *)\n      | Binop(e1, op, e2) as e -> \n        let (t1, e1') = check_expr e1\n        and (t2, e2') = check_expr e2 in\n        let err = \"Illegal binary operator \" ^\n                  string_of_typ t1 ^ \" \" ^ string_of_op op ^ \" \" ^\n                  string_of_typ t2 ^ \" in \" ^ string_of_expr e\n        in\n        (* All binary operators require operands of the same type*)\n        \n        if t1 = Void(\"Env\") then\n          (t2, SBinop((t1, e1'), op, (t2, e2')))\n        else if t2 = Void(\"Env\") then\n          (t1, SBinop((t1, e1'), op, (t2, e2')))\n        else if t1 = t2 then\n          (* Determine expression type based on operator and operand types *)\n          let t = match op with\n            Add | Sub | Times | Divide when t1 = Uint(\"uint\") -> Uint(\"uint\")\n            | Add | Sub | Times | Divide when t1 = Int -> Int\n            | And | Or when t1 = Bool -> Bool\n            | _ -> raise (Failure err)\n          in\n          (t, SBinop((t1, e1'), op, (t2, e2')))\n        else if (t1 = Uint(\"uint\") && t2 = Int) || (t1 = Int && t2 = Uint(\"uint\")) then\n          let t = match op with\n          Add | Sub | Times | Divide -> Int\n          | _ -> raise (Failure err)\n          in\n          (t, SBinop((t1, e1'), op, (t2, e2')))\n        else raise (Failure err)\n\n      | Logexpr(e1, e2) -> (Void(\"Log\"), SLogexpr(check_expr e1, List.map check_expr e2))\n      | Storageassign (e1, e2) as e -> \n        let (t1, e1') = check_expr e1\n        and (t2, e2') = check_expr e2 in\n        let err = \"Illegal storage assign: \" ^\n                  string_of_typ t1 ^ \" <- \" ^\n                  string_of_typ t2 ^ \" in \" ^ string_of_expr e\n        in\n        (* All binary operators require operands of the same type*)\n        if t2 = Void(\"Env\") && t1 != Void(\"Env\") then\n          (t1, SStorageassign((t1, e1'), (t2, e2')))\n        else if (t1 = Uint(\"uint\") && t2 = Int) || (t1 = Int && t2 = Uint(\"uint\")) then\n          (Void(\"void\"), SStorageassign((t1, e1'), (t2, e2')))\n        else if t1 = t2 then\n          (Void(\"void\"), SStorageassign((t1, e1'), (t2, e2')))\n        else raise (Failure err)\n\n      (* Comparsion : Equal | Neq | LGT | RGT | LGTEQ | RGTEQ *)\n      | Comparsion (e1, op, e2) as e -> \n        let (t1, e1') = check_expr e1\n        and (t2, e2') = check_expr e2 in\n        let err = \"Illegal binary operator \" ^\n                  string_of_typ t1 ^ \" \" ^ string_of_op op ^ \" \" ^\n                  string_of_typ t2 ^ \" in \" ^ string_of_expr e\n        in\n        (* All binary operators require operands of the same type*)\n        if t1 = Void(\"Env\") then\n          (t2, SComparsion((t1, e1'), op, (t2, e2')))\n        else if t2 = Void(\"Env\") then\n          (t1, SComparsion((t1, e1'), op, (t2, e2')))\n        else if t1 = t2 then\n          (* Determine expression type based on operator and operand types *)\n          let t = match op with\n            | Equal | Neq | LGT | RGT | LGTEQ | RGTEQ when t1 = Uint(\"uint\") || t1 = Int -> Bool\n            | _ -> raise (Failure err)\n          in\n          (t, SComparsion((t1, e1'), op, (t2, e2')))\n        else if (t1 = Uint(\"uint\") && t2 = Int) || (t1 = Int && t2 = Uint(\"uint\")) then\n          let t = match op with\n          | Equal | Neq | LGT | RGT | LGTEQ | RGTEQ -> Bool\n          | _ -> raise (Failure err)\n          in\n          (t, SComparsion((t1, e1'), op, (t2, e2')))\n        else raise (Failure err)\n      | Voidlit(s) -> (Void(\"void\"), SVoidlit(s) )\n    in\n\n    let sreturns = \n      let (t, sx) = check_expr func.returns in\n      match t with \n      Void(\"Env\") -> (return_type, sx)\n      | _ -> if t = return_type then (t, sx) \n      else \n        let return_type_unmatch_err = \"Return type of method \" ^ (string_of_expr func.methodname)\n        ^ \" is: \" ^ (string_of_typ return_type) ^ \",\\n with is unmatch with \"\n        ^ \" expression: \" ^ (string_of_sexpr (t, sx)) in \n        if t = return_type then (t, sx)\n        else raise (Failure return_type_unmatch_err)\n\n    in\n    { \n      smethodname = sfunc func.methodname;\n      sparams = func.params;\n      sguard_body = List.map check_expr func.guard_body;\n      sstorage_body = List.map check_expr func.storage_body;\n      seffects_body = List.map check_expr func.effects_body;\n      sreturns = sreturns;\n    }\n  in\n\n  let sinterface_def =\n      {\n        ssignaturename = check_expr signature.signaturename;\n        sinterfacebody = signature.interfacebody;\n      }\n  in \n\n  let simplementation_def = \n    {\n      sconsturctor = {\n        sname = check_expr implementation.consturctor.name;\n        sparams = implementation.consturctor.params;\n        sconsturctor_body = List.map check_expr implementation.consturctor.consturctor_body;\n        sreturn_type = implementation.consturctor.return_type;\n      };\n\n      smethods = List.map check_func implementation.methods;\n    }\n  in \n\n  let sprogram = (sinterface_def, simplementation_def)\n  in\n  sprogram\n"
  },
  {
    "path": "src/OpenSC/src/test.ml",
    "content": "open Ast\n\nlet _ =\n  let lexbuf = Lexing.from_channel stdin in\n  let program = Parser.program Scanner.token lexbuf in\n  print_endline (string_of_program program)"
  },
  {
    "path": "src/OpenSC/src/test2.ml",
    "content": "open Sast\n\nlet _ =\n  let lexbuf = Lexing.from_channel stdin in\n  let program = Parser.program Scanner.token lexbuf in\n  let sprogram = Semant.check program in\n  print_endline (string_of_sprogram sprogram)\n"
  },
  {
    "path": "src/OpenSC/src/test3.ml",
    "content": "open Sast\nopen TranslateMinic\n\nlet _ =\n  let open LanguageExt in\n  let lexbuf = Lexing.from_channel stdin in\n  let program = Parser.program Scanner.token lexbuf in\n  let sprogram = Semant.check program in\n(*   print_endline (string_of_sprogram sprogram) in *)\n  let minicAST = TranslateMinic.minicgen sprogram in\n  print_endline (show_genv minicAST)\n\n\n\n\n  (* | MINIC -> let ge = minicgen filename ast_structure in print_endline (Backend.LanguageExt.show_genv ge)\t\t\t      *)\n\n\n(* ocamlbuild  -I backend test3.native *)\n"
  },
  {
    "path": "src/OpenSC/src/test4.ml",
    "content": "open Sast\nopen TranslateMinic\n\nlet _ =\n  let open LanguageExt in\n  let open Datatypes in \n  let open Glue in\n  let open ASM in\n  let open DatatypesExt in\n  let ch = open_in filename in\n  let lexbuf = Lexing.from_channel ch in\n  let program = Parser.program Scanner.token lexbuf in\n  let sprogram = Semant.check program in\n(*   print_endline (string_of_sprogram sprogram) in *)\n  let minicAST = TranslateMinic.minicgen sprogram in\n     match full_compile_genv minicAST with\n     | None -> print_endline \"Compilation failed\"; exit 1\n     | Some (Coq_pair (program, entrypoint)) ->\n        let asm =\n          transform\n            (List.rev (caml_list program))\n            entrypoint in\n            print_endline (show_genv minicAST); \n            print_endline (assemble asm)\n\n\n  (* | MINIC -> let ge = minicgen filename ast_structure in print_endline (Backend.LanguageExt.show_genv ge)\t\t\t      *)\n\n\n(* ocamlbuild -pkg cryptokit -I backend test4.native *)\n"
  },
  {
    "path": "src/OpenSC/src/testfolder/scanner.mll",
    "content": "\nlet digits = ['0'-'9']\nlet letter = ['a'-'z' 'A'-'Z']\n\nrule token = parse\n   [' ' '\\t' '\\r' '\\n'] \t{ token lexbuf }\n  |'-' \t\t\t\t \t\t\t\t\t{comment 1 lexbuf} (* comment *)\n  |\"/-\"\t\t\t\t \t\t\t\t\t{multicomment 1 lexbuf} (* multiple comment *)\n  | '('             \t { \"LPAREN\" }\n\t| ')'             \t { \"RPAREN\" }\n\t| '{'             \t { \"LBRACE\" }\n\t| '}'             \t { \"RBRACE\" }\n\t| '['             \t { \"LBRACK\" }\n\t| ']'             \t { \"RBRACK\" }\n\t(*  General op *)\n\t| \"==\"\t\t\t\t \t\t\t { \"EQ\" }\n\t| \"!=\"\t\t\t\t \t\t\t { \"NEQ\" }\n\t| \">\"\t\t\t\t \t\t\t\t { \"LGT\" } \n\t| \"+\"\t\t\t\t \t\t\t\t { \"ADD\" }\n\t| \"-\"\t\t\t\t \t\t\t\t { \"SUB\" }\n\t| \"*\"\t\t\t\t \t\t\t\t { \"MUL\" }\n\t| \"/\"\t\t\t\t \t\t\t\t { \"DIVIDE\" }\n\t| \"and\"\t\t\t\t \t\t\t\t { \"AND\" }\n\t| \"or\"\t\t\t\t \t\t\t\t { \"OR\" }\t\t\t\n\t(* end of general ops *)\n\t(*  Types *)\n\t| \"UInt\"\t\t\t \t\t\t { \"UINTType\" }\n\t| \"True\"          \t { \"BooLit(true)\"  }\n\t| \"False\"         \t { \"BooLit(false)\" }\n\t| \"Bool\"          \t { \"BOOL\" }\n\t| \"Address\"\t\t\t \t\t { \"ADDRESS\" }\n\t| \"map\"\t\t\t\t \t\t\t { \"MAP\" } (* as hash table *)\n\t| \"()\"\t\t\t\t \t\t\t { \"UNIT\" }\n\t(* end of types *)\n\t(* type of assignement*)\n\t| \"->\"\t\t\t\t \t\t\t { \"ARROW\" }\n\t| \"|->\"\t\t\t\t \t\t\t { \"PASSIGN\" }\n\t| \"=>\"\t\t\t\t\t\t\t { \"MAPASSIGN\" }\n\t| '='\t\t\t\t \t\t\t\t { \"ASSIGN\" }\n\t| ':'             \t { \"COLON\" } (* Type declaration *)\n\t(* end of type of assignments *)\n\t| '.'\t\t\t\t \t\t\t\t { \"POINT\" } (* Point for extract information *)\n\t| ';'\t\t\t\t\t\t\t\t { \"SEMI\" }\n\t(*  ==========================================================  *)\n\t| \"signature\"\t\t \t\t { \"SIGNATURE\" }\t\t\n\t| \"end\"\t\t\t\t       { \"END\" }\t(* separation op *)\n\t| \"storage\"\t\t\t     { \"STROAGE\" }\n\t| \"event\"\t\t\t \t\t\t { \"EVENT\" }\n\t| \"of\"\t\t\t\t \t\t\t { \"OF\" }\n\t| \"method\"\t\t\t \t\t { \"METHOD\" }\n\t| \"constructor\"\t\t \t { \"CONSTRUCTOR\" }\n\t| \"Env\"\t\t\t\t \t\t\t { \"ENVIRONMENT\" }\n\t| \"guard\"\t\t\t \t\t\t { \"GUARD\" }\n\t| \"effects\"\t\t\t\t \t { \"EFFECTS\" }\n\t| \"logs\"\t\t\t  \t\t { \"LOGS\" }\n\t| \"returns\"\t\t\t \t\t { \"RETURNS\" }\n\t| digits+ as lem    { \"please\"}\n\t| letter (digits | letter | '_')* as lem { lem }\n\n\tand comment lvl = parse\n\t  \"\\n\"  { if lvl = 1 then token lexbuf else comment (lvl - 1) lexbuf  }\n\t| _     { comment lvl lexbuf }\n\n\tand multicomment lvl = parse\n\t  \"-/\"  { if lvl = 1 then token lexbuf else comment (lvl - 1) lexbuf  }\n\t| _     { multicomment lvl lexbuf }\n\n\n{\n  let _ = \n  let buf = Lexing . from_channel stdin in\n  let f = token buf in\n  print_endline f\n}"
  },
  {
    "path": "src/OpenSC/src/translateMinic.ml",
    "content": "open Ast\nopen Sast\nlet sprintf = Printf.sprintf\n\nopen Backend.ExpMiniC            \nopen Backend.StmtMiniC            \nopen Backend.Language   \n\n\nlet rec positive_of_int n =\n  let open Backend.BinNums in\n  if n = 1 then\n    Coq_xH\n  else if (n land 1) = 1 then\n    Coq_xI (positive_of_int (n asr 1))\n  else\n    Coq_xO (positive_of_int (n asr 1))\n  \nlet coq_Z_of_int n =\n  let open Backend.BinNums in\n  if n = 0 then Z0\n  else if n > 0 then Zpos (positive_of_int n)\n  else Zneg (positive_of_int (-n))\n\nlet rec int_of_positive p =\nlet open Backend.BinNums in\n  match p with\n  | Coq_xI rest -> 2*(int_of_positive rest) + 1\n  | Coq_xO rest -> 2*(int_of_positive rest)\n  | Coq_xH -> 1\n\nlet int_of_z =\nlet open Backend.BinNums in\n  function\n  | Z0 -> 0\n  | Zpos rest -> int_of_positive rest\n  | Zneg rest -> -(int_of_positive rest)\n\nlet rec coqlist_of_list =\n  let open Backend.Datatypes in\n  function\n  | [] -> Coq_nil\n  | x::xs -> (Coq_cons (x, coqlist_of_list xs)) \n       \nlet rec filter_map f ls =\n  let open Backend.Datatypes in\n    match ls with\n    | [] -> []\n    | x::xs -> match f x with\n          | Some y -> y :: filter_map f xs\n          | None -> filter_map f xs\n\nlet ident_table : (string, int) Hashtbl.t = Hashtbl.create 1000\nlet ident_counter : int ref = ref 550\n\n(** ident_generator : positive **)\nlet ident_generator = fun prefix midfix postfix ->\n  let id = (prefix ^ midfix ^ \"_\"^ postfix) in\n  try positive_of_int (Hashtbl.find ident_table id)\n  with Not_found -> begin\n      let n = !ident_counter in\n      ident_counter := !ident_counter + 1;\n      Hashtbl.add ident_table id n;\n      positive_of_int n\n    end\n\nlet struct_name_to_ident2 = ident_generator \"\" \"struct\"\nlet struct_field_name_to_ident2 = ident_generator \"\" \"field\"\nlet backend_ident_of_globvar  = ident_generator \"var_\" \"var2\"\nlet backend_ident_of_funcname = ident_generator \"ident_\" \"function\"\nlet backend_ident_of_tempvar =  ident_generator \"temp_\" \"var\"\n(* let backend_ident_of_tempvar =  positive_of_int 11 *)\n\nlet rec gen_ctype =\n  let open Backend.Ctypes in \n  function \n  | Bool -> Tint (I256, Unsigned)\n  | Int -> Tint (I256, Signed)\n  | Uint x  -> Tint (I256, Unsigned)\n  | Void x -> Tvoid\n  | Address x -> Tint (I256, Unsigned)\n  | Mapstruct (key_ty, val_ty) -> Thashmap (gen_ctype (List.hd key_ty), gen_ctype val_ty)\n\n  (* | Mapstruct (t1, t2) -> Thashmap (gen_ctype t1, gen_ctype t2) *)\n  (* and gen_ctype_fields\n  do we need ctype fields??\n  leave for now\n  *)\n\nlet gen_unop = \n  let open Backend.Cop in\n  function\n  | Neq -> Oneg\n  | _ -> raise (Failure \"Not a unop!\")\n  (* | OPnot -> Onotbool\n  | OPbitnot -> Onotint\n  | OPbitneg -> Onotint\n  | OPsha_1 -> Osha_1  may need to suppport more unary op *)\n\nlet gen_binop =\n  let open Backend.Cop in\n  function\n  | Add -> Oadd\n  | Sub -> Osub\n  | Times -> Omul\n  | Divide -> Odiv\n  | And -> Oand\n  | Or -> Oor\n  | Equal -> Oeq\n  | Neq -> One\n  | RGT -> Olt\n  | RGTEQ -> Ole\n  | LGT -> Ogt\n  | LGTEQ -> Oge\n  | PASSIGN -> raise (Failure \"PASSIGN should be solved as Storageassign in expr\")\n\n(*   | OPlt -> Olt\n  | OPle -> Ole\n  | OPgt -> Ogt\n  | OPge -> Oge\n  | OPshl -> Oshl\n  | OPshr -> Oshr\n  | OPxor -> Oxor\n  | OPbitand -> Oand\n  | OPbitor -> Oor\n  | OPsha_2 -> Osha_2 *)\n\n\nlet rec gen_rexpr e =\n  let open Backend.Integers in\n  let open Backend.ExpMiniC in\n  let open Backend.Language in\n  match e with\n  | (t, SId(Sglobal,l)) -> Eglob (backend_ident_of_globvar l, gen_ctype t)\n  | (t, SId(Slocal,l)) -> Etempvar (backend_ident_of_tempvar l, gen_ctype t)\n  (* | (t, SId(Slocal,l)) -> Etempvar (backend_ident_of_tempvar, gen_ctype t) *)\n  | se -> raise (Failure (\"Not implemented: \" ^ string_of_sexpr se))\n\nlet rec gen_lexpr e =\n  let open Backend.Ctypes in\n  let open Backend.Integers in\n  let open Backend.ExpMiniC in\n  let open Backend.Language in\n  let open Backend.MachineModel in\n  match e with\n  | (t, SNumLit l) -> Econst_int256 (Int256.repr (coq_Z_of_int l), gen_ctype Int)\n  | (t, SBoolLit l) -> (match l with \n                        |true -> Econst_int256 (Int256.one, Tint (I256, Unsigned))\n                        |false -> Econst_int256 (Int256.zero, Tint (I256, Unsigned)) )\n  | (t, SId(Sglobal,l)) -> Eglob (backend_ident_of_globvar l, gen_ctype t)\n  | (t, SId(Slocal,l)) -> Etempvar (backend_ident_of_tempvar l, gen_ctype t)\n  (* | (t, SId(Slocal,l)) -> Etempvar (backend_ident_of_tempvar, gen_ctype t) *)\n  | (t1, SBinop ((t2, se1), op, (t3, se2))) -> Ebinop (gen_binop op, gen_lexpr (t2, se1), gen_lexpr (t3, se2), gen_ctype t1)\t\n  | (t, SComparsion ((t1, se1), op, (t2, se2))) -> Ebinop (gen_binop op, gen_lexpr (t1, se1), gen_lexpr (t2, se2), gen_ctype t)\t\n  | (t, SMapexpr((t1, se1), selist)) -> \n    (* TODO: convert selist's type to Tstruct *)\n    let se2 = List.hd selist in\n    Eindex(gen_lexpr (t1, se1), gen_lexpr se2, gen_ctype t)\n  | (t, SEnvLit(s1, s2)) -> \n    (\n      match s2 with \n      | \"sender\" -> Ecall0 (Bcaller, Tvoid)\n      | \"value\" -> Ecall0 (Bcallvalue, Tvoid)\n      | \"origin\" -> Ecall0 (Borigin, Tvoid)\n      | \"sig\" -> Ecall0 (Baddress, Tvoid)\n      | \"data\" -> Ecall0 (Baddress, Tvoid)\n      | _ -> let _ = print_endline (\"Waring: Env key may not support\") in\n      Ecall0 (Baddress, Tvoid)\n    )\n  | se -> raise (Failure (\"Not implemented: \" ^ string_of_sexpr se))\n\n(** gen_assign_stmt : statement **)\nlet gen_assign_stmt e1 e2 = \n  Sassign(gen_lexpr e1, gen_lexpr e2)\n\nlet gen_set_stmt id e1 =\n  Sset (positive_of_int id, gen_rexpr e1)\n\nlet gen_guard_stmt e = \n  Sifthenelse(gen_lexpr e, Sskip, Srevert)\n\n(* sparams: decls list *)\n(** gen_params : \n    (ident, coq_type) prod list; **)\nlet gen_params sparams =\n  let open Backend.Datatypes in\n  let open Backend.Globalenvs.Genv in\n  let cvt = function\n    | Var(Id str, typ) -> Some (Coq_pair(backend_ident_of_tempvar str, gen_ctype typ))\n    (* | Var(Id str, typ) -> Some (Coq_pair(backend_ident_of_tempvar, gen_ctype typ)) *)\n    | _ -> None\n  in\n  coqlist_of_list (filter_map cvt sparams)\n\n(* let rec gen_nonempty_params (e, t) =\n  let open Backend.Datatypes in\n  match ts with\n  | t :: ts -> Coq_pair (positive_of_int (1), gen_ctype t) :: gen_nonempty_params (base+1) ts\n  |  _ -> [] *)\n\n(* storagebody: sexpr list *)\n(** gen_storage_cmd : statement **)\nlet gen_storage_cmd storebody =\n  let open Backend.Datatypes in\n  let rec list2seq = function \n    | [] -> Sskip\n    | hd::[] -> hd\n    | hd::tl -> Ssequence(hd, list2seq tl)\n  in\n  let sexpr2Sassign = function\n    | (typ, SStorageassign(lsexpr, rsexpr)) -> Some(gen_assign_stmt lsexpr rsexpr) (* (gen_assign_stmt (Int, (SId \"storedData\")) (Int, (SNumLit 12))) *)\n    | _ -> None\n  in\n  list2seq (filter_map sexpr2Sassign storebody)\n\nlet gen_guard_cmd guardbody = \n  let open Backend.Datatypes in\n  let rec list2seq = function \n    | [] -> Sskip\n    | hd::[] -> hd\n    | hd::tl -> Ssequence(hd, list2seq tl)\n  in\n  let sexpr2stmt = function\n    | se -> Some(gen_guard_stmt se)\n  in\n  list2seq (filter_map sexpr2stmt guardbody)\n\n\n(* we need a temp variable to store the return value in, \n   which should be distinct from the parameters. Hopefully \n   nobody writes a function that takes more than 10 parameters. *)\nlet return_temp_id = positive_of_int 10 \n  \nlet gen_return_cmd (return_type, sx) =\n  let open Backend.Datatypes in\n  match return_type with\n    Void(_) -> Sreturn None\n  | _ -> Ssequence(Sset (return_temp_id,\n                         gen_lexpr (return_type, sx)),\n                   Sreturn (Some return_temp_id))\n  \n(** gen_methoddef : coq_function **)\nlet gen_methoddef m =\n  let open Backend.Datatypes in\n  let method_classify (ty, _) = match ty with\n    | Void s -> false\n    | _ -> true\n  in\n  (* let dest = builtinBase_local_ident_start in   *) (* let builtinBase_local_ident_start = 10 *)\n  (* let is_pure, has_return = method_classify mt in *)\n  let has_return = method_classify m.sreturns in\n  (* let body = gen_set_stmt  builtinBase_local_ident_start (List.hd m.sstorage_body) in *)\n  (* let body =  *)\n    (* gen_storage_cmd m.sstorage_body *)\n    (* Ssequence(gen_guard_cmd m.sguard_body, gen_storage_cmd m.sstorage_body) *)\n  let ret_type (ty, sx) = gen_ctype ty in\n  \n  { \n    fn_return = ret_type m.sreturns;\n    fn_params = gen_params m.sparams; (* (ident, coq_type) prod list; *)\n    fn_temps  = if has_return then\n                  coqlist_of_list [Coq_pair(return_temp_id, ret_type m.sreturns)]\n                else\n                  Coq_nil;\n    fn_locals = Coq_nil;\n    fn_body =  \n    (* gen_storage_cmd m.sstorage_body *)\n      Ssequence(Ssequence(gen_guard_cmd m.sguard_body, gen_storage_cmd m.sstorage_body), gen_return_cmd m.sreturns)\n  }\n\n\nlet dummy_constructor =\n  let open Backend.Ctypes in\n  { \n    fn_return = Tvoid;\n    fn_params = Coq_nil;\n    fn_temps  = Coq_nil;\n    fn_locals = Coq_nil;\n    fn_body =  Sreturn None\n  }\n  \n  (* { fn_return = Tvoid;\n  fn_params = (11,TInt (SIZE,SIGNEDNESS))::nil;\n  fn_temps =  (10,Tvoid)::nil;\n  fn_body = Sassign(Eglob(550,TInt (SIZE,SIGNEDNESS)),Etempvar(11,TInt (SIZE,SIGNEDNESS)))\n  } *)\n\n(* let gen_methoddef objname m =\n  let open Datatypes in\n  let mt = m.aMethodType in\n  let dest = builtinBase_local_ident_start in  \n  let is_pure, has_return = method_classify mt in\n  let body = gen_cmd objname is_pure m.aMethodBody dest in\n  let ret_type = gen_ctype mt.aMethodReturnType.aTypeCtype in\n  { fn_return = ret_type ;\n    fn_params = coqlist_of_list (gen_params builtinBase_local_ident_start mt.aMethodArgumentTypes);\n    fn_temps  = coqlist_of_list (gen_tempenv ((dest,mt.aMethodReturnType.aTypeCtype)\n                :: gen_cmd_locals m.aMethodBody dest));\n    fn_body =  (if has_return then\n                  Ssequence (body,\n            (Sreturn (Some (Etempvar (positive_of_int dest,\n                    ret_type)))))\n    else\n      body)\n  } *)\n\n(* Print MiniC expressions/statements, for debugging purposes. *)\n\n\nlet rec string_of_ctype = \n  let open Backend.Ctypes in\n  function\n  | Tvoid -> \"Tvoid\"\n  | Tint (_,_) -> \"TInt (SIZE,SIGNEDNESS)\"\n  | Tpointer _ -> \"Tpointer\"\n  | Tarray (t,z) -> (\"Tarray (\"^string_of_ctype t^\",\"^string_of_int(int_of_z z)^\")\")\n  | Thashmap (t1,t2) -> (\"Thashmap(\"^string_of_ctype t1^\",\"^string_of_ctype t2^\")\")\n  | Tfunction (ts,t) -> \"Tfunction (TYPES,TYPE)\"\n  | Tstruct (id,flds) -> \"Tstring (IDENT, FIELDS)\"\n  | Tunion  (id,flds) -> \"Tunion (IDENT, FIELDS)\"\n  | Tcomp_ptr id -> \"Tcomp_ptr ID\"\n\t\t    \nlet rec string_of_expr = function\n  | Econst_int (z, t) -> (\"Econst_int (\" ^ string_of_int (int_of_z z) ^ \",\"^string_of_ctype t^\")\")\n  | Econst_int256 (z, t) -> (\"Econst_int (\" ^ string_of_int (int_of_z z) ^ \",\"^string_of_ctype t^\")\")\n  | Eglob (id,t) -> (\"Eglob(\"^string_of_int (int_of_positive id)^\",\"^string_of_ctype t^\")\")\n  | Etempvar (id,t) -> (\"Etempvar(\"^string_of_int (int_of_positive id)^\",\"^string_of_ctype t^\")\")\n  | Evar (id,t) -> (\"Evar(\"^string_of_int (int_of_positive id)^\",\"^string_of_ctype t^\")\")\n  | Eaddr (e,t) -> (\"Eaddr(\" ^ string_of_expr e ^\",\"^ string_of_ctype t ^\")\")\n  | Ederef (e,t) -> (\"Ederef(\" ^ string_of_expr e ^\",\"^ string_of_ctype t ^\")\")\n  | Eunop (op,e,t) -> (\"Eunop(OP,\"^string_of_expr e^\",\"^string_of_ctype t ^\")\")\n  | Ebinop (op,e1,e2,t) -> (\"Ebinop(OP,\"^string_of_expr e1^\",\"^string_of_expr e2^\",\"^string_of_ctype t ^\")\")\n  | Efield (e, ident, t) ->(\"Efield(\"^string_of_expr e^\",\"^string_of_int (int_of_positive ident)^\",\"^string_of_ctype t^\")\")\n  | Eindex (e1,e2,t) -> (\"Eindex(\"^string_of_expr e1 ^\",\"^string_of_expr e2^\",\"^string_of_ctype t^\")\")\n  | Ecall0 (bt,t) -> \"Ecall0(BUILTIN,TYPE)\"\n  | Ecall1 (bt,e,t) -> \"Ecall0(BUILTIN,EXPR,TYPE)\"\n\nlet rec string_of_statement = function\n  | Sskip -> \"Sskip\"\n  | Sassign (e1,e2) -> (\"Sassign(\"^string_of_expr e1 ^\",\"^ string_of_expr e2 ^\")\")\n  | Sset (id,e) -> (\"Sset(\"^string_of_int(int_of_positive id)^\",\"^string_of_expr e^\")\")\n  | Scall (None, lab, exprs) -> \"Scall(None, LABEL, ARGS)\"\n  | Scall (Some id, lab, expr) -> \"Scall(Some ID, LABEL, ARGS)\"\n  | Ssequence (s1,s2) -> (\"Ssequence(\"^string_of_statement s1 ^\",\"^ string_of_statement s2^\")\")\n  | Sifthenelse (e,s1,s2) -> (\"Sifthenelse(\"^string_of_expr e^\",\"^string_of_statement s1^\",\"^string_of_statement s2 ^\")\")\n  | Sloop s -> \"(Sloop \"^string_of_statement s^\")\"\n  | Sbreak -> \"Sbreak\"\n  | Sreturn None -> \"Sreturn None\"\n  | Sreturn (Some x) -> (\"Sreturn Some(\"^string_of_int(int_of_positive x)^\")\")\t\t      \n  | Stransfer (e1,e2) -> \"Stransfer (\"^string_of_expr e1 ^\",\"^ string_of_expr e2 ^\")\"\n  | Scallmethod (e1,ids,z,e,es) -> \"Scallmethod TODO\"\n  | Slog (_, _) -> \"Slog\"\n  | Srevert -> \"Srevert\"\n\nlet rec string_of_params = \n  let open Backend.Datatypes in\n  function\n  | Coq_cons (Coq_pair(id, t) , params) -> \"(\"^string_of_int (int_of_positive id) ^\",\"^string_of_ctype t ^\")::\"^ string_of_params params\n  | Coq_nil -> \"nil\"\n\t\t \nlet string_of_methoddef md =\n   \"{ fn_return = \" ^ string_of_ctype md.fn_return ^ \";\\n\"\n  ^\"  fn_params = \" ^ string_of_params md.fn_params ^\";\\n\"\n  ^\"  fn_temps =  \" ^ string_of_params md.fn_temps ^\";\\n\"\n  ^\"  fn_body = \" ^ string_of_statement md.fn_body ^\"\\n\"\n  ^\"}\"\n   \n\n(** gen_object_methods : \n    (Int.int, coq_fun) prod list **)\nlet gen_object_methods gen_methodname gen_method o =\n  let open Backend.Datatypes in\n  coqlist_of_list\n    (List.map\n    (* print_endline(string_of_methoddef (gen_method m)); *)\n      (fun m -> Coq_pair (gen_methodname m, gen_method m)) (* for debugging purpose *)\n      o.smethods) \n\n(** gen_object_fields :\n    vars: (ident, coq_type) prod list **)\nlet gen_object_fields declist = \n  let open Backend.Datatypes in\n  let open Backend.Globalenvs.Genv in\n  let decl2gvars = function\n    | TypeAssigndecl(Id s, t) -> Some (Coq_pair(backend_ident_of_globvar s, gen_ctype t))\n    | MapAssigndecl(Id s, t) -> Some (Coq_pair(backend_ident_of_globvar s, gen_ctype t))\n    | _ -> None\n  in\n  coqlist_of_list (filter_map decl2gvars declist)\n\n(** gen_object : genv **)\n(* (i, o) = (sinterface, simplementation) *)\nlet gen_object (i, o) =\n  let open Backend.Datatypes in\n  let open Backend.Globalenvs.Genv in\n  let open Cryptokit in\n  let open Abi in \n  (* let keccak_intval (_, SStrLit str) =\n    let hashval = hash_string (Hash.keccak 256) str in\n      (0x01000000) * Char.code (String.get hashval 0)\n    + (0x00010000) * Char.code (String.get hashval 1)\n    + (0x00000100) * Char.code (String.get hashval 2)\n    +                Char.code (String.get hashval 3) \n  in *)\n  (* let make_funcname m = backend_ident_of_funcname o.sconsturctor_def.sname m.smethodname in *)\n  (* let make_methname m = coq_Z_of_int 1101101111 in *)\n  (* let make_methname m = coq_Z_of_int (function_selector_intval_of_method m) in *) (* function_selector_intval_of_method: from abi.ml *)\n  let make_methname m = coq_Z_of_int (function_selector_intval_of_method m) in \n  (* let make_methname m = coq_Z_of_int 1627277233 in  *)\n  (* let make_methname m = coq_Z_of_int 1101101111 in *)\n    new_genv (* new_genv: vars -> funcs -> methods -> constructor  *)\n      (gen_object_fields i.sinterfacebody) (* vars: (ident, coq_type) prod list *)\n      Coq_nil (* funcs: (id, coq_fun) prod list. Only the lower layers have funcs *)\n      (gen_object_methods make_methname gen_methoddef o) (* methods: (Int.int, coq_fun) prod list *)\n      (Backend.Datatypes.Some dummy_constructor)\n\nlet minicgen sprogram = gen_object sprogram\n\n(** \nopen AST (* type ident = positive -> BinNums: type positive = | Coq_xI of positive | Coq_xO of positive | Coq_xH *)\nopen Cop (* unary_operation, binary_operation *)\nopen Ctypes (* type coq_type = Tvoid | ... | ... *)\nopen Datatypes (* type ('a, 'b) prod = Coq_pair of 'a * 'b *)\nopen Globalenvs (* Genv: type ('f, 'v) t  *)\nopen Integers\nopen MachineModel (* builtin0, builtin1 (EVM built-in) *)\n\ntype genv = { \n    genv_vars : ident list; \n    genv_funcs : ident list;\n    genv_methods : Int.int list; \n    genv_defs : coq_type PTree.t;\n    genv_fundefs : coq_function PTree.t;\n    genv_methoddefs : coq_function option IntMap.t;\n    genv_constructor : coq_function option \n  }\n**)\n"
  },
  {
    "path": "src/OpenSC/testcase/01_check_var_exist_succ.sc",
    "content": "/- test case: find variable successful -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData                |-> s;\n  returns void;\n}\n"
  },
  {
    "path": "src/OpenSC/testcase/02_check_var_exist_fail.sc",
    "content": "/- test case: find variable successful -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData                |-> s;\n  returns void;\n}\n\nmethod set(x: UInt) {\n\tguard{\n    supply > 5;\n  }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}\n"
  },
  {
    "path": "src/OpenSC/testcase/03_check_var_duplicate_announce_fail.sc",
    "content": "/- test case: find variable fail -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    storage storedData : Bool;\n    constructor c : UInt -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n"
  },
  {
    "path": "src/OpenSC/testcase/04_check_func_exist_succ.sc",
    "content": "/- test case: find variable successful -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (UInt) -> void;\n\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData                |-> s;\n  returns void;\n}\n\nmethod set(x: UInt) {\n\tguard{\n  }\n\tstorage{\n    storedData                |-> x;\n  }\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/05_check_func_exist_fail.sc",
    "content": "/- A simple storage program -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n}\n\nconstructor c (s : UInt){\n\tstorage\n\treturns void;\n}\nmethod set(x: UInt) {\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}\n"
  },
  {
    "path": "src/OpenSC/testcase/06_check_func_duplicate_announce_fail.sc",
    "content": "/- A simple storage program -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (UInt) -> void;\n    method set : (void) -> void;\n}\n\nconstructor c (s : UInt){\n\tstorage\n\treturns void;\n}\n\nmethod set(x: UInt) {\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}\n"
  },
  {
    "path": "src/OpenSC/testcase/07_check_func_duplicate_implement_fail.sc",
    "content": "/- A simple storage program -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (UInt) -> void;\n}\n\nconstructor c (s : UInt){\n\tstorage\n\treturns void;\n}\n\nmethod set(x: UInt) {\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}\n\nmethod set(y: UInt) {\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/08_check_func_constructor_announce_once_fail.sc",
    "content": "\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    constructor c2 : UInt -> void;\n    method set : (UInt) -> void;\n}\n\nconstructor c (s : UInt){\n\tstorage\n\treturns void;\n}\nmethod set(x: UInt) {\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}\n"
  },
  {
    "path": "src/OpenSC/testcase/09_check_func_constructor_announce_once_fail2.sc",
    "content": "signature SimpleStorage {\n    storage storedData : UInt;\n    method set : (UInt) -> void;\n}\n\nconstructor c (s : UInt){\n\tstorage\n\treturns void;\n}\nmethod set(x: UInt) {\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}\n"
  },
  {
    "path": "src/OpenSC/testcase/10_check_var_in_method_succ.sc",
    "content": "/- test case: find variable in method successful -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (UInt, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: UInt, y: UInt) {\n\tguard{\n        x > 0;\n    }\n\tstorage{\n        storedData     |-> y;\n    }\n\teffects{}\n\treturns voidlit;\n}\n\n"
  },
  {
    "path": "src/OpenSC/testcase/11_check_var_duplicate_in_method_fail.sc",
    "content": "/- test case: find variable in method successful -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (UInt, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: UInt, x: UInt) {\n\tguard{\n        x > 0;\n    }\n\tstorage{\n        storedData     |-> y;\n    }\n\teffects{}\n\treturns voidlit;\n}\n\n"
  },
  {
    "path": "src/OpenSC/testcase/12_check_var_method_miss_args_fail.sc",
    "content": "/- test case: find variable in method successful -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (UInt, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: UInt) {\n\tguard{\n        x > 0;\n    }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}\n\n"
  },
  {
    "path": "src/OpenSC/testcase/13_check_var_method_redundant_args_fail.sc",
    "content": "/- test case: find variable fail -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (UInt, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: UInt, y:UInt, z:Bool) {\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}\n\n"
  },
  {
    "path": "src/OpenSC/testcase/14_check_var_args_unmatch_decl_type_fail.sc",
    "content": "signature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (UInt, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: UInt, y: Bool) {\n\tguard{\n        x > 0;\n    }\n\tstorage{\n        storedData     |-> y;\n    }\n\teffects{}\n\treturns voidlit;\n}\n\n"
  },
  {
    "path": "src/OpenSC/testcase/15_check_var_duplicate_with_global_var_in_args_fail.sc",
    "content": "signature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (UInt) -> void;\n}\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(storedData: UInt) {\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}\n"
  },
  {
    "path": "src/OpenSC/testcase/16_check_var_in_method_type_succ.sc",
    "content": "/- test case: find variable in method successful -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{\n        x > 0;\n    }\n\tstorage{\n        storedData     |-> y;\n    }\n\teffects{}\n\treturns voidlit;\n}\n\n"
  },
  {
    "path": "src/OpenSC/testcase/17_check_var_in_method_return_type_succ.sc",
    "content": "/- test case: find variable in method successful -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> int;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns x;\n}"
  },
  {
    "path": "src/OpenSC/testcase/18_check_var_in_method_return_type_fail.sc",
    "content": "/- test case: find variable in method successful -/\n\nsignature SimpleStorage {\n    storage storedData : UInt;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> int;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{}\n\tstorage{}\n\teffects{}\n\treturns y;\n}"
  },
  {
    "path": "src/OpenSC/testcase/19_check_binop_add_sub_succ.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{}\n\tstorage{\n        storedData     |-> x + y;\n        storedData     |-> storedData - y;\n    }\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/20_check_binop_add_sub_fail.sc",
    "content": "/- test case: find variable in method successful -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, Bool) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: Bool) {\n\tguard{}\n\tstorage{\n        storedData     |-> x + y;\n        storedData     |-> storedData - y;\n    }\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/21_check_binop_times_divide_succ.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{}\n\tstorage{\n        storedData     |-> x * y;\n        storedData     |-> storedData / y;\n    }\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/22_check_binop_times_divide_fail.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, Bool) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: Bool) {\n\tguard{}\n\tstorage{\n        storedData     |-> x * y;\n        storedData     |-> storedData / y;\n    }\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/23_check_binop_eq_neq_succ.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{\n        x == 5;\n        y != 10;\n    }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/24_check_binop_eq_neq_fail.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, Bool) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: Bool) {\n\tguard{\n        x == 5;\n        y != 10;\n    }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/25_check_binop_lgt_rgt_eq_succ.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{\n        x >= 5;\n        y <= 10;\n        x > y;\n    }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/26_check_binop_lgt_rgt_eq_fail.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, Bool) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: Bool) {\n\tguard{\n        x >= 5;\n        y <= 10;\n        x > y;\n    }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/27_check_binop_and_or_succ.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (Bool, Bool) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: Bool, y: Bool) {\n\tguard{\n        (x and y) or y;\n    }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/28_check_binop_and_or_fail.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, Bool) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: Bool) {\n\tguard{\n        (x and y) or y;\n    }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/29_check_binop_passign_succ.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{}\n\tstorage{\n        storedData     |-> x;\n        storedData     |-> storedData - y;\n    }\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/30_check_binop_passign_fail.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, Bool) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: Bool) {\n\tguard{}\n\tstorage{\n        storedData     |-> x;\n        storedData     |-> y;\n    }\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/31_check_binop_combine01_succ.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{\n        (x == 5) or (y != 10);\n    }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/32_check_binop_combine02_succ.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{\n        (x == 5 * y) and (y != 10);\n    }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/33_check_binop_combine03_succ.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{\n        (x == 5 * y) and (y != 10) or True;\n    }\n\tstorage{}\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/34_check_binop_combine04_succ.sc",
    "content": "/- test case -/\n\nsignature SimpleStorage {\n    storage storedData : int;\n    storage tag : Bool;\n    constructor c : UInt -> void;\n    method set : (int, UInt) -> void;\n}\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    storedData              |-> s;\n  returns void;\n}\n\nmethod set(x: int, y: UInt) {\n\tguard{}\n\tstorage{\n        tag |-> (x == 5 * y) and (y != 10) or True;\n    }\n\teffects{}\n\treturns voidlit;\n}"
  },
  {
    "path": "src/OpenSC/testcase/35_check_map_query_succ.sc",
    "content": "/- test case -/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Address) => UInt;\n\n  constructor c : UInt -> void;\n  method balanceOf : (Address) -> UInt;\n}\n\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod balanceOf (a : Address){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns balances[(a)];\n  }"
  },
  {
    "path": "src/OpenSC/testcase/36_check_map_id_err_fail.sc",
    "content": "/- test case -/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Address) => UInt;\n\n  constructor c : UInt -> void;\n  method balanceOf : (Address) -> UInt;\n}\n\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod balanceOf (a : Address){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns s[(a)];\n  }"
  },
  {
    "path": "src/OpenSC/testcase/37_check_map_not_map_type_fail.sc",
    "content": "/- test case -/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Address) => UInt;\n\n  constructor c : UInt -> void;\n  method balanceOf : (Address) -> UInt;\n}\n\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod balanceOf (a : Address){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns supply[(a)];\n  }"
  },
  {
    "path": "src/OpenSC/testcase/38_check_map_query_value_miss_fail.sc",
    "content": "/- test case -/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Address) => UInt;\n\n  constructor c : UInt -> void;\n  method balanceOf : (Address) -> UInt;\n}\n\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod balanceOf (a : Address){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns balances[( )];\n  }"
  },
  {
    "path": "src/OpenSC/testcase/39_check_map_query_redundant_fail.sc",
    "content": "/- test case -/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Address) => UInt;\n\n  constructor c : UInt -> void;\n  method balanceOf : (Address) -> UInt;\n}\n\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod balanceOf (a : Address){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns balances[(a, a)];\n  }"
  },
  {
    "path": "src/OpenSC/testcase/40_check_map_query_wrong_type_fail.sc",
    "content": "/- test case -/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Address) => UInt;\n\n  constructor c : UInt -> void;\n  method balanceOf : (int) -> UInt;\n}\n\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod balanceOf (a : int){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns balances[(a)];\n  }"
  },
  {
    "path": "src/OpenSC/testcase/41_check_map_query_key_type_not_allowed_fail.sc",
    "content": "/- test case -/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Bool) => UInt;\n\n  constructor c : UInt -> void;\n  method balanceOf : (Bool) -> UInt;\n}\n\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod balanceOf (a : Bool){\n  guard{\n    Env.value == 0;\n  }\n  storage{}\n  effects{}\n  returns balances[(a)];\n  }"
  },
  {
    "path": "src/OpenSC/testcase/42_check_map_query_assign_succ.sc",
    "content": "/- test case -/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Address) => UInt;\n\n  constructor c : UInt -> void;\n  method balanceOf : (Address) -> UInt;\n}\n\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod balanceOf (a : Address){\n  guard{\n    Env.value == 0;\n  }\n  storage{\n      balances[(a)] |-> supply;\n  }\n  effects{}\n  returns balances[(a)];\n  }"
  },
  {
    "path": "src/OpenSC/testcase/43_check_map_query_assign_unmatch_fail.sc",
    "content": "/- test case -/\n\nsignature TOKEN{\n\n  storage supply : UInt;\n\n  map balances : (Address) => UInt;\n\n  constructor c : UInt -> void;\n  method balanceOf : (Address) -> UInt;\n}\n\n\n/- implementation -/\n\nconstructor c (s : UInt){\n  storage\n    supply                |-> s;\n    balances[Env.sender]  |-> s;\n  returns void;\n}\n\nmethod balanceOf (a : Address){\n  guard{\n    Env.value == 0;\n  }\n  storage{\n      balances[(a)] |-> a;\n  }\n  effects{}\n  returns balances[(a)];\n  }"
  },
  {
    "path": "src/README.md",
    "content": "This source directory contains the OCaml parts of the DeepSEA compiler. For the\ntime being, we do not include the sources for the parts that are written in\nCoq, but we ship the Ocaml files which were compiled from them.\n\nIn order to build it, use opam to install the prerequisites, and then run make:\n\n```\nopam install .\nmake edsger\nmv _build/default/Edsger/edsger.bc dsc\n```\n"
  },
  {
    "path": "src/Runtime.v",
    "content": "(* *********************************************************************)\n(*    DeepSpec, the language of certified softwares                    *)\n(*                                                                     *)\n(*      Shu-Chun Weng, Yale University                                 *)\n(*                                                                     *)\n(*  Copyright (c) 2013-2015 Shu-Chun Weng <shu-chun.weng@yale.edu>.    *)\n(*                                                                     *)\n(*  This program is free software; you can redistribute it and/or      *)\n(*  modify it under the terms of the GNU General Public License        *)\n(*  version 2 as published by the Free Software Foundation.  Note that *)\n(*  the only valid version of the GPL for this work is version 2, not  *)\n(*  v2.2 or v3.x or whatever.                                          *)\n(*                                                                     *)\n(*  This program is distributed in the hope that it will be useful,    *)\n(*  but WITHOUT ANY WARRANTY; without even the implied warranty of     *)\n(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)\n(*  GNU General Public License for more details.                       *)\n(*                                                                     *)\n(*  You should have received a copy of the GNU General Public License  *)\n(*  along with this program; if not, write to the Free Software        *)\n(*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,         *)\n(*  MA 02110-1301 USA.                                                 *)\n(* *********************************************************************)\n\n(** The run-time library for certified programs generated by [edsger] *)\n\n(* Standard library modules *)\nRequire Export BinInt.\n\n(* CompCert modules *)\nRequire Export backend.Cop.\nRequire Export backend.Ctypes.\nRequire Export cclib.Coqlib.\nRequire Export cclib.Integers.\nRequire Export cclib.Maps.\n\n(* CertiKOS modules *)\n(*\nRequire        liblayers.compat.CompatGenSem.\nRequire        liblayers.compcertx.MakeProgram.\nRequire        liblayers.compcertx.StencilImpl.\nRequire        mcertikos.layerlib.PrimSemantics.\n *)\n\n(* DeepSpec modules *)\nRequire Export DeepSpec.core.Cval.\nRequire Export DeepSpec.core.SEnv.\nRequire Export DeepSpec.core.HyperType.\nRequire Export DeepSpec.core.HyperTypeInst.\nRequire Export DeepSpec.core.MemoryModel.\nRequire Export DeepSpec.core.Syntax.\nRequire Export DeepSpec.core.SynthesisFunc.\nRequire Export DeepSpec.core.SynthesisStmt.\nRequire Export DeepSpec.lib.OProp.\n(* Todo: do we need this export? *)\nRequire Export DeepSpec.lib.IndexedMaps.\nRequire Export DeepSpec.lib.SimpleMaps.\nRequire Export DeepSpec.lib.SimpleIndexedMaps.\n\n(* We don't import liblayers.logic.Structures, which populates the notation\n   scope too much; instead we declare the minimum we need. *)\n(*\nInfix \"⊕\" := liblayers.logic.Structures.oplus (at level 60, right associativity).\nInfix \"↦\" := liblayers.logic.Structures.mapsto (at level 55, right associativity).\n*)\nNotation tchar := (Tint I8 Unsigned).\n\n(* This file will contain definitions related to each type in DeepSpec,\n   defining the corresponding lenses. *)\n\n(* Default value for global pointers.\n\n   The current version of DeepSpec does not provide pointers as a primitive type, but\n   if we added an address-of operator, then this would be used.  *)\n(*\nDefinition empty_globalpointer := GLOBUndef.\n *)\n\nLemma and_iff_compat {A B C D} : (A <-> C) -> (B <-> D) -> ((A /\\ B) <-> (C /\\ D)).\nProof.\n  intros A_iff_C B_iff_D.\n  rewrite A_iff_C, B_iff_D.\n  apply iff_refl.\nQed.\n\nLtac solve_algebraic_record_data_type_hyper_type hyper_type_impl :=\n esplit;\n  [ intros; eexists; reflexivity\n  | unfold ht_ft_cond, ht_default, hyper_type_impl;\n    repeat match goal with\n    | |- _ /\\ _ => split\n    | |- True => exact I\n    end; apply ht_default_ft_cond\n  | intros f; apply iff_refl || (\n    unfold ht_valid_ft_cond, ht_valid_ft_ocond, hyper_type_impl;\n    rewrite ? oand1_distr, ? OProp1map1; [| exact I .. ];\n    repeat (apply and_iff_compat; try apply @ht_valid_ft_ocond_same);\n      typeclasses eauto)\n  ].\n\nLtac solve_record_type_hyper_field :=\n   constructor;\n     [ reflexivity   (* size_pos *)\n     | simpl; tauto  (* get_returns *)\n     | simpl; tauto  (* set_returns *)\n     | simpl; intros; constructor; reflexivity   (* get_correct*) \n     | intros part whole pcond wcond; constructor; reflexivity (* set_correct *)\n     | eexists; eexists;\n       repeat apply conj; reflexivity  (* delta_correct *)\n     ].\n\n(* Previous version. Still unclear on this... *)\n(* Ltac solve_record_type_hyper_field :=\n   esplit;\n     [ reflexivity\n     | simpl; auto  \n     | intros whole wcond; apply wcond\n     | intros part whole pcond wcond; simpl; repeat apply conj; solve [ apply pcond | apply wcond ]\n     | constructor; reflexivity\n     | intros part whole pc wc; apply ht_some_cval; reflexivity\n     | eexists; eexists;\n       repeat apply conj; reflexivity\n     ]. *)\n\nHint Extern 1 ((_ < _)%Z) => reflexivity : zarith.\nHint Extern 1 ((_ > _)%Z) => reflexivity : zarith.\n\n(* TODO: Oops, the currently admitted condition is supposed to be available from the context, we need to track down where it's supposed to come from. *)\nLtac solve_twobranch_type_hyper_field :=\n  esplit;\n    [  simpl; constructor (* size_pos *)\n    | intros whole wcond;\n      try destruct whole as [ | ]; simpl in *; try tauto; auto with zarith; apply wcond (* get_returns *)\n    | intros part whole pcond wcond; simpl; try destruct whole as [ | ]; repeat apply conj; solve [ apply pcond | apply wcond ] (* set_returns *)\n    | intros whole;\n      try destruct whole as [ | ]; simpl in *; try tauto;\n      constructor; reflexivity  (* get_correct *)\n    | simpl; intros part whole;\n      assert (wvalid : ht_valid_ft_cond whole) by admit;\n      try destruct whole as [ | ]; simpl in wvalid; try tauto;\n      constructor; reflexivity (* set_correct *)\n    | eexists; eexists;\n      repeat apply conj; reflexivity  (* delta_correct *)\n    ].\n\nDefinition array_cval {tp} `{HyperTypeImpl tp} arr (size : Z) :=\n  CVarray (*unpair_ty tp*) (CAmap (ZMap.map (@ht_cval tp _) arr)).\n\nLemma forall_suchthat_iff_compat {T P A B} :\n  (forall t : T, P t -> (A t <-> B t)) ->\n  ((forall t : T, P t -> A t) <-> (forall t : T, P t -> B t)).\nProof.\n  intros IH; split; intros other t p;\n    [ rewrite <- IH | rewrite IH ]; try apply other; exact p.\nQed.\n\nLemma forall_suchthat_iff_compat2 {T S P A B} :\n  (forall (t : T) (s:S), P t s -> (A t s <-> B t s)) ->\n  ((forall (t : T) (s:S), P t s -> A t s) <-> (forall (t : T) (s:S), P t s -> B t s)).\nProof.\n  intros IH; split; intros other t s p;\n    [ rewrite <- IH | rewrite IH ]; try apply other; exact p.\nQed.\n\n\nOpen Scope Z_scope.\n\nLemma zle_and_zlt_between a b c : a <= b < c -> zle a b && zlt b c = true.\nProof.\n  intros [ a_le_b b_lt_c ].\n  destruct (zle a b); try contradiction.\n  destruct (zlt b c); try contradiction.\n  reflexivity.\nQed.\n\n(* Lenses to do with arrays. *)\nSection ZMAP_BASED_ARRAY.\n  Variable tp : type_pair.\n  (* Hypothesis tp_naturally_aligned : naturally_aligned (unpair_ty tp). *)\n  Context`{hti : HyperTypeImpl tp}.\n  Variable sz : Z.\n\n  Let arr_tp := Tpair (ZMap.t (unpair_ft tp)) (Tarray (unpair_ty tp) sz).\n\n  Local Instance ZMap_based_array_hyper_type_impl : HyperTypeImpl arr_tp := {\n    ht_cval f := array_cval (*tp*) f sz;\n    ht_ft_cond f := forall n, 0 <= n < sz -> @ht_ft_cond tp _ (ZMap.get n f);\n    ht_default := ZMap.init (@ht_default tp _);\n    ht_valid_ft_cond f := forall n, 0 <= n < sz ->\n      @ht_valid_ft_cond tp _ (ZMap.get n f);\n    ht_valid_ft_ocond :=\n      omap1 (fun p f => forall n, 0 <= n < sz -> p (ZMap.get n f))\n            (@ht_valid_ft_ocond tp _);\n(*    ht_inject j a b := forall n, (*0 <= n < sz ->*) (* strengthened for passthrough *)\n      @ht_inject tp _ j (ZMap.get n a) (ZMap.get n b) *)\n  }.\n\n  Local Instance ZMap_based_array_hyper_type`{ht : !HyperType tp} : HyperType arr_tp.\n  Proof. esplit.\n    - intros; eexists; reflexivity.\n    - intros n n_range.\n      unfold ht_default, ZMap_based_array_hyper_type_impl.\n      rewrite ZMap.gi.\n      apply ht_default_ft_cond.\n    - intros f.\n      unfold ht_valid_ft_cond, ht_valid_ft_ocond, ZMap_based_array_hyper_type_impl.\n      change (ZMap.t (unpair_ft tp)) with (unpair_ft arr_tp).\n      rewrite OProp1map1; [| intros; exact I ].\n      apply forall_suchthat_iff_compat.\n      intros; apply ht_valid_ft_ocond_same.\n  Qed.\n\n  Local Instance ZMap_based_array_hyper_index_impl : HyperIndexImpl arr_tp tp := {\n    Hindex_size := sz;\n    Hindex_get idx ar := ZMap.get idx ar;\n    Hindex_set idx elem ar := ZMap.set idx elem ar\n  }.\n\n  Local Instance ZMap_based_array_hyper_index`{ht : !HyperType tp} : HyperIndex arr_tp tp.\n  Proof. Admitted.\n(*   Proof. esplit. *)\n(*     - (* Hindex_get_returns *) *)\n(*       intros a i i_range ac; apply ac, i_range. *)\n(*     - (* Hindex_set_returns *) *)\n(*       simpl; intros f a i i_range fc ac i' i'_range. *)\n(*       destruct (zeq i' i) as [ -> | i_ne ]; *)\n(*         [ rewrite ? ZMap.gss; apply fc *)\n(*         | rewrite ? ZMap.gso; [ apply ac, i'_range | apply i_ne ] *)\n(*         ]. *)\n(*     - (* Hindex_get_correct *) *)\n(*       simpl; intros a i i_range. *)\n(*       rewrite zle_and_zlt_between, ZMap.gmap; try assumption. *)\n(*       constructor. *)\n(*       reflexivity. *)\n(*     - (* Hindex_set_correct *) *)\n(*       simpl; intros f a i i_range. *)\n(*       rewrite zle_and_zlt_between; try assumption. *)\n(*       constructor. *)\n(*       simpl; unfold array_cval. *)\n(*       do 2 f_equal. *)\n(*       apply eq_sym, ZMapAux.smap. *)\n(*     - (* Hindex_array_type *) *)\n(*       eexists; reflexivity. *)\n(* (*    - (* Hindex_naturally_aligned *) *)\n(*       exact tp_naturally_aligned. *) *)\n(*   Qed. *)\n\n  Local Instance ZMap_based_array_hyper_index_passthrough :\n      HyperIndexPassthrough arr_tp tp.\n(*  Proof. esplit; simpl.\n    - intros j a b.\n      exact (fun x => x).\n    - intros j elem_a arr_a elem_b arr_b elem_inj arr_inj i n.\n      destruct (zeq n i) as [ -> | i_ne ].\n      + rewrite 2 ZMap.gss.\n        exact elem_inj.\n      + rewrite 2 ZMap.gso; try assumption.\n        apply arr_inj.\n  Qed. *)\nEnd ZMAP_BASED_ARRAY.\n\n\nDefinition hashmap_cval {tp} `{HyperTypeImpl tp} arr :=\n  CVhashmap\n    (CHmap (map_of_tree ht_cval ht_default arr)).\n\n(* Lenses to do with hashmaps. *)\nSection INT256TREE_BASED_INT_HASHMAP.\n  Variable tp : type_pair.\n  (* Hypothesis tp_naturally_aligned : naturally_aligned (unpair_ty tp). *)\n  Context`{hti : HyperTypeImpl tp}.\n  \n  Let arr_tp := Tpair (Int256Tree.t (unpair_ft tp)) (Thashmap tint (unpair_ty tp)).\n\n  Local Instance Int256Tree_based_hashmap_hyper_type_impl : HyperTypeImpl arr_tp := {\n    ht_cval f := hashmap_cval (*tp*) f;\n    ht_ft_cond f := forall n v, Int256Tree.get n f = Some v ->  @ht_ft_cond tp _ v;\n    ht_default := (Int256Tree.empty (unpair_ft tp));\n    ht_valid_ft_cond f := forall n v, Int256Tree.get n f = Some v ->\n      @ht_valid_ft_cond tp _ v;\n    ht_valid_ft_ocond := \n      omap1 (fun p f => forall n v, Int256Tree.get n f = Some v -> p v)\n            (@ht_valid_ft_ocond tp _);\n  }.\n\n  Local Instance Int256Tree_based_hashmap_hyper_type`{ht : !HyperType tp} : HyperType arr_tp.\n  Proof. esplit.\n    - intros; eexists; reflexivity.\n    - intros n.\n      unfold ht_default, Int256Tree_based_hashmap_hyper_type_impl.\n      rewrite Int256Tree.gempty.\n      intros; congruence.\n    - intros f.\n      unfold ht_valid_ft_cond, ht_valid_ft_ocond, Int256Tree_based_hashmap_hyper_type_impl.\n      change (Int256Tree.t (unpair_ft tp)) with (unpair_ft arr_tp).\n      rewrite OProp1map1; [| intros; exact I ].\n      apply forall_suchthat_iff_compat2.\n      intros; apply ht_valid_ft_ocond_same.\n  Qed.\n\n  Local Instance Int256Tree_based_hashmap_hash_impl : HyperIntHashImpl arr_tp tp := {\n    Hhash_get idx ar := Int256Tree.get_default ht_default idx ar;\n    Hhash_set idx elem ar := Int256Tree.set idx elem ar\n  }.\n\n  Require Import lib.ArithInv.\n\n  Local Instance Int256Tree_based_hashmap_hash `{ht : !HyperType tp} : HyperIntHash arr_tp tp.\n  Proof. esplit.\n    - (* Hhash_get_returns *)\n      intros a i ac.\n      simpl.\n      unfold Int256Tree.get_default.\n      destruct (Int256Tree.get i a) eqn:?.\n      + apply (ac _ _ Heqo).\n      + apply ht_default_ft_cond.\n    - (* Hhash_set_returns *)\n      simpl; intros f a i fc ac i'.\n      intros.\n      destruct (Int256.eq i' i) eqn:i_eq;  inv_arith.\n      + subst.\n        rewrite Int256Tree.gss in H.\n        inversion H.\n        subst; auto.\n      + rewrite Int256Tree.gso in H by assumption.\n        eapply ac; eauto.\n    - (* Hhash_get_correct *)\n      simpl; intros a i.\n      unfold Int256Tree.get_default.\n      destruct (Int256Tree.get i a) as [v|] eqn:?.\n      + eapply (map_of_tree_Some ht_cval ht_default)  in Heqo.\n        rewrite Heqo.\n        constructor.\n        reflexivity.\n      + apply (map_of_tree_None ht_cval ht_default) in Heqo.\n        rewrite Heqo.\n        constructor.\n        reflexivity.\n    - (* Hhash_set_correct *)\n      simpl; intros f a i.\n      constructor.\n      simpl.\n      unfold hashmap_cval.\n      rewrite map_of_tree_set.\n      reflexivity.\n    - (* Hhash_array_type *)\n      eexists; reflexivity.\n  Qed.\n  \nEnd INT256TREE_BASED_INT_HASHMAP.  \n\n\n(* Recall that layer interfaces are specified in terms of a Coq relations (the \"semantics\"),\n   while the desugaring uses Coq functions.\n\n   These functions convert desugared values into the semantic values that the layer interface specifications expect.\n *)\n\n(* Omitting all of this for now... *)\n(*\nSection SEMOF_HYPER_TYPE.\n  Context {mem}`{Hmem: Mem.MemoryModel mem}`{Hmwd: MemWithData.UseMemWithData mem}.\n  Context {data : Type}.\n  Context`{LayerSpec : !LayerSpecClass}.\n  Context {ft ty}`{ht : HyperType (Tpair ft ty), hta : !HyperArgRet (Tpair ft ty)}.\n\n  Let unfold_cval cv := match cv with\n    | CVval v => v\n    | _ => Vundef\n    end.\n\n  (* Roughly, this typeclass instance says how to give a relational semantics for desugared functions of type\n       (data -> option (data * ft))\n     in terms of a layerlib relation (which involves zero arguments, a return type ty, and implicitly some state d).\n   *)\n  Inductive semof_nil_ft {data}\n      : GenSem.Semof data (data -> option (data * ft)) Tnil ty :=\n  | semof_nil_ft_intro f (d : data) d' a v:\n      f d = Monad.ret (d', a) ->\n      ht_ft_cond a -> ht_valid_ft_cond a ->\n      unfold_cval (ht_cval a) = v ->\n      GenSem.semof f nil d v d'.\n\n  Global Existing Instance semof_nil_ft.\n\n  (* Each semantic needs to satisfy some extra properties, so we prove those. *)\n  Global Instance semof_nil_ft_props\n      : GenSem.Semprops (data -> option (data * ft)).\n  Proof.\n    split.\n    + (* semprops_well_typed *)\n      intros ? ? ? ? ? H.\n      inv H.\n      assert (ht_has_type := ht_has_type).\n      eapply ht_has_type; try eassumption.\n      unfold ht_rel.\n      exploit ht_basic; try eassumption; inversion 1;\n        constructor; reflexivity.\n    + (* semprops_arity *)\n      intros ? ? ? ? ? H.\n      inv H;\n      reflexivity.\n    + (* semprops_lessdef *)\n      intros ? ? ? ? ? ? H Hl.\n      inv H;\n      inv Hl;\n      reflexivity.\n    + (* semprops_inject_neutral *)\n      inversion 1; subst.\n      exploit ht_basic; try eassumption; inversion 1; constructor.\n    + (* semprops_determ *)\n      inversion 1.\n      inversion 1.\n      unfold Monad.bind, Monad.ret in *; simpl in *.\n      split; [ assert (a0 = a) |]; try congruence.\n    + (* semprops_inject *)\n      inversion 1.\n      inversion 1.\n      reflexivity.\n  Qed.\n\n  (* We use the above definition to give semantics to pure functions (which do not change the abstract data). *)\n  Local Notation lift_nil_ft_pure f :=\n    (fun d => Monad.bind (f d) (fun b => Monad.ret (d, b))).\n\n  Global Instance semof_nil_ft_pure\n      : GenSem.Semof data (data -> option ft) Tnil ty :=\n    fun f => GenSem.semof (lift_nil_ft_pure f).\n\n  Global Instance semof_nil_ft_pure_props\n      : GenSem.Semprops (data -> option ft).\n  Proof.\n    split; intro f.\n    + exact (GenSem.semprops_well_typed (lift_nil_ft_pure f)).\n    + exact (GenSem.semprops_arity (lift_nil_ft_pure f)).\n    + exact (GenSem.semprops_lessdef (lift_nil_ft_pure f)).\n    + exact (GenSem.semprops_inject_neutral (lift_nil_ft_pure f)).\n    + exact (GenSem.semprops_determ (lift_nil_ft_pure f)).\n    + exact (GenSem.semprops_inject (lift_nil_ft_pure f)).\n  Qed.\n\n  Global Instance semof_nil_ft_pure_invar `{CompatData data}(f: data -> option ft):\n    CompatGenSem.PreservesInvariants f.\n  Proof.\n    split.\n    * intros ? ? ? ? ? semof inv.\n      simpl in semof.\n      inversion semof as [ ? ? ? ? ? spec ]; subst.\n      unfold Monad.bind, Monad.ret in spec; simpl in spec.\n      destruct (f d); try discriminate spec.\n      injection spec as _ <-; assumption.\n    * intros ? ? ? ? semof inv.\n      simpl in semof.\n      inversion semof as [ ? ? ? ? ? spec ]; subst.\n      unfold Monad.bind, Monad.ret in spec; simpl in spec.\n      destruct (f d); try discriminate spec.\n      injection spec as _ <-; assumption.\n    * intros ? ? ? ? semof inv.\n      simpl in semof.\n      inversion semof as [ ? ? ? ? ? spec ]; subst.\n      unfold Monad.bind, Monad.ret in spec; simpl in spec.\n      destruct (f d); try discriminate spec.\n      injection spec as _ <-; assumption.\n  Qed.\n\n  (* Then we give semantics for functions that take more than zero arguments.\n     We use some \"generic programming\" to specify this in terms of prepending one argument at a time.\n   *)\n  Inductive semof_cons_ft `{GenSem.Semof data}\n    : GenSem.Semof data (ft -> T) (Tcons ty targs) tres :=\n  | semof_cons_ft_intro f a l d v d' va:\n    GenSem.semof (f a) l d v d' ->\n    ht_ft_cond a -> ht_valid_ft_cond a ->\n    unfold_cval (ht_cval a) = va ->\n    GenSem.semof f (va :: l) d v d'.\n\n  Global Existing Instance semof_cons_ft.\n\n  Global Instance semof_cons_ft_props {T}`(HT: GenSem.Semprops data T)\n      : GenSem.Semprops (ft -> T).\n  Proof.\n    split.\n    + (* semprops_well_typed *)\n      intros ? ? ? ? ? H.\n      inv H.\n      apply (GenSem.semprops_well_typed (targs := targs) (f a) l d vres d').\n      eassumption.\n    + (* semprops_arity *)\n      intros ? ? ? ? ? H.\n      inv H.\n      simpl.\n      f_equal.\n      eapply GenSem.semprops_arity.\n      eassumption.\n    + (* semprops_lessdef *)\n      intros until d'.\n      intros H Hl.\n      inv H.\n      inv Hl.\n      inv H4.\n      * f_equal.\n        eapply GenSem.semprops_lessdef; eassumption.\n      * revert H3.\n        exploit ht_basic; try eassumption; inversion 1; discriminate.\n    + (* semprops_inject_neutral *)\n      inversion 1; subst.\n      eapply GenSem.semprops_inject_neutral.\n      eassumption.\n    + (* semprops_determ *)\n      inversion 1.\n      inversion 1.\n      assert (a0 = a).\n      { apply ht_injective; try assumption.\n        revert H3 H19.\n        exploit (ht_basic a0); try eassumption.\n        exploit (ht_basic a); try eassumption.\n        inversion 1; inversion 1; simpl; congruence.\n      }\n      subst.\n      eapply GenSem.semprops_determ; eassumption.\n    + (* semprops_inject *)\n      intros.\n      inv H.\n      inv H0.\n      (*inv H4; try (destruct b; discriminate).*)\n      f_equal.\n      - revert H5.\n        exploit ht_basic; try eassumption; inversion 1; inversion 1; reflexivity.\n      - eapply GenSem.semprops_inject; eassumption.\n  Qed.\n\n  Global Instance semof_cons_ft_invar\n      `{Tsemof: GenSem.Semof data, CompatData data} (f: ft -> T):\n    (forall n, CompatGenSem.PreservesInvariants (f n)) ->\n    CompatGenSem.PreservesInvariants f.\n  Proof.\n    intros Hf.\n    split.\n    * intros ? ? ? ? ? semof inv.\n      simpl in semof.\n      inversion semof as [ ? ? ? ? ? ? ? semof' ]; subst.\n      eapply CompatGenSem.semprops_low_level_invariant; eassumption.\n    * intros ? ? ? ? semof inv.\n      simpl in semof.\n      inversion semof as [ ? ? ? ? ? ? ? semof' ]; subst.\n      eapply CompatGenSem.semprops_high_level_invariant; eassumption.\n    * intros ? ? ? ? semof inv.\n      simpl in semof.\n      inversion semof as [ ? ? ? ? ? ? ? semof' ]; subst.\n      eapply CompatGenSem.semprops_kernel_mode; eassumption.\n  Qed.\nEnd SEMOF_HYPER_TYPE.\n\nRemove Hints GenSem.semof_nil_int64_pure_total\n             GenSem.semof_nil_int64_pure\n             GenSem.semof_nil_int64\n             GenSem.semof_nil_int_pure_total\n             GenSem.semof_nil_int_pure\n             GenSem.semof_nil_int\n             GenSem.semof_cons64\n             GenSem.semof_cons : typeclass_instances.\n\n(* These two tactics convert between layerlib semantics and the DeepSpec desugared\n   representation.  *)\nLtac inv_semof' sem_of :=\n  repeat\n    match type of sem_of with\n    | GenSem.semof _ _ _ _ _ => unfold GenSem.semof in sem_of\n    | semof_nil_ft_pure _ _ _ _ _ => unfold semof_nil_ft_pure in sem_of\n    | semof_cons_ft _ _ _ _ _ =>\n      let a       := fresh \"arg\" in\n      let sem_of' := fresh \"sem_of'\" in\n      let ac      := fresh \"argc\" in\n      let a_valid := fresh \"arg_valid\" in\n      let a_eq    := fresh \"arg_eq\" in\n      inversion sem_of as [ ? a ? ? ? ? ? sem_of' ac a_valid a_eq ]; subst;\n      clear sem_of; rename sem_of' into sem_of\n    | semof_nil_ft _ _ _ _ _ =>\n      let r       := fresh \"ret\" in\n      let sem_of' := fresh \"sem_of'\" in\n      let rc      := fresh \"retc\" in\n      let r_valid := fresh \"ret_valid\" in\n      let r_eq    := fresh \"ret_eq\" in\n      inversion sem_of as [ ? ? ? r ? sem_of' rc r_valid r_eq ]; subst;\n      clear sem_of; rename sem_of' into sem_of\n    | GenSem.semof_nil_void _ _ _ _ _ =>\n      let sem_of' := fresh \"sem_of'\" in\n      inversion sem_of as [ ? ? ? sem_of' ]; subst;\n      clear sem_of; rename sem_of' into sem_of\n    | Monad.bind ?f ?m = Monad.ret ?b =>\n      let sem_of' := fresh \"sem_of'\" in\n      let H       := fresh \"H\" in\n      destruct (Monad.monad_inv_bind f m b sem_of) as (? & sem_of' & H);\n      injection H as -> <-; clear sem_of H; rename sem_of' into sem_of\n    end.\n\nLtac inv_semof sem_of :=\n  inv_semof' sem_of;\n  simpl in sem_of;\n  try (match type of sem_of with\n    match ?X with _ => _ end = Some _  =>\n    let Hsem_of := fresh sem_of in\n    destruct X eqn:Hsem_of;\n    [ let H'sem_of := fresh Hsem_of in\n      rename Hsem_of into H'sem_of; rename sem_of into Hsem_of; rename H'sem_of into sem_of\n      | discriminate]\n  end).\n\nLtac construct_semof :=\n  repeat match goal with\n  | |- GenSem.semof _ _ _ _ _ => unfold GenSem.semof\n  | given : ?f _ = Monad.ret ?r |- semof_nil_ft_pure ?spec _ _ _ _ =>\n    match spec with\n    | context[f] => apply semof_nil_ft_intro with r; try assumption; try reflexivity\n    end\n  | given : appcontext[?f ?arg] |- semof_cons_ft ?f _ _ _ _ =>\n    apply semof_cons_ft_intro with arg; try assumption; try reflexivity\n  | given : ?f ?d = Some (_, ?r) |- semof_nil_ft ?f _ ?d _ _ =>\n    apply semof_nil_ft_intro with r; try assumption; try reflexivity\n  | |- GenSem.semof_nil_void _ _ _ _ _ => constructor\n  | |- _ = Monad.ret _ => eassumption\n  end.\n\n(* Then we construct the liblayer semantics for primitives.\n   (This is the right hand side of each entry in a layer interface.)\n\n   There already is some code in liblayer for building primitive semantics,\n   but it does it in one step directly from Coq functions. Here we do it in\n   two steps,\n     coq function -> c semantics -> arbitrary primitive semantics.\n   This is the first step, the second step is basically just inl(-).\n*)\nSection primitive_primsem.\n  Context {mem}`{memory_model : Mem.MemoryModel mem}.\n  Context`{Hmwd : !MemWithData.UseMemWithData mem}.\n  Context {D}`{HD : CompatData D}.\n\n  Definition gencsem `{Tsemof : GenSem.Semof (cdata D)}`{Hsemof : !GenSem.Semprops T}\n      (f : T){H : CompatGenSem.PreservesInvariants f} := {|\n    CompatCPrimitives.sextcall_primsem_step := CompatGenSem.sextcall_generic_info f;\n    CompatCPrimitives.sextcall_props := Errors.OK (CompatGenSem.extcall_generic_properties f);\n    CompatCPrimitives.sextcall_invs := Errors.OK (CompatGenSem.extcall_generic_invariants f H)\n  |}.\n\n  Definition dummy_sextcall_primsem : CompatCPrimitives.sextcall_primsem (cdata D) := {|\n    CompatCPrimitives.sextcall_primsem_step := {|\n      CompatCPrimitives.sextcall_step WB vargs m vres m' := True;\n      CompatCPrimitives.sextcall_csig := {|\n        CompcertStructures.csig_args := Ctypes.Tnil;\n        CompcertStructures.csig_res := Ctypes.Tvoid;\n        CompcertStructures.csig_cc := AST.cc_default\n      |}\n    |};\n    CompatCPrimitives.sextcall_props := Errors.Error nil;\n    CompatCPrimitives.sextcall_invs := Errors.Error nil\n  |}.\nEnd primitive_primsem.\n*)\n\n(* Each DeepSpec project will generate one instance of this class.\n\n  Then the Coq typeclass search will produce an instance of LayerSpecClass,\n  which is used by most of synthesis functions.\n *)\n\nDefinition block := positive. (* TODO: make a better memory model. *)\nClass GlobalAbData {AbData : Type}(AbData_empty_data : AbData)\n    (AbData_low_level_invariant : block -> AbData -> Prop) := {\n  AbData_low_level_invariant_incr : forall n n' d,\n    (n <= n')%positive ->\n    AbData_low_level_invariant n d ->\n    AbData_low_level_invariant n' d;\n  AbData_empty_data_low_level_invariant : forall n,\n    AbData_low_level_invariant n AbData_empty_data\n}.\n\n(* This is an empty layer with no objects and no import/exports.\n   The lowest layer defined by the user will build on top of this. *)\nSection BUILTIN_LAYER.\n  Context`{LayerSpec : LayerSpecClass}.\n  Context {AbData_empty_data : GetHighData}.\n  Context {AbData_low_level_invariant : block -> GetHighData -> Prop}.\n  Context`{global_abdata : !GlobalAbData AbData_empty_data AbData_low_level_invariant}.\n\n  Instance BuiltinBase_data_ops : CompatDataOps GetHighData := {\n    empty_data := AbData_empty_data;\n    high_level_invariant d := True;\n    (*low_level_invariant := AbData_low_level_invariant; \n    kernel_mode d := True *)\n  }.\n  \n  Instance BuiltinBase_data : CompatData GetHighData  := {\n(*    low_level_invariant_incr := AbData_low_level_invariant_incr;\n    empty_data_low_level_invariant := AbData_empty_data_low_level_invariant; *)\n    empty_data_high_level_invariant := I\n  }.\n\n  Definition BuiltinBase_cdata : compatdata := cdata GetHighData.\n\n  (*\n  Definition BuiltinBase_Layer : liblayers.compat.CompatLayerDef.compatlayer BuiltinBase_cdata\n    := Structures.emptyset. *)\nEnd BUILTIN_LAYER.\n\n(* We start numbering identifiers from 10 instead of 1.\n\n   This is because CompCert uses some low-numbered idenfiers for special variables, and\n   when printing error messages it will print hardcoded names for these instead of numbers(!),\n   which would be very confusing.\n*)\nNotation BuiltinBase_local_ident_start := 10%positive.\n\n(* Tactics to solve the _wellformed and _prf conditions.\n   Edsger will call these in the generated LayerFoo.v files.\n*)\nLtac solve_wellformed :=\n  compute -[Int256.repr Int256.modulus not];\n  repeat match goal with\n  | |- prod ?X ?Y => split\n  | |- SimpleIndexedMaps.Isomorphism ?X ?Y =>\n       (* simpl may still leave some symbols folded, definitional\n          equivalent terms may not be syntactically identical. *)\n    apply SimpleIndexedMaps.identity_automorphism\n  | |- True => exact I\n  | |- ?X <> ?Y => discriminate\n  end;\n  match goal with\n  | |- ?g => idtac \"unknown well-formed condition\" g\n  end.\n\n(*\nLtac solve_passthrough_prf f :=\n  unfold f;\n  repeat match goal with\n    | |- variable_passthrough_prf _ => assumption\n    | |- expr_constr_passthrough_prf_conj _ =>\n         unfold expr_constr_passthrough_prf_conj; simpl\n    | |- { _ : _ | _ } => econstructor\n    | _ => typeclasses eauto\n    | |- cmd_constr_passthrough_prf _ (CCrespec_opt _ _ _) =>\n      constructor; intros; CommonTactic.subdestruct; eexists; intros; reflexivity\n    (*\n    | |- function_constr_passthrough_prf _ => constructor\n    | |- cmd_constr_passthrough_prf _ _ => constructor\n    | |- lexpr_constr_passthrough_prf _ => constructor\n    | |- expr_constr_passthrough_prf _ => constructor\n    *)\n    | _ => constructor\n    end.\n *)\n\nLtac solve_function_constr_prf f :=\n  unfold f;\n  esplit; [ simpl; typeclasses eauto (* HyperArgRet *) || exact I |];\n  repeat match goal with\n  | |- variable_prf _ => constructor; [ reflexivity | typeclasses eauto ]\n  | |- expr_constr_prf_conj _ => unfold expr_constr_prf_conj; simpl\n  | |- @ht_ft_cond _ int_Z32_impl _ => split; reflexivity\n  | |- @ht_ft_cond _ int_bool_impl _ => simpl\n  (*\n  | |- primitive_prf _ => typeclasses eauto\n  | |- primitive_passthrough_prf _ => typeclasses eauto\n  | |- HyperField _ _ _ => typeclasses eauto\n  | |- HyperIndex _ _ => typeclasses eauto\n  | |- HyperByValueType _ _ => typeclasses eauto\n  | |- HyperBinaryOp _ _ _ _ => typeclasses eauto\n  *)\n  | |- _ => typeclasses eauto\n  (*\n  | |- cmd_constr_prf _ _ _ _ => econstructor\n  | |- lexpr_constr_prf _ => econstructor\n  | |- expr_constr_prf _ => econstructor\n  | |- True => constructor\n  | |- _ = _ => constructor\n  | |- _ /\\ _ => constructor\n  | |- { _ : _ | _ } => econstructor\n  *)\n  | |- _ => econstructor\n  end.\n\n(* \"safety condition destruct\". This unfolds synth_stmt_spec_cond. *)\nLtac scdestruct sc :=\n  match type of sc with\n  | True => clear sc\n  | ?X = ?X => clear sc\n  | _ /\\ _ =>\n    let sc1 := fresh \"sc1\" in\n    let sc2 := fresh \"sc2\" in\n    destruct sc as [ sc1 sc2 ];\n    scdestruct sc1; scdestruct sc2\n  | match ?X with _ => _ end = Some _ =>\n    let sc1 := fresh \"sc\" in\n    destruct X eqn:sc1;\n    try discriminate sc;\n    scdestruct sc1 (* ; scdestruct sc *)\n  | _ => progress hnf in sc; scdestruct sc\n  | _ => idtac\n  end.\n\n(* These unfold just enough definitions so that the verification conditions can be discharged. *)\nLtac vcgen_static eval_in :=\n  match goal with\n  | |- _ /\\ _ => split; vcgen_static eval_in\n  | |- True => exact I\n  | |- forall X, @?P X -> _ =>\n    let X' := fresh X in\n    let P' := fresh X' \"_cond\" in\n    intros X' P';\n    eval_in P';\n    vcgen_static eval_in\n  | |- _ -> False => idtac\n  | |- _ -> _ =>\n    let sc := fresh \"sc\" in\n    intros sc;\n    eval_in sc;\n    scdestruct sc; vcgen_static eval_in\n  | |- let X := _ in _ =>\n    let X' := fresh X in\n    intros X';\n    eval_in X';\n    vcgen_static eval_in\n  | _ => idtac\n  end.\n(* Ltac vcgen' eval_in eval_goal steps := *)\n(*   vcgen_static eval_in; *)\n(*   match goal with *)\n(*   | |- Z.lt _ _ => eval_goal *)\n(*   | |- Z.gt _ _ => eval_goal *)\n(*   | |- Z.le _ _ => eval_goal *)\n(*   | |- Z.ge _ _ => eval_goal *)\n(*   | |- not _ => eval_goal *)\n(*   | |- synth_stmt_cond ?c _ _ _ _ _ => *)\n(*     match c with *)\n(*     | CCskip => idtac *)\n(*     | CCload _ => idtac *)\n(*     | CCyield _ => idtac *)\n(*     | CCpanic => idtac *)\n(*     end; *)\n(*     unfold synth_stmt_cond; eval_goal *)\n(*   | _ => match steps with *)\n(*     | S ?steps' => progress hnf; vcgen' eval_in eval_goal steps' *)\n(*     | _ => idtac *)\n(*     end *)\n(*   end. *)\n\n(* Ltac cbv_minus := cbv -[Int256.repr Int256.modulus zeq zle zlt Z.iter Z.le Z.lt Z.gt Z.ge Z.eqb Z.leb Z.ltb Z.geb Z.gtb Z.mul Z.div Z.modulo Z.add Z.sub Z.shiftl Z.shiftr Z.lxor Z.land Z.lor *)\n(*                               is_true bool_dec  ZMap.get ZMap.set hlist_hd *)\n(*                               omap2 oand2 oimply2 oabsorption2 hlist_param_func SpecTree.get SpecTree.get_eq]. *)\n\nLemma repr_Z_mod_modulus_eq: forall x, Int.repr (Int.Z_mod_modulus x) = Int.repr x.\nProof.\n  intro x.\n  Transparent Int.repr.\n  unfold Int.repr.\n  Local Opaque Int.repr.\n  apply Int.mkint_eq.\n  rewrite Int.Z_mod_modulus_eq.\n  apply Zmod_small.\n  apply Int.Z_mod_modulus_range.\nQed.\n"
  },
  {
    "path": "src/_CoqProject",
    "content": "-R . DeepSpec\n\n-arg -w\n-arg none\n\ncclib/Integers.v\ncclib/Coqlib.v\nbackend/AST.v\n\ncclib/Maps.v\ncclib/Errors.v\nlib/Monad/Functor.v\nlib/Monad/Applicative.v\nlib/Monad/MonadZero.v\nlib/Monad/MonadPlus.v\nlib/Monad/MonadTrans.v\nlib/Monad/MonadReader.v\nlib/Monad/MonadExc.v\nlib/Monad/OptErrMonadLaws.v\nlib/Monad/OptErrMonad.v\nlib/Monad/OptionMonadLaws.v\nlib/Monad/MonadState.v\nlib/Monad/MonadLaws.v\nlib/Monad/MonadInv.v\nlib/Monad/OptionMonad.v\nlib/Monad/RunStateTInv.v\nbackend/Smallstep.v\nbackend/Events.v\nbackend/phase/MiniC/BigstepSemantics.v\nbackend/Environments/HashEnv.v\nbackend/Environments/StackEnv.v\nbackend/MachineModelLow.v\nbackend/Expressions/ExpStacked.v\nbackend/GasModel.v\nbackend/phase/MiniC/Semantics.v\nbackend/TempModel.v\nbackend/Expressions/SemanticsMiniC.v\ncore/SynthesisExpr.v\ncore/SynthesisStmt.v\nlib/LangDef.v\nlib/IndexedMaps.v\ncore/SynthesisFunc.v\nlib/Monad/StateMonadLaws.v\nlib/Monad/StateMonad.v\nlib/Monad/StateMonadOption.v\nbackend/Environments/Globalenvs.v\nbackend/Expressions/ExpMiniC.v\nbackend/Statements/StmtMiniC.v\ncore/Syntax.v\ncore/HyperTypeInst.v\nlib/SimpleIndexedMaps.v\nlib/SimpleMaps.v\nlib/Monad/ContOptionMonad.v\nlib/OProp.v\nlib/Lens.v\ncore/MemoryModel.v\nbackend/AbstractData.v\nbackend/MachineModel.v\ncore/HyperType.v\nbackend/MemoryModel.v\nbackend/Environments/AllEnvironments.v\ncore/SEnv.v\nlib/ArithInv.v\nbackend/Environments/ExtEnv.v\ncore/Cval.v\nbackend/SymbolicKeccak.v\nlib/Monad/Monad.v\nbackend/Options.v\nbackend/Ctypes.v\nbackend/Values/HighValues.v\nbackend/IndexLib.v\nbackend/Values/LowValues.v\nbackend/Cop.v\nRuntime.v\n"
  },
  {
    "path": "src/backend/AST.v",
    "content": "(* This file is unchanged from CompCert except commenting things out. *)\n\n\n(** This file defines a number of data types and operations used in\n  the abstract syntax trees of many of the intermediate languages. *)\n\nRequire Import cclib.Coqlib.\nRequire String.\nRequire Import cclib.Integers.\n\nSet Implicit Arguments.\n\n(** * Syntactic elements *)\n\n(** Identifiers (names of local variables, of global symbols and functions,\n  etc) are represented by the type [positive] of positive integers. *)\n\n(* These are used. *)\nDefinition ident := positive.\nDefinition ident_eq := peq.\n\nParameter ident_of_string : String.string -> ident.\n\nDefinition label := ident.\n\n(*\n(** Function definitions are the union of internal and external functions.\nbut we model external functions differently, so we don't need fundef *)\nDefinition fundef (F: Type): Type := F.\n*)\n\n\n                        (* this is not used: *)\n(*  | External: external_function -> fundef F *)\n\n\n"
  },
  {
    "path": "src/backend/AbstractData.v",
    "content": "(* This code is adapted from liblayers.compcertx.AbstractData and\n   liblayers.compcertx.MemWithData.\n    \n   We should revisit it when we port liblayers to work with\n   DeepSEA/ethereum, but it shold be enough as a placeholder for\n   now. *)\n\nRequire Import ZArith.\nRequire Import backend.Values.LowValues.\nRequire Import backend.MemoryModel.\nRequire Import backend.Environments.ExtEnv.\n\n(* In CompcertX, the type of memory is abstract and there is a\n   typeclass MemoryModelOps with operations on it, but for our\n   purposes we can just define it concretely. *) \nDefinition mem := ext_env.  \n\n\nClass CompatDataOps data :=\n  {\n    empty_data : data;\n    high_level_invariant: data -> Prop\n  }.\n\nClass CompatData data `{data_ops: CompatDataOps data} :=\n  {\n    empty_data_high_level_invariant:\n      high_level_invariant empty_data\n  }.\n\nRecord compatdata :=\n  {\n    cdata_type : Type;\n    cdata_ops : CompatDataOps cdata_type;\n    cdata_prf : CompatData cdata_type\n  }.\n\nGlobal Existing Instance cdata_ops.\nGlobal Existing Instance cdata_prf.\n\nDefinition cdata := Build_compatdata.\nGlobal Arguments cdata _ {_ _}.\n\nDefinition mwd (D: compatdata) := (mem * cdata_type D)%type.\n\n\n"
  },
  {
    "path": "src/backend/Cop.v",
    "content": "(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** Arithmetic and logical operators *)\n\n\nRequire Import cclib.Coqlib.\nRequire Import backend.AST.\nRequire Import cclib.Integers.\n(* Require Import Floats. *)\nRequire Import backend.Values.LowValues.\nRequire Import backend.Values.HighValues.\n(*Require Import Memory. *)\nRequire Import backend.Ctypes.\nRequire Import SymbolicKeccak.\n\n(** * Syntax of operators. *)\n\nInductive unary_operation : Type :=\n  | Onotbool : unary_operation          (**r boolean negation ([!] in C) *)\n  | Onotint : unary_operation           (**r integer complement ([~] in C) *)\n  | Oneg : unary_operation              (**r opposite (unary [-]) *)\n  | Osha_1 : unary_operation.           (**r Keccak-256 hash. *)\n\nInductive binary_operation : Type :=\n  | Oadd : binary_operation             (**r addition (binary [+]) *)\n  | Osub : binary_operation             (**r subtraction (binary [-]) *)\n  | Omul : binary_operation             (**r multiplication (binary [*]) *)\n  | Odiv : binary_operation             (**r division ([/]) *)\n  | Omod : binary_operation             (**r remainder ([%]) *)\n  | Oexp : binary_operation             (**r exponentiation ([**]) *)\n\n  | Oand : binary_operation             (**r bitwise and ([&]) *)\n  | Oor : binary_operation              (**r bitwise or ([|]) *)\n  | Oxor : binary_operation             (**r bitwise xor ([^]) *)\n  | Oshl : binary_operation             (**r left shift ([<<]) *)\n  | Oshr : binary_operation             (**r right shift ([>>]) *)\n  | Oeq: binary_operation               (**r comparison ([==]) *)\n  | One: binary_operation               (**r comparison ([!=]) *)\n  | Olt: binary_operation               (**r comparison ([<]) *)\n  | Ogt: binary_operation               (**r comparison ([>]) *)\n  | Ole: binary_operation               (**r comparison ([<=]) *)\n  | Oge: binary_operation               (**r comparison ([>=]) *)\n           \n  | Osha_2 : binary_operation.          (**r Keccak-256 hash *)\n\nInductive incr_or_decr : Type := Incr | Decr.\n\n\nDefinition sem_unary_operation_int256 (op: unary_operation) (n: int256) : option int256 :=\n  match op with\n  | Onotbool => Some (if (Int256.eq n Int256.zero) then Int256.one else Int256.zero)\n  | Onotint => Some (Int256.not n)\n  | Oneg => Some (Int256.neg n)\n  | Osha_1 => None (* handled elsewhere. *)\n  end.\n\nDefinition sem_unary_operation (op: unary_operation) (v: val) (_:type) : option val :=\n  match op with\n  | Osha_1 => Some (sha_1 v)\n  | _ => \n    match v with\n    | Vint i => match sem_unary_operation_int256 op i with\n                | Some i' => Some (Vint i')\n                | None => None\n                end\n    | _ => None\n    end\n  end.\n\nDefinition int256_of_bool (b:bool) :=\n  if b then Int256.one else Int256.zero.\n\nDefinition Int256_comparison (signed:bool) (op : comparison) (n m : int256) :=\nif signed then Some (int256_of_bool (Int256.cmp  op n m))\n          else Some (int256_of_bool (Int256.cmpu op n m)).\n\n(* TODO: complete these. Need to have similar for all the other binary operations. *)\nDefinition sem_binary_operation_int256 (op: binary_operation) (signed:bool) (n m: int256) : option int256 :=\n  match op with\n  | Oadd  => Some (Int256.add n m)\n  | Osub  => Some (Int256.sub n m)\n  | Omul  => Some (Int256.mul n m)\n  | Odiv  => Some (Int256.divu n m)\n  | Omod => if signed then Some (Int256.mods n m)\n                      else Some (Int256.modu n m)\n  | Oexp  => None (* todo *)\n  | Oand  => Some (Int256.and n m)\n  | Oor   => Some (Int256.or  n m)\n  | Oxor  => Some (Int256.xor n m)\n  | Oshl  => Some (Int256.shl n m)\n  | Oshr => if signed then Some (Int256.shr n m)\n                      else Some (Int256.shru n m)\n  | Oeq   => Int256_comparison signed Ceq n m\n  | One   => Int256_comparison signed Cne n m              \n  | Olt   => Int256_comparison signed Clt n m\n  | Ogt   => Int256_comparison signed Cgt n m\n  | Oge   => Int256_comparison signed Cge n m\n  | Ole   => Int256_comparison signed Cle n m\n\n  | Osha_2 => None (* handled elsewhere. *)                               \n  end.\n\nDefinition val_eq_dec : forall (v1 v2 :val), {v1=v2}+{v1<>v2}.\n  decide equality.\n  + apply Int256.eq_dec.\n  + decide equality ; try apply Pos.eq_dec; try apply Int256.eq_dec; try apply IdentExtIndexed.eq.\nDefined.\n\nDefinition sem_binary_operation (op: binary_operation) (v1 :val) (t1:type) (v2 : val) (t2:type) : option val :=\n  match op with\n  | Osha_2 => Some (sha_2 v1 v2)\n  | Oeq => Some (Vint (if val_eq_dec v1 v2 then (Int256.one) else (Int256.zero)))\n  | One => Some (Vint (if val_eq_dec v1 v2 then (Int256.zero) else (Int256.one)))\n  | _ => \n    match is_signed t1, is_signed t2 with\n    | false, false =>\n      match v1, v2 with\n      | Vint i1, Vint i2 => match sem_binary_operation_int256 op false i1 i2 with\n                            | Some i => Some (Vint i)\n                            | None => None\n                            end\n      | _,_ => None                 \n      end\n    | _,_ => None (* todo: support signed integer types *)\n    end\n  end.\n\nDefinition sem_unop_low (op: unary_operation) (v:LowValues.val) (t:type) : option LowValues.val :=\n  match sem_unary_operation op (OfLow v) t with\n  | Some v' => ToLowErr v'\n  | None => None\n  end.\n\nDefinition sem_binop_low (op:binary_operation) (v1:LowValues.val) (t1:type) (v2:LowValues.val) (t2:type) :=\n  match sem_binary_operation op (OfLow v1) t1 (OfLow v2) t2 with\n  | Some v' => ToLowErr v'\n  | None => None\n  end.\n"
  },
  {
    "path": "src/backend/Ctypes.v",
    "content": "(* These are the types we used, but the only ones we pay attention to are void, array, and struct. \n   Anything else is all treated the same. \n\n*)\n\n(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** Type expressions for the Compcert C and Clight languages *)\n\nRequire Import cclib.Coqlib.\nRequire Import backend.AST.\nRequire Import cclib.Errors.\nRequire Import backend.Options.\n(* Require Archi. *)\n\n(** * Syntax of types *)\n\n(** Compcert C types are similar to those of C.  They include numeric types,\n  pointers, arrays, function types, and composite types (struct and \n  union).  Numeric types (integers and floats) fully specify the\n  bit size of the type.  An integer type is a pair of a signed/unsigned\n  flag and a bit size: 8, 16, or 32 bits, or the special [IBool] size\n  standing for the C99 [_Bool] type.  64-bit integers are treated separately. *)\n\nInductive signedness : Type :=\n  | Signed: signedness\n  | Unsigned: signedness.\n\nInductive intsize : Type :=\n  | I8: intsize\n  | I16: intsize\n  | I32: intsize\n  | I256: intsize\n  | IBool: intsize.\n\nInductive ptrkind : Type :=\n| mem : ptrkind\n| stor : ptrkind\n| call : ptrkind.\n\nInductive type : Type :=\n  | Tvoid: type                            (**r the [void] type *)\n  | Tint: intsize -> signedness -> type    (**r integer types *)\n  | Tpointer: ptrkind -> type -> type      (**r pointer types ([*ty]) *)\n  | Tarray: type -> Z -> type              (**r array types ([ty[len]]) *)\n  | Thashmap : type -> type -> type        (** key_type, elem_type *)\n  | Tfunction: typelist -> type ->type     (**r function types *)\n  | Tstruct: ident -> fieldlist -> type    (**r struct types *)\n  | Tunion: ident -> fieldlist -> type     (**r union types *)\n  | Tcomp_ptr: ident -> type               (**r pointer to named struct or union *)\n\nwith typelist : Type :=\n  | Tnil: typelist\n  | Tcons: type -> typelist -> typelist\n\nwith fieldlist : Type :=\n  | Fnil: fieldlist\n  | Fcons: ident -> type -> fieldlist -> fieldlist.\n\nLemma type_eq: forall (ty1 ty2: type), {ty1=ty2} + {ty1<>ty2}\nwith typelist_eq: forall (tyl1 tyl2: typelist), {tyl1=tyl2} + {tyl1<>tyl2}\nwith fieldlist_eq: forall (fld1 fld2: fieldlist), {fld1=fld2} + {fld1<>fld2}.\nProof.\n  assert (forall (x y: intsize), {x=y} + {x<>y}) by decide equality.\n  assert (forall (x y: signedness), {x=y} + {x<>y}) by decide equality.\n  generalize ident_eq zeq bool_dec. intros E1 E2 E3.\n  decide equality.\n  decide equality.\n  decide equality.\n  generalize ident_eq. intros E1. decide equality.\nDefined.\n\nOpaque type_eq typelist_eq fieldlist_eq.\n\nDefinition type_int32s := Tint I32 Signed.\nDefinition type_int256u := Tint I256 Unsigned.\nDefinition type_bool := Tint IBool Signed.\n\n(* Signedness. *)\n\nDefinition is_signed (t: type) : bool :=\n  match t with\n  | Tint _ Signed => true\n  | _ => false\n  end.\n\n(* Concatenation and length for fieldlsit. *)\n\nFixpoint fieldlist_app (fld1 fld2: fieldlist) : fieldlist :=\n  match fld1 with\n  | Fnil => fld2\n  | Fcons id ty fld => Fcons id ty (fieldlist_app fld fld2)\n  end.\n\nFixpoint fieldlist_length (fld: fieldlist) : nat :=\n  match fld with\n  | Fnil => 0\n  | Fcons id ty fld => S (fieldlist_length fld)\n  end.\n\nLemma fieldlist_app_assoc fld1 fld2 fld3 :\n  fieldlist_app fld1 (fieldlist_app fld2 fld3)\n    = fieldlist_app (fieldlist_app fld1 fld2) fld3.\nProof.\n  induction fld1; [ reflexivity | simpl ].\n  f_equal; apply IHfld1.\nQed.\n\nLemma fieldlist_length_app fld1 fld2 :\n  fieldlist_length (fieldlist_app fld1 fld2) =\n       (fieldlist_length fld1 + fieldlist_length fld2)%nat.\nProof.\n  induction fld1; auto.\n  simpl. rewrite IHfld1. auto.\nQed.\n\n(** Size of a type in words *)\n(* This is added to the EVM backend, which counts words sometimes.\nActually this should never matter, because everything is hashed *)\n\nFixpoint sizeof_words (t: type) : Z :=\n  match t with\n  | Tarray t' n  => (sizeof_words t') * (Zmax 0 n)\n  | Tstruct _ fld => sizeof_struct_words fld 0\n  | _ => 1 (* most things are one word *)\n  end\n\nwith sizeof_struct_words (fld: fieldlist) (pos: Z) {struct fld} : Z :=\n  match fld with\n  | Fnil => pos\n  | Fcons _ t fld' => sizeof_struct_words fld' (pos + (sizeof_words t))\n  end.\n\n(* get offset and type *)\nFixpoint struct_field (fld: fieldlist) (id: ident) : option (nat * type) :=\n  match fld with\n  | Fnil => None\n  | Fcons id' t fld' => if ident_eq id' id then Some (O, t) else\n    unpack offset, t' <- struct_field fld' id ;;\n      Some (S offset, t')\n  end.\n"
  },
  {
    "path": "src/backend/Environments/AllEnvironments.v",
    "content": "Require Import cclib.Coqlib.\nRequire Import backend.Ctypes.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.Values.LowValues.\nRequire Import backend.Values.HighValues.\n\n(** These should be divided up into their own files. *)\n\n(* temp_env represents a local enviroment. It contains arguments and temps for a function. *)\n\n(* temps all have value 0 until initialized, except args *)\nDefinition temp_env : Type := PTree.t val.\n\nDefinition temp_env_low : Type := PTree.t LowValues.val.\n\n(* stores contents of evm stack, which is is reality a list of values\nbut may conceptually be function args, temps during execution, or return values. \n\nThe operational semantics use this (only a single stack_data, since the indidual step rules only case about the top part of the stack).\nThe highest language just uses Temps; then further compilation phases introduce Args, Retval etc. \n*)\nInductive stack_data: Type :=\n| Temps: temp_env -> stack_data\n| Args: list val -> stack_data     (* When you have just called a function but not yet allocated temps. *)\n\n(* A function has n arguments and m temp variables. \n   The calling function pushes arguments. The function prelude pushes m zeros for the temps.\n   Then semantically, the rest of the function body is executed in an temp_env which has (n+m) entries.\n   There is an extra complication that if there are two function arguments with the same name, the first one will be shadowed and not put in the temp_env.   \n *)\n                                                \n| MethodArgs: list val -> stack_data\n| Retval: val -> stack_data.\n\nInductive stack_data_low : Type :=\n| TempsL: temp_env_low -> stack_data_low\n| ArgsL: list LowValues.val -> stack_data_low\n| MethodArgsL: list LowValues.val -> stack_data_low\n| RetvalL: LowValues.val -> stack_data_low\n.\n"
  },
  {
    "path": "src/backend/Environments/ExtEnv.v",
    "content": "Require Import cclib.Coqlib.\nRequire Import backend.Ctypes.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.Values.HighValues.\nRequire Import backend.AST.\n\nSection ExtEnv.\n\nVariable function : Type.\nVariable fn_locals : function -> list (ident * type).\n\nInductive contents :=\n| EEVal : forall v:val, contents\n| EEUndef : contents\n| EEDead : contents\n.\n\n(* at a lower level, storage and memory are separate *)\nDefinition ext_env : Type := IdentExtMap.t (contents).\n\nNotation \"env [ i ]\" := (IdentExtMap.get i env) (at level 80).\nNotation \"env [ i |-> v ]\" := (IdentExtMap.set i v env) (at level 80).\n\nDefinition empty_stack : ext_env :=\n  Int256Map.init EEDead.\n\nFixpoint alloc_eid (ty:type) (root:ident_ext) (ee:ext_env) (init:contents) : option ext_env :=\n  match ty with\n  | Tarray ty' size =>\n    let fix alloc (ind:nat) (ee:ext_env) :=\n        match ind with\n        | O => Some ee\n        | S ind' =>\n          match alloc ind' ee with\n          | Some ee' => alloc_eid ty' (Index root (Int256.repr (Z.of_nat ind))) ee' init\n          | None => None\n          end       \n        end\n    in\n    match size with\n    | Zpos p => alloc (Pos.to_nat p) ee\n    | _ => None\n    end\n  | Tstruct id fl =>\n    let fix alloc (fl:fieldlist) (ee:ext_env) :=\n        match fl with\n        | Fnil => Some ee\n        | Fcons id ty' fl' =>\n          match alloc fl' ee with\n          | Some se' => alloc_eid ty' (Field root id) se' init\n          | None => None\n          end\n        end\n    in alloc fl ee\n  | _ => Some (ee[root|->init])\n  end.\n\nFixpoint initial_locs (ctx:int256) (locs : list (ident*type)) (ee:ext_env) : option ext_env :=\n  match locs with\n  | nil => Some ee\n  | (id,ty)::locs' =>\n    match initial_locs ctx locs' ee with\n    | Some se' => alloc_eid ty (Field (Local ctx) id) ee EEUndef\n    | None => None\n    end\n  end.\n\nFixpoint clear_locs (ctx:int256) (locs : list (ident*type)) (ee:ext_env) : option ext_env :=\n  match locs with\n  | nil => Some ee\n  | (id,ty)::locs' =>\n    match initial_locs ctx locs' ee with\n    | Some se' => alloc_eid ty (Field (Local ctx) id) ee EEDead\n    | None => None\n    end\n  end.\n\nFixpoint frame_size (locs:list (ident * type)) : int256 :=\n  match locs with\n  | nil => Int256.repr 0\n  | cons (_,ty) locs' => Int256.add (Int256.repr (sizeof_words ty)) (frame_size locs')\n  end.\n\nDefinition push_func (ctx:int256) (f:function) (ee:ext_env) : option (ext_env*int256) :=\n  match initial_locs ctx (fn_locals f) ee with\n  | Some ee' => Some (ee', Int256.add ctx (frame_size (fn_locals f)))\n  | None => None\n  end.\n\nDefinition pop_func (ctx:int256) (f:function) (ee:ext_env) : option (ext_env*int256) :=\n  match clear_locs ctx (fn_locals f) ee with\n  | Some ee' => Some (ee', Int256.sub ctx (frame_size (fn_locals f)))\n  | None => None\n  end.\n\nDefinition read (eid:ident_ext) (ee:ext_env) : option val :=\n  match ee[eid] with\n  | EEVal v => Some v\n  | _ => None\n  end.\n\nDefinition write (eid:ident_ext) (v:val) (ee:ext_env) : option ext_env :=\n  match ee[eid] with\n  | EEDead => None\n  | _ => Some (ee[eid|->(EEVal v)])\n  end.\n\nDefinition var (ctx:int256) (id:ident) (ee:ext_env) : option ident_ext :=\n  let eid := Field (Local ctx) id in\n  match ee[eid] with\n  | EEDead => None\n  | _ => Some eid\n  end.\n\nDefinition glob (id:ident) (ee:ext_env) : option ident_ext :=\n  Some (Field Global id).\n\nDefinition addr (eid:ident_ext) : val :=\n  Vptr (LVeid eid).\n\nDefinition deref (v:val) : option ident_ext :=\n  match v with\n  | Vptr (LVeid eid) => Some eid\n  | _ => None\n  end.\n\nDefinition access_field (base:ident_ext) (ty:type) (fid:ident) : option ident_ext :=\n  match ty with\n  | Tstruct _ fl =>\n    match struct_field fl fid with\n    | Some _ => Some (Field base fid)\n    | None => None\n    end\n  | _ => None\n  end.\n\nDefinition index_array (base:ident_ext) (ty:type) (ind:val) : option ident_ext :=\n  match ind,ty with\n  | Vint off, Tarray ty' size =>\n    if Int256.lt off (Int256.repr size) then\n      Some (Index base off)\n    else None\n  | Vint off, Thashmap _ _  =>\n      Some (Index base off)\n  | _, _ => None\n  end.\n\nEnd ExtEnv.\n"
  },
  {
    "path": "src/backend/Environments/Globalenvs.v",
    "content": "(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** Global environments are a component of the dynamic semantics of\n  all languages involved in the compiler.  A global environment\n  maps symbol names (names of functions and of global variables)\n  to the corresponding memory addresses.  It also maps memory addresses\n  of functions to the corresponding function descriptions.\n\n  Global environments, along with the initial memory state at the beginning\n  of program execution, are built from the program of interest, as follows:\n- A distinct memory address is assigned to each function of the program.\n  These function addresses use negative numbers to distinguish them from\n  addresses of memory blocks.  The associations of function name to function\n  address and function address to function description are recorded in\n  the global environment.\n- For each global variable, a memory block is allocated and associated to\n  the name of the variable.\n\n  These operations reflect (at a high level of abstraction) what takes\n  place during program linking and program loading in a real operating\n  system. *)\n\nRequire Import cclib.Coqlib.\nRequire Import cclib.Errors.\nRequire Import cclib.Maps.\nRequire Import backend.AST.\nRequire Import cclib.Integers.\nRequire Import backend.Values.LowValues.\nRequire Import backend.Options.\n\n(*\n\n(** * Symbol environments *)\n\n(** Symbol environments are a restricted view of global environments,\n  focusing on symbol names and their associated blocks.  They do not\n  contain mappings from blocks to function or variable definitions. *)\n\nModule Senv.\n\nRecord t: Type := mksenv {\n  (** Operations *)\n  find_symbol: ident -> option block;\n  public_symbol: ident -> bool;\n  invert_symbol: block -> option ident;\n  block_is_volatile: block -> option bool;\n  nextblock: block;\n  (** Properties *)\n  find_symbol_injective:\n    forall id1 id2 b, find_symbol id1 = Some b -> find_symbol id2 = Some b -> id1 = id2;\n  invert_find_symbol:\n    forall id b, invert_symbol b = Some id -> find_symbol id = Some b;\n  find_invert_symbol:\n    forall id b, find_symbol id = Some b -> invert_symbol b = Some id;\n  public_symbol_exists:\n    forall id, public_symbol id = true -> exists b, find_symbol id = Some b;\n  find_symbol_below:\n    forall id b, find_symbol id = Some b -> Plt b nextblock;\n  block_is_volatile_below:\n    forall b, block_is_volatile b = Some true -> Plt b nextblock\n}.\n\nDefinition symbol_address (ge: t) (id: ident) (ofs: ptrofs) : val :=\n  match find_symbol ge id with\n  | Some b => Vptr b ofs\n  | None => Vundef\n  end.\n\nTheorem shift_symbol_address:\n  forall ge id ofs delta,\n  symbol_address ge id (Ptrofs.add ofs delta) = Val.offset_ptr (symbol_address ge id ofs) delta.\nProof.\n  intros. unfold symbol_address, Val.offset_ptr. destruct (find_symbol ge id); auto.\nQed.\n\nTheorem shift_symbol_address_32:\n  forall ge id ofs n,\n  Archi.ptr64 = false ->\n  symbol_address ge id (Ptrofs.add ofs (Ptrofs.of_int n)) = Val.add (symbol_address ge id ofs) (Vint n).\nProof.\n  intros. unfold symbol_address. destruct (find_symbol ge id).\n- unfold Val.add. rewrite H. auto.\n- auto.\nQed.\n\nTheorem shift_symbol_address_64:\n  forall ge id ofs n,\n  Archi.ptr64 = true ->\n  symbol_address ge id (Ptrofs.add ofs (Ptrofs.of_int64 n)) = Val.addl (symbol_address ge id ofs) (Vlong n).\nProof.\n  intros. unfold symbol_address. destruct (find_symbol ge id).\n- unfold Val.addl. rewrite H. auto.\n- auto.\nQed.\n\nDefinition equiv (se1 se2: t) : Prop :=\n      nextblock se2 = nextblock se1\n  /\\\n     (forall id, find_symbol se2 id = find_symbol se1 id)\n  /\\ (forall id, public_symbol se2 id = public_symbol se1 id)\n  /\\ (forall b, block_is_volatile se2 b = block_is_volatile se1 b).\n\nEnd Senv.\n*)\n\n\nModule IntIndexed <: INDEXED_TYPE.\n\nDefinition t := int.\nDefinition index (i : int) :=\n  let (intval, _) := i in\n  match intval with\n  | Z0 => xH\n  | Zpos p => xO p\n  | Zneg p => xI p\n  end.\n\nDefinition index_inv p :=\n  match p with\n  | xH => Int.zero\n  | xO p' => Int.repr (Zpos p')\n  | xI p' => Int.repr (Zneg p')\n  end.\n\n  Lemma zlt_proof_irrelevance :\n    forall {x y : Z}  (p q : x < y), p = q.\n  Proof.\n    intros.\n    apply Eqdep_dec.eq_proofs_unicity.\n    decide equality.\n  Qed.\n\n  Lemma range_proof_irrelevance :\n    forall {x y z : Z}  (p q : x < y < z), p = q.\n  Proof.\n    intros.\n    destruct p as [p1 p2].\n    destruct q as [q1 q2].\n    rewrite (zlt_proof_irrelevance p1 q1).\n    rewrite (zlt_proof_irrelevance p2 q2).\n    reflexivity.\n  Qed.\n\n  Transparent Int.Z_mod_modulus.\n  Lemma modulus_nop : forall x,\n      -1 < x < Int.modulus -> Int.Z_mod_modulus x = x.\n  Proof.\n    intros.\n    unfold Int.Z_mod_modulus.\n    destruct x.\n    + reflexivity.\n    + rewrite Int.P_mod_two_p_eq.\n      rewrite Zmod_small by (unfold Int.modulus in H; omega).\n      reflexivity.\n    + destruct H.\n      unfold Z.lt in H.\n      simpl in H.\n      destruct p; simpl in H; congruence.\n  Qed.\n  Opaque Int.Z_mod_modulus.\n  \n  Transparent Int.repr.\n  Lemma index_invertible : forall x, index_inv (index x) = x.\n  Proof.\n    intros.\n    destruct x as [x x_range].\n    destruct x; simpl.\n    + unfold Int.zero.\n      unfold Int.repr.\n      rewrite (range_proof_irrelevance (Int.Z_mod_modulus_range' 0) x_range).\n      reflexivity.\n    + unfold Int.repr.\n      generalize (Int.Z_mod_modulus_range' (Z.pos p)).      \n      rewrite (modulus_nop _ x_range).\n      intros a.\n      rewrite (range_proof_irrelevance a x_range).\n      reflexivity.\n    + unfold Int.repr.\n      generalize (Int.Z_mod_modulus_range' (Z.neg p)).      \n      rewrite (modulus_nop _ x_range).\n      intros a.\n      rewrite (range_proof_irrelevance a x_range).\n      reflexivity.\n  Qed.\n  Opaque Int.repr.\n  \n  Lemma index_inj: forall (x y: int), index x = index y -> x = y.\n  Proof.\n    unfold index; destruct x; destruct y; intros;\n      try discriminate; try reflexivity.\n    apply Int.mkint_eq.\n    destruct intval; destruct intval0; try (inversion H); try reflexivity.\n  Qed.\n\n  Definition eq := Int.eq_dec.\n\nEnd IntIndexed.\n\nModule IntMap := IMap(IntIndexed).\n\n\n\nModule Genv.\n\n(** * Global environments *)\n\nSection GENV.\n\nVariable F: Type.  (**r The type of function descriptions *)\nVariable V: Type.  (**r The type of information attached to variables *)\n\n(** The type of global environments. *)\n\n\nRecord t: Type := mkgenv {\n  (* list of variables *)\n  genv_vars: list ident;              (**r which symbol names are public *)\n  (* list of functions *)\n  genv_funcs: list ident;             (**r which symbol names are public *)\n  (* list of methods, i.e. public functions *)\n  genv_methods: list int;\n  (* type of variables *)\n  genv_defs: PTree.t V;     (**r mapping symbol -> type *)\n  (* function definitions *)\n  genv_fundefs: PTree.t F;     (**r mapping symbol -> function definition *)\n  (* method definitions *)\n  genv_methoddefs: IntMap.t (option F);\n  (* constructor *)\n  genv_constructor: option F;\n}.\n\n(*\n\nRecord t: Type := mkgenv {\n  (* list of variables *)\n  genv_public: list ident;              (**r which symbol names are public *)\n  (* where in memory *)\n  genv_symb: PTree.t block;             (**r mapping symbol -> block *)\n  (* type of variables *)\n  genv_defs: PTree.t V;     (**r mapping block -> definition *)\n  genv_fundefs: PTree.t F;     (**r mapping block -> definition *)\n  genv_next: block;                     (**r next symbol pointer *)\n  genv_symb_range: forall id b, PTree.get id genv_symb = Some b -> Plt b genv_next;\n  genv_defs_range: forall b g, PTree.get b genv_defs = Some g -> Plt b genv_next;\n  genv_vars_inj: forall id1 id2 b,\n    PTree.get id1 genv_symb = Some b -> PTree.get id2 genv_symb = Some b -> id1 = id2\n}.\n\n*)\n\n(** Creation functions *)\n\nDefinition empty_genv : t :=\n  mkgenv nil nil nil (PTree.empty _) (PTree.empty _) (IntMap.init None) None.\n\nFixpoint add_genv_funcs (funcs: list (ident * F)) (ge: t) : t :=\n  match funcs with\n  | nil => ge\n  | (id, fundef)::rest => let r := add_genv_funcs rest ge in\n    mkgenv r.(genv_vars) (id::(r.(genv_funcs))) r.(genv_methods) r.(genv_defs) (PTree.set id fundef r.(genv_fundefs)) r.(genv_methoddefs) r.(genv_constructor)\n  end.\n\nFixpoint add_genv_vars (vars: list (ident * V)) (ge: t) : t :=\n  match vars with\n  | nil => ge\n  | (id, def)::rest => let r := add_genv_vars rest ge in\n    mkgenv (id::(r.(genv_vars))) r.(genv_funcs) r.(genv_methods) (PTree.set id def r.(genv_defs)) r.(genv_fundefs) r.(genv_methoddefs) r.(genv_constructor)\n  end.\n\nFixpoint add_genv_methods (methods: list (int * F)) (ge: t) : t :=\n  match methods with\n  | nil => ge\n  | (sig, fundef)::rest => let r := add_genv_methods rest ge in\n    mkgenv r.(genv_vars) r.(genv_funcs) (sig::(r.(genv_methods))) r.(genv_defs) r.(genv_fundefs) (IntMap.set sig (Some fundef) r.(genv_methoddefs)) r.(genv_constructor)\n  end.\n\nDefinition add_genv_constructor (constructor: option F) (ge: t) : t :=\n  mkgenv ge.(genv_vars) ge.(genv_funcs) ge.(genv_methods) ge.(genv_defs) ge.(genv_fundefs) ge.(genv_methoddefs) constructor.\n\nDefinition new_genv (vars: list (ident * V))\n    (funcs: list (ident * F)) (methods: list (int * F))\n    (constructor: option F) : t :=\n  add_genv_constructor constructor (add_genv_methods methods (add_genv_funcs funcs (add_genv_vars vars empty_genv))).\n\n(* This includes functions and methods, but not the constructor. The difference is that you are not allowed to \n   call the constructor. *)\nDefinition all_functions (ge: t) : list F :=\n  (map snd (PTree.elements ge.(genv_fundefs)))\n  ++ (flat_map (optional_filter F) (map snd (PTree.elements (snd ge.(genv_methoddefs)))))\n  .\n\n(*  (map snd (PTree.elements ge.(genv_fundefs)))\n  ++ (flat_map (optional_filter F) (map snd (PTree.elements (snd ge.(genv_methoddefs)))))\n  ++ (optional_filter F ge.(genv_constructor)).*)\n\nDefinition count_methods (ge: t) : nat :=\n  length (PTree.elements (snd (genv_methoddefs ge))).\n\n(*\n\n(** [find_symbol ge id] returns the block associated with the given name, if any *)\n\nDefinition find_symbol (ge: t) (id: ident) : option block :=\n  PTree.get id ge.(genv_symb).\n\n(** [symbol_address ge id ofs] returns a pointer into the block associated\n  with [id], at byte offset [ofs].  [Vundef] is returned if no block is associated\n  to [id]. *)\n\nDefinition symbol_address (ge: t) (id: ident) (ofs: ptrofs) : val :=\n  match find_symbol ge id with\n  | Some b => Vptr b ofs\n  | None => Vundef\n  end.\n\n(** [public_symbol ge id] says whether the name [id] is public and defined. *)\n\nDefinition public_symbol (ge: t) (id: ident) : bool :=\n  match find_symbol ge id with\n  | None => false\n  | Some _ => In_dec ident_eq id ge.(genv_public)\n  end.\n\n(** [find_def ge b] returns the global definition associated with the given address. *)\n\nDefinition find_def (ge: t) (b: block) : option (globdef F V) :=\n  PTree.get b ge.(genv_defs).\n\n(** [find_funct_ptr ge b] returns the function description associated with\n    the given address. *)\n\nDefinition find_funct_ptr (ge: t) (b: block) : option F :=\n  match find_def ge b with Some (Gfun f) => Some f | _ => None end.\n\n(** [find_funct] is similar to [find_funct_ptr], but the function address\n    is given as a value, which must be a pointer with offset 0. *)\n\nDefinition find_funct (ge: t) (v: val) : option F :=\n  match v with\n  | Vptr b ofs => if Ptrofs.eq_dec ofs Ptrofs.zero then find_funct_ptr ge b else None\n  | _ => None\n  end.\n\n(** [invert_symbol ge b] returns the name associated with the given block, if any *)\n\nDefinition invert_symbol (ge: t) (b: block) : option ident :=\n  PTree.fold\n    (fun res id b' => if eq_block b b' then Some id else res)\n    ge.(genv_symb) None.\n\n(** [find_var_info ge b] returns the information attached to the variable\n   at address [b]. *)\n\nDefinition find_var_info (ge: t) (b: block) : option (globvar V) :=\n  match find_def ge b with Some (Gvar v) => Some v | _ => None end.\n\n(** [block_is_volatile ge b] returns [true] if [b] points to a global variable\n  of volatile type, [false] otherwise. *)\n\nDefinition block_is_volatile (ge: t) (b: block) : option bool :=\n  match find_var_info ge b with\n  | None => None\n  | Some gv => Some (gv.(gvar_volatile))\n  end.\n\n(** ** Constructing the global environment *)\n\nProgram Definition add_global (ge: t) (idg: ident * option (globdef F V)) : t :=\n  @mkgenv\n    ge.(genv_public)\n    (PTree.set idg#1 ge.(genv_next) ge.(genv_symb))\n    (match idg#2 with Some g => PTree.set ge.(genv_next) g ge.(genv_defs) | _ => ge.(genv_defs) end)\n    (Psucc ge.(genv_next))\n    _ _ _.\nNext Obligation.\n  destruct ge; simpl in *.\n  rewrite PTree.gsspec in H. destruct (peq id i). inv H. apply Plt_succ.\n  apply Plt_trans_succ; eauto.\nQed.\nNext Obligation.\n  destruct ge; simpl in *.\n  destruct o.\n  +\n  rewrite PTree.gsspec in H. destruct (peq b genv_next0).\n  inv H. apply Plt_succ.\n  apply Plt_trans_succ; eauto.\n  +\n  apply genv_defs_range0 in H.\n  xomega.\nQed.\nNext Obligation.\n  destruct ge; simpl in *.\n  rewrite PTree.gsspec in H. rewrite PTree.gsspec in H0.\n  destruct (peq id1 i); destruct (peq id2 i).\n  congruence.\n  inv H. eelim Plt_strict. eapply genv_symb_range0; eauto.\n  inv H0. eelim Plt_strict. eapply genv_symb_range0; eauto.\n  eauto.\nQed.\n\nDefinition add_globals (ge: t) (gl: list (ident * option (globdef F V))) : t :=\n  List.fold_left add_global gl ge.\n\nLemma add_globals_app:\n  forall gl2 gl1 ge,\n  add_globals ge (gl1 ++ gl2) = add_globals (add_globals ge gl1) gl2.\nProof.\n  intros. apply fold_left_app. \nQed.\n\nProgram Definition empty_genv (pub: list ident): t :=\n  @mkgenv pub (PTree.empty _) (PTree.empty _) 1%positive _ _ _.\nNext Obligation.\n  rewrite PTree.gempty in H. discriminate.\nQed.\nNext Obligation.\n  rewrite PTree.gempty in H. discriminate.\nQed.\nNext Obligation.\n  rewrite PTree.gempty in H. discriminate.\nQed.\n\nDefinition globalenv (p: program F V) :=\n  add_globals (empty_genv p.(prog_public)) p.(prog_defs).\n\n(** Proof principles *)\n\nSection GLOBALENV_PRINCIPLES.\n\nVariable P: t -> Prop.\n\nLemma add_globals_preserves:\n  forall gl ge,\n  (forall ge id g, P ge -> In (id, g) gl -> P (add_global ge (id, g))) ->\n  P ge -> P (add_globals ge gl).\nProof.\n  induction gl; simpl; intros.\n  auto.\n  destruct a. apply IHgl; auto.\nQed.\n\nLemma add_globals_ensures:\n  forall id g gl ge,\n  (forall ge id g, P ge -> In (id, g) gl -> P (add_global ge (id, g))) ->\n  (forall ge, P (add_global ge (id, g))) ->\n  In (id, g) gl -> P (add_globals ge gl).\nProof.\n  induction gl; simpl; intros.\n  contradiction.\n  destruct H1. subst a. apply add_globals_preserves; auto.\n  apply IHgl; auto.\nQed.\n\nLemma add_globals_unique_preserves:\n  forall id gl ge,\n  (forall ge id1 g, P ge -> In (id1, g) gl -> id1 <> id -> P (add_global ge (id1, g))) ->\n  ~In id (map fst gl) -> P ge -> P (add_globals ge gl).\nProof.\n  induction gl; simpl; intros.\n  auto.\n  destruct a. apply IHgl; auto.\nQed.\n\nLemma add_globals_unique_ensures:\n  forall gl1 id g gl2 ge,\n  (forall ge id1 g1, P ge -> In (id1, g1) gl2 -> id1 <> id -> P (add_global ge (id1, g1))) ->\n  (forall ge, P (add_global ge (id, g))) ->\n  ~In id (map fst gl2) -> P (add_globals ge (gl1 ++ (id, g) :: gl2)).\nProof.\n  intros. rewrite add_globals_app. simpl. apply add_globals_unique_preserves with id; auto.\nQed.\n\nRemark in_norepet_unique:\n  forall (A: Type),\n  forall id g (gl: list (ident * A)),\n  In (id, g) gl -> list_norepet (map fst gl) ->\n  exists gl1 gl2, gl = gl1 ++ (id, g) :: gl2 /\\ ~In id (map fst gl2).\nProof.\n  induction gl as [|[id1 g1] gl]; simpl; intros.\n  contradiction.\n  inv H0. destruct H.\n  inv H. exists nil, gl. auto.\n  exploit IHgl; eauto. intros (gl1 & gl2 & X & Y).\n  exists ((id1, g1) :: gl1), gl2; split; auto. rewrite X; auto.\nQed.\n\nLemma add_globals_norepet_ensures:\n  forall id g gl ge,\n  (forall ge id1 g1, P ge -> In (id1, g1) gl -> id1 <> id -> P (add_global ge (id1, g1))) ->\n  (forall ge, P (add_global ge (id, g))) ->\n  In (id, g) gl -> list_norepet (map fst gl) -> P (add_globals ge gl).\nProof.\n  intros. exploit in_norepet_unique; eauto. intros (gl1 & gl2 & X & Y).\n  subst gl. apply add_globals_unique_ensures; auto. intros. eapply H; eauto.\n  apply in_or_app; simpl; auto.\nQed.\n\nEnd GLOBALENV_PRINCIPLES.\n\n(** ** Properties of the operations over global environments *)\n\nTheorem public_symbol_exists:\n  forall ge id, public_symbol ge id = true -> exists b, find_symbol ge id = Some b.\nProof.\n  unfold public_symbol; intros. destruct (find_symbol ge id) as [b|].\n  exists b; auto.\n  discriminate.\nQed.\n\nTheorem shift_symbol_address:\n  forall ge id ofs delta,\n  symbol_address ge id (Ptrofs.add ofs delta) = Val.offset_ptr (symbol_address ge id ofs) delta.\nProof.\n  intros. unfold symbol_address, Val.offset_ptr. destruct (find_symbol ge id); auto.\nQed.\n\nTheorem shift_symbol_address_32:\n  forall ge id ofs n,\n  Archi.ptr64 = false ->\n  symbol_address ge id (Ptrofs.add ofs (Ptrofs.of_int n)) = Val.add (symbol_address ge id ofs) (Vint n).\nProof.\n  intros. unfold symbol_address. destruct (find_symbol ge id).\n- unfold Val.add. rewrite H. auto.\n- auto.\nQed.\n\nTheorem shift_symbol_address_64:\n  forall ge id ofs n,\n  Archi.ptr64 = true ->\n  symbol_address ge id (Ptrofs.add ofs (Ptrofs.of_int64 n)) = Val.addl (symbol_address ge id ofs) (Vlong n).\nProof.\n  intros. unfold symbol_address. destruct (find_symbol ge id).\n- unfold Val.addl. rewrite H. auto.\n- auto.\nQed.\n\nTheorem find_funct_inv:\n  forall ge v f,\n  find_funct ge v = Some f -> exists b, v = Vptr b Ptrofs.zero.\nProof.\n  intros until f; unfold find_funct.\n  destruct v; try congruence.\n  destruct (Ptrofs.eq_dec i Ptrofs.zero); try congruence.\n  intros. exists b; congruence.\nQed.\n\nTheorem find_funct_find_funct_ptr:\n  forall ge b,\n  find_funct ge (Vptr b Ptrofs.zero) = find_funct_ptr ge b.\nProof.\n  intros; simpl. apply dec_eq_true.\nQed.\n\nTheorem find_funct_ptr_iff:\n  forall ge b f, find_funct_ptr ge b = Some f <-> find_def ge b = Some (Gfun f).\nProof.\n  intros. unfold find_funct_ptr. destruct (find_def ge b) as [[f1|v1]|]; intuition congruence.\nQed.\n\nTheorem find_var_info_iff:\n  forall ge b v, find_var_info ge b = Some v <-> find_def ge b = Some (Gvar v).\nProof.\n  intros. unfold find_var_info. destruct (find_def ge b) as [[f1|v1]|]; intuition congruence.\nQed.\n\nTheorem find_def_symbol:\n  forall p id g,\n  (prog_defmap p)!id = Some g <-> exists b, find_symbol (globalenv p) id = Some b /\\ find_def (globalenv p) b = Some g.\nProof.\n  intros.\n  set (P := fun m ge => m!id = Some g <-> exists b, find_symbol ge id = Some b /\\ find_def ge b = Some g).\n  assert (REC: forall l m ge,\n            P m ge ->\n            P (fold_left\n                 (fun m idg =>\n                    (*PTree.set idg#1 idg#2 m*)\n                    match idg#2 with Some g => PTree.set idg#1 g m | _ => PTree.remove idg#1 m end\n                 )\n                 l m)\n              (add_globals ge l)).\n  { induction l as [ | [id1 g1] l]; intros; simpl.\n  - auto.\n  - apply IHl. unfold P, add_global, find_symbol, find_def; simpl.\n    destruct g1.\n    *\n    rewrite ! PTree.gsspec. destruct (peq id id1). \n    + subst id1. split; intros.\n      inv H0. exists (genv_next ge); split; auto. apply PTree.gss.\n      destruct H0 as (b & A & B). inv A. rewrite PTree.gss in B. auto.\n    + red in H; rewrite H. split.\n      intros (b & A & B). exists b; split; auto. rewrite PTree.gso; auto. \n      apply Plt_ne. eapply genv_symb_range; eauto. \n      intros (b & A & B). rewrite PTree.gso in B. exists b; auto. \n      apply Plt_ne. eapply genv_symb_range; eauto.\n    *\n    rewrite PTree.gsspec.\n    rewrite PTree.grspec.\n    destruct (peq id id1); destruct (PTree.elt_eq id id1); auto; try intuition congruence.\n    subst id1.\n    split; try discriminate.\n    destruct 1 as (? & J & K).\n    inv J.\n    apply genv_defs_range in K.\n    xomega.\n  }\n  apply REC. unfold P, find_symbol, find_def; simpl. \n  rewrite ! PTree.gempty. split.\n  congruence.\n  intros (b & A & B); congruence.\nQed.\n\nTheorem find_def_symbol_strong:\n  forall p id g,\n  (prog_option_defmap p)!id = Some g <-> exists b, find_symbol (globalenv p) id = Some b /\\ find_def (globalenv p) b = g.\nProof.\n  intros.\n  set (P := fun m ge => m!id = Some g <-> exists b, find_symbol ge id = Some b /\\ find_def ge b = g).\n  assert (REC: forall l m ge,\n            P m ge ->\n            P (fold_left\n                 (fun m idg => PTree.set idg#1 idg#2 m)\n                 l m)\n              (add_globals ge l)).\n  { induction l as [ | [id1 g1] l]; intros; simpl.\n  - auto.\n  - apply IHl. unfold P, add_global, find_symbol, find_def; simpl.\n    rewrite ! PTree.gsspec. destruct (peq id id1).\n    + subst id1. split; intros.\n      inv H0. exists (genv_next ge); split; auto.\n      destruct g.\n      { apply PTree.gss. }\n      { destruct (_ ! _) eqn:GE; auto.\n        apply genv_defs_range in GE.\n        xomega. }\n      destruct H0 as (b & A & B). clear P IHl H. inv A.\n      destruct g1.\n      { rewrite PTree.gss. auto. }\n      destruct (_ ! _) eqn:GE; auto.\n      apply genv_defs_range in GE.\n      xomega.\n    + red in H; rewrite H. split.\n      intros (b & A & B). exists b; split; auto.\n      destruct g1; auto.\n      rewrite PTree.gso; auto.\n      apply Plt_ne. eapply genv_symb_range; eauto. \n      intros (b & A & B).\n      destruct g1; eauto.\n      rewrite PTree.gso in B. exists b; auto.\n      apply Plt_ne. eapply genv_symb_range; eauto.\n  }\n  apply REC. unfold P, find_symbol, find_def; simpl. \n  rewrite ! PTree.gempty. split.\n  congruence.\n  intros (b & A & B); congruence.\nQed.\n\nTheorem find_symbol_exists:\n  forall p id g,\n  In (id, g) (prog_defs p) ->\n  exists b, find_symbol (globalenv p) id = Some b.\nProof.\n  intros. unfold globalenv. eapply add_globals_ensures; eauto.\n(* preserves *)\n  intros. unfold find_symbol; simpl. rewrite PTree.gsspec. destruct (peq id id0).\n  econstructor; eauto.\n  auto.\n(* ensures *)\n  intros. unfold find_symbol; simpl. rewrite PTree.gss. econstructor; eauto.\nQed.\n\nTheorem find_symbol_inversion : forall p x b,\n  find_symbol (globalenv p) x = Some b ->\n  In x (prog_defs_names p).\nProof.\n  intros until b; unfold globalenv. eapply add_globals_preserves.\n(* preserves *)\n  unfold find_symbol; simpl; intros. rewrite PTree.gsspec in H1.\n  destruct (peq x id). subst x. change id with (fst (id, g)). apply List.in_map; auto.\n  auto.\n(* base *)\n  unfold find_symbol; simpl; intros. rewrite PTree.gempty in H. discriminate.\nQed.\n\nTheorem find_def_inversion:\n  forall p b g,\n  find_def (globalenv p) b = Some g ->\n  exists id, In (id, Some g) (prog_defs p).\nProof.\n  intros until g. unfold globalenv. apply add_globals_preserves.\n(* preserves *)\n  unfold find_def; simpl; intros.\n  destruct g0; auto.\n  rewrite PTree.gsspec in H1. destruct (peq b (genv_next ge)).\n  inv H1. exists id; auto.\n  auto.\n(* base *)\n  unfold find_def; simpl; intros. rewrite PTree.gempty in H. discriminate.\nQed.\n\nCorollary find_funct_ptr_inversion:\n  forall p b f,\n  find_funct_ptr (globalenv p) b = Some f ->\n  exists id, In (id, Some (Gfun f)) (prog_defs p).\nProof.\n  intros. apply find_def_inversion with b. apply find_funct_ptr_iff; auto.\nQed.\n\nCorollary find_funct_inversion:\n  forall p v f,\n  find_funct (globalenv p) v = Some f ->\n  exists id, In (id, Some (Gfun f)) (prog_defs p).\nProof.\n  intros. exploit find_funct_inv; eauto. intros [b EQ]. subst v.\n  rewrite find_funct_find_funct_ptr in H.\n  eapply find_funct_ptr_inversion; eauto.\nQed.\n\nTheorem find_funct_ptr_prop:\n  forall (P: F -> Prop) p b f,\n  (forall id f, In (id, Some (Gfun f)) (prog_defs p) -> P f) ->\n  find_funct_ptr (globalenv p) b = Some f ->\n  P f.\nProof.\n  intros. exploit find_funct_ptr_inversion; eauto. intros [id IN]. eauto.\nQed.\n\nTheorem find_funct_prop:\n  forall (P: F -> Prop) p v f,\n  (forall id f, In (id, Some (Gfun f)) (prog_defs p) -> P f) ->\n  find_funct (globalenv p) v = Some f ->\n  P f.\nProof.\n  intros. exploit find_funct_inversion; eauto. intros [id IN]. eauto.\nQed.\n\nTheorem global_addresses_distinct:\n  forall ge id1 id2 b1 b2,\n  id1 <> id2 ->\n  find_symbol ge id1 = Some b1 ->\n  find_symbol ge id2 = Some b2 ->\n  b1 <> b2.\nProof.\n  intros. red; intros; subst. elim H. destruct ge. eauto.\nQed.\n\nTheorem invert_find_symbol:\n  forall ge id b,\n  invert_symbol ge b = Some id -> find_symbol ge id = Some b.\nProof.\n  intros until b; unfold find_symbol, invert_symbol.\n  apply PTree_Properties.fold_rec.\n  intros. rewrite H in H0; auto.\n  congruence.\n  intros. destruct (eq_block b v). inv H2. apply PTree.gss.\n  rewrite PTree.gsspec. destruct (peq id k).\n  subst. assert (m!k = Some b) by auto. congruence.\n  auto.\nQed.\n\nTheorem find_invert_symbol:\n  forall ge id b,\n  find_symbol ge id = Some b -> invert_symbol ge b = Some id.\nProof.\n  intros until b.\n  assert (find_symbol ge id = Some b -> exists id', invert_symbol ge b = Some id').\n  unfold find_symbol, invert_symbol.\n  apply PTree_Properties.fold_rec.\n  intros. rewrite H in H0; auto.\n  rewrite PTree.gempty; congruence.\n  intros. destruct (eq_block b v). exists k; auto.\n  rewrite PTree.gsspec in H2. destruct (peq id k).\n  inv H2. congruence. auto.\n\n  intros; exploit H; eauto. intros [id' A].\n  assert (id = id'). eapply genv_vars_inj; eauto. apply invert_find_symbol; auto.\n  congruence.\nQed.\n\nDefinition advance_next (gl: list (ident * option (globdef F V))) (x: positive) :=\n  List.fold_left (fun n g => Psucc n) gl x.\n\nRemark genv_next_add_globals:\n  forall gl ge,\n  genv_next (add_globals ge gl) = advance_next gl (genv_next ge).\nProof.\n  induction gl; simpl; intros.\n  auto.\n  rewrite IHgl. auto.\nQed.\n\nRemark genv_public_add_globals:\n  forall gl ge,\n  genv_public (add_globals ge gl) = genv_public ge.\nProof.\n  induction gl; simpl; intros.\n  auto.\n  rewrite IHgl; auto.\nQed.\n\nTheorem globalenv_public:\n  forall p, genv_public (globalenv p) = prog_public p.\nProof.\n  unfold globalenv; intros. rewrite genv_public_add_globals. auto.\nQed.\n\nTheorem block_is_volatile_below:\n  forall ge b, block_is_volatile ge b = Some true ->  Plt b ge.(genv_next).\nProof.\n  unfold block_is_volatile; intros. destruct (find_var_info ge b) as [gv|] eqn:FV.\n  rewrite find_var_info_iff in FV. eapply genv_defs_range; eauto.\n  discriminate.\nQed.\n\n(** ** Coercing a global environment into a symbol environment *)\n\nDefinition to_senv (ge: t) : Senv.t :=\n @Senv.mksenv\n    (find_symbol ge)\n    (public_symbol ge)\n    (invert_symbol ge)\n    (block_is_volatile ge)\n    ge.(genv_next)\n    ge.(genv_vars_inj)\n    (invert_find_symbol ge)\n    (find_invert_symbol ge)\n    (public_symbol_exists ge)\n    ge.(genv_symb_range)\n    (block_is_volatile_below ge).\n*)\nEnd GENV.\n(*\n(** * Construction of the initial memory state *)\n\nSection WITHMEMORYMODEL.\nContext `{memory_model_prf: Mem.MemoryModel}.\n\nVariable F: Type.  (**r The type of function descriptions *)\nVariable V: Type.  (**r The type of information attached to variables *)\n\nSection INITMEM.\n\nVariable ge: t F V.\n\nDefinition store_init_data (m: mem) (b: block) (p: Z) (id: init_data) : option mem :=\n  match id with\n  | Init_int8 n => Mem.store Mint8unsigned m b p (Vint n)\n  | Init_int16 n => Mem.store Mint16unsigned m b p (Vint n)\n  | Init_int32 n => Mem.store Mint32 m b p (Vint n)\n  | Init_int64 n => Mem.store Mint64 m b p (Vlong n)\n  | Init_float32 n => Mem.store Mfloat32 m b p (Vsingle n)\n  | Init_float64 n => Mem.store Mfloat64 m b p (Vfloat n)\n  | Init_addrof symb ofs =>\n      match find_symbol ge symb with\n      | None => None\n      | Some b' => Mem.store Mptr m b p (Vptr b' ofs)\n      end\n  | Init_space n => Some m\n  end.\n\nFixpoint store_init_data_list (m: mem) (b: block) (p: Z) (idl: list init_data)\n                              {struct idl}: option mem :=\n  match idl with\n  | nil => Some m\n  | id :: idl' =>\n      match store_init_data m b p id with\n      | None => None\n      | Some m' => store_init_data_list m' b (p + init_data_size id) idl'\n      end\n  end.\n\nDefinition perm_globvar (gv: globvar V) : permission :=\n  if gv.(gvar_volatile) then Nonempty\n  else if gv.(gvar_readonly) then Readable\n  else Writable.\n\nDefinition alloc_global (m: mem) (idg: ident * option (globdef F V)): option mem :=\n  match idg with\n  | (id, None) =>\n      let (m1, b) := Mem.alloc m 0 0 in\n      Some m1\n  | (id, Some (Gfun f)) =>\n      let (m1, b) := Mem.alloc m 0 1 in\n      Mem.drop_perm m1 b 0 1 Nonempty\n  | (id, Some (Gvar v)) =>\n      let init := v.(gvar_init) in\n      let sz := init_data_list_size init in\n      let (m1, b) := Mem.alloc m 0 sz in\n      match store_zeros m1 b 0 sz with\n      | None => None\n      | Some m2 =>\n          match store_init_data_list m2 b 0 init with\n          | None => None\n          | Some m3 => Mem.drop_perm m3 b 0 sz (perm_globvar v)\n          end\n      end\n  end.\n\nFixpoint alloc_globals (m: mem) (gl: list (ident * option (globdef F V)))\n                       {struct gl} : option mem :=\n  match gl with\n  | nil => Some m\n  | g :: gl' =>\n      match alloc_global m g with\n      | None => None\n      | Some m' => alloc_globals m' gl'\n      end\n  end.\n\nLemma alloc_globals_app : forall gl1 gl2 m m1,\n  alloc_globals m gl1 = Some m1 ->\n  alloc_globals m1 gl2 = alloc_globals m (gl1 ++ gl2).\nProof.\n  induction gl1.\n  simpl. intros.  inversion H; subst. auto.\n  simpl. intros. destruct (alloc_global m a); eauto. inversion H.\nQed.\n\n(** Next-block properties *)\n\nRemark store_zeros_nextblock:\n  forall m b p n m', store_zeros m b p n = Some m' -> Mem.nextblock m' = Mem.nextblock m.\nProof.\n  intros until n. functional induction (store_zeros m b p n); intros.\n  inv H; auto.\n  rewrite IHo; eauto with mem.\n  congruence.\nQed.\n\nRemark store_init_data_list_nextblock:\n  forall idl b m p m',\n  store_init_data_list m b p idl = Some m' ->\n  Mem.nextblock m' = Mem.nextblock m.\nProof.\n  induction idl; simpl; intros until m'.\n  intros. congruence.\n  caseEq (store_init_data m b p a); try congruence. intros.\n  transitivity (Mem.nextblock m0). eauto.\n  destruct a; simpl in H; try (eapply Mem.nextblock_store; eauto; fail).\n  congruence.\n  destruct (find_symbol ge i); try congruence. eapply Mem.nextblock_store; eauto.\nQed.\n\nRemark alloc_global_nextblock:\n  forall g m m',\n  alloc_global m g = Some m' ->\n  Mem.nextblock m' = Psucc(Mem.nextblock m).\nProof.\n  unfold alloc_global. intros.\n  destruct g as [id [[f|v]|]].\n  (* function *)\n  destruct (Mem.alloc m 0 1) as [m1 b] eqn:?.\n  erewrite Mem.nextblock_drop; eauto. erewrite Mem.nextblock_alloc; eauto.\n  (* variable *)\n  set (init := gvar_init v) in *.\n  set (sz := init_data_list_size init) in *.\n  destruct (Mem.alloc m 0 sz) as [m1 b] eqn:?.\n  destruct (store_zeros m1 b 0 sz) as [m2|] eqn:?; try discriminate.\n  destruct (store_init_data_list m2 b 0 init) as [m3|] eqn:?; try discriminate.\n  erewrite Mem.nextblock_drop; eauto.\n  erewrite store_init_data_list_nextblock; eauto.\n  erewrite store_zeros_nextblock; eauto.\n  erewrite Mem.nextblock_alloc; eauto.\n  (* none *)\n  destruct (Mem.alloc m 0 0) as [m1 b] eqn:? .\n  inv H.\n  eapply Mem.nextblock_alloc.\n  eassumption.\nQed.\n\nRemark alloc_globals_nextblock:\n  forall gl m m',\n  alloc_globals m gl = Some m' ->\n  Mem.nextblock m' = advance_next gl (Mem.nextblock m).\nProof.\n  induction gl; simpl; intros.\n  congruence.\n  destruct (alloc_global m a) as [m1|] eqn:?; try discriminate.\n  erewrite IHgl; eauto. erewrite alloc_global_nextblock; eauto.\nQed.\n\n(** Permissions *)\n\nRemark store_zeros_perm:\n  forall k prm b' q m b p n m',\n  store_zeros m b p n = Some m' ->\n  (Mem.perm m b' q k prm <-> Mem.perm m' b' q k prm).\nProof.\n  intros until n. functional induction (store_zeros m b p n); intros.\n  inv H; tauto.\n  destruct (IHo _ H); intros. split; eauto with mem.\n  congruence.\nQed.\n\nRemark store_init_data_perm:\n  forall k prm b' q i b m p m',\n  store_init_data m b p i = Some m' ->\n  (Mem.perm m b' q k prm <-> Mem.perm m' b' q k prm).\nProof.\n  intros. \n  assert (forall chunk v,\n          Mem.store chunk m b p v = Some m' ->\n          (Mem.perm m b' q k prm <-> Mem.perm m' b' q k prm)).\n    intros; split; eauto with mem.\n  destruct i; simpl in H; eauto. \n  inv H; tauto.\n  destruct (find_symbol ge i); try discriminate. eauto.\nQed.\n\nRemark store_init_data_list_perm:\n  forall k prm b' q idl b m p m',\n  store_init_data_list m b p idl = Some m' ->\n  (Mem.perm m b' q k prm <-> Mem.perm m' b' q k prm).\nProof.\n  induction idl as [ | i1 idl]; simpl; intros.\n- inv H; tauto.\n- destruct (store_init_data m b p i1) as [m1|] eqn:S1; try discriminate.\n  transitivity (Mem.perm m1 b' q k prm). \n  eapply store_init_data_perm; eauto.\n  eapply IHidl; eauto.\nQed.\n\nRemark alloc_global_perm:\n  forall k prm b' q idg m m',\n  alloc_global m idg = Some m' ->\n  Mem.valid_block m b' ->\n  (Mem.perm m b' q k prm <-> Mem.perm m' b' q k prm).\nProof.\n  intros. destruct idg as [id [[f|v]|]]; simpl in H.\n  (* function *)\n  destruct (Mem.alloc m 0 1) as [m1 b] eqn:?.\n  assert (b' <> b). apply Mem.valid_not_valid_diff with m; eauto with mem.\n  split; intros.\n  eapply Mem.perm_drop_3; eauto. eapply Mem.perm_alloc_1; eauto.\n  eapply Mem.perm_alloc_4; eauto. eapply Mem.perm_drop_4; eauto.\n  (* variable *)\n  set (init := gvar_init v) in *.\n  set (sz := init_data_list_size init) in *.\n  destruct (Mem.alloc m 0 sz) as [m1 b] eqn:?.\n  destruct (store_zeros m1 b 0 sz) as [m2|] eqn:?; try discriminate.\n  destruct (store_init_data_list m2 b 0 init) as [m3|] eqn:?; try discriminate.\n  assert (b' <> b). apply Mem.valid_not_valid_diff with m; eauto with mem.\n  split; intros.\n  eapply Mem.perm_drop_3; eauto.\n  erewrite <- store_init_data_list_perm; [idtac|eauto].\n  erewrite <- store_zeros_perm; [idtac|eauto].\n  eapply Mem.perm_alloc_1; eauto.\n  eapply Mem.perm_alloc_4; eauto.\n  erewrite store_zeros_perm; [idtac|eauto].\n  erewrite store_init_data_list_perm; [idtac|eauto].\n  eapply Mem.perm_drop_4; eauto.\n  (* none *)\n  destruct (Mem.alloc m 0 0) as [m1 b] eqn:?.\n  assert (b' <> b). apply Mem.valid_not_valid_diff with m; eauto with mem.\n  inv H.\n  split; intros.\n  eapply Mem.perm_alloc_1; eauto.\n  eapply Mem.perm_alloc_4; eauto.\nQed.\n\nRemark alloc_globals_perm:\n  forall k prm b' q gl m m',\n  alloc_globals m gl = Some m' ->\n  Mem.valid_block m b' ->\n  (Mem.perm m b' q k prm <-> Mem.perm m' b' q k prm).\nProof.\n  induction gl.\n  simpl; intros. inv H. tauto.\n  simpl; intros. destruct (alloc_global m a) as [m1|] eqn:?; try discriminate.\n  erewrite alloc_global_perm; eauto. eapply IHgl; eauto.\n  unfold Mem.valid_block in *. erewrite alloc_global_nextblock; eauto.\n  apply Plt_trans_succ; auto.\nQed.\n\n(** Data preservation properties *)\n\nRemark store_zeros_unchanged:\n  forall (P: block -> Z -> Prop) m b p n m',\n  store_zeros m b p n = Some m' ->\n  (forall i, p <= i < p + n -> ~ P b i) ->\n  Mem.unchanged_on P m m'.\nProof.\n  intros until n. functional induction (store_zeros m b p n); intros.\n- inv H; apply Mem.unchanged_on_refl.\n- apply Mem.unchanged_on_trans with m'.\n+ eapply Mem.store_unchanged_on; eauto. simpl. intros. apply H0. omega. \n+ apply IHo; auto. intros; apply H0; omega. \n- discriminate.\nQed.\n\nRemark store_init_data_unchanged:\n  forall (P: block -> Z -> Prop) b i m p m',\n  store_init_data m b p i = Some m' ->\n  (forall ofs, p <= ofs < p + init_data_size i -> ~ P b ofs) ->\n  Mem.unchanged_on P m m'.\nProof.\n  intros. destruct i; simpl in *;\n  try (eapply Mem.store_unchanged_on; eauto; fail).\n  inv H; apply Mem.unchanged_on_refl.\n  destruct (find_symbol ge i); try congruence.\n  eapply Mem.store_unchanged_on; eauto;\n  unfold Mptr; destruct Archi.ptr64; eauto.\nQed.\n\nRemark store_init_data_list_unchanged:\n  forall (P: block -> Z -> Prop) b il m p m',\n  store_init_data_list m b p il = Some m' ->\n  (forall ofs, p <= ofs -> ~ P b ofs) ->\n  Mem.unchanged_on P m m'.\nProof.\n  induction il; simpl; intros.\n- inv H. apply Mem.unchanged_on_refl.\n- destruct (store_init_data m b p a) as [m1|] eqn:?; try congruence.\n  apply Mem.unchanged_on_trans with m1.\n  eapply store_init_data_unchanged; eauto. intros; apply H0; tauto. \n  eapply IHil; eauto. intros; apply H0. generalize (init_data_size_pos a); omega.\nQed.\n\n(** Properties related to [loadbytes] *)\n\nDefinition readbytes_as_zero (m: mem) (b: block) (ofs len: Z) : Prop :=\n  forall p n,\n  ofs <= p -> p + Z.of_nat n <= ofs + len ->\n  Mem.loadbytes m b p (Z.of_nat n) = Some (list_repeat n (Byte Byte.zero)).\n\nLemma store_zeros_loadbytes:\n  forall m b p n m',\n  store_zeros m b p n = Some m' ->\n  readbytes_as_zero m' b p n.\nProof.\n  intros until n; functional induction (store_zeros m b p n); red; intros.\n- destruct n0. simpl. apply Mem.loadbytes_empty. omega.\n  rewrite inj_S in H1. omegaContradiction.\n- destruct (zeq p0 p).\n  + subst p0. destruct n0. simpl. apply Mem.loadbytes_empty. omega.\n    rewrite inj_S in H1. rewrite inj_S.\n    replace (Z.succ (Z.of_nat n0)) with (1 + Z.of_nat n0) by omega.\n    change (list_repeat (S n0) (Byte Byte.zero))\n      with ((Byte Byte.zero :: nil) ++ list_repeat n0 (Byte Byte.zero)).\n    apply Mem.loadbytes_concat.\n    eapply Mem.loadbytes_unchanged_on with (P := fun b1 ofs1 => ofs1 = p).\n    eapply store_zeros_unchanged; eauto. intros; omega.\n    intros; omega.\n    replace (Byte Byte.zero :: nil) with (encode_val Mint8unsigned Vzero).\n    change 1 with (size_chunk Mint8unsigned).\n    eapply Mem.loadbytes_store_same; eauto.\n    unfold encode_val; unfold encode_int; unfold rev_if_be; destruct Archi.big_endian; reflexivity.\n    eapply IHo; eauto. omega. omega. omega. omega.\n  + eapply IHo; eauto. omega. omega.\n- discriminate.\nQed.\n\nDefinition bytes_of_init_data (i: init_data): list memval :=\n  match i with\n  | Init_int8 n => inj_bytes (encode_int 1%nat (Int.unsigned n))\n  | Init_int16 n => inj_bytes (encode_int 2%nat (Int.unsigned n))\n  | Init_int32 n => inj_bytes (encode_int 4%nat (Int.unsigned n))\n  | Init_int64 n => inj_bytes (encode_int 8%nat (Int64.unsigned n))\n  | Init_float32 n => inj_bytes (encode_int 4%nat (Int.unsigned (Float32.to_bits n)))\n  | Init_float64 n => inj_bytes (encode_int 8%nat (Int64.unsigned (Float.to_bits n)))\n  | Init_space n => list_repeat (Z.to_nat n) (Byte Byte.zero)\n  | Init_addrof id ofs =>\n      match find_symbol ge id with\n      | Some b => inj_value (if Archi.ptr64 then Q64 else Q32) (Vptr b ofs)\n      | None   => list_repeat (if Archi.ptr64 then 8%nat else 4%nat) Undef\n      end\n  end.\n\nRemark init_data_size_addrof:\n  forall id ofs, init_data_size (Init_addrof id ofs) = size_chunk Mptr.\nProof.\n  intros. unfold Mptr. simpl. destruct Archi.ptr64; auto.\nQed.\n\nLemma store_init_data_loadbytes:\n  forall m b p i m',\n  store_init_data m b p i = Some m' ->\n  readbytes_as_zero m b p (init_data_size i) ->\n  Mem.loadbytes m' b p (init_data_size i) = Some (bytes_of_init_data i).\nProof.\n  intros; destruct i; simpl in H; try apply (Mem.loadbytes_store_same _ _ _ _ _ _ H).\n- inv H. simpl.\n  assert (EQ: Z.of_nat (Z.to_nat z) = Z.max z 0).\n  { destruct (zle 0 z). rewrite Z2Nat.id; xomega. destruct z; try discriminate. simpl. xomega. } \n  rewrite <- EQ. apply H0. omega. simpl. omega. \n- rewrite init_data_size_addrof. simpl.\n  destruct (find_symbol ge i) as [b'|]; try discriminate.\n  rewrite (Mem.loadbytes_store_same _ _ _ _ _ _ H).\n  unfold encode_val, Mptr; destruct Archi.ptr64; reflexivity.\nQed.\n\nFixpoint bytes_of_init_data_list (il: list init_data): list memval :=\n  match il with\n  | nil => nil\n  | i :: il => bytes_of_init_data i ++ bytes_of_init_data_list il\n  end.\n\nLemma store_init_data_list_loadbytes:\n  forall b il m p m',\n  store_init_data_list m b p il = Some m' ->\n  readbytes_as_zero m b p (init_data_list_size il) ->\n  Mem.loadbytes m' b p (init_data_list_size il) = Some (bytes_of_init_data_list il).\nProof.\n  induction il as [ | i1 il]; simpl; intros.\n- apply Mem.loadbytes_empty. omega.\n- generalize (init_data_size_pos i1) (init_data_list_size_pos il); intros P1 PL.\n  destruct (store_init_data m b p i1) as [m1|] eqn:S; try discriminate.\n  apply Mem.loadbytes_concat.\n  eapply Mem.loadbytes_unchanged_on with (P := fun b1 ofs1 => ofs1 < p + init_data_size i1).\n  eapply store_init_data_list_unchanged; eauto.\n  intros; omega.\n  intros; omega.\n  eapply store_init_data_loadbytes; eauto. \n  red; intros; apply H0. omega. omega.\n  apply IHil with m1; auto.\n  red; intros. \n  eapply Mem.loadbytes_unchanged_on with (P := fun b1 ofs1 => p + init_data_size i1 <= ofs1).\n  eapply store_init_data_unchanged; eauto. \n  intros; omega.\n  intros; omega. \n  apply H0. omega. omega.\n  auto. auto.\nQed.\n\n(** Properties related to [load] *)\n\nDefinition read_as_zero (m: mem) (b: block) (ofs len: Z) : Prop :=\n  forall chunk p,\n  ofs <= p -> p + size_chunk chunk <= ofs + len ->\n  (align_chunk chunk | p) ->\n  Mem.load chunk m b p =\n  Some (match chunk with\n        | Mint8unsigned | Mint8signed | Mint16unsigned | Mint16signed | Mint32 => Vint Int.zero\n        | Mint64 => Vlong Int64.zero\n        | Mfloat32 => Vsingle Float32.zero\n        | Mfloat64 => Vfloat Float.zero\n        | Many32 | Many64 => Vundef\n        end).\n\nRemark read_as_zero_unchanged:\n  forall (P: block -> Z -> Prop) m b ofs len m',\n  read_as_zero m b ofs len ->\n  Mem.unchanged_on P m m' ->\n  (forall i, ofs <= i < ofs + len -> P b i) ->\n  read_as_zero m' b ofs len.\nProof.\n  intros; red; intros. eapply Mem.load_unchanged_on; eauto. \n  intros; apply H1. omega. \nQed. \n\nLemma store_zeros_read_as_zero:\n  forall m b p n m',\n  store_zeros m b p n = Some m' ->\n  read_as_zero m' b p n.\nProof.\n  intros; red; intros.\n  transitivity (Some(decode_val chunk (list_repeat (size_chunk_nat chunk) (Byte Byte.zero)))).\n  apply Mem.loadbytes_load; auto. rewrite size_chunk_conv.\n  eapply store_zeros_loadbytes; eauto. rewrite <- size_chunk_conv; auto.\n  f_equal. destruct chunk; unfold decode_val; unfold decode_int; unfold rev_if_be; destruct Archi.big_endian; reflexivity.\nQed.\n\nFixpoint load_store_init_data (m: mem) (b: block) (p: Z) (il: list init_data) {struct il} : Prop :=\n  match il with\n  | nil => True\n  | Init_int8 n :: il' =>\n      Mem.load Mint8unsigned m b p = Some(Vint(Int.zero_ext 8 n))\n      /\\ load_store_init_data m b (p + 1) il'\n  | Init_int16 n :: il' =>\n      Mem.load Mint16unsigned m b p = Some(Vint(Int.zero_ext 16 n))\n      /\\ load_store_init_data m b (p + 2) il'\n  | Init_int32 n :: il' =>\n      Mem.load Mint32 m b p = Some(Vint n)\n      /\\ load_store_init_data m b (p + 4) il'\n  | Init_int64 n :: il' =>\n      Mem.load Mint64 m b p = Some(Vlong n)\n      /\\ load_store_init_data m b (p + 8) il'\n  | Init_float32 n :: il' =>\n      Mem.load Mfloat32 m b p = Some(Vsingle n)\n      /\\ load_store_init_data m b (p + 4) il'\n  | Init_float64 n :: il' =>\n      Mem.load Mfloat64 m b p = Some(Vfloat n)\n      /\\ load_store_init_data m b (p + 8) il'\n  | Init_addrof symb ofs :: il' =>\n      (exists b', find_symbol ge symb = Some b' /\\ Mem.load Mptr m b p = Some(Vptr b' ofs))\n      /\\ load_store_init_data m b (p + size_chunk Mptr) il'\n  | Init_space n :: il' =>\n      read_as_zero m b p n\n      /\\ load_store_init_data m b (p + Zmax n 0) il'\n  end.\n\nLemma store_init_data_list_charact:\n  forall b il m p m',\n  store_init_data_list m b p il = Some m' ->\n  read_as_zero m b p (init_data_list_size il) ->\n  load_store_init_data m' b p il.\nProof.\n  assert (A: forall chunk v m b p m1 il m',\n    Mem.store chunk m b p v = Some m1 ->\n    store_init_data_list m1 b (p + size_chunk chunk) il = Some m' ->\n    Mem.load chunk m' b p = Some(Val.load_result chunk v)).\n  {\n    intros.\n    eapply Mem.load_unchanged_on with (P := fun b' ofs' => ofs' < p + size_chunk chunk).\n    eapply store_init_data_list_unchanged; eauto. intros; omega.\n    intros; tauto.\n    eapply Mem.load_store_same; eauto.\n  }\n  induction il; simpl.\n- auto.\n- intros. destruct (store_init_data m b p a) as [m1|] eqn:?; try congruence.\n  exploit IHil; eauto.\n  set (P := fun (b': block) ofs' => p + init_data_size a <= ofs').\n  apply read_as_zero_unchanged with (m := m) (P := P).\n  red; intros; apply H0; auto. generalize (init_data_size_pos a); omega. omega. \n  eapply store_init_data_unchanged with (P := P); eauto.\n  intros; unfold P. omega.\n  intros; unfold P. omega.\n  intro D.\n  destruct a; simpl in Heqo.\n+ split; auto. eapply (A Mint8unsigned (Vint i)); eauto.\n+ split; auto. eapply (A Mint16unsigned (Vint i)); eauto.\n+ split; auto. eapply (A Mint32 (Vint i)); eauto.\n+ split; auto. eapply (A Mint64 (Vlong i)); eauto.\n+ split; auto. eapply (A Mfloat32 (Vsingle f)); eauto.\n+ split; auto. eapply (A Mfloat64 (Vfloat f)); eauto.\n+ split; auto.\n  set (P := fun (b': block) ofs' => ofs' < p + init_data_size (Init_space z)).\n  inv Heqo. apply read_as_zero_unchanged with (m := m1) (P := P).\n  red; intros. apply H0; auto. simpl. generalize (init_data_list_size_pos il); xomega.\n  eapply store_init_data_list_unchanged; eauto. \n  intros; unfold P. omega.\n  intros; unfold P. simpl; xomega.\n+ rewrite init_data_size_addrof in *.\n  split; auto.\n  destruct (find_symbol ge i); try congruence.\n  exists b0; split; auto.\n  transitivity (Some (Val.load_result Mptr (Vptr b0 i0))).\n  eapply (A Mptr (Vptr b0 i0)); eauto.\n  unfold Val.load_result, Mptr; destruct Archi.ptr64; auto.\nQed.\n\nRemark alloc_global_unchanged:\n  forall (P: block -> Z -> Prop) m id g m',\n  alloc_global m (id, g) = Some m' ->\n  Mem.unchanged_on P m m'.\nProof.\n  intros. destruct g as [[f|v]|]; simpl in H.\n- (* function *)\n  destruct (Mem.alloc m 0 1) as [m1 b] eqn:?.\n  set (Q := fun b' (ofs: Z) => b' <> b).\n  apply Mem.unchanged_on_implies with Q.\n  apply Mem.unchanged_on_trans with m1.\n  eapply Mem.alloc_unchanged_on; eauto.\n  eapply Mem.drop_perm_unchanged_on; eauto. \n  intros; red. apply Mem.valid_not_valid_diff with m; eauto with mem.\n- (* variable *)\n  set (init := gvar_init v) in *.\n  set (sz := init_data_list_size init) in *.\n  destruct (Mem.alloc m 0 sz) as [m1 b] eqn:?.\n  destruct (store_zeros m1 b 0 sz) as [m2|] eqn:?; try discriminate.\n  destruct (store_init_data_list m2 b 0 init) as [m3|] eqn:?; try discriminate.\n  set (Q := fun b' (ofs: Z) => b' <> b).\n  apply Mem.unchanged_on_implies with Q.\n  apply Mem.unchanged_on_trans with m1.\n  eapply Mem.alloc_unchanged_on; eauto.\n  apply Mem.unchanged_on_trans with m2.\n  eapply store_zeros_unchanged; eauto.\n  apply Mem.unchanged_on_trans with m3.\n  eapply store_init_data_list_unchanged; eauto. \n  eapply Mem.drop_perm_unchanged_on; eauto. \n  intros; red. apply Mem.valid_not_valid_diff with m; eauto with mem.\n- (* none *)\n  destruct (Mem.alloc m 0 0) as [m1 b] eqn:?.\n  inv H.\n  eapply Mem.alloc_unchanged_on; eauto.\nQed.\n\nRemark alloc_globals_unchanged:\n  forall (P: block -> Z -> Prop) gl m m',\n  alloc_globals m gl = Some m' ->\n  Mem.unchanged_on P m m'.\nProof.\n  induction gl; simpl; intros.\n- inv H. apply Mem.unchanged_on_refl.\n- destruct (alloc_global m a) as [m''|] eqn:?; try discriminate.\n  destruct a as [id g].\n  apply Mem.unchanged_on_trans with m''. \n  eapply alloc_global_unchanged; eauto.\n  apply IHgl; auto.\nQed.\n\nRemark load_store_init_data_invariant:\n  forall m m' b,\n  (forall chunk ofs, Mem.load chunk m' b ofs = Mem.load chunk m b ofs) ->\n  forall il p,\n  load_store_init_data m b p il -> load_store_init_data m' b p il.\nProof.\n  induction il; intro p; simpl.\n  auto.\n  rewrite ! H. destruct a; intuition. red; intros; rewrite H; auto.\nQed.\n\nDefinition globals_initialized (g: t F V) (m: mem) :=\n  forall b gd,\n  find_def g b = Some gd ->\n  match gd with\n  | Gfun f =>\n         Mem.perm m b 0 Cur Nonempty\n      /\\ (forall ofs k p, Mem.perm m b ofs k p -> ofs = 0 /\\ p = Nonempty)\n  | Gvar v =>\n         Mem.range_perm m b 0 (init_data_list_size v.(gvar_init)) Cur (perm_globvar v)\n      /\\ (forall ofs k p, Mem.perm m b ofs k p ->\n            0 <= ofs < init_data_list_size v.(gvar_init) /\\ perm_order (perm_globvar v) p)\n      /\\ (v.(gvar_volatile) = false -> load_store_init_data m b 0 v.(gvar_init))\n      /\\ (v.(gvar_volatile) = false -> Mem.loadbytes m b 0 (init_data_list_size v.(gvar_init)) = Some (bytes_of_init_data_list v.(gvar_init)))\n  end.\n\nLemma alloc_global_initialized:\n  forall g m id gd m',\n  genv_next g = Mem.nextblock m ->\n  alloc_global m (id, gd) = Some m' ->\n  globals_initialized g m ->\n     globals_initialized (add_global g (id, gd)) m'\n  /\\ genv_next (add_global g (id, gd)) = Mem.nextblock m'.\nProof.\n  intros.\n  exploit alloc_global_nextblock; eauto. intros NB. split.\n- (* globals-initialized *)\n  red; intros. unfold find_def in H2; simpl in H2.\n  destruct gd.\n{\n  rewrite PTree.gsspec in H2. destruct (peq b (genv_next g)).\n+ inv H2. destruct gd0 as [f|v]; simpl in H0.\n* destruct (Mem.alloc m 0 1) as [m1 b] eqn:ALLOC.\n  exploit Mem.alloc_result; eauto. intros RES.\n  rewrite H, <- RES. split.\n  eapply Mem.perm_drop_1; eauto. omega.\n  intros. \n  assert (0 <= ofs < 1). { eapply Mem.perm_alloc_3; eauto. eapply Mem.perm_drop_4; eauto. }\n  exploit Mem.perm_drop_2; eauto. intros ORD.\n  split. omega. inv ORD; auto.\n* set (init := gvar_init v) in *.\n  set (sz := init_data_list_size init) in *.\n  destruct (Mem.alloc m 0 sz) as [m1 b] eqn:?.\n  destruct (store_zeros m1 b 0 sz) as [m2|] eqn:?; try discriminate.\n  destruct (store_init_data_list m2 b 0 init) as [m3|] eqn:?; try discriminate.\n  exploit Mem.alloc_result; eauto. intro RES.\n  replace (genv_next g) with b by congruence.\n  split. red; intros. eapply Mem.perm_drop_1; eauto.\n  split. intros.\n  assert (0 <= ofs < sz).\n  { eapply Mem.perm_alloc_3; eauto. \n    erewrite store_zeros_perm by eauto.\n    erewrite store_init_data_list_perm by eauto. \n    eapply Mem.perm_drop_4; eauto. }\n  split; auto.\n  eapply Mem.perm_drop_2; eauto.\n  split. intros NOTVOL. apply load_store_init_data_invariant with m3.\n  intros. eapply Mem.load_drop; eauto. right; right; right. \n  unfold perm_globvar. rewrite NOTVOL. destruct (gvar_readonly v); auto with mem.\n  eapply store_init_data_list_charact; eauto. \n  eapply store_zeros_read_as_zero; eauto.\n  intros NOTVOL. \n  transitivity (Mem.loadbytes m3 b 0 sz). \n  eapply Mem.loadbytes_drop; eauto. right; right; right.\n  unfold perm_globvar. rewrite NOTVOL. destruct (gvar_readonly v); auto with mem.\n  eapply store_init_data_list_loadbytes; eauto.\n  eapply store_zeros_loadbytes; eauto.\n+ assert (U: Mem.unchanged_on (fun _ _ => True) m m') by (eapply alloc_global_unchanged; eauto).\n  assert (VALID: Mem.valid_block m b).\n  { red. rewrite <- H. eapply genv_defs_range; eauto. } \n  exploit H1; eauto.\n  destruct gd0 as [f|v].\n* intros [A B]; split; intros.\n  eapply Mem.perm_unchanged_on; eauto. exact I.\n  eapply B. eapply Mem.perm_unchanged_on_2; eauto. exact I.\n* intros (A & B & C & D). split; [| split; [| split]]. \n  red; intros. eapply Mem.perm_unchanged_on; eauto. exact I.\n  intros. eapply B. eapply Mem.perm_unchanged_on_2; eauto. exact I.\n  intros. apply load_store_init_data_invariant with m; auto. \n  intros. eapply Mem.load_unchanged_on_1; eauto. intros; exact I.\n  intros. eapply Mem.loadbytes_unchanged_on; eauto. intros; exact I.\n}\n{\n  generalize H0. intro H0' .\n  apply alloc_global_nextblock in H0'.\n  apply (alloc_global_unchanged (fun _ _ => True)) in H0.\n  generalize H2. intro H2'.\n  apply genv_defs_range in H2'.\n  rewrite H in H2'.\n  apply H1 in H2.\n  destruct gd0.\n  + destruct H2.\n    split.\n    - eapply Mem.perm_unchanged_on; eauto.\n      simpl; auto.\n    - intros.\n      eapply H3.\n      eapply Mem.perm_unchanged_on_2; eauto.\n      simpl; auto.\n  + destruct H2 as (R & PO & LSINI & INI).\n    split.\n    {\n      red; intros. eapply Mem.perm_unchanged_on; eauto.\n      simpl; auto.\n    }\n    split.\n    {\n      intros.\n      eapply PO; eauto.\n      eapply Mem.perm_unchanged_on_2; eauto.\n      simpl; auto.\n    }\n    split.\n    {\n      intros.\n      eapply load_store_init_data_invariant.\n      2: eapply LSINI; eauto.\n      intros.\n      eapply Mem.load_unchanged_on_1; eauto.\n      simpl; auto.\n    }\n    {\n      intros.\n      eapply Mem.loadbytes_unchanged_on; eauto.\n      simpl; auto.\n    }\n}\n- simpl. congruence.\nQed.\n\nLemma alloc_globals_initialized:\n  forall gl ge m m',\n  alloc_globals m gl = Some m' ->\n  genv_next ge = Mem.nextblock m ->\n  globals_initialized ge m ->\n  globals_initialized (add_globals ge gl) m'.\nProof.\n  induction gl; simpl; intros.\n- inv H; auto.\n- destruct a as [id g]. destruct (alloc_global m (id, g)) as [m1|] eqn:?; try discriminate.\n  exploit alloc_global_initialized; eauto. intros [P Q].\n  eapply IHgl; eauto.\nQed.\n\nDefinition globals_initialized_strong (g: t F V) (m: mem) :=\n  (forall b,\n     find_def g b = None ->\n     forall ofs k p, ~ Mem.perm m b ofs k p) /\\\n  globals_initialized g m.\n\nLemma alloc_global_initialized_strong:\n  forall g m id gd m',\n  genv_next g = Mem.nextblock m ->\n  alloc_global m (id, gd) = Some m' ->\n  globals_initialized_strong g m ->\n  globals_initialized_strong (add_global g (id, gd)) m'\n  /\\ genv_next (add_global g (id, gd)) = Mem.nextblock m' .\nProof.\n  intros g m id gd m' H H0 H1.\n  exploit alloc_global_nextblock; eauto. intros NB.\n  exploit (alloc_global_unchanged (fun _ _ => True)); eauto. intro UNCH.\n  destruct H1 as [H1 H2].\n  apply and_assoc.\n  split.\n  {\n    intros b H3 ofs k p.\n    unfold find_def in H3.\n    unfold add_global in H3.\n    simpl in H3.\n    destruct gd.\n    + rewrite PTree.gsspec in H3.\n      destruct (peq b (genv_next g)); try discriminate.\n      intro PERM.\n      eapply H1; eauto.\n      eapply Mem.perm_unchanged_on_2 with (P := fun _ _ => True); simpl; eauto.\n      unfold Mem.valid_block.\n      apply Mem.perm_valid_block in PERM.\n      unfold Mem.valid_block in PERM.\n      rewrite H in n.\n      rewrite NB in PERM.\n      xomega.\n    + intro PERM.\n      destruct (peq b (genv_next g)) as [ | n ] .\n      - subst.\n        simpl in H0.\n        destruct (Mem.alloc m 0 0) as [? b] eqn:ALLOC.\n        inv H0.\n        exploit Mem.alloc_result; eauto.\n        intro; subst.\n        rewrite H in PERM.\n        exploit Mem.perm_alloc_3; eauto.\n        omega.\n      - eapply H1; eauto.\n        eapply Mem.perm_unchanged_on_2; eauto.\n        { simpl; auto. }\n        unfold Mem.valid_block.\n        rewrite H in n.\n        apply Mem.perm_valid_block in PERM.\n        unfold Mem.valid_block in PERM.\n        rewrite NB in PERM.\n        xomega.\n  }\n  eapply alloc_global_initialized; eauto.\nQed.\n\nLemma alloc_globals_initialized_strong:\n  forall gl ge m m',\n  alloc_globals m gl = Some m' ->\n  genv_next ge = Mem.nextblock m ->\n  globals_initialized_strong ge m ->\n  globals_initialized_strong (add_globals ge gl) m'.\nProof.\n  induction gl; simpl; intros.\n- inv H; auto.\n- destruct a as [id g]. destruct (alloc_global m (id, g)) as [m1|] eqn:?; try discriminate.\n  exploit alloc_global_initialized_strong; eauto. intros [P Q].\n  eapply IHgl; eauto.\nQed.\n\nEnd INITMEM.\n\nDefinition init_mem (p: program F V) :=\n  alloc_globals (globalenv p) Mem.empty p.(prog_defs).\n\nLemma init_mem_genv_next: forall p m,\n  init_mem p = Some m ->\n  genv_next (globalenv p) = Mem.nextblock m.\nProof.\n  unfold init_mem; intros.\n  exploit alloc_globals_nextblock; eauto. rewrite Mem.nextblock_empty. intro.\n  generalize (genv_next_add_globals (prog_defs p) (empty_genv F V (prog_public p))).\n  fold (globalenv p). simpl genv_next. intros. congruence.\nQed.\n\nTheorem find_symbol_not_fresh:\n  forall p id b m,\n  init_mem p = Some m ->\n  find_symbol (globalenv p) id = Some b -> Mem.valid_block m b.\nProof.\n  intros. red. erewrite <- init_mem_genv_next; eauto.\n  eapply genv_symb_range; eauto.\nQed.\n\nTheorem find_def_not_fresh:\n  forall p b g m,\n  init_mem p = Some m ->\n  find_def (globalenv p) b = Some g -> Mem.valid_block m b.\nProof.\n  intros. red. erewrite <- init_mem_genv_next; eauto.\n  eapply genv_defs_range; eauto.\nQed.\n\nTheorem find_funct_ptr_not_fresh:\n  forall p b f m,\n  init_mem p = Some m ->\n  find_funct_ptr (globalenv p) b = Some f -> Mem.valid_block m b.\nProof.\n  intros. rewrite find_funct_ptr_iff in H0. eapply find_def_not_fresh; eauto.\nQed.\n\nTheorem find_var_info_not_fresh:\n  forall p b gv m,\n  init_mem p = Some m ->\n  find_var_info (globalenv p) b = Some gv -> Mem.valid_block m b.\nProof.\n  intros. rewrite find_var_info_iff in H0. eapply find_def_not_fresh; eauto.\nQed.\n\nLemma init_mem_characterization_gen:\n  forall p m,\n  init_mem p = Some m ->\n  globals_initialized (globalenv p) (globalenv p) m.\nProof.\n  intros. apply alloc_globals_initialized with Mem.empty. \n  auto.\n  rewrite Mem.nextblock_empty. auto.\n  red; intros. unfold find_def in H0; simpl in H0; rewrite PTree.gempty in H0; discriminate.\nQed.\n\nLemma init_mem_characterization_gen_strong:\n  forall p m,\n  init_mem p = Some m ->\n  globals_initialized_strong (globalenv p) (globalenv p) m.\nProof.\n  intros. apply alloc_globals_initialized_strong with Mem.empty.\n  auto.\n  rewrite Mem.nextblock_empty. auto.\n  red; intros.\n  split.\n  {\n    intros; eauto using Mem.perm_empty.\n  }\n  red; intros.\n  unfold find_def in H0; simpl in H0; rewrite PTree.gempty in H0; discriminate.\nQed.\n\nTheorem init_mem_characterization:\n  forall p b gv m,\n  find_var_info (globalenv p) b = Some gv ->\n  init_mem p = Some m ->\n  Mem.range_perm m b 0 (init_data_list_size gv.(gvar_init)) Cur (perm_globvar gv)\n  /\\ (forall ofs k p, Mem.perm m b ofs k p ->\n        0 <= ofs < init_data_list_size gv.(gvar_init) /\\ perm_order (perm_globvar gv) p)\n  /\\ (gv.(gvar_volatile) = false ->\n      load_store_init_data (globalenv p) m b 0 gv.(gvar_init))\n  /\\ (gv.(gvar_volatile) = false ->\n      Mem.loadbytes m b 0 (init_data_list_size gv.(gvar_init)) = Some (bytes_of_init_data_list (globalenv p) gv.(gvar_init))).\nProof.\n  intros. rewrite find_var_info_iff in H.\n  exploit init_mem_characterization_gen; eauto.\nQed.\n\nTheorem init_mem_characterization_2:\n  forall p b fd m,\n  find_funct_ptr (globalenv p) b = Some fd ->\n  init_mem p = Some m ->\n  Mem.perm m b 0 Cur Nonempty\n  /\\ (forall ofs k p, Mem.perm m b ofs k p -> ofs = 0 /\\ p = Nonempty).\nProof.\n  intros. rewrite find_funct_ptr_iff in H.\n  exploit init_mem_characterization_gen; eauto.\nQed.\n\n(** ** Compatibility with memory injections *)\n\nSection INITMEM_INJ.\n\nVariable ge: t F V.\nVariable thr: block.\nHypothesis symb_inject: forall id b, find_symbol ge id = Some b -> Plt b thr.\n\nLemma store_zeros_neutral:\n  forall m b p n m',\n  Mem.inject_neutral thr m ->\n  Plt b thr ->\n  store_zeros m b p n = Some m' ->\n  Mem.inject_neutral thr m'.\nProof.\n  intros until n. functional induction (store_zeros m b p n); intros.\n  inv H1; auto.\n  apply IHo; auto. eapply Mem.store_inject_neutral; eauto. constructor.\n  inv H1.\nQed.\n\nLemma store_init_data_neutral:\n  forall m b p id m',\n  Mem.inject_neutral thr m ->\n  Plt b thr ->\n  store_init_data ge m b p id = Some m' ->\n  Mem.inject_neutral thr m'.\nProof.\n  intros.\n  destruct id; simpl in H1; try (eapply Mem.store_inject_neutral; eauto; fail).\n  congruence.\n  destruct (find_symbol ge i) as [b'|] eqn:E; try discriminate.\n  eapply Mem.store_inject_neutral; eauto.\n  econstructor. unfold Mem.flat_inj. apply pred_dec_true; auto. eauto.\n  rewrite Ptrofs.add_zero. auto.\nQed.\n\nLemma store_init_data_list_neutral:\n  forall b idl m p m',\n  Mem.inject_neutral thr m ->\n  Plt b thr ->\n  store_init_data_list ge m b p idl = Some m' ->\n  Mem.inject_neutral thr m'.\nProof.\n  induction idl; simpl; intros.\n  congruence.\n  destruct (store_init_data ge m b p a) as [m1|] eqn:E; try discriminate.\n  eapply IHidl. eapply store_init_data_neutral; eauto. auto. eauto.\nQed.\n\nLemma alloc_global_neutral:\n  forall idg m m',\n  alloc_global ge m idg = Some m' ->\n  Mem.inject_neutral thr m ->\n  Plt (Mem.nextblock m) thr ->\n  Mem.inject_neutral thr m'.\nProof.\n  intros. destruct idg as [id [[f|v]|]]; simpl in H.\n  (* function *)\n  destruct (Mem.alloc m 0 1) as [m1 b] eqn:?.\n  assert (Plt b thr). rewrite (Mem.alloc_result _ _ _ _ _ Heqp). auto.\n  eapply Mem.drop_inject_neutral; eauto.\n  eapply Mem.alloc_inject_neutral; eauto.\n  (* variable *)\n  set (init := gvar_init v) in *.\n  set (sz := init_data_list_size init) in *.\n  destruct (Mem.alloc m 0 sz) as [m1 b] eqn:?.\n  destruct (store_zeros m1 b 0 sz) as [m2|] eqn:?; try discriminate.\n  destruct (store_init_data_list ge m2 b 0 init) as [m3|] eqn:?; try discriminate.\n  assert (Plt b thr). rewrite (Mem.alloc_result _ _ _ _ _ Heqp). auto.\n  eapply Mem.drop_inject_neutral; eauto.\n  eapply store_init_data_list_neutral with (m := m2) (b := b); eauto.\n  eapply store_zeros_neutral with (m := m1); eauto.\n  eapply Mem.alloc_inject_neutral; eauto.\n  (* none *)\n  destruct (Mem.alloc m 0 0) as [m1 b] eqn:?.\n  assert (Plt b thr). rewrite (Mem.alloc_result _ _ _ _ _ Heqp). auto.\n  inv H.\n  eapply Mem.alloc_inject_neutral; eauto.\nQed.\n\nRemark advance_next_le: forall gl x, Ple x (advance_next (F:=F) (V:=V) gl x).\nProof.\n  induction gl; simpl; intros.\n  apply Ple_refl.\n  apply Ple_trans with (Psucc x). apply Ple_succ. eauto.\nQed.\n\nLemma alloc_globals_neutral:\n  forall gl m m',\n  alloc_globals ge m gl = Some m' ->\n  Mem.inject_neutral thr m ->\n  Ple (Mem.nextblock m') thr ->\n  Mem.inject_neutral thr m'.\nProof.\n  induction gl; intros.\n  simpl in *. congruence.\n  exploit alloc_globals_nextblock; eauto. intros EQ.\n  simpl in *. destruct (alloc_global ge m a) as [m1|] eqn:E; try discriminate.\n  exploit alloc_global_neutral; eauto.\n  assert (Ple (Psucc (Mem.nextblock m)) (Mem.nextblock m')).\n  { rewrite EQ. apply advance_next_le. }\n  unfold Plt, Ple in *; zify; omega.\nQed.\n\nEnd INITMEM_INJ.\n\nTheorem initmem_inject:\n  forall p m,\n  init_mem p = Some m ->\n  Mem.inject (Mem.flat_inj (Mem.nextblock m)) m m.\nProof.\n  unfold init_mem; intros.\n  apply Mem.neutral_inject.\n  eapply alloc_globals_neutral; eauto.\n  intros. exploit find_symbol_not_fresh; eauto.\n  apply Mem.empty_inject_neutral.\n  apply Ple_refl.\nQed.\n\n(** ** Sufficient and necessary conditions for the initial memory to exist. *)\n\n(** Alignment properties *)\n\nDefinition init_data_alignment (i: init_data) : Z :=\n  match i with\n  | Init_int8 n => 1\n  | Init_int16 n => 2\n  | Init_int32 n => 4\n  | Init_int64 n => 8\n  | Init_float32 n => 4\n  | Init_float64 n => 4\n  | Init_addrof symb ofs => if Archi.ptr64 then 8 else 4\n  | Init_space n => 1\n  end.\n\nFixpoint init_data_list_aligned (p: Z) (il: list init_data) {struct il} : Prop :=\n  match il with\n  | nil => True\n  | i1 :: il => (init_data_alignment i1 | p) /\\ init_data_list_aligned (p + init_data_size i1) il\n  end.\n\nSection INITMEM_INVERSION.\n\nVariable ge: t F V.\n\nLemma store_init_data_aligned:\n  forall m b p i m',\n  store_init_data ge m b p i = Some m' ->\n  (init_data_alignment i | p).\nProof.\n  intros.\n  assert (DFL: forall chunk v,\n    Mem.store chunk m b p v = Some m' ->\n    align_chunk chunk = init_data_alignment i ->\n    (init_data_alignment i | p)).\n  { intros. apply Mem.store_valid_access_3 in H0. destruct H0. congruence. }\n  destruct i; simpl in H; eauto.\n  simpl. apply Z.divide_1_l.\n  destruct (find_symbol ge i); try discriminate. eapply DFL. eassumption. \n  unfold Mptr, init_data_alignment; destruct Archi.ptr64; auto.\nQed.\n\nLemma store_init_data_list_aligned:\n  forall b il m p m',\n  store_init_data_list ge m b p il = Some m' ->\n  init_data_list_aligned p il.\nProof.\n  induction il as [ | i1 il]; simpl; intros.\n- auto.\n- destruct (store_init_data ge m b p i1) as [m1|] eqn:S1; try discriminate.\n  split; eauto. eapply store_init_data_aligned; eauto.\nQed.\n\nLemma store_init_data_list_free_idents:\n  forall b i o il m p m',\n  store_init_data_list ge m b p il = Some m' ->\n  In (Init_addrof i o) il ->\n  exists b', find_symbol ge i = Some b'.\nProof.\n  induction il as [ | i1 il]; simpl; intros.\n- contradiction.\n- destruct (store_init_data ge m b p i1) as [m1|] eqn:S1; try discriminate.\n  destruct H0.\n+ subst i1. simpl in S1. destruct (find_symbol ge i) as [b'|]. exists b'; auto. discriminate.\n+ eapply IHil; eauto.\nQed.\n\nEnd INITMEM_INVERSION.\n\nTheorem init_mem_inversion:\n  forall p m id v,\n  init_mem p = Some m ->\n  In (id, Some (Gvar v)) p.(prog_defs) ->\n  init_data_list_aligned 0 v.(gvar_init)\n  /\\ forall i o, In (Init_addrof i o) v.(gvar_init) -> exists b, find_symbol (globalenv p) i = Some b.\nProof.\n  intros until v. unfold init_mem. set (ge := globalenv p). \n  revert m. generalize Mem.empty. generalize (prog_defs p). \n  induction l as [ | idg1 defs ]; simpl; intros m m'; intros.\n- contradiction.\n- destruct (alloc_global ge m idg1) as [m''|] eqn:A; try discriminate.\n  destruct H0.\n+ subst idg1; simpl in A. \n  set (il := gvar_init v) in *. set (sz := init_data_list_size il) in *. \n  destruct (Mem.alloc m 0 sz) as [m1 b].\n  destruct (store_zeros m1 b 0 sz) as [m2|]; try discriminate.\n  destruct (store_init_data_list ge m2 b 0 il) as [m3|] eqn:B; try discriminate.\n  split. eapply store_init_data_list_aligned; eauto. intros; eapply store_init_data_list_free_idents; eauto.\n+ eapply IHdefs; eauto.\nQed.\n\nSection INITMEM_EXISTS.\n\nVariable ge: t F V.\n\nLemma store_zeros_exists:\n  forall m b p n,\n  Mem.range_perm m b p (p + n) Cur Writable ->\n  exists m', store_zeros m b p n = Some m'.\nProof.\n  intros until n. functional induction (store_zeros m b p n); intros PERM.\n- exists m; auto.\n- apply IHo. red; intros. eapply Mem.perm_store_1; eauto. apply PERM. omega.\n- destruct (Mem.valid_access_store m Mint8unsigned b p Vzero) as (m' & STORE).\n  split. red; intros. apply Mem.perm_cur. apply PERM. simpl in H. omega. \n  simpl. apply Z.divide_1_l.\n  congruence.\nQed.\n\nLemma store_init_data_exists:\n  forall m b p i,\n  Mem.range_perm m b p (p + init_data_size i) Cur Writable ->\n  (init_data_alignment i | p) ->\n  (forall id ofs, i = Init_addrof id ofs -> exists b, find_symbol ge id = Some b) ->\n  exists m', store_init_data ge m b p i = Some m'.\nProof.\n  intros. \n  assert (DFL: forall chunk v,\n          init_data_size i = size_chunk chunk ->\n          init_data_alignment i = align_chunk chunk ->\n          exists m', Mem.store chunk m b p v = Some m').\n  { intros. destruct (Mem.valid_access_store m chunk b p v) as (m' & STORE).\n    split. rewrite <- H2; auto. rewrite <- H3; auto. \n    exists m'; auto. }\n  destruct i; eauto.\n  simpl. exists m; auto.\n  simpl. exploit H1; eauto. intros (b1 & FS). rewrite FS. eapply DFL. \n  unfold init_data_size, Mptr. destruct Archi.ptr64; auto.\n  unfold init_data_alignment, Mptr. destruct Archi.ptr64; auto.\nQed.\n\nLemma store_init_data_list_exists:\n  forall b il m p,\n  Mem.range_perm m b p (p + init_data_list_size il) Cur Writable ->\n  init_data_list_aligned p il ->\n  (forall id ofs, In (Init_addrof id ofs) il -> exists b, find_symbol ge id = Some b) ->\n  exists m', store_init_data_list ge m b p il = Some m'.\nProof.\n  induction il as [ | i1 il ]; simpl; intros.\n- exists m; auto.\n- destruct H0. \n  destruct (@store_init_data_exists m b p i1) as (m1 & S1); eauto.\n  red; intros. apply H. generalize (init_data_list_size_pos il); omega.\n  rewrite S1. \n  apply IHil; eauto. \n  red; intros. erewrite <- store_init_data_perm by eauto. apply H. generalize (init_data_size_pos i1); omega.\nQed.\n\nLemma alloc_global_exists:\n  forall m idg,\n  match idg with\n  | (id, None) => True\n  | (id, Some (Gfun f)) => True\n  | (id, Some (Gvar v)) =>\n        init_data_list_aligned 0 v.(gvar_init)\n     /\\ forall i o, In (Init_addrof i o) v.(gvar_init) -> exists b, find_symbol ge i = Some b\n  end ->\n  exists m', alloc_global ge m idg = Some m'.\nProof.\n  intros m [id [[f|v]|]]; intros; simpl.\n- destruct (Mem.alloc m 0 1) as [m1 b] eqn:ALLOC.\n  destruct (Mem.range_perm_drop_2 m1 b 0 1 Nonempty) as [m2 DROP].\n  red; intros; eapply Mem.perm_alloc_2; eauto. \n  exists m2; auto.\n- destruct H as [P Q].\n  set (sz := init_data_list_size (gvar_init v)).\n  destruct (Mem.alloc m 0 sz) as [m1 b] eqn:ALLOC.\n  assert (P1: Mem.range_perm m1 b 0 sz Cur Freeable) by (red; intros; eapply Mem.perm_alloc_2; eauto).\n  destruct (@store_zeros_exists m1 b 0 sz) as [m2 ZEROS].\n  red; intros. apply Mem.perm_implies with Freeable; auto with mem.\n  rewrite ZEROS.\n  assert (P2: Mem.range_perm m2 b 0 sz Cur Freeable).\n  { red; intros. erewrite <- store_zeros_perm by eauto. eauto. }\n  destruct (@store_init_data_list_exists b (gvar_init v) m2 0) as [m3 STORE]; auto.\n  red; intros. apply Mem.perm_implies with Freeable; auto with mem.\n  rewrite STORE.\n  assert (P3: Mem.range_perm m3 b 0 sz Cur Freeable).\n  { red; intros. erewrite <- store_init_data_list_perm by eauto. eauto. }\n  destruct (Mem.range_perm_drop_2 m3 b 0 sz (perm_globvar v)) as [m4 DROP]; auto.\n  exists m4; auto.\n- destruct (Mem.alloc _ _ _); eauto.\nQed.\n\nEnd INITMEM_EXISTS.\n\nTheorem init_mem_exists:\n  forall p,\n  (forall id v, In (id, Some (Gvar v)) (prog_defs p) ->\n        init_data_list_aligned 0 v.(gvar_init)\n     /\\ forall i o, In (Init_addrof i o) v.(gvar_init) -> exists b, find_symbol (globalenv p) i = Some b) ->\n  exists m, init_mem p = Some m.\nProof.\n  intros. set (ge := globalenv p) in *. \n  unfold init_mem. revert H. generalize (prog_defs p) Mem.empty.\n  induction l as [ | idg l]; simpl; intros.\n- exists m; auto.\n- destruct (@alloc_global_exists ge m idg) as [m1 A1].\n  destruct idg as [id [[f|v]|]]; eauto.\n  fold ge. rewrite A1. eapply IHl; eauto. \nQed. \n\nEnd WITHMEMORYMODEL.\n\n(** * Commutation with program transformations *)\n\nSection MATCH_GENVS.\n\nContext {A B V W: Type} (R: globdef A V -> globdef B W -> Prop).\n\nRecord match_genvs (ge1: t A V) (ge2: t B W): Prop := {\n  mge_next:\n    genv_next ge2 = genv_next ge1;\n  mge_symb:\n    forall id, PTree.get id (genv_symb ge2) = PTree.get id (genv_symb ge1);\n  mge_defs:\n    forall b, option_rel R (PTree.get b (genv_defs ge1)) (PTree.get b (genv_defs ge2))\n}.\n\nLemma add_global_match:\n  forall ge1 ge2 id g1 g2,\n  match_genvs ge1 ge2 ->\n  option_rel R g1 g2 ->\n  match_genvs (add_global ge1 (id, g1)) (add_global ge2 (id, g2)).\nProof.\n  intros. destruct H. constructor; simpl; intros.\n- congruence.\n- rewrite mge_next0, ! PTree.gsspec. destruct (peq id0 id); auto. \n-\n  inv H0; auto.\n  rewrite mge_next0, ! PTree.gsspec. destruct (peq b (genv_next ge1)).\n  constructor; auto.\n  auto.\nQed.\n\nLemma add_globals_match:\n  forall gl1 gl2,\n  list_forall2 (fun idg1 idg2 => fst idg1 = fst idg2 /\\ option_rel R (snd idg1) (snd idg2)) gl1 gl2 ->\n  forall ge1 ge2, match_genvs ge1 ge2 ->\n  match_genvs (add_globals ge1 gl1) (add_globals ge2 gl2).\nProof.\n  induction 1; intros; simpl.\n  auto.\n  destruct a1 as [id1 g1]; destruct b1 as [id2 g2]; simpl in *; destruct H; subst id2.\n  apply IHlist_forall2. apply add_global_match; auto.\nQed.\n\nEnd MATCH_GENVS.\n\nSection MATCH_PROGRAMS.\n\nContext {C F1 V1 F2 V2: Type} {LC: Linker C} {LF: Linker F1} {LV: Linker V1}.\nVariable match_fundef: C -> F1 -> F2 -> Prop.\nVariable match_varinfo: V1 -> V2 -> Prop.\nVariable ctx: C.\nVariable p: program F1 V1.\nVariable tp: program F2 V2.\nHypothesis progmatch: match_program_gen match_fundef match_varinfo ctx p tp.\n\nLemma globalenvs_match:\n  match_genvs (match_globdef match_fundef match_varinfo ctx) (globalenv p) (globalenv tp).\nProof.\n  intros. apply add_globals_match. apply progmatch. \n  constructor; simpl; intros; auto. rewrite ! PTree.gempty. constructor.\nQed.\n\nTheorem find_def_match_2:\n  forall b, option_rel (match_globdef match_fundef match_varinfo ctx)\n                       (find_def (globalenv p) b) (find_def (globalenv tp) b).\nProof (mge_defs globalenvs_match).\n\nTheorem find_def_match:\n  forall b g,\n  find_def (globalenv p) b = Some g ->\n  exists tg,\n  find_def (globalenv tp) b = Some tg /\\ match_globdef match_fundef match_varinfo ctx g tg.\nProof.\n  intros. generalize (find_def_match_2 b). rewrite H; intros R; inv R.\n  exists y; auto. \nQed.\n\nTheorem find_funct_ptr_match:\n  forall b f,\n  find_funct_ptr (globalenv p) b = Some f ->\n  exists cunit tf,\n  find_funct_ptr (globalenv tp) b = Some tf /\\ match_fundef cunit f tf /\\ linkorder cunit ctx.\nProof.\n  intros. rewrite find_funct_ptr_iff in *. apply find_def_match in H. \n  destruct H as (tg & P & Q). inv Q. \n  exists ctx', f2; intuition auto. apply find_funct_ptr_iff; auto.\nQed.\n\nTheorem find_funct_match:\n  forall v f,\n  find_funct (globalenv p) v = Some f ->\n  exists cunit tf,\n  find_funct (globalenv tp) v = Some tf /\\ match_fundef cunit f tf /\\ linkorder cunit ctx.\nProof.\n  intros. exploit find_funct_inv; eauto. intros [b EQ]. subst v.\n  rewrite find_funct_find_funct_ptr in H.\n  rewrite find_funct_find_funct_ptr.\n  apply find_funct_ptr_match. auto.\nQed.\n\nTheorem find_var_info_match:\n  forall b v,\n  find_var_info (globalenv p) b = Some v ->\n  exists tv,\n  find_var_info (globalenv tp) b = Some tv /\\ match_globvar match_varinfo v tv.\nProof.\n  intros. rewrite find_var_info_iff in *. apply find_def_match in H. \n  destruct H as (tg & P & Q). inv Q. \n  exists v2; split; auto. apply find_var_info_iff; auto.\nQed.\n\nTheorem find_symbol_match:\n  forall (s : ident),\n  find_symbol (globalenv tp) s = find_symbol (globalenv p) s.\nProof.\n  intros. destruct globalenvs_match. apply mge_symb0.\nQed.\n\nTheorem genv_next_match:\n  genv_next (globalenv tp) = genv_next (globalenv p).\nProof.\n  intros. destruct globalenvs_match. apply mge_next0.\nQed.\n\nTheorem senv_match:\n  Senv.equiv (to_senv (globalenv p)) (to_senv (globalenv tp)).\nProof.\n  red; simpl. repeat split.\n- apply genv_next_match.\n- apply find_symbol_match.\n- intros. unfold public_symbol. rewrite find_symbol_match. \n  rewrite ! globalenv_public. \n  destruct progmatch as (P & Q & R). rewrite R. auto.\n- intros. unfold block_is_volatile. \n  destruct globalenvs_match as [P Q R]. specialize (R b).\n  unfold find_var_info, find_def.\n  inv R; auto.\n  inv H1; auto.\n  inv H2; auto.\nQed.\n\nContext `{memory_model_prf: Mem.MemoryModel}.\n\nLemma store_init_data_list_match:\n  forall idl m b ofs m',\n  store_init_data_list (globalenv p) m b ofs idl = Some m' ->\n  store_init_data_list (globalenv tp) m b ofs idl = Some m'.\nProof.\n  induction idl; simpl; intros.\n- auto.\n- destruct (store_init_data (globalenv p) m b ofs a) as [m1|] eqn:S; try discriminate.\n  assert (X: store_init_data (globalenv tp) m b ofs a = Some m1).\n  { destruct a; auto. simpl; rewrite find_symbol_match; auto. }\n  rewrite X. auto.\nQed.\n\nLemma alloc_globals_match:\n  forall gl1 gl2, list_forall2 (match_ident_option_globdef match_fundef match_varinfo ctx) gl1 gl2 ->\n  forall m m',\n  alloc_globals (globalenv p) m gl1 = Some m' ->\n  alloc_globals (globalenv tp) m gl2 = Some m'.\nProof.\n  induction 1; simpl; intros.\n- auto.\n- destruct (alloc_global (globalenv p) m a1) as [m1|] eqn:?; try discriminate.\n  assert (X: alloc_global (globalenv tp) m b1 = Some m1).\n  { destruct a1 as [id1 g1]; destruct b1 as [id2 g2]; destruct H; simpl in *.\n    subst id2. inv H2.\n  - auto.\n  - inv H; simpl in *. \n    { auto. }\n    inv H2; simpl in *.\n    set (sz := init_data_list_size init) in *.\n    destruct (Mem.alloc m 0 sz) as [m2 b] eqn:?.\n    destruct (store_zeros m2 b 0 sz) as [m3|] eqn:?; try discriminate.\n    destruct (store_init_data_list (globalenv p) m3 b 0 init) as [m4|] eqn:?; try discriminate.\n    erewrite store_init_data_list_match; eauto.\n  }\n  rewrite X; eauto.\nQed.\n\nTheorem init_mem_match:\n  forall m, init_mem p = Some m -> init_mem tp = Some m.\nProof.\n  unfold init_mem; intros.\n  eapply alloc_globals_match; eauto. apply progmatch.\nQed.\n\nEnd MATCH_PROGRAMS.\n\n(** Special case for partial transformations that do not depend on the compilation unit *)\n\nSection TRANSFORM_PARTIAL.\n\nContext {A B V: Type} {LA: Linker A} {LV: Linker V}.\nContext {transf: A -> res B} {p: program A V} {tp: program B V}.\nHypothesis progmatch: match_program (fun cu f tf => transf f = OK tf) eq p tp.\n\nTheorem find_funct_ptr_transf_partial:\n  forall b f,\n  find_funct_ptr (globalenv p) b = Some f ->\n  exists tf,\n  find_funct_ptr (globalenv tp) b = Some tf /\\ transf f = OK tf.\nProof.\n  intros. exploit (find_funct_ptr_match progmatch); eauto. \n  intros (cu & tf & P & Q & R); exists tf; auto.\nQed.\n\nTheorem find_funct_transf_partial:\n  forall v f,\n  find_funct (globalenv p) v = Some f ->\n  exists tf,\n  find_funct (globalenv tp) v = Some tf /\\ transf f = OK tf.\nProof.\n  intros. exploit (find_funct_match progmatch); eauto. \n  intros (cu & tf & P & Q & R); exists tf; auto.\nQed.\n\nTheorem find_symbol_transf_partial:\n  forall (s : ident),\n  find_symbol (globalenv tp) s = find_symbol (globalenv p) s.\nProof.\n  intros. eapply (find_symbol_match progmatch). \nQed.\n\nTheorem senv_transf_partial:\n  Senv.equiv (to_senv (globalenv p)) (to_senv (globalenv tp)).\nProof.\n  intros. eapply (senv_match progmatch).\nQed.\n\nContext `{memory_model_prf: Mem.MemoryModel}.\n\nTheorem init_mem_transf_partial:\n  forall m, init_mem p = Some m -> init_mem tp = Some m.\nProof.\n  eapply (init_mem_match progmatch).\nQed.\n\nEnd TRANSFORM_PARTIAL.\n\n(** Special case for total transformations that do not depend on the compilation unit *)\n\nSection TRANSFORM_TOTAL.\n\nContext {A B V: Type} {LA: Linker A} {LV: Linker V}.\nContext {transf: A -> B} {p: program A V} {tp: program B V}.\nHypothesis progmatch: match_program (fun cu f tf => tf = transf f) eq p tp.\n\nTheorem find_funct_ptr_transf:\n  forall b f,\n  find_funct_ptr (globalenv p) b = Some f ->\n  find_funct_ptr (globalenv tp) b = Some (transf f).\nProof.\n  intros. exploit (find_funct_ptr_match progmatch); eauto. \n  intros (cu & tf & P & Q & R). congruence.\nQed.\n\nTheorem find_funct_transf:\n  forall v f,\n  find_funct (globalenv p) v = Some f ->\n  find_funct (globalenv tp) v = Some (transf f).\nProof.\n  intros. exploit (find_funct_match progmatch); eauto. \n  intros (cu & tf & P & Q & R). congruence.\nQed.\n\nTheorem find_symbol_transf:\n  forall (s : ident),\n  find_symbol (globalenv tp) s = find_symbol (globalenv p) s.\nProof.\n  intros. eapply (find_symbol_match progmatch).\nQed.\n\nTheorem senv_transf:\n  Senv.equiv (to_senv (globalenv p)) (to_senv (globalenv tp)).\nProof.\n  intros. eapply (senv_match progmatch).\nQed.\n\nContext `{memory_model_prf: Mem.MemoryModel}.\n\nTheorem init_mem_transf:\n  forall m, init_mem p = Some m -> init_mem tp = Some m.\nProof.\n  eapply (init_mem_match progmatch).\nQed.\n\nEnd TRANSFORM_TOTAL.\n*)\nEnd Genv.\n\n(*\nCoercion Genv.to_senv: Genv.t >-> Senv.t.\n*)\n\n"
  },
  {
    "path": "src/backend/Environments/HashEnv.v",
    "content": "Require Import cclib.Coqlib.\nRequire Import backend.Ctypes.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.Values.LowValues.\nRequire Import backend.AST.\nRequire Import backend.IndexLib.\n\nInductive HashKey :=\n| singleton : int256 -> HashKey\n| pair : HashKey -> int256 -> HashKey.\n\nModule HashKeyIndexed <: INDEXED_TYPE.\n\n  Definition t := HashKey.\n\n  Fixpoint index (hk : HashKey) : positive :=\n    match hk with\n    | singleton i => int_index i\n    | pair hk i => inject_positive (index hk) (int_index i)\n    end.\n\nDefinition index_inv (p : positive) : HashKey.\nAdmitted.\n\nLemma index_invertible : forall x, index_inv (index x) = x.\nAdmitted.\n\nLemma index_inj: forall (x y: HashKey), index x = index y -> x = y.\nProof.\nAdmitted.\n\nLemma eq: forall (x y: HashKey), {x = y} + {x <> y}.\nProof.\n  induction x; destruct y; intros; decide equality;\n  try decide equality; try apply Int256.eq_dec.\nQed.\n\nEnd HashKeyIndexed.\n\nModule HashKeyMap := IMap(HashKeyIndexed).\n\nDefinition hash_env : Type := HashKeyMap.t val.\n\nNotation \"he [ i ]\" := (HashKeyMap.get i he) (at level 80).\nNotation \"he [ i |-> v ]\" := (HashKeyMap.set i v he) (at level 80).\n\nDefinition empty_hash_env : hash_env :=\n  (HashKeyMap.init Vzero).\n\nFixpoint hkOfVal (v:val) : option HashKey :=\n  match v with\n  | Vhash (Vint i) => Some (singleton i)\n  | Vhash2 v (Vint i) => option_map (fun hk => pair hk i) (hkOfVal v)\n  | _ => None\n  end.\n\nDefinition read (ptr:val) (he:hash_env) : option val :=\n  option_map (fun hk => he[hk]) (hkOfVal ptr).\n\nDefinition write (ptr:val) (v:val) (he:hash_env) : option hash_env :=\n  option_map (fun hk => he[hk |-> v]) (hkOfVal ptr).\n"
  },
  {
    "path": "src/backend/Environments/StackEnv.v",
    "content": "Require Import cclib.Coqlib.\nRequire Import backend.Ctypes.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.Values.LowValues.\nRequire Import backend.AST.\n\nSection StackEnv.\n\nVariable function : Type.\nVariable fn_locals : function -> list (ident * type).\n\n(* at a lower level, storage and memory are separate *)\nDefinition stack_env : Type := Int256Map.t LowValues.val.\n\n(* Memory layout:\n   0x00 - 0x1f          Return Values\n   0x20 - 0x3f          Stack Pointer\n   0x40 -               Stack *)\n\nDefinition sp := Int256.repr (2304 + 32).\nDefinition sb := Int256.repr (2304 + 64).\n\nNotation \"stk [ i ]\" := (Int256Map.get i stk) (at level 80).\nNotation \"stk [ i |-> v ]\" := (Int256Map.set i v stk) (at level 80).\n\n(* The stack itself begins at 0x40 *)\nDefinition empty_stack : stack_env :=\n  (Int256Map.init Vzero)[sp|->Vint sb].\n\nDefinition push_frame (size:int256) (stk:stack_env) : option stack_env :=\n  match stk[sp] with\n  | Vint p => Some (stk[sp |-> Vint (Int256.add p size)])\n  | _ => None\n  end.\n\nDefinition pop_frame (size:int256) (stk:stack_env) : option stack_env :=\n  match stk[sp] with\n  | Vint p => Some (stk[sp |-> Vint (Int256.sub p size)])\n  | _ => None\n  end.\n\nFixpoint sizeof (ty:type) : int256 :=\n  Int256.repr (sizeof_words ty).\n\nFixpoint offset (fl:fieldlist) (id:ident) : option int256 :=\n  match struct_field fl id with\n  | Some (off,_) => Some (Int256.mul (Int256.repr 32) (Int256.repr (Z.of_nat off)))\n  | None => None\n  end.\n\nFixpoint frame_size (locs:list (ident * type)) : int256 :=\n  match locs with\n  | nil => Int256.repr 0\n  | cons (_,ty) locs' => Int256.add (Int256.mul (Int256.repr 32) (sizeof ty)) (frame_size locs')\n  end.\n\nDefinition push_func (f:function) (stk:stack_env) : option stack_env :=\n  push_frame (frame_size (fn_locals f)) stk.\n\nDefinition pop_func (f:function) (stk:stack_env) : option stack_env :=\n  pop_frame (frame_size (fn_locals f)) stk.\n\nDefinition read (ptr:val) (stk:stack_env) : option val :=\n  match ptr,stk[sp] with\n  | Vint p, Vint s =>\n    if Int256.eq p sp then None\n    else if Int256.lt p s then Some (stk[p])\n         else None\n  | _,_ => None\n  end.\n\nDefinition write (ptr:val) (v:val) (stk:stack_env) : option stack_env :=\n  match ptr,stk[sp] with\n  | Vint p, Vint s =>\n    if Int256.eq p sp then None\n    else if Int256.lt p s then Some (stk[p |-> v])\n         else None\n  | _,_ => None\n  end.\n\n\nFixpoint mkfieldlist (itl:list (ident*type)) : fieldlist :=\n  match itl with\n  | nil => Fnil\n  | cons (i,t) itl' => Fcons i t (mkfieldlist itl')\n  end.\n\nDefinition var (id:ident) (locals:list(ident*type)) (stk:stack_env) : option val :=\n  match stk[sp] with\n  | Vint s =>\n    let base := Int256.sub s (frame_size locals) in\n    let fl := mkfieldlist locals in\n    option_map (fun off => Vint (Int256.add base off)) (offset fl id)\n  | _ => None\n  end.\n\nDefinition access_field (v:val) (ty:type) (i:ident) : option val :=\n  match v,ty with\n  | Vint base, Tstruct _ fl => option_map (fun off => (Vint (Int256.add base off))) (offset fl i)\n  | _,_ => None\n  end.\n\nDefinition index_array (v:val) (ty:type) (ind:val) : option val :=\n  match v,ind,ty with\n  | Vint base, Vint off, Tarray ty' size =>\n    if Int256.lt off (Int256.repr size) then\n      Some (Vint (Int256.add base (Int256.mul off (sizeof ty'))))\n    else None\n  | _, _, _ => None\n  end.\n\n\nEnd StackEnv.\n"
  },
  {
    "path": "src/backend/Events.v",
    "content": "(** Observable events, execution traces, and semantics of external calls. *)\n\nRequire Import cclib.Coqlib.\nRequire Import backend.AST.\nRequire Import cclib.Integers.\nRequire Import backend.Values.HighValues.\n\n(* TODO: make this a list of log entries, method calls *)\nInductive event : Type :=\n  | Etransfer: forall (addr value : val), event\n  | Ecallmethod: forall (addr : val) (signature: int) (value : val) (args: list val), event\n  | Elog: forall (topics : list val) (args : list val), event.\n\nDefinition log := list event.\n\n(* default log. *)\nDefinition L0 : log := nil.\n"
  },
  {
    "path": "src/backend/Expressions/ExpMiniC.v",
    "content": "(* This is the top level langauge. \n\n   It is almost unchanged from Clight, but there are still quite a few changes. *)\n\n(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** The Clight language: a simplified version of Compcert C where all\n  expressions are pure and assignments and function calls are\n  statements, not expressions. *)\n\nRequire Import cclib.Coqlib.\nRequire Import cclib.Errors.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.AST.\nRequire Import backend.Ctypes.\nRequire Import backend.Cop. \nRequire Import backend.MachineModel.\nRequire Import backend.Values.HighValues.\n\n(** * Abstract syntax *)\n\n(** ** Expressions *)\n\n(** Clight expressions correspond to the \"pure\" subset of C expressions.\n  The main omissions are string literals and assignment operators\n  ([=], [+=], [++], etc).  In Clight, assignment is a statement,\n  not an expression.  Additionally, an expression can also refer to\n  temporary variables, which are a separate class of local variables\n  that do not reside in memory and whose address cannot be taken.\n\n  As in Compcert C, all expressions are annotated with their types,\n  as needed to resolve operator overloading and type-dependent behaviors. *)\n\n\n(* Compared to Clight, we have added array-deref, hash-deref, and calling builtins. *)\nInductive expr : Type :=\n  | Econst_int: int -> type -> expr       (** r integer literal *)\n  | Econst_int256: int256 -> type -> expr (** r 256-bit integer literal *)\n  | Evar: ident -> type -> expr           (** r variable *)\n  | Eglob: ident -> type -> expr          (** global variable *)\n  | Etempvar: ident -> type -> expr       (** r temporary variable *)\n  | Ederef: expr -> type -> expr          (** r pointer dereference (unary [*]) *)\n  | Eaddr: expr -> type -> expr          (** take the address of an lvalue to produce an rvalue pointer *)\n  | Eunop: unary_operation -> expr -> type -> expr  (** r unary operation *)\n  | Ebinop: binary_operation -> expr -> expr -> type -> expr (** r binary operation *)\n  | Efield: expr -> ident -> type -> expr (** r access to a member of a struct *)\n  | Eindex: expr -> expr -> type -> expr\n  (* Some function calls are compiled to special commands\n  and have no side effects *)\n  | Ecall0: builtin0 -> type -> expr\n  | Ecall1: builtin1 -> expr -> type -> expr.\n\n\nRemark expr_dec: forall (x y: expr), {x = y} + {x <> y}.\nProof. intros. decide equality;\ntry apply Int256.eq_dec; try apply Int.eq_dec;\ntry apply type_eq; try apply ident_eq; try decide equality.\nQed.\n\n(** [sizeof] and [alignof] are derived forms. *)\n\n(* TODO: if these are ever used by the middle-end, it should probably be changed to Econst_int256. *)\n(*\nDefinition Esizeof (ty' ty: type) : expr := Econst_int (Int.repr(sizeof ty')) ty.\nDefinition Ealignof (ty' ty: type) : expr := Econst_int (Int.repr(alignof ty')) ty.\n*)\n\n(** Extract the type part of a type-annotated Clight expression. *)\n\nDefinition typeof (e: expr) : type :=\n  match e with\n  | Econst_int _ ty => ty\n  | Econst_int256 _ ty => ty\n  | Evar _ ty => ty\n  | Eglob _ ty => ty\n  | Etempvar _ ty => ty\n  | Ederef _ ty => ty\n  | Eaddr _ ty => ty\n  | Eunop _ _ ty => ty\n  | Ebinop _ _ _ ty => ty\n  | Efield _ _ ty => ty\n  | Eindex _ _ ty => ty\n  | Ecall0 _ ty => ty\n  | Ecall1 _ _ ty => ty\n  end.\n"
  },
  {
    "path": "src/backend/Expressions/ExpStacked.v",
    "content": "\n(* Intermediate language after Clabeled.\nMerges a stackframe of local environments and return points\ninto a single stack.\nIn order to make return point well-defined,\nwe split function calls into pushing, jumping, and saving return value *)\n\nRequire Import cclib.Coqlib.\nRequire Import backend.AST.\nRequire Import backend.Environments.Globalenvs.\nRequire Import cclib.Integers.\nRequire Import backend.Ctypes.\nRequire Import backend.Values.LowValues.\nRequire Import backend.Options.\nRequire Import backend.Cop.\nRequire Import backend.MachineModel.\nRequire Import backend.MachineModelLow.\n\n(* This is the first phase where we don't use MiniC expressions. Now\nexpressions is not a recursive datatype, and intermediate values are\ninstead stored on the stack.\n\nLocal env references are direct now, and expression values are on the\nstack.  Expressions that take arguments will pop them off the stack *)\nInductive expr : Type :=\n  | Econst_int256: int256 -> expr (**r 256-bit integer literal *)\n  | Eglob: ident -> expr           (**r variable *)\n  | Etempvar: nat -> expr       (**r temporary variable *)\n  | Emload: expr          (**r memory pointer dereference (unary [*]) *)\n  | Esload: expr          (**r storage pointer dereference (unary [*]) *)\n  | Eunop: unary_operation -> expr  (**r unary operation *)\n  (* all binary operations use the top of the stack as their first argument and\n    second on the stack as their second argument.\n    So when computing the first argument, the stack will have an\n    unnamed value on top. *)\n  | Ebinop: binary_operation -> bool -> expr (**r binary operation. bool is a signedness flag *)\n  | Ecall0: builtin0  -> expr\n  | Ecall1: builtin1 -> expr.\n\n(* Describes return types of a function, because this affects how method/function calls are compiled: *)\nInductive ret_type : Type :=\n  | Tvoid_fun: ret_type (* has to push dummy 0 value *)\n  | Tvoid_method: ret_type (* actually returns nothing *)\n  | Tvoid_constructor: ret_type (* RETURNs code *)\n  | Terror: ret_type (* type cannot be returned, like array *)\n  | Tsome_fun: ret_type (* returns something by pushing onto the stack *)\n  | Tsome_method: ret_type (* returns with a RETURN command *)\n  | Tsome_constructor: ret_type. (* pops value, RETURNs code *)\n\n(* In earlier langauges we had instructions for calling functions. Now we want to compile those into jumps, so we have several types of labels (to enforce uniqueness).\n   Eventually, these will again be unified into a single lable type. *)\nInductive typed_label : Type :=\n  | Linternal : label -> typed_label (* internal label within the current function *)\n  | Lcall: label -> typed_label (* function to call *)\n  | Lreturn: label -> typed_label. (* label for returning to the inside of another function *)\n\n(* expression arguments are popped off the stack *)\nInductive statement : Type :=\n  | Sskip: statement (* no-op *)\n  | Srvalue: expr -> statement (* pushes an expression as an rvalue *)\n  | Slvalue : expr -> statement (* pushes an expression as an lvalue. compiled the same but semantically different. (TODO: there will need to be a future pass where these are the same, and pointers are turned into actual integers.) *)\n  | Spushvoid : statement (* semantically, pushes a void value onto the stack, as a placeholder *)\n  | Spop : statement (* remove a value from the stack *)\n  | Sassign : statement\n  | Sset : nat -> statement (* nat references a stack position, which must reference a temp in this function's local env. moves the thing on the stack to replace this temp. (So this sets a place in the stack, whereas in previous languages it would have been a temp identifier.) *)\n    (* cleanup function and return value pushed on stack.\n    first argument is amount of junk to pop off stack, second is about the return value. *)\n  | Sdone : nat -> ret_type -> statement\n\n  (* control flow *)\n  | Spushlabel: typed_label -> statement\n  | Slabel: label -> statement\n  | Sjump_call : statement    (* unconditional jump to a different function *)\n  | Sjump_internal: statement (* unconditional jump inside a function. *)\n  | Sjumpi: statement (* cond, label on stack. jump if nonzero *)\n\n  (* custom ethereum statements *)\n  | Stransfer : statement (** address.transfer(value), with address & value from the stack.\n    actually all operands to CALL are on the stack, but some have dummy values.  (hopefully, the transfer will eventually get compiled to a single call command.)\n    pushes success value *)\n\n  (* This no longer takes a list of expressions for arguments, but it still has the number of arguments.\n     The way this should get compiled in later phases is to take right number of arguments from the stack, put them in memory, do the call, and then load the results from memory to the stack. *)                  \n  | Scallmethod : int -> nat -> nat -> statement (* sig, number of args, number of retvals. from stack get addr, val, args *)\n                                         \n  | Slog : nat -> nat -> statement (* number of topics, number of args; both are from stack *)\n  | Srevert : statement\n\n  (* This fetches arguments from CALLDATA and puts them on the stack. *)                \n  | Sfetchargs : nat -> statement (* how many args to push *)\n  .\n\nDefinition code : Type := list statement.\n\nRecord function : Type := mkfunction {\n  fn_code: code;\n}.\n\nDefinition genv := Genv.t function type.\n(* pair genv with label for start of transaction body *)\nDefinition program : Type := genv * label.\n\n"
  },
  {
    "path": "src/backend/Expressions/SemanticsMiniC.v",
    "content": "Require Import backend.MachineModel.\nRequire Import backend.Environments.AllEnvironments.\nRequire Import backend.Environments.ExtEnv.\nRequire Import backend.TempModel.\nRequire Import backend.AST.\nRequire Import cclib.Coqlib.\nRequire Import backend.Expressions.ExpMiniC.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.Options.\nRequire Import backend.Values.HighValues.\nRequire Import backend.AbstractData.\n\nSection SEMANTICS.\n\n  Variable adata: Type.\n  \n  Variable ctx: int256.\n\n  (* machine environment *)\n  Variable me: machine_env adata.\n\n  (* storage/memory environment *)\n  Variable ee: ext_env.\n\n  Variable le: temp_env.\n\n  (* Calculate the size of the offset we need, in words. *)\n  (*Definition sem_field_offset (ty: type) (field: ident) : option int256 :=\n    match ty with\n    | Tstruct _ fld =>\n    unpack offset, _ <- struct_field fld field ;; Some (Int256.repr (Z.of_nat offset))\n    | _ => None\n    end.*)\n\n  (* rvalues always evaluate to ints.  *)\n  Inductive eval_rvalue: expr -> val -> Prop :=\n  | eval_Econst_int256: forall i ty,\n      eval_rvalue (Econst_int256 i ty) (Vint i)\n  | eval_Etempvar: forall id val ty,\n      PTree.get id le = Some val ->\n      eval_rvalue (Etempvar id ty) val\n  | eval_Elvalue: forall e lv v,\n      (* This case is tricky, it relies on the set of things that eval_lvalue\n         can evaluate is disjoint from the other ones.  \n         The effect is that any lexpr which is embedded in an rexpr implicitly involves an lookup in ee. *)      \n      eval_lvalue e lv ->\n      read lv ee = Some v ->\n      eval_rvalue e v\n  | eval_Eaddr: forall e lv ty,\n      eval_lvalue e lv ->\n      eval_rvalue (Eaddr e ty) (Vptr (LVeid lv))\n  | eval_Eunop: forall op a ty v1 v,\n      eval_rvalue a v1 ->\n      sem_unary_operation op v1 Tvoid = Some v ->\n      eval_rvalue (Eunop op a ty) v\n  | eval_Ebinop: forall op a1 a2 ty1 ty2 ty  v1 v2 v,\n      eval_rvalue a1 v1 ->\n      eval_rvalue a2 v2 ->\n      (* For the ethereum backend we mostly ignore types, so to be compatible\n         with the middle end it is useful to be able to put in arbitrary ty1/ty2. *)\n      sem_binary_operation op v1 ty1 v2 ty2 = Some v ->\n      eval_rvalue (Ebinop op a1 a2 ty) v\n  | eval_Ecall0: forall b ty v,\n      (me_query me) (Qcall0 b) = v ->\n      eval_rvalue (Ecall0 b ty) v\n  | eval_Ecall1: forall b a av ty v,\n      eval_rvalue a av ->\n      (me_query me) (Qcall1 b av) = v ->\n      eval_rvalue (Ecall1 b a ty) v\n\n(* lvalues always evaluate to extended identifiers.\n   The `val` type is mutually defined with an `lval` type,\n   but that is not actually used until in later compiler phases *)\nwith eval_lvalue: expr -> ident_ext -> Prop :=\n| eval_Evar: forall id ty lv,\n    var ctx id ee = Some lv ->\n    eval_lvalue (Evar id ty) lv\n| eval_Eglob: forall id ty lv,\n    glob id ee = Some lv ->\n    eval_lvalue (Eglob id ty) lv\n| eval_Efield: forall e id ty base lv,\n    eval_lvalue e base ->\n    access_field base (typeof e) id = Some lv ->\n    eval_lvalue (Efield e id ty) lv\n| eval_Eindex: forall e1 e2 ty base ind lv,\n    eval_lvalue e1 base ->\n    eval_rvalue e2 ind ->\n    index_array base (typeof e1) ind = Some lv ->\n    eval_lvalue (Eindex e1 e2 ty) lv\n| eval_Ederef: forall e ty v lv,\n    eval_rvalue e v ->\n    deref v = Some lv ->\n    eval_lvalue (Ederef e ty) lv\n.\n\nInductive eval_rvalues: list expr -> list val -> Prop :=\n  | eval_Enil:\n    eval_rvalues nil nil\n  | eval_Econs: forall rv val rvs vals,\n    eval_rvalue rv val ->\n    eval_rvalues rvs vals ->\n    eval_rvalues (rv :: rvs) (val :: vals).\n\nRemark eval_rvalues_len: forall es vs,\n  eval_rvalues es vs -> length es = length vs.\nProof. induction es; intros; inv H. auto. simpl.\nreplace (length vals) with (length es). auto. apply IHes; auto.\nQed.\n\n(* evaluates to Vunit for None. *)\nInductive eval_optvalue: option expr -> val -> Prop :=\n  | eval_Enone:\n    eval_optvalue None Vunit\n  | eval_Esome: forall e v,\n    eval_rvalue e v ->\n    eval_optvalue (Some e) v.\n\nEnd SEMANTICS.\n\nArguments eval_lvalue {adata}.\nArguments eval_rvalue {adata}.\nArguments eval_rvalues {adata}.\nArguments eval_optvalue {adata}.\n"
  },
  {
    "path": "src/backend/GasModel.v",
    "content": "\nRequire Import cclib.Coqlib.\nRequire Import backend.Expressions.ExpStacked.\nRequire Import backend.Expressions.ExpMiniC.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.MachineModel.\nRequire Import Environments.Globalenvs.\n\nLocal Open Scope nat_scope.\n\nLtac REORDER order := assert order as NEWORDER by (intros; omega); rewrite NEWORDER; clear NEWORDER.\nLtac REORDERIN order hyp := assert order as NEWORDER by (intros; omega); rewrite NEWORDER in hyp; clear NEWORDER.\n\nOpaque Peano.plus.\n\n(* constants from yellow paper *)\nDefinition g_base : nat := 2.\nDefinition g_verylow : nat := 3.\nDefinition g_low : nat := 5.\nDefinition g_mid : nat := 8.\nDefinition g_high : nat := 10.\nDefinition g_jumpdest : nat := 1.\n\nDefinition g_sload : nat := 200.\nDefinition g_sset : nat := 20000.  (* upper bound SSTORE by assuming it's always zero -> nonzero *)\n\n\n(** Derived constants *)\n\nDefinition gas_mload : nat := g_verylow.\nDefinition gas_push : nat := g_verylow.\nDefinition gas_pop : nat := g_base.\nDefinition gas_calldataload : nat := g_verylow.\nDefinition gas_codecopy : nat := g_verylow.\nDefinition gas_dup : nat := g_verylow.\nDefinition gas_swap : nat := g_verylow.\n\n(* jumps and labels are inexpensive,\nand it's hard to keep track at all levels of the number of each required at each level *)\nDefinition gas_label : nat := g_jumpdest.\nDefinition gas_jump : nat := g_mid.\nDefinition gas_jumpi : nat := g_high.\nDefinition gas_jump_arg : nat := gas_push + gas_jump.\nDefinition gas_jumpi_arg : nat := gas_push + gas_jumpi.\n(* either fallthrough or jump or conditional jump *)\nDefinition gas_branch : nat := Nat.max gas_label (Nat.max gas_jump_arg gas_jumpi_arg).\n\n\nRemark gas_jump_le_branch: gas_jump_arg <= gas_branch.\nProof. unfold gas_branch. apply Nat.le_trans with (Nat.max gas_jump_arg gas_jumpi_arg).\napply Nat.le_max_l. apply Nat.le_max_r.\nQed.\n\nRemark gas_jumpi_le_branch: gas_jumpi_arg <= gas_branch.\nProof. unfold gas_branch. apply Nat.le_trans with (Nat.max gas_jump_arg gas_jumpi_arg).\napply Nat.le_max_r. apply Nat.le_max_r.\nQed.\n\nRemark gas_label_le_branch: gas_label <= gas_branch.\nProof. unfold gas_branch. apply Nat.le_max_l.\nQed.\n\nFixpoint gas_branches (count: nat) : nat :=\n  match count with 0 => 0 | S n => gas_branch + gas_branches n end.\n\nLemma gas_branches_split: forall b1 b2,\n  gas_branches (b1 + b2) = gas_branches b1 + gas_branches b2.\nProof. induction b1; simpl; intros; repeat rewrite Nat.add_0_l.\nauto. rewrite Nat.add_succ_l. simpl. rewrite IHb1. omega.\nQed.\n\nDefinition gas_eval_builtin0 (b: builtin0) : nat :=\n  match b with\n  | Baddress => g_base\n  | Borigin => g_base\n  | Bcaller => g_base\n  | Bcallvalue => g_base\n  | Bcoinbase => g_base\n  | Btimestamp => g_base\n  | Bnumber => g_base\n  | Bchainid => g_base\n  | Bselfbalance => g_low\n  end.\n\nDefinition gas_eval_builtin1 (b: builtin1) : nat :=\n  match b with\n  (* these are from the yellow paper *)\n  | Bbalance => 400\n  | Bblockhash => 20\n  end.\n\nDefinition gas_sha_1 : nat := 30 + 6.  (* 30 flat rate plus 6 per word *)\nDefinition gas_sha_2 : nat := 30 + 12. (* 30 flat rate plus 6 per word *)\n\nDefinition gas_binop (o: binary_operation) : nat :=\n  match o with\n  | Oadd => g_verylow\n  | Osub => g_verylow\n  | Omul => g_low\n  | Osha_2 => gas_sha_2\n  | _ => g_verylow\n  end.\n\nDefinition gas_unop (o: unary_operation) : nat :=\n  match o with\n  | Onotbool => g_verylow\n  | Onotint => g_verylow\n  | Oneg => gas_push + gas_binop Osub\n  | Osha_1 => gas_sha_1\n  end.\n\n(* TODO: look up the actual values *)\n\n(* deref determines whether the expression is automatically dereferenced *)\nFixpoint gas_eval_expr (deref: bool) (e: expr) : nat :=\n  match e with\n  | Econst_int _ _ => 0\n  | Econst_int256 _ _ => gas_push\n  | Evar _ _ => gas_push + match deref with true => g_sload | false => 0 end\n  | Eglob _ _ => gas_push + match deref with true => g_sload | false => 0 end\n  | Etempvar _ _ => gas_dup\n  | Eaddr _ _ => 0\n  | Ederef e _ => (gas_eval_expr deref e) + g_sload\n  | Eunop o e _ => (gas_eval_expr deref e) + gas_unop o\n  | Ebinop o e1 e2 _ => (gas_eval_expr deref e1) + (gas_eval_expr deref e2) + gas_binop o\n  | Efield e _ _ => (gas_eval_expr deref e) + gas_push + gas_sha_2 + g_sload\n  | Eindex e1 e2 _ => (gas_eval_expr deref e1) + (gas_eval_expr deref e2) + gas_sha_2 + g_sload\n  | Ecall0 b _ => gas_eval_builtin0 b\n  | Ecall1 b e _ => gas_eval_expr deref e + gas_eval_builtin1 b\n  end.\n\nFixpoint gas_eval_exprs (deref: bool) (args: list expr) : nat :=\n  match args with\n  | nil => 0\n  | arg::rest => (gas_eval_expr deref arg) + (gas_eval_exprs deref rest)\n  end.\n\nDefinition gas_eval_optexpr (deref: bool) (optexpr: option expr) : nat :=\n  match optexpr with None => gas_push | Some e => gas_eval_expr deref e end.\n\nDefinition gas_assign (deref: bool) (lv: expr) (rv: expr) (b: nat) : nat :=\n  (gas_eval_expr deref lv) + (gas_eval_expr deref rv) + g_sset + (gas_branches b).\n\nDefinition gas_set_stacked : nat := gas_swap + gas_pop.\n\nDefinition gas_set (deref: bool) (rv: expr) (b: nat) : nat :=\n  (gas_eval_expr deref rv) + gas_set_stacked + (gas_branches b).\n\n(* TODO: find if gas depends on amount of args and other stuff *)\nDefinition g_call : nat := 700.\nDefinition g_callvalue : nat := 9000.\n\nDefinition gas_transfer_base : nat :=\n  g_call + g_callvalue.\n\nDefinition gas_callmethod_base : nat :=\n  g_call + g_callvalue.\n\nDefinition gas_transfer (deref: bool) (a: expr) (v: expr) (b: nat) : nat :=\n  gas_jumpi + gas_push + gas_unop Onotbool + gas_transfer_base + gas_push + gas_push + gas_push + gas_push + gas_push +\n    (gas_eval_expr deref a) + (gas_eval_expr deref v) + (gas_branches b).\n\nDefinition gas_log_base (ntopics nargs : nat) : nat :=\n  nargs * (2 * g_verylow)   (* Write arguments to memory. This is not quite right, because MSTORE can take more than verylow if it extends memory. *)\n  + 2 * g_verylow           (* push memory base/size *)\n  + 375 * (1 + ntopics).    (* the LOG0/.../LOG4 instruction *)\n\n\nDefinition gas_log (deref: bool) (topics args : list expr) (b: nat) : nat :=\n  gas_log_base (length topics) (length args)\n  + (gas_eval_exprs deref topics)\n  + (gas_eval_exprs deref args)\n  + (gas_branches b).\n\nDefinition gas_saveretval : nat := gas_set_stacked.\n\nDefinition gas_saveretval' (b: nat) : nat := gas_saveretval + gas_branches b.\n\nFixpoint gas_saveretvals (c: nat) : nat :=\n  match c with 0 => 0 | S n => gas_saveretval + gas_saveretvals n end.\n\n(* read from memory *)\nDefinition gas_extractretval : nat := 30.\nFixpoint gas_extractretvals (c: nat) : nat :=\n  match c with 0 => 0 | S n => gas_extractretval + gas_extractretvals n end.\n\n(* put in memory *)\nDefinition gas_stasharg : nat := 22.\nFixpoint gas_stashargs (c: nat) : nat :=\n  match c with 0 => 0 | S n => gas_stasharg + gas_stashargs n end.\n\nDefinition gas_return_var (deref: bool) (rv: positive) (b: nat) : nat :=\n  (gas_eval_expr deref (Etempvar rv Tvoid)) + (gas_branches b).\n\nDefinition gas_return_none (deref: bool) (b: nat) : nat :=\n  (gas_branches b).\n\nDefinition gas_pops (garbage: nat) : nat :=\n  garbage * gas_pop.\n\nDefinition gas_cleanup (garbage: nat) : nat :=\n  match garbage with\n  | O => O\n  | _ => gas_pops garbage + gas_swap\n  end.\n\nDefinition gas_done_simple (garbage: nat) : nat :=\n  gas_cleanup garbage + 100.\n\nDefinition gas_done (garbage: nat) (b: nat) : nat :=\n  gas_done_simple garbage + gas_branches b.\n\nDefinition gas_return_done (deref: bool) (rv: option positive) (garbage: nat) (b: nat) : nat :=\n  match rv with\n  | Some rv => gas_return_var deref rv 0 + gas_done garbage 0 + gas_branches b\n  | None => gas_return_none deref 0 + gas_done garbage 0 + gas_branches b\n  end.\n\n(*Lemma gas_return_done_split: forall d r g b1 b2,\n  gas_return_done d r g (b1 + b2) = gas_done g b1 + gas_return d r b2.\nProof.\nintros. unfold gas_return_done. unfold gas_done. unfold gas_return.\nrewrite gas_branches_split. simpl. omega.\nQed.*)\n\nDefinition gas_callmethod_stacked (rv_count: nat) (args: nat) : nat :=\n  gas_callmethod_base\n  + (gas_extractretvals rv_count)\n  + (gas_stashargs args).\n\nDefinition gas_callmethod (deref: bool) (a: expr) (rv_count: nat) (v: expr) (args: list expr) (b: nat) : nat :=\n  gas_push + gas_push + gas_push + gas_push + gas_push + gas_push + gas_jumpi + gas_unop Onotbool\n  + gas_eval_expr deref a\n  + gas_saveretvals rv_count\n  + gas_eval_expr deref v\n  + gas_eval_exprs deref args\n  + gas_callmethod_stacked rv_count (length args)\n  + gas_branches b.\n\nDefinition gas_call (deref: bool) (args: list expr) (b: nat) : nat :=\n  (gas_eval_exprs deref args) + gas_jump_arg + gas_push + (gas_branches b).\n\n(* pushing empty temps onto the stack *)\nDefinition gas_temps (temps: nat) : nat := gas_push * temps.\n\n(* Push args onto the stack. For internal functions, the args are\n  already on the stack. We reserve the gas because methods and the\n  constructor need it, and it's difficult to know in the semantics\n  whether we're entering a method. So there are three cases:\n  - Internal function, zero gas.\n  - Method, gas_calldataload + gas_push.\n  - Constructor, 3*gas_push + gas_codecopy + gas_mload.\n  gas_arg is an upper bound of all of them.\n *)\n\nDefinition gas_arg_method :nat := gas_calldataload + gas_push.\nDefinition gas_arg_constr :nat := 3*gas_push + gas_codecopy + gas_mload.\n\nDefinition gas_arg : nat := gas_arg_constr.\nDefinition gas_args (args: nat) : nat := gas_arg * args.\n\nRemark gas_arg_bound_method: gas_arg >= gas_arg_method.\nProof. compute. omega. Qed.\nRemark gas_arg_bound_constr: gas_arg >= gas_arg_constr.\nProof. compute. omega. Qed.\n\nDefinition gas_intro (temps: nat) (args: nat) : nat :=\n  gas_temps temps + gas_args args.\n\nDefinition gas_callenter (temps: nat) (args: nat) (b: nat) : nat :=\n  (gas_intro temps args) + (gas_branches b).\n\nDefinition gas_eval_cond (deref: bool) (e: expr) (b: nat) : nat :=\n  (gas_eval_expr deref e) + (gas_branches b).\n\nDefinition gas_branching (f: nat -> nat) : Prop :=\n  forall x, f x = f 0 + gas_branches x.\n\nLtac gas_branching_auto FUN := unfold gas_branching; intros; simpl;\n  unfold FUN; simpl; repeat rewrite Nat.add_0_r; auto.\n\nRemark transfer_branching: forall a b c, gas_branching (gas_transfer a b c).\ngas_branching_auto gas_transfer. Qed.\n\nRemark log_branching: forall a b c, gas_branching (gas_log a b c).\ngas_branching_auto gas_log. Qed.\n\nRemark callmethod_branching: forall a b c d e, gas_branching (gas_callmethod a b c d e).\ngas_branching_auto gas_callmethod. Qed.\n\nRemark callenter_branching: forall a b, gas_branching (gas_callenter a b).\ngas_branching_auto gas_callenter. Qed.\n\nRemark assign_branching: forall a b c, gas_branching (gas_assign a b c).\ngas_branching_auto gas_assign. Qed.\n\nRemark set_branching: forall a b, gas_branching (gas_set a b).\ngas_branching_auto gas_set. Qed.\n\nRemark call_branching: forall a b, gas_branching (gas_call a b).\ngas_branching_auto gas_call. Qed.\n\nRemark cond_branching: forall a b, gas_branching (gas_eval_cond a b).\ngas_branching_auto gas_eval_cond. Qed.\n\n(*Remark return_branching: forall a b, gas_branching (gas_return a b).\ngas_branching_auto gas_return. Qed.*)\n\nRemark done_branching: forall a, gas_branching (gas_done a).\ngas_branching_auto gas_done. Qed.\n\nRemark retval_branching: gas_branching gas_saveretval'.\ngas_branching_auto gas_saveretval'. Qed.\n\n\nLemma succ_pred: forall x, 0 < x -> S (Nat.pred x) = x.\nProof.\ndestruct x; intros.\nomega.\nsimpl. reflexivity.\nQed.\n\nLemma gas_add_sub: forall c g g',\n  g + c <= g' ->\n  exists g'', g' = g'' + c /\\ g <= g''.\nProof.\ninduction c; simpl; intros.\nexists g'. rewrite Nat.add_0_r in H. split; auto.\nrewrite Nat.add_comm in H. rewrite Nat.add_succ_l in H.\nrewrite Nat.add_comm in H. rewrite <- Nat.add_succ_l in H.\ndestruct (IHc (S g) g' H) as (g_0 & g_0_eq & g_0_lt).\nexists (pred g_0).\nassert (S (Init.Nat.pred g_0) = g_0).\n{ rewrite succ_pred; auto. unfold lt.\n  apply Nat.le_trans with (S g); auto. omega. }\nsplit.\n\nrewrite Nat.add_comm. rewrite Nat.add_succ_l.\nrewrite Nat.add_comm. rewrite <- Nat.add_succ_l.\nrewrite H0; auto.\napply le_S_n. rewrite H0. auto.\nQed.\n\nLemma le_add: forall g c,\n  g <= g + c.\nProof. induction c; intros.\nomega. apply Nat.le_trans with (g + c); auto.\nrewrite Nat.add_succ_r. omega.\nQed.\n\nLemma le_pad: forall g c c',\n  c' <= c -> c' <= c + g.\nProof. intros. apply Nat.le_trans with c; auto. apply le_add.\nQed.\n\nLemma le_diff: forall g c c',\n  c' <= c -> g + c' <= g + c.\nProof. induction g; intros.\nrepeat rewrite Nat.add_0_l. assumption.\nrepeat rewrite Nat.add_succ_l.\napply le_n_S. apply IHg. assumption.\nQed.\n\nLemma le_diff2: forall g c c',\n  c' <= c -> c' + g <= c + g.\nProof. intros.\nrewrite Nat.add_comm. rewrite (Nat.add_comm c g).\napply le_diff. auto.\nQed.\n\nLemma le_pad': forall g c c',\n  c' + g <= c -> c' <= c.\nProof. intros. apply Nat.le_trans with (c' + g); auto. apply le_pad. auto.\nQed.\n\nLemma le_add2: forall g g' c c',\n  c' <= c -> g' <= g -> c' + g' <= c + g.\nProof. intros.\napply Nat.le_trans with (c' + g).\napply le_diff; auto.\napply le_diff2; auto.\nQed.\n\nLemma gas_partial_add_sub: forall c g g',\n  g + c <= g' ->\n  forall c',\n  c' <= c ->\n  exists g'', g' = g'' + c' /\\ g <= g''.\nProof.\nintros. apply gas_add_sub. apply Nat.le_trans with (g + c); auto.\napply le_diff. auto.\nQed.\n\n\n\nLemma gas_branch_label: forall g g',\n  g + gas_branch <= g' ->\n  exists g'', g' = g'' + gas_label /\\ g <= g''.\nProof.\nintros. eapply gas_partial_add_sub; eauto. apply gas_label_le_branch.\nQed.\n\nLemma gas_branch_jump: forall g g',\n  g + gas_branch <= g' ->\n  exists g'', g' = g'' + gas_jump_arg /\\ g <= g''.\nProof.\nintros. eapply gas_partial_add_sub; eauto. apply gas_jump_le_branch.\nQed.\n\nLemma gas_branch_jumpi: forall g g',\n  g + gas_branch <= g' ->\n  exists g'', g' = g'' + gas_jumpi_arg /\\ g <= g''.\nProof.\nintros. eapply gas_partial_add_sub; eauto. (* apply gas_jumpi_le_branch. *)\nQed.\n\n\nLtac same_gas_used GAS g' := apply gas_add_sub in GAS; destruct GAS as (g'' & g_eq & GAS); subst g'.\n\n\nLemma gas_split_branches: forall g f,\n  gas_branching f ->\n  g + f 2 = g + gas_branch + f 0 + gas_branch.\nProof.\nunfold gas_branching. intros. assert (A := H 2).\nrewrite A.\nsimpl.\nomega.\nQed.\n\nLemma gas_extract_branch: forall g f,\n  gas_branching f ->\n  g + f 1 = g + f 0 + gas_branch.\nProof. unfold gas_branching. intros. assert (A := H 1).\nrewrite A; simpl; omega.\nQed.\n\nLtac gas_use_2 GAS g' g_0 :=\n  same_gas_used GAS g'; rename g'' into g_0;\n  same_gas_used GAS g_0.\n\nLtac gas_use_3 GAS g' g_0 g_1 :=\n  same_gas_used GAS g'; rename g'' into g_0;\n  same_gas_used GAS g_0; rename g'' into g_1;\n  same_gas_used GAS g_1.\n\nLtac gas_use_4 GAS g' g_0 g_1 g_2 :=\n  same_gas_used GAS g'; rename g'' into g_0;\n  same_gas_used GAS g_0; rename g'' into g_1;\n  same_gas_used GAS g_1; rename g'' into g_2;\n  same_gas_used GAS g_2.\n\n(* Stacked expression *)\n\nDefinition gas_eval_stacked_expr (e: ExpStacked.expr) : nat :=\n  match e with\n  | ExpStacked.Econst_int256 _ => gas_push\n  | ExpStacked.Eglob _ => gas_push\n  | ExpStacked.Etempvar _ => gas_dup\n  | ExpStacked.Esload => g_sload\n  | ExpStacked.Emload => g_sload\n  | ExpStacked.Eunop o => gas_unop o\n  | ExpStacked.Ebinop o _ => gas_binop o\n  | ExpStacked.Ecall0 b => gas_eval_builtin0 b\n  | ExpStacked.Ecall1 b => gas_eval_builtin1 b\n  end.\n\nFixpoint gas_eval_stacked_exprs (args: list ExpStacked.expr) : nat :=\n  match args with\n  | nil => 0\n  | arg::rest => (gas_eval_stacked_expr arg) + (gas_eval_stacked_exprs rest)\n  end.\n\nDefinition gas_eval_stacked_optexpr (optexpr: option ExpStacked.expr) : nat :=\n  match optexpr with None => 0 | Some e => gas_eval_stacked_expr e end.\n\nDefinition gas_assign_stacked : nat := g_sset.\n\nDefinition gas_eval_stacked_cond (cond: ExpStacked.expr) (b: nat) : nat :=\n  (gas_eval_stacked_expr cond) + (gas_branches b).\n\n(* Method multiplexer *)\n\n(* TODO: make it depend on the number of methods *)\nDefinition gas_multiplex (methods: nat) : nat := 500.\n\n"
  },
  {
    "path": "src/backend/IndexLib.v",
    "content": "(* Library for building map index types *)\n\n\nRequire Import cclib.Coqlib.\nRequire Import cclib.Integers.\n\nLocal Open Scope nat_scope.\n\n(* interleave with zeros *)\nFixpoint sparse_positive (x: positive) : positive :=\n  match x with\n  | xH => xO xH\n  | xO y => xO (xO (sparse_positive y))\n  | xI y => xO (xI (sparse_positive y))\n  end.\n\n(* interleave with zeros, after the first bit *)\nDefinition delay_sparse (x: positive) : positive :=\n  match x with\n  | xH => xH\n  | xI r => xI (sparse_positive r)\n  | xO r => xO (sparse_positive r)\n  end.\n\nFixpoint pos_measure (x: positive) : nat :=\n  match x with\n  | xH => S O\n  | xI r => S (pos_measure r)\n  | xO r => S (pos_measure r)\n  end.\n\nFixpoint pick_first (x y: positive) (m: nat) {struct m} : positive :=\n  match m with\n  | O => xH (* should never reach here *)\n  | S n =>\n    match x with\n    | xH => xI (delay_sparse y)\n    | xO r => xO (pick_first y r n)\n    | xI r => xI (pick_first y r n)\n    end\n  end.\n\n(* Function to injectively map two positives into\na single positive *)\nDefinition inject_positive (x y: positive) : positive :=\n  pick_first x y ((pos_measure x) + (pos_measure y)).\n\nLemma measure_comm: forall x y, (pos_measure x + pos_measure y) = (pos_measure y + pos_measure x).\nProof.\nintros. apply plus_comm.\nQed.\n\nLemma measure_pos: forall x y,\n  ((pos_measure x + S (pos_measure y)) = S (pos_measure x + pos_measure y)).\nProof.\nauto.\nQed.\n\nLemma measure_plus_one: forall x, pos_measure x + 1 = S (pos_measure x).\nProof.\nintro. omega.\nQed.\n\nLemma delay_matters: forall x y, delay_sparse x = sparse_positive y -> False.\nProof.\nintros x y. revert x.\ninduction y.\n\ndestruct x. simpl. discriminate.\nsimpl. injection; clear H.\ndestruct x; simpl; discriminate.\nunfold delay_sparse. simpl. discriminate.\n\ndestruct x; unfold delay_sparse; simpl.\ndiscriminate.\ninjection; clear H.\ndestruct x; simpl.\ninjection; clear H.\nfold (delay_sparse (xI x)).\napply IHy.\ninjection; clear H.\nfold (delay_sparse (xO x)).\napply IHy.\n\ninjection; clear H.\nfold (delay_sparse xH).\napply IHy.\n\ndiscriminate.\n\nintro x. destruct x; simpl; try discriminate.\ninjection; clear H. destruct x; simpl; discriminate.\nQed.\n\nLemma sparse_is_sparse: forall x y z,\n  inject_positive x y = sparse_positive z -> False.\nProof.\nintros x y z. revert x y.\ninduction z; intros x y; simpl.\n\n-\n  destruct x; unfold inject_positive; simpl.\n\n  discriminate.\n\n  injection; clear H.\n\n  destruct y; simpl; try rewrite measure_pos; simpl.\n  injection; clear H.\n  fold (inject_positive x y).\n  apply IHz.\n\n  discriminate.\n\n  rewrite measure_plus_one. simpl. injection; clear H.\n  apply delay_matters.\n\n  discriminate.\n\n-\n  unfold inject_positive.\n  destruct x; simpl.\n  destruct y; rewrite measure_comm; simpl; discriminate.\n  destruct y; simpl;\n    try rewrite measure_pos; try rewrite measure_plus_one; simpl.\n  discriminate.\n  injection; clear H.\n  apply IHz.\n  discriminate.\n  discriminate.\n\n-\n  destruct x; try discriminate.\n  unfold inject_positive; simpl.\n  injection; clear H.\n  destruct y; simpl;\n    try rewrite measure_pos; try rewrite measure_plus_one; simpl; discriminate.\nQed.\n\nLemma delay_sparse_is_sparse: forall x y z,\n  inject_positive x y = delay_sparse z -> False.\nProof.\nintros x y z.\ndestruct z; unfold delay_sparse;\n  destruct x; unfold inject_positive; simpl; try discriminate;\n  injection; clear H.\n-\n  rewrite measure_comm.\n  fold (inject_positive y x).\n  apply sparse_is_sparse.\n-\n  apply delay_matters.\n-\n  rewrite measure_comm.\n  fold (inject_positive y x).\n  apply sparse_is_sparse.\nQed.\n\nLemma injective_sparse: forall x y, sparse_positive x = sparse_positive y -> x = y.\nProof.\ninduction x; simpl.\n-\n  destruct y; simpl.\n  intro H.\n  injection H.\n  intro.\n  assert (x=y).\n  apply IHx.\n  exact H0.\n  rewrite H1; reflexivity.\n  discriminate.\n  discriminate.\n-\n  destruct y; simpl.\n  discriminate.\n  intro H; injection H.\n  intro.\n  assert (x=y).\n  apply IHx; exact H0.\n  rewrite H1; reflexivity.\n  discriminate.\n-\n  destruct y; simpl.\n  discriminate.\n  discriminate.\n  intro. reflexivity.\nQed.\n\nLemma injective_delay_sparse: forall x y, delay_sparse x = delay_sparse y -> x = y.\nProof.\ndestruct x; destruct y; simpl; intro;\n  try discriminate; try reflexivity; injection H; intro.\nassert (x=y).\napply injective_sparse. exact H0.\nrewrite H1; reflexivity.\nassert (x=y).\napply injective_sparse. exact H0.\nrewrite H1; reflexivity.\nQed.\n\n\nLemma injective_positive_1:\n  forall w x y z,\n    inject_positive w x = inject_positive y z -> w = y.\nProof.\nintros w x y z.\nrevert x w z.\ninduction y; intros x w z; unfold inject_positive; simpl.\n+\n  destruct z; destruct x; destruct w; simpl;\n    try rewrite ?measure_pos; try rewrite ?measure_plus_one; simpl;\n    try discriminate; intro; injection H; clear H.\n  *\n    fold (inject_positive w x).\n    fold (inject_positive y z).\n    intro.\n    assert (w=y).\n    revert H.\n    apply IHy.\n    rewrite H0.\n    reflexivity.\n  *\n    fold (inject_positive y z).\n    intro.\n    exfalso.\n    apply sparse_is_sparse with y z x.\n    symmetry.\n    exact H.\n  *\n    fold (inject_positive y z).\n    intro.\n    exfalso.\n    apply delay_sparse_is_sparse with y z w.\n    symmetry.\n    exact H.\n  *\n    fold (inject_positive w x).\n    fold (inject_positive y z).\n    intro.\n    assert (w=y).\n    revert H.\n    apply IHy.\n    rewrite H0.\n    reflexivity.\n  *\n    fold (inject_positive y z).\n    intro; exfalso; apply sparse_is_sparse with y z x; symmetry; exact H.\n  *\n    fold (inject_positive w x).\n    intro; exfalso; apply delay_sparse_is_sparse with w x y; exact H.\n  *\n    intro; exfalso.\n    apply delay_matters with y x.\n    symmetry. exact H.\n  *\n    intro.\n    assert (w=y).\n    apply injective_delay_sparse.\n    exact H.\n    rewrite H0; reflexivity.\n+\n  destruct z; destruct x; destruct w; simpl;\n  try rewrite ?measure_pos; try rewrite ?measure_plus_one; simpl;\n  try discriminate; intro; injection H; clear H.\n  *\n    fold (inject_positive w x).\n    fold (inject_positive y z).\n    intro.\n    assert (w=y).\n    revert H.\n    apply IHy.\n    rewrite H0.\n    reflexivity.\n  *\n    fold (inject_positive y z).\n    intro. exfalso.\n    apply delay_sparse_is_sparse with y z w.\n    symmetry. exact H.\n  *\n    fold (inject_positive w x).\n    fold (inject_positive y z).\n    intro.\n    assert (w=y).\n    revert H; apply IHy.\n    rewrite H0; reflexivity.\n  *\n    fold (inject_positive w x).\n    intro. exfalso.\n    apply delay_sparse_is_sparse with w x y.\n    exact H.\n  *\n    intro. assert (w=y).\n    apply injective_delay_sparse.\n    exact H.\n    rewrite H0; reflexivity.\n+\n  destruct w; simpl; try discriminate; try reflexivity.\n  rewrite measure_comm.\n  fold (inject_positive x w).\n  intro H; injection H; clear H.\n  intro. exfalso.\n  apply delay_sparse_is_sparse with x w z.\n  exact H.\nQed.\n\nLemma injective_positive_2:\n  forall w x y z,\n    inject_positive w x = inject_positive y z -> x = z.\nProof.\nintros w x y z.\ndestruct w; destruct y;\n  unfold inject_positive; simpl;\n  try rewrite ?measure_pos; simpl;\n  try discriminate;\n  intro H; injection H; clear H;\n  try rewrite measure_comm; simpl.\n-\n  fold (inject_positive x w).\n  rewrite measure_comm; fold (inject_positive z y).\n  apply injective_positive_1.\n-\n  fold (inject_positive x w).\n  intro; exfalso.\n  apply delay_sparse_is_sparse with x w z; exact H.\n-\n  fold (inject_positive x w).\n  rewrite measure_comm; fold (inject_positive z y).\n  apply injective_positive_1.\n-\n  fold (inject_positive z y).\n  intro; exfalso.\n  apply delay_sparse_is_sparse with z y x; symmetry; exact H.\n-\n  apply injective_delay_sparse.\nQed.\n\n\n\nDefinition int_index (i : int256) : positive :=\n  let (i, _) := i in\n  match i with\n  | Z0 => xH\n  | Zpos p => xO p\n  | Zneg p => xI p\n  end.\n\nLemma int_index_injective: forall (x y: int256), int_index x = int_index y -> x = y.\nProof.\nunfold int_index; destruct x; destruct y; intros.\napply Int256.mkint_eq.\ndestruct intval; destruct intval0; try (inversion H); try reflexivity.\nQed.\n\nDefinition int32_index (i : int) : positive :=\n  let (i, _) := i in\n  match i with\n  | Z0 => xH\n  | Zpos p => xO p\n  | Zneg p => xI p\n  end.\n\nLemma int32_index_injective: forall (x y: int), int32_index x = int32_index y -> x = y.\nProof.\nunfold int32_index; destruct x; destruct y; intros.\napply Int.mkint_eq.\ndestruct intval; destruct intval0; try (inversion H); try reflexivity.\nQed.\n\n\n"
  },
  {
    "path": "src/backend/MachineModel.v",
    "content": "(* The EVM allows contracts to query lots of things\nabout itself and about the blockchain.\nThese are the \"builtin\" expresions.\nWe treat these like global variable lookups, because\nthe only way to access the values at any level is fixed.\nFor example, to compute caller you need to use the\n\"caller\" builtin expression up in DeepSEA, and this must\ncompile into a \"CALLER\" command in the bytecode.\n*)\n\nRequire Import cclib.Coqlib.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.IndexLib.\nRequire Import backend.Values.LowValues.\nRequire Import backend.Values.HighValues.\nRequire Import backend.Environments.ExtEnv.\nRequire Import backend.AbstractData.\n\n(* Defines the set of builtin expressions in the EVM. \n   They are split into datatypes based on the number of arguments they take.\n*)\nInductive builtin0: Type :=\n| Baddress: builtin0\n| Borigin: builtin0\n| Bcaller: builtin0\n| Bcallvalue: builtin0\n| Bcoinbase: builtin0\n| Btimestamp: builtin0\n| Bnumber: builtin0\n| Bchainid: builtin0\n| Bselfbalance: builtin0.\n\nInductive builtin1: Type :=\n| Bbalance: builtin1\n| Bblockhash: builtin1.\n\nInductive state_query : Type :=\n| Qcall0: builtin0 -> state_query\n| Qcall1: builtin1 -> val -> state_query.\n\n(* Each language semantics has a machine_env (in fact, the same one)\nwhich specifies the result of doing the EVM builtin operations.\n\nFor builtin queries the machine_env contains the information, and\nbelow we define a relation me_query which presents this in a uniform\nway to the rest of the compiler correctness proof.\n\nThe machine_env currently contains two abstract relations for\ntransfers and methods calls to other contracts. These are mostly\nplaceholders, they will probably need some redesign to be useful to\nwrite code about contracts. \n\nThe entire backend is parametrized on an abstract data type which\nkeeps state related to transfers and method calls, to be filled in \nat a later time.\n *)\n\nSection WITH_DATA.\nContext adata {data_ops: CompatDataOps adata}.\n\nRecord machine_env  : Type := mkmachine {\n  me_address : int256;  (* Todo: make it int160. *)\n  me_origin : int256;   (* Todo: make it int160. *)                     \n  me_caller : int256;\n  me_callvalue : int256;\n  me_coinbase : int256;\n  me_timestamp : int256;\n  me_number : int256;\n  me_chainid : int256;\n  me_selfbalance : int256;\n  me_balance : int256 -> int256;   (* Todo: make it int160. *)\n  me_blockhash : int256 -> int256;\n\n  (* todo: this is bad because it doesn't deal with potential reentrancy. *)\n  (* Returns an int representing success/failure, and the new abstract state. *)\n  me_transfer : forall (addr value: int256)(d: adata), (int256 * adata);\n  (* addr, sig, value, args, prev_data, prev_storage, new_data, new_storage, success, retvals *)\n  me_callmethod : val -> int -> val -> list val -> adata -> ext_env -> adata -> ext_env -> int256 -> list val -> Prop;\n  me_log : forall (topics : list val) (args : list val), adata -> adata\n}.\n\nDefinition me_query (me : machine_env) (q: state_query) : val :=\n  match q with\n  | Qcall0 Baddress => Vint (me_address me)\n  | Qcall0 Borigin => Vint (me_origin me)\n  | Qcall0 Bcaller => Vint (me_caller me)\n  | Qcall0 Bcallvalue => Vint (me_callvalue me)\n  | Qcall0 Bcoinbase => Vint (me_coinbase me)\n  | Qcall0 Btimestamp => Vint (me_timestamp me)\n  | Qcall0 Bnumber => Vint (me_number me)\n  | Qcall0 Bchainid => Vint (me_chainid me)\n  | Qcall0 Bselfbalance => Vint (me_selfbalance me)\n  | Qcall1 Bbalance (Vint addr) => Vint (me_balance me addr)\n  | Qcall1 Bbalance _ => Vunit (* ill-typed query. *)\n  | Qcall1 Bblockhash (Vint n) => Vint (me_blockhash me n)\n  | Qcall1 Bblockhash _ => Vunit (* ill-typed query. *)\n  end.\n  \n(*\n(* This is now done with a relation *)\n\nModule QueryIndexed <: INDEXED_TYPE.\n\nDefinition t := state_query.\n\nDefinition index (q: state_query) : positive :=\n  match q with\n  | Qsha_1 v => xO (xO (xO (xO (xO (int_index v)))))\n  | Qsha_2 v1 v2 => xO (xO (xO (xO (xI (inject_positive (int_index v1) (int_index v2))))))\n  | Qaddress => xO (xO (xO (xI (xO xH))))\n  | Qbalance v => xO (xO (xO (xI (xI (int_index v)))))\n  | Qorigin => xO (xO (xI (xO (xO xH))))\n  | Qcaller => xO (xO (xI (xO (xI xH))))\n  | Qcallvalue => xO (xO (xI (xI (xO xH))))\n  | Qcalldataload v => xO (xO (xI (xI (xI (int_index v)))))\n  | Qcalldatasize => xO (xI (xO (xO (xO xH))))\n  | Qcodesize => xO (xI (xO (xO (xI xH))))\n  | Qgasprice => xO (xI (xO (xI (xO xH))))\n  | Qextcodesize v => xO (xI (xO (xI (xI (int_index v)))))\n  | Qblockhash v => xO (xI (xI (xO (xO (int_index v)))))\n  | Qcoinbase => xO (xI (xI (xO (xI xH))))\n  | Qtimestamp => xO (xI (xI (xI (xO xH))))\n  | Qnumber => xO (xI (xI (xI (xI xH))))\n  | Qdifficulty => xI (xO (xO (xO (xO xH))))\n  | Qgaslimit => xI (xO (xO (xO (xI xH))))\n  | Qgas => xI (xO (xO (xO (xI (xO xH)))))\n  end.\n\nLemma index_inj: forall q r, index q = index r -> q = r.\nProof.\ndestruct q; destruct r; simpl; try discriminate; try reflexivity;\n  intro H; injection H; clear H; intro H.\n-\n  replace i0 with i; try reflexivity; apply int_index_injective; exact H.\n-\n  replace i1 with i. replace i2 with i0.\n  reflexivity.\n  apply int_index_injective.\n  apply injective_positive_2 with (int_index i) (int_index i1).\n  exact H.\n  apply int_index_injective.\n  apply injective_positive_1 with (int_index i0) (int_index i2).\n  exact H.\n-\n  replace i0 with i; try reflexivity; apply int_index_injective; exact H.\n-\n  replace i0 with i; try reflexivity; apply int_index_injective; exact H.\n-\n  replace i0 with i; try reflexivity; apply int_index_injective; exact H.\n-\n  replace i0 with i; try reflexivity; apply int_index_injective; exact H.\nQed.\n\nLemma eq: forall (x y: state_query), {x = y} + {x <> y}.\nProof.\nintros. decide equality; apply Int256.eq_dec.\nQed.\n\nEnd QueryIndexed.\n\nModule StateMap := IMap(QueryIndexed).\n\nDefinition state_env := StateMap.t int256.\n\n*)\n\nEnd WITH_DATA.\n\nArguments  me_address {adata}.\nArguments  me_origin {adata}.\nArguments  me_caller {adata}.\nArguments  me_callvalue {adata}.\nArguments  me_coinbase {adata}.\nArguments  me_timestamp {adata}.\nArguments  me_number {adata}.\nArguments  me_chainid {adata}.\nArguments  me_selfbalance {adata}.\nArguments  me_balance {adata}.\nArguments  me_blockhash {adata}.\nArguments  me_transfer {adata}.\nArguments  me_callmethod {adata}.\nArguments  me_query {adata}.\nArguments me_log {adata}.\n"
  },
  {
    "path": "src/backend/MachineModelLow.v",
    "content": "(* \nThe MachineModelLow is exactly the same as the MachineModel,\nexcept the me_transfer, me_callmethods, and me_log now expects\na low value instead of a high value.\n\n*)\n\nRequire Import cclib.Coqlib.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.IndexLib.\nRequire Import backend.Values.LowValues.\nRequire Import backend.Environments.StackEnv.\nRequire Import backend.Environments.HashEnv.\nRequire Import backend.AbstractData.\nRequire Import backend.MachineModel.\n\n\nInductive state_query : Type :=\n| Qcall0: builtin0 -> state_query\n| Qcall1: builtin1 -> val -> state_query.\n\n\nSection WITH_DATA.\nContext adata {data_ops: CompatDataOps adata}.\n\nRecord machine_env  : Type := mkmachine {\n  me_address : int256;  (* Todo: make it int160. *)\n  me_origin : int256;   (* Todo: make it int160. *)                     \n  me_caller : int256;\n  me_callvalue : int256;\n  me_coinbase : int256;\n  me_timestamp : int256;\n  me_number : int256;\n  me_chainid : int256;\n  me_selfbalance : int256;\n  me_balance : int256 -> int256;   (* Todo: make it int160. *)\n  me_blockhash : int256 -> int256;\n\n  me_transfer : forall (addr value: val)(d: adata), (int256 * adata);\n  (* addr, sig, value, args, prev_data, prev_storage, new_data, new_storage, success, retvals *)\n  me_callmethod : val -> int -> val -> list val -> adata -> stack_env -> hash_env -> adata -> stack_env -> hash_env -> int256 -> list val -> Prop;\n  me_log : forall (topics : list val) (args : list val), adata -> adata\n}.\n\nDefinition me_query (me : machine_env) (q: state_query) : val :=\n  match q with\n  | Qcall0 Baddress => Vint (me_address me)\n  | Qcall0 Borigin => Vint (me_origin me)\n  | Qcall0 Bcaller => Vint (me_caller me)\n  | Qcall0 Bcallvalue => Vint (me_callvalue me)\n  | Qcall0 Bcoinbase => Vint (me_coinbase me)\n  | Qcall0 Btimestamp => Vint (me_timestamp me)\n  | Qcall0 Bnumber => Vint (me_number me)\n  | Qcall0 Bchainid => Vint (me_chainid me)\n  | Qcall0 Bselfbalance => Vint (me_selfbalance me)\n  | Qcall1 Bbalance (Vint addr) => Vint (me_balance me addr)\n  | Qcall1 Bbalance _ => Vunit (* ill-typed query. *)\n  | Qcall1 Bblockhash (Vint n) => Vint (me_blockhash me n)\n  | Qcall1 Bblockhash _ => Vunit (* ill-typed query. *)\n  end.\n\nEnd WITH_DATA.\n\nArguments  me_address {adata}.\nArguments  me_origin {adata}.\nArguments  me_caller {adata}.\nArguments  me_callvalue {adata}.\nArguments  me_coinbase {adata}.\nArguments  me_timestamp {adata}.\nArguments  me_number {adata}.\nArguments  me_chainid {adata}.\nArguments  me_selfbalance {adata}.\nArguments  me_balance {adata}.\nArguments  me_blockhash {adata}.\nArguments  me_transfer {adata}.\nArguments  me_callmethod {adata}.\nArguments  me_query {adata}.\nArguments me_log {adata}.\n"
  },
  {
    "path": "src/backend/MemoryModel.v",
    "content": "\nRequire Import cclib.Coqlib.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.AST.\nRequire Import backend.IndexLib.\n\n(* For the ethereum backend we do not use memory injections, but we\nstill define a dummy datatype in order to make the middle-end more\nportable between C and Ethereum. *)\nDefinition meminj : Set := unit.\n\n(* The type of offsets into structs etc. It will be int in the C backend and int256 in the Ethereum backend. *)\nDefinition offset_t := int256.\n\n(* after hashing, the rest of memory is for retvals and args *)\nDefinition public_retval_base : Z := 96%Z.\n(* according to ABI, this is how big each arg/retval is *)\nDefinition abi_word_size : Z := 32%Z.\n\n(* move funsig over to left-align the 4 bytes to 256 bytes *)\nDefinition funsig_aligned (funsig: int) : int256 :=\n  let funsig := Int.unsigned funsig in\n  Int256.repr (Z.shiftl funsig 224).\n\n(* locations in memory for CALL args *)\nDefinition public_funsig_pos (retval_count: nat) : Z :=\n  public_retval_base + (abi_word_size * (Z.of_nat retval_count)).\nDefinition public_arg_pos (index: nat) (retval_count: nat) : Z :=\n  (public_funsig_pos retval_count) + ((Z.of_nat index) * abi_word_size) + 4%Z.\nDefinition public_arg_size (arg_count: nat) : Z :=\n  ((Z.of_nat arg_count) * abi_word_size) + 4%Z.\nDefinition retval_pos (index: nat) : Z :=\n  public_retval_base + (abi_word_size * (Z.of_nat index)).\n\n(* arguments to CALL *)\nDefinition argpos (retval_count: nat) : Z := public_funsig_pos retval_count.\nDefinition arglen (arg_count: nat) : Z := public_arg_size arg_count.\nDefinition retpos : Z := public_retval_base.\nDefinition retlen (retval_count: nat) : Z := abi_word_size * (Z.of_nat retval_count).\n\n(* according to the ABI specification,\nCalldata locations *)\nDefinition call_data_arg_location (argi: nat) : int256 :=\n  Int256.repr (((Z.of_nat argi) * 32%Z) + 4%Z).\n\n(* add two consts for codecopy *)\nDefinition bytes_to_fetch : int256 := Int256.repr 32%Z.\n\nDefinition MemoryLocation : int256 := Int256.repr 128%Z.  "
  },
  {
    "path": "src/backend/Options.v",
    "content": "(* \nMany things can fail during a program run, so a lot of helper functions used to define the semantics of the various intermediate languages return options.\n\nAlso, many things can fail in compilation, due to failed assumptions, so most of the compilation functions return optErr (i.e. an option or an error message).\n\nBoth of these are monad, and this file defines suitable monad instances and tactics that work the same way on both.\n*)\n\nRequire Export DeepSpec.lib.Monad.Monad.\nRequire Export DeepSpec.lib.Monad.OptionMonad.\nRequire  DeepSpec.lib.Monad.OptionMonadLaws.\nRequire Export DeepSpec.lib.Monad.OptErrMonad.\nRequire  DeepSpec.lib.Monad.OptErrMonadLaws.\nRequire Export DeepSpec.lib.Monad.MonadInv.\n\nRequire Coq.Strings.String.\nExport String.StringSyntax.\n\n(* H is where to bind. a is new var and H1 is new hypothesis for value of a *)\nLtac BindSome H a H1 :=\n  match type of H with\n  | @eq ?T _ _ =>\n    match (eval compute in T) with\n    | option _ => apply (@bind_some _ _ OptionMonadLaws.MonadLaws_option MonadInvBind_option) in H; destruct H as (a & H1 & H)\n    | optErr _ => apply (@bind_some _ _ OptErrMonadLaws.MonadLaws_optErr MonadInvBind_optErr) in H; destruct H as (a & H1 & H)\n    end\nend.\n  \n(* call on a hypothesis of the form Some expr = Some id *)\nLtac SomeSome H id := injection H; clear H; intro; subst id.\n\nDefinition fromOption {A:Type} (ov : option A) (msg : String.string) :=\n  match ov with\n  | Some v => Success v\n  | None => Error msg\n  end.\n\nLemma fromOption_Success : forall A (ov : option A) msg v,\n    fromOption ov msg = Success v ->\n    ov = Some v.\nProof.\n  intros.\n  destruct ov; simpl in *; congruence.\nQed.  \n\nExport MonadNotation.\n\nDefinition optional_filter (A: Type) (a: option A) : list A :=\n  match a with None => nil | Some a' => a' :: nil end.\n  \n\n"
  },
  {
    "path": "src/backend/Smallstep.v",
    "content": "(* This is almost unchanged from CompCert, except it no longer uses events. \n\n  Almost every definition is used, and the proofs have been adapted.\n*)\n\n\n(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** Tools for small-step operational semantics *)\n\n(** This module defines generic operations and theorems over\n  the one-step transition relations that are used to specify\n  operational semantics in small-step style. *)\n\nRequire Import cclib.Coqlib.\nRequire Import cclib.Integers.\n\nSet Implicit Arguments.\n\n(** * Closures of transitions relations *)\n\nSection CLOSURES.\n\nVariable genv: Type.\nVariable state: Type.\n\n(** A one-step transition relation has the following signature.\n  It is parameterized by a global environment, which does not\n  change during the transition.  It relates the initial state\n  of the transition with its final state.  The [trace] parameter\n  captures the observable events possibly generated during the\n  transition. *)\n\nVariable step: genv -> state -> state -> Prop.\n\n(** No transitions: stuck state *)\n\nDefinition nostep (ge: genv) (s: state) : Prop :=\n  forall s', ~(step ge s s').\n\n(** Zero, one or several transitions.  Also known as Kleene closure,\n    or reflexive transitive closure. *)\n\nInductive star (ge: genv): state -> state -> Prop :=\n  | star_refl: forall s,\n      star ge s s\n  | star_step: forall s1 s2 s3,\n      step ge s1 s2 -> star ge s2 s3 ->\n      star ge s1 s3.\n\nLemma star_one:\n  forall ge s1 s2, step ge s1 s2 -> star ge s1 s2.\nProof.\n  intros. eapply star_step; eauto. apply star_refl.\nQed.\n\nLemma star_two:\n  forall ge s1 s2 s3,\n  step ge s1 s2 -> step ge s2 s3 ->\n  star ge s1 s3.\nProof.\n  intros. eapply star_step; eauto. apply star_one; auto.\nQed.\n\nLemma star_three:\n  forall ge s1 s2 s3 s4,\n  step ge s1 s2 -> step ge s2 s3 -> step ge s3 s4 ->\n  star ge s1 s4.\nProof.\n  intros. eapply star_step; eauto. eapply star_two; eauto.\nQed.\n\nLemma star_four:\n  forall ge s1 s2 s3 s4 s5,\n  step ge s1 s2 -> step ge s2 s3 ->\n  step ge s3 s4 -> step ge s4 s5 ->\n  star ge s1 s5.\nProof.\n  intros. eapply star_step; eauto. eapply star_three; eauto.\nQed.\n\nLemma star_trans:\n  forall ge s1 s2, star ge s1 s2 ->\n  forall s3, star ge s2 s3 -> star ge s1 s3.\nProof.\n  induction 1; intros.\n  auto. eapply star_step; eauto.\nQed.\n\nLemma star_left:\n  forall ge s1 s2 s3,\n  step ge s1 s2 -> star ge s2 s3 ->\n  star ge s1 s3.\nProof star_step.\n\nLemma star_right:\n  forall ge s1 s2 s3,\n  star ge s1 s2 -> step ge s2 s3 ->\n  star ge s1 s3.\nProof.\n  intros. eapply star_trans. eauto. apply star_one. eauto.\nQed.\n\n(*\nLemma star_E0_ind:\n  forall ge (P: state -> state -> Prop),\n  (forall s, P s s) ->\n  (forall s1 s2 s3, step ge s1 E0 s2 -> P s2 s3 -> P s1 s3) ->\n  forall s1 s2, star ge s1 E0 s2 -> P s1 s2.\nProof.\n  intros ge P BASE REC.\n  assert (forall s1 t s2, star ge s1 t s2 -> t = E0 -> P s1 s2).\n    induction 1; intros; subst.\n    auto.\n    destruct (Eapp_E0_inv _ _ H2). subst. eauto.\n  eauto.\nQed.\n*)\n(** One or several transitions.  Also known as the transitive closure. *)\n\nInductive plus (ge: genv): state -> state -> Prop :=\n  | plus_left: forall s1 s2 s3,\n      step ge s1 s2 -> star ge s2 s3 ->\n      plus ge s1 s3.\n\nLemma plus_one:\n  forall ge s1 s2,\n  step ge s1 s2 -> plus ge s1 s2.\nProof.\n  intros. econstructor; eauto. apply star_refl.\nQed.\n\nLemma plus_two:\n  forall ge s1 s2 s3,\n  step ge s1 s2 -> step ge s2 s3 ->\n  plus ge s1 s3.\nProof.\n  intros. eapply plus_left; eauto. apply star_one; auto.\nQed.\n\nLemma plus_three:\n  forall ge s1 s2 s3 s4,\n  step ge s1 s2 -> step ge s2 s3 -> step ge s3 s4 ->\n  plus ge s1 s4.\nProof.\n  intros. eapply plus_left; eauto. eapply star_two; eauto.\nQed.\n\nLemma plus_four:\n  forall ge s1 s2 s3 s4 s5,\n  step ge s1 s2 -> step ge s2 s3 ->\n  step ge s3 s4 -> step ge s4 s5 ->\n  plus ge s1 s5.\nProof.\n  intros. eapply plus_left; eauto. eapply star_three; eauto.\nQed.\n\nLemma plus_star:\n  forall ge s1 s2, plus ge s1 s2 -> star ge s1 s2.\nProof.\n  intros. inversion H; subst.\n  eapply star_step; eauto.\nQed.\n\nLemma plus_right:\n  forall ge s1 s2 s3,\n  star ge s1 s2 -> step ge s2 s3 ->\n  plus ge s1 s3.\nProof.\n  intros. inversion H; subst. simpl. apply plus_one. auto.\n  eapply plus_left; eauto.\n  eapply star_right; eauto.\nQed.\n\nLemma plus_left':\n  forall ge s1 s2 s3,\n  step ge s1 s2 -> plus ge s2 s3 ->\n  plus ge s1 s3.\nProof.\n  intros. eapply plus_left; eauto. apply plus_star; auto.\nQed.\n\nLemma plus_right':\n  forall ge s1 s2 s3,\n  plus ge s1 s2 -> step ge s2 s3 ->\n  plus ge s1 s3.\nProof.\n  intros. eapply plus_right; eauto. apply plus_star; auto.\nQed.\n\nLemma plus_star_trans:\n  forall ge s1 s2 s3,\n  plus ge s1 s2 -> star ge s2 s3 -> plus ge s1 s3.\nProof.\n  intros. inversion H; subst.\n  econstructor; eauto. eapply star_trans; eauto.\nQed.\n\nLemma star_plus_trans:\n  forall ge s1 s2 s3,\n  star ge s1 s2 -> plus ge s2 s3 -> plus ge s1 s3.\nProof.\n  intros. inversion H; subst.\n  simpl; auto.\n  econstructor. eauto. eapply star_trans. eauto.\n  apply plus_star. eauto.\nQed.\n\nLemma plus_trans:\n  forall ge s1 s2 s3,\n  plus ge s1 s2 -> plus ge s2 s3 -> plus ge s1 s3.\nProof.\n  intros. eapply plus_star_trans. eauto. apply plus_star. eauto.\nQed.\n(*\nLemma plus_inv:\n  forall ge s1 t s2,\n  plus ge s1 t s2 ->\n  step ge s1 t s2 \\/ exists s', exists t1, exists t2, step ge s1 t1 s' /\\ plus ge s' t2 s2 /\\ t = t1 ** t2.\nProof.\n  intros. inversion H; subst. inversion H1; subst.\n  left. rewrite E0_right. auto.\n  right. exists s3; exists t1; exists (t0 ** t3); split. auto.\n  split. econstructor; eauto. auto.\nQed.\n\nLemma star_inv:\n  forall ge s1 t s2,\n  star ge s1 t s2 ->\n  (s2 = s1 /\\ t = E0) \\/ plus ge s1 t s2.\nProof.\n  intros. inv H. left; auto. right; econstructor; eauto.\nQed.\n\nLemma plus_ind2:\n  forall ge (P: state -> trace -> state -> Prop),\n  (forall s1 t s2, step ge s1 t s2 -> P s1 t s2) ->\n  (forall s1 t1 s2 t2 s3 t,\n   step ge s1 t1 s2 -> plus ge s2 t2 s3 -> P s2 t2 s3 -> t = t1 ** t2 ->\n   P s1 t s3) ->\n  forall s1 t s2, plus ge s1 t s2 -> P s1 t s2.\nProof.\n  intros ge P BASE IND.\n  assert (forall s1 t s2, star ge s1 t s2 ->\n         forall s0 t0, step ge s0 t0 s1 ->\n         P s0 (t0 ** t) s2).\n  induction 1; intros.\n  rewrite E0_right. apply BASE; auto.\n  eapply IND. eauto. econstructor; eauto. subst t. eapply IHstar; eauto. auto.\n\n  intros. inv H0. eauto.\nQed.\n\nLemma plus_E0_ind:\n  forall ge (P: state -> state -> Prop),\n  (forall s1 s2 s3, step ge s1 E0 s2 -> star ge s2 E0 s3 -> P s1 s3) ->\n  forall s1 s2, plus ge s1 E0 s2 -> P s1 s2.\nProof.\n  intros. inv H0. exploit Eapp_E0_inv; eauto. intros [A B]; subst. eauto.\nQed.\n\n(** Counted sequences of transitions *)\n\nInductive starN (ge: genv): nat -> state -> trace -> state -> Prop :=\n  | starN_refl: forall s,\n      starN ge O s E0 s\n  | starN_step: forall n s t t1 s' t2 s'',\n      step ge s t1 s' -> starN ge n s' t2 s'' -> t = t1 ** t2 ->\n      starN ge (S n) s t s''.\n\nRemark starN_star:\n  forall ge n s t s', starN ge n s t s' -> star ge s t s'.\nProof.\n  induction 1; econstructor; eauto.\nQed.\n\nRemark star_starN:\n  forall ge s t s', star ge s t s' -> exists n, starN ge n s t s'.\nProof.\n  induction 1.\n  exists O; constructor.\n  destruct IHstar as [n P]. exists (S n); econstructor; eauto.\nQed.\n\n(** Infinitely many transitions *)\n\nCoInductive forever (ge: genv): state -> traceinf -> Prop :=\n  | forever_intro: forall s1 t s2 T,\n      step ge s1 t s2 -> forever ge s2 T ->\n      forever ge s1 (t *** T).\n\nLemma star_forever:\n  forall ge s1 t s2, star ge s1 t s2 ->\n  forall T, forever ge s2 T ->\n  forever ge s1 (t *** T).\nProof.\n  induction 1; intros. simpl. auto.\n  subst t. rewrite Eappinf_assoc.\n  econstructor; eauto.\nQed.\n\n(** An alternate, equivalent definition of [forever] that is useful\n    for coinductive reasoning. *)\n\nVariable A: Type.\nVariable order: A -> A -> Prop.\n\nCoInductive forever_N (ge: genv) : A -> state -> traceinf -> Prop :=\n  | forever_N_star: forall s1 t s2 a1 a2 T1 T2,\n      star ge s1 t s2 ->\n      order a2 a1 ->\n      forever_N ge a2 s2 T2 ->\n      T1 = t *** T2 ->\n      forever_N ge a1 s1 T1\n  | forever_N_plus: forall s1 t s2 a1 a2 T1 T2,\n      plus ge s1 t s2 ->\n      forever_N ge a2 s2 T2 ->\n      T1 = t *** T2 ->\n      forever_N ge a1 s1 T1.\n\nHypothesis order_wf: well_founded order.\n\nLemma forever_N_inv:\n  forall ge a s T,\n  forever_N ge a s T ->\n  exists t, exists s', exists a', exists T',\n  step ge s t s' /\\ forever_N ge a' s' T' /\\ T = t *** T'.\nProof.\n  intros ge a0. pattern a0. apply (well_founded_ind order_wf).\n  intros. inv H0.\n  (* star case *)\n  inv H1.\n  (* no transition *)\n  change (E0 *** T2) with T2. apply H with a2. auto. auto.\n  (* at least one transition *)\n  exists t1; exists s0; exists x; exists (t2 *** T2).\n  split. auto. split. eapply forever_N_star; eauto.\n  apply Eappinf_assoc.\n  (* plus case *)\n  inv H1.\n  exists t1; exists s0; exists a2; exists (t2 *** T2).\n  split. auto.\n  split. inv H3. auto.\n  eapply forever_N_plus. econstructor; eauto. eauto. auto.\n  apply Eappinf_assoc.\nQed.\n\nLemma forever_N_forever:\n  forall ge a s T, forever_N ge a s T -> forever ge s T.\nProof.\n  cofix COINDHYP; intros.\n  destruct (forever_N_inv H) as [t [s' [a' [T' [P [Q R]]]]]].\n  rewrite R. apply forever_intro with s'. auto.\n  apply COINDHYP with a'; auto.\nQed.\n\n(** Yet another alternative definition of [forever]. *)\n\nCoInductive forever_plus (ge: genv) : state -> traceinf -> Prop :=\n  | forever_plus_intro: forall s1 t s2 T1 T2,\n      plus ge s1 t s2 ->\n      forever_plus ge s2 T2 ->\n      T1 = t *** T2 ->\n      forever_plus ge s1 T1.\n\nLemma forever_plus_inv:\n  forall ge s T,\n  forever_plus ge s T ->\n  exists s', exists t, exists T',\n  step ge s t s' /\\ forever_plus ge s' T' /\\ T = t *** T'.\nProof.\n  intros. inv H. inv H0. exists s0; exists t1; exists (t2 *** T2).\n  split. auto.\n  split. exploit star_inv; eauto. intros [[P Q] | R].\n    subst. simpl. auto. econstructor; eauto.\n  traceEq.\nQed.\n\nLemma forever_plus_forever:\n  forall ge s T, forever_plus ge s T -> forever ge s T.\nProof.\n  cofix COINDHYP; intros.\n  destruct (forever_plus_inv H) as [s' [t [T' [P [Q R]]]]].\n  subst. econstructor; eauto.\nQed.\n\n(** Infinitely many silent transitions *)\n\nCoInductive forever_silent (ge: genv): state -> Prop :=\n  | forever_silent_intro: forall s1 s2,\n      step ge s1 E0 s2 -> forever_silent ge s2 ->\n      forever_silent ge s1.\n\n(** An alternate definition. *)\n\nCoInductive forever_silent_N (ge: genv) : A -> state -> Prop :=\n  | forever_silent_N_star: forall s1 s2 a1 a2,\n      star ge s1 E0 s2 ->\n      order a2 a1 ->\n      forever_silent_N ge a2 s2 ->\n      forever_silent_N ge a1 s1\n  | forever_silent_N_plus: forall s1 s2 a1 a2,\n      plus ge s1 E0 s2 ->\n      forever_silent_N ge a2 s2 ->\n      forever_silent_N ge a1 s1.\n\nLemma forever_silent_N_inv:\n  forall ge a s,\n  forever_silent_N ge a s ->\n  exists s', exists a',\n  step ge s E0 s' /\\ forever_silent_N ge a' s'.\nProof.\n  intros ge a0. pattern a0. apply (well_founded_ind order_wf).\n  intros. inv H0.\n  (* star case *)\n  inv H1.\n  (* no transition *)\n  apply H with a2. auto. auto.\n  (* at least one transition *)\n  exploit Eapp_E0_inv; eauto. intros [P Q]. subst.\n  exists s0; exists x.\n  split. auto. eapply forever_silent_N_star; eauto.\n  (* plus case *)\n  inv H1. exploit Eapp_E0_inv; eauto. intros [P Q]. subst.\n  exists s0; exists a2.\n  split. auto. inv H3. auto.\n  eapply forever_silent_N_plus. econstructor; eauto. eauto.\nQed.\n\nLemma forever_silent_N_forever:\n  forall ge a s, forever_silent_N ge a s -> forever_silent ge s.\nProof.\n  cofix COINDHYP; intros.\n  destruct (forever_silent_N_inv H) as [s' [a' [P Q]]].\n  apply forever_silent_intro with s'. auto.\n  apply COINDHYP with a'; auto.\nQed.\n\n(** Infinitely many non-silent transitions *)\n\nCoInductive forever_reactive (ge: genv): state -> traceinf -> Prop :=\n  | forever_reactive_intro: forall s1 s2 t T,\n      star ge s1 t s2 -> t <> E0 -> forever_reactive ge s2 T ->\n      forever_reactive ge s1 (t *** T).\n\nLemma star_forever_reactive:\n  forall ge s1 t s2 T,\n  star ge s1 t s2 -> forever_reactive ge s2 T ->\n  forever_reactive ge s1 (t *** T).\nProof.\n  intros. inv H0. rewrite <- Eappinf_assoc. econstructor.\n  eapply star_trans; eauto.\n  red; intro. exploit Eapp_E0_inv; eauto. intros [P Q]. contradiction.\n  auto.\nQed.\n\n*)\n\nEnd CLOSURES.\n\n(*\n\n(** * Transition semantics *)\n\n(** The general form of a transition semantics. *)\n\n(** [CompCertX:test-compcert-param-final] We parameterize the semantics\nover the type of final return value. For whole programs, this shall be\n[int]. *)\n\nRecord semantics (RETVAL: Type) : Type := Semantics_gen {\n  state: Type;\n  genvtype: Type;\n  step : genvtype -> state -> trace -> state -> Prop;\n  initial_state: state -> Prop;\n  final_state: state -> RETVAL -> Prop;\n  globalenv: genvtype;\n  symbolenv: Senv.t\n}.\n\n(** The form used in earlier CompCert versions, for backward compatibility. *)\n\nDefinition Semantics {state funtype vartype: Type}\n                     {RETVAL: Type}\n                     (step: Genv.t funtype vartype -> state -> trace -> state -> Prop)\n                     (initial_state: state -> Prop)\n                     (final_state: state -> RETVAL -> Prop)\n                     (globalenv: Genv.t funtype vartype) :=\n  {| state := state;\n     genvtype := Genv.t funtype vartype;\n     step := step;\n     initial_state := initial_state;\n     final_state := final_state;\n     globalenv := globalenv;\n     symbolenv := Genv.to_senv globalenv |}.\n\n(** Handy notations. *)\n\nNotation \" 'Step' L \" := (step L (globalenv L)) (at level 1) : smallstep_scope.\nNotation \" 'Star' L \" := (star (step L) (globalenv L)) (at level 1) : smallstep_scope.\nNotation \" 'Plus' L \" := (plus (step L) (globalenv L)) (at level 1) : smallstep_scope.\nNotation \" 'Forever_silent' L \" := (forever_silent (step L) (globalenv L)) (at level 1) : smallstep_scope.\nNotation \" 'Forever_reactive' L \" := (forever_reactive (step L) (globalenv L)) (at level 1) : smallstep_scope.\nNotation \" 'Nostep' L \" := (nostep (step L) (globalenv L)) (at level 1) : smallstep_scope.\n\nOpen Scope smallstep_scope.\n\n(** * Forward simulations between two transition semantics. *)\n\n(** The general form of a forward simulation. *)\n\nRecord fsim_properties {RETVAL: Type} (L1 L2: semantics RETVAL) (index: Type)\n                       (order: index -> index -> Prop)\n                       (match_states: index -> state L1 -> state L2 -> Prop) : Prop := {\n    fsim_order_wf: well_founded order;\n    fsim_match_initial_states:\n      forall s1, initial_state L1 s1 ->\n      exists i, exists s2, initial_state L2 s2 /\\ match_states i s1 s2;\n    fsim_match_final_states:\n      forall i s1 s2 r,\n      match_states i s1 s2 -> final_state L1 s1 r -> final_state L2 s2 r;\n    fsim_simulation:\n      forall s1 t s1', Step L1 s1 t s1' ->\n      forall i s2, match_states i s1 s2 ->\n      exists i', exists s2',\n         (Plus L2 s2 t s2' \\/ (Star L2 s2 t s2' /\\ order i' i))\n      /\\ match_states i' s1' s2';\n    fsim_public_preserved:\n      forall id, Senv.public_symbol (symbolenv L2) id = Senv.public_symbol (symbolenv L1) id\n  }.\n\nArguments fsim_properties {_} _ _ _ _ _.\n\nInductive forward_simulation {RETVAL: Type} (L1 L2: semantics RETVAL) : Prop :=\n  Forward_simulation (index: Type)\n                     (order: index -> index -> Prop)\n                     (match_states: index -> state L1 -> state L2 -> Prop)\n                     (props: fsim_properties L1 L2 index order match_states).\n\nArguments Forward_simulation {RETVAL L1 L2 index} order match_states props.\n\n(** An alternate form of the simulation diagram *)\n\nLemma fsim_simulation':\n  forall RETVAL: Type,\n  forall L1 L2: _ RETVAL,\n  forall index order match_states, fsim_properties L1 L2 index order match_states ->\n  forall i s1 t s1', Step L1 s1 t s1' ->\n  forall s2, match_states i s1 s2 ->\n  (exists i', exists s2', Plus L2 s2 t s2' /\\ match_states i' s1' s2')\n  \\/ (exists i', order i' i /\\ t = E0 /\\ match_states i' s1' s2).\nProof.\n  intros. exploit @fsim_simulation; eauto.\n  intros [i' [s2' [A B]]]. intuition.\n  left; exists i'; exists s2'; auto.\n  inv H3.\n  right; exists i'; auto.\n  left; exists i'; exists s2'; split; auto. econstructor; eauto.\nQed.\n\n(** ** Forward simulation diagrams. *)\n\n(** Various simulation diagrams that imply forward simulation *)\n\nSection FORWARD_SIMU_DIAGRAMS.\n\nContext {RETVAL: Type}.\nVariable L1: semantics RETVAL.\nVariable L2: semantics RETVAL.\n\nHypothesis public_preserved:\n  forall id, Senv.public_symbol (symbolenv L2) id = Senv.public_symbol (symbolenv L1) id.\n\nVariable match_states: state L1 -> state L2 -> Prop.\n\nHypothesis match_initial_states:\n  forall s1, initial_state L1 s1 ->\n  exists s2, initial_state L2 s2 /\\ match_states s1 s2.\n\nHypothesis match_final_states:\n  forall s1 s2 r,\n  match_states s1 s2 ->\n  final_state L1 s1 r ->\n  final_state L2 s2 r.\n\n(** Simulation when one transition in the first program\n    corresponds to zero, one or several transitions in the second program.\n    However, there is no stuttering: infinitely many transitions\n    in the source program must correspond to infinitely many\n    transitions in the second program. *)\n\nSection SIMULATION_STAR_WF.\n\n(** [order] is a well-founded ordering associated with states\n  of the first semantics.  Stuttering steps must correspond\n  to states that decrease w.r.t. [order]. *)\n\nVariable order: state L1 -> state L1 -> Prop.\nHypothesis order_wf: well_founded order.\n\nHypothesis simulation:\n  forall s1 t s1', Step L1 s1 t s1' ->\n  forall s2, match_states s1 s2 ->\n  exists s2',\n  (Plus L2 s2 t s2' \\/ (Star L2 s2 t s2' /\\ order s1' s1))\n  /\\ match_states s1' s2'.\n\nLemma forward_simulation_star_wf: forward_simulation L1 L2.\nProof.\n  apply Forward_simulation with order (fun idx s1 s2 => idx = s1 /\\ match_states s1 s2);\n  constructor.\n- auto.\n- intros. exploit match_initial_states; eauto. intros [s2 [A B]].\n    exists s1; exists s2; auto.\n- intros. destruct H. eapply match_final_states; eauto.\n- intros. destruct H0. subst i. exploit simulation; eauto. intros [s2' [A B]].\n  exists s1'; exists s2'; intuition auto.\n- auto.\nQed.\n\nEnd SIMULATION_STAR_WF.\n\nSection SIMULATION_STAR.\n\n(** We now consider the case where we have a nonnegative integer measure\n  associated with states of the first semantics.  It must decrease when we take\n  a stuttering step. *)\n\nVariable measure: state L1 -> nat.\n\nHypothesis simulation:\n  forall s1 t s1', Step L1 s1 t s1' ->\n  forall s2, match_states s1 s2 ->\n  (exists s2', Plus L2 s2 t s2' /\\ match_states s1' s2')\n  \\/ (measure s1' < measure s1 /\\ t = E0 /\\ match_states s1' s2)%nat.\n\nLemma forward_simulation_star: forward_simulation L1 L2.\nProof.\n  apply forward_simulation_star_wf with (ltof _ measure).\n  apply well_founded_ltof.\n  intros. exploit simulation; eauto. intros [[s2' [A B]] | [A [B C]]].\n  exists s2'; auto.\n  exists s2; split. right; split. rewrite B. apply star_refl. auto. auto.\nQed.\n\nEnd SIMULATION_STAR.\n\n(** Simulation when one transition in the first program corresponds\n    to one or several transitions in the second program. *)\n\nSection SIMULATION_PLUS.\n\nHypothesis simulation:\n  forall s1 t s1', Step L1 s1 t s1' ->\n  forall s2, match_states s1 s2 ->\n  exists s2', Plus L2 s2 t s2' /\\ match_states s1' s2'.\n\nLemma forward_simulation_plus: forward_simulation L1 L2.\nProof.\n  apply forward_simulation_star with (measure := fun _ => O).\n  intros. exploit simulation; eauto.\nQed.\n\nEnd SIMULATION_PLUS.\n\n(** Lock-step simulation: each transition in the first semantics\n    corresponds to exactly one transition in the second semantics. *)\n\nSection SIMULATION_STEP.\n\nHypothesis simulation:\n  forall s1 t s1', Step L1 s1 t s1' ->\n  forall s2, match_states s1 s2 ->\n  exists s2', Step L2 s2 t s2' /\\ match_states s1' s2'.\n\nLemma forward_simulation_step: forward_simulation L1 L2.\nProof.\n  apply forward_simulation_plus.\n  intros. exploit simulation; eauto. intros [s2' [A B]].\n  exists s2'; split; auto. apply plus_one; auto.\nQed.\n\nEnd SIMULATION_STEP.\n\n(** Simulation when one transition in the first program\n    corresponds to zero or one transitions in the second program.\n    However, there is no stuttering: infinitely many transitions\n    in the source program must correspond to infinitely many\n    transitions in the second program. *)\n\nSection SIMULATION_OPT.\n\nVariable measure: state L1 -> nat.\n\nHypothesis simulation:\n  forall s1 t s1', Step L1 s1 t s1' ->\n  forall s2, match_states s1 s2 ->\n  (exists s2', Step L2 s2 t s2' /\\ match_states s1' s2')\n  \\/ (measure s1' < measure s1 /\\ t = E0 /\\ match_states s1' s2)%nat.\n\nLemma forward_simulation_opt: forward_simulation L1 L2.\nProof.\n  apply forward_simulation_star with measure.\n  intros. exploit simulation; eauto. intros [[s2' [A B]] | [A [B C]]].\n  left; exists s2'; split; auto. apply plus_one; auto.\n  right; auto.\nQed.\n\nEnd SIMULATION_OPT.\n\nEnd FORWARD_SIMU_DIAGRAMS.\n\n(** ** Forward simulation of transition sequences *)\n\nSection SIMULATION_SEQUENCES.\n\nContext {RETVAL: Type}.\nContext (L1 L2: semantics RETVAL).\nContext index order match_states (S: fsim_properties L1 L2 index order match_states).\n\nLemma simulation_star:\n  forall s1 t s1', Star L1 s1 t s1' ->\n  forall i s2, match_states i s1 s2 ->\n  exists i', exists s2', Star L2 s2 t s2' /\\ match_states i' s1' s2'.\nProof.\n  induction 1; intros.\n  exists i; exists s2; split; auto. apply star_refl.\n  exploit @fsim_simulation; eauto. intros [i' [s2' [A B]]].\n  exploit IHstar; eauto. intros [i'' [s2'' [C D]]].\n  exists i''; exists s2''; split; auto. eapply star_trans; eauto.\n  intuition auto. apply plus_star; auto.\nQed.\n\nLemma simulation_plus:\n  forall s1 t s1', Plus L1 s1 t s1' ->\n  forall i s2, match_states i s1 s2 ->\n  (exists i', exists s2', Plus L2 s2 t s2' /\\ match_states i' s1' s2')\n  \\/ (exists i', clos_trans _ order i' i /\\ t = E0 /\\ match_states i' s1' s2).\nProof.\n  induction 1 using plus_ind2; intros.\n(* base case *)\n  exploit fsim_simulation'; eauto. intros [A | [i' A]].\n  left; auto.\n  right; exists i'; intuition.\n(* inductive case *)\n  exploit fsim_simulation'; eauto. intros [[i' [s2' [A B]]] | [i' [A [B C]]]].\n  exploit simulation_star. apply plus_star; eauto. eauto.\n  intros [i'' [s2'' [P Q]]].\n  left; exists i''; exists s2''; split; auto. eapply plus_star_trans; eauto.\n  exploit IHplus; eauto. intros [[i'' [s2'' [P Q]]] | [i'' [P [Q R]]]].\n  subst. simpl. left; exists i''; exists s2''; auto.\n  subst. simpl. right; exists i''; intuition auto.\n  eapply t_trans; eauto. eapply t_step; eauto.\nQed.\n\nLemma simulation_forever_silent:\n  forall i s1 s2,\n  Forever_silent L1 s1 -> match_states i s1 s2 ->\n  Forever_silent L2 s2.\nProof.\n  assert (forall i s1 s2,\n          Forever_silent L1 s1 -> match_states i s1 s2 ->\n          forever_silent_N (step L2) order (globalenv L2) i s2).\n    cofix COINDHYP; intros.\n    inv H. destruct (fsim_simulation S _ _ _ H1 _ _ H0) as [i' [s2' [A B]]].\n    destruct A as [C | [C D]].\n    eapply forever_silent_N_plus; eauto.\n    eapply forever_silent_N_star; eauto.\n  intros. eapply forever_silent_N_forever; eauto. eapply fsim_order_wf; eauto.\nQed.\n\nLemma simulation_forever_reactive:\n  forall i s1 s2 T,\n  Forever_reactive L1 s1 T -> match_states i s1 s2 ->\n  Forever_reactive L2 s2 T.\nProof.\n  cofix COINDHYP; intros.\n  inv H.\n  edestruct simulation_star as [i' [st2' [A B]]]; eauto.\n  econstructor; eauto.\nQed.\n\nEnd SIMULATION_SEQUENCES.\n\n(** ** Composing two forward simulations *)\n\nLemma compose_forward_simulations:\n  forall {RETVAL: Type},\n  forall L1 L2 L3, forward_simulation (RETVAL := RETVAL) L1 L2 -> forward_simulation L2 L3 -> forward_simulation L1 L3.\nProof.\n  intro RETVAL.\n  intros L1 L2 L3 S12 S23. \n  destruct S12 as [index order match_states props].\n  destruct S23 as [index' order' match_states' props'].\n\n  set (ff_index := (index' * index)%type).\n  set (ff_order := lex_ord (clos_trans _ order') order).\n  set (ff_match_states := fun (i: ff_index) (s1: state L1) (s3: state L3) =>\n                             exists s2, match_states (snd i) s1 s2 /\\ match_states' (fst i) s2 s3).\n  apply Forward_simulation with ff_order ff_match_states; constructor.\n- (* well founded *)\n  unfold ff_order. apply wf_lex_ord. apply wf_clos_trans.\n  eapply fsim_order_wf; eauto. eapply fsim_order_wf; eauto.\n- (* initial states *)\n  intros. exploit (fsim_match_initial_states props); eauto. intros [i [s2 [A B]]].\n  exploit (fsim_match_initial_states props'); eauto. intros [i' [s3 [C D]]].\n  exists (i', i); exists s3; split; auto. exists s2; auto.\n- (* final states *)\n  intros. destruct H as [s3 [A B]].\n  eapply (fsim_match_final_states props'); eauto.\n  eapply (fsim_match_final_states props); eauto.\n- (* simulation *)\n  intros. destruct H0 as [s3 [A B]]. destruct i as [i2 i1]; simpl in *.\n  exploit (fsim_simulation' props); eauto. intros [[i1' [s3' [C D]]] | [i1' [C [D E]]]].\n+ (* L2 makes one or several steps. *)\n  exploit @simulation_plus; eauto. intros [[i2' [s2' [P Q]]] | [i2' [P [Q R]]]].\n* (* L3 makes one or several steps *)\n  exists (i2', i1'); exists s2'; split. auto. exists s3'; auto.\n* (* L3 makes no step *)\n  exists (i2', i1'); exists s2; split.\n  right; split. subst t; apply star_refl. red. left. auto.\n  exists s3'; auto.\n+ (* L2 makes no step *)\n  exists (i2, i1'); exists s2; split.\n  right; split. subst t; apply star_refl. red. right. auto.\n  exists s3; auto.\n- (* symbols *)\n  intros. transitivity (Senv.public_symbol (symbolenv L2) id); eapply fsim_public_preserved; eauto.\nQed.\n\n(** * Receptiveness and determinacy *)\n\nDefinition single_events {RETVAL: Type} (L: semantics RETVAL) : Prop :=\n  forall s t s', Step L s t s' -> (length t <= 1)%nat.\n\nRecord receptive {RETVAL: Type} (L: semantics RETVAL) : Prop :=\n  Receptive {\n    sr_receptive: forall s t1 s1 t2,\n      Step L s t1 s1 -> match_traces (symbolenv L) t1 t2 -> exists s2, Step L s t2 s2;\n    sr_traces:\n      single_events L\n  }.\n\nRecord determinate {RETVAL: Type} (L: semantics RETVAL) : Prop :=\n  Determinate {\n    sd_determ: forall s t1 s1 t2 s2,\n      Step L s t1 s1 -> Step L s t2 s2 ->\n      match_traces (symbolenv L) t1 t2 /\\ (t1 = t2 -> s1 = s2);\n    sd_traces:\n      single_events L;\n    sd_initial_determ: forall s1 s2,\n      initial_state L s1 -> initial_state L s2 -> s1 = s2;\n    sd_final_nostep: forall s r,\n      final_state L s r -> Nostep L s;\n    sd_final_determ: forall s r1 r2,\n      final_state L s r1 -> final_state L s r2 -> r1 = r2\n  }.\n\nSection DETERMINACY.\n\nContext {RETVAL: Type}.\nVariable L: semantics RETVAL.\nHypothesis DET: determinate L.\n\nLemma sd_determ_1:\n  forall s t1 s1 t2 s2,\n  Step L s t1 s1 -> Step L s t2 s2 -> match_traces (symbolenv L) t1 t2.\nProof.\n  intros. eapply sd_determ; eauto.\nQed.\n\nLemma sd_determ_2:\n  forall s t s1 s2,\n  Step L s t s1 -> Step L s t s2 -> s1 = s2.\nProof.\n  intros. eapply sd_determ; eauto.\nQed.\n\nLemma star_determinacy:\n  forall s t s', Star L s t s' ->\n  forall s'', Star L s t s'' -> Star L s' E0 s'' \\/ Star L s'' E0 s'.\nProof.\n  induction 1; intros.\n  auto.\n  inv H2.\n  right. eapply star_step; eauto.\n  exploit sd_determ_1. eexact H. eexact H3. intros MT.\n  exploit (sd_traces DET). eexact H. intros L1.\n  exploit (sd_traces DET). eexact H3. intros L2.\n  assert (t1 = t0 /\\ t2 = t3).\n    destruct t1. inv MT. auto.\n    destruct t1; simpl in L1; try omegaContradiction.\n    destruct t0. inv MT. destruct t0; simpl in L2; try omegaContradiction.\n    simpl in H5. split. congruence. congruence.\n  destruct H1; subst.\n  assert (s2 = s4) by (eapply sd_determ_2; eauto). subst s4.\n  auto.\nQed.\n\nEnd DETERMINACY.\n\n(** * Backward simulations between two transition semantics. *)\n\nDefinition safe {RETVAL: Type} (L: semantics RETVAL) (s: state L) : Prop :=\n  forall s',\n  Star L s E0 s' ->\n  (exists r, final_state L s' r)\n  \\/ (exists t, exists s'', Step L s' t s'').\n\nLemma star_safe:\n  forall {RETVAL: Type},\n  forall (L: semantics RETVAL) s s',\n  Star L s E0 s' -> safe L s -> safe L s'.\nProof.\n  intros; red; intros. apply H0. eapply star_trans; eauto.\nQed.\n\n(** The general form of a backward simulation. *)\n\nRecord bsim_properties {RETVAL: Type}\n                       (L1 L2: semantics RETVAL) (index: Type)\n                       (order: index -> index -> Prop)\n                       (match_states: index -> state L1 -> state L2 -> Prop) : Prop := {\n    bsim_order_wf: well_founded order;\n    bsim_initial_states_exist:\n      forall s1, initial_state L1 s1 -> exists s2, initial_state L2 s2;\n    bsim_match_initial_states:\n      forall s1 s2, initial_state L1 s1 -> initial_state L2 s2 ->\n      exists i, exists s1', initial_state L1 s1' /\\ match_states i s1' s2;\n    bsim_match_final_states:\n      forall i s1 s2 r,\n      match_states i s1 s2 -> safe L1 s1 -> final_state L2 s2 r ->\n      exists s1', Star L1 s1 E0 s1' /\\ final_state L1 s1' r;\n    bsim_progress:\n      forall i s1 s2,\n      match_states i s1 s2 -> safe L1 s1 ->\n      (exists r, final_state L2 s2 r) \\/\n      (exists t, exists s2', Step L2 s2 t s2');\n    bsim_simulation:\n      forall s2 t s2', Step L2 s2 t s2' ->\n      forall i s1, match_states i s1 s2 -> safe L1 s1 ->\n      exists i', exists s1',\n         (Plus L1 s1 t s1' \\/ (Star L1 s1 t s1' /\\ order i' i))\n      /\\ match_states i' s1' s2';\n    bsim_public_preserved:\n      forall id, Senv.public_symbol (symbolenv L2) id = Senv.public_symbol (symbolenv L1) id\n  }.\n\nArguments bsim_properties {_} _ _ _ _ _.\n\nInductive backward_simulation {RETVAL: Type} (L1 L2: semantics RETVAL) : Prop :=\n  Backward_simulation (index: Type)\n                      (order: index -> index -> Prop)\n                      (match_states: index -> state L1 -> state L2 -> Prop)\n                      (props: bsim_properties L1 L2 index order match_states).\n\nArguments Backward_simulation {RETVAL L1 L2 index} order match_states props.\n\n(** An alternate form of the simulation diagram *)\n\nLemma bsim_simulation':\n  forall RETVAL: Type,\n  forall (L1 L2: _ RETVAL) index order match_states, bsim_properties L1 L2 index order match_states ->\n  forall i s2 t s2', Step L2 s2 t s2' ->\n  forall s1, match_states i s1 s2 -> safe L1 s1 ->\n  (exists i', exists s1', Plus L1 s1 t s1' /\\ match_states i' s1' s2')\n  \\/ (exists i', order i' i /\\ t = E0 /\\ match_states i' s1 s2').\nProof.\n  intros. exploit @bsim_simulation; eauto.\n  intros [i' [s1' [A B]]]. intuition.\n  left; exists i'; exists s1'; auto.\n  inv H4.\n  right; exists i'; auto.\n  left; exists i'; exists s1'; split; auto. econstructor; eauto.\nQed.\n\n(** ** Backward simulation diagrams. *)\n\n(** Various simulation diagrams that imply backward simulation. *)\n\nSection BACKWARD_SIMU_DIAGRAMS.\n\nContext {RETVAL: Type}.\nVariable L1: semantics RETVAL.\nVariable L2: semantics RETVAL.\n\nHypothesis public_preserved:\n  forall id, Senv.public_symbol (symbolenv L2) id = Senv.public_symbol (symbolenv L1) id.\n\nVariable match_states: state L1 -> state L2 -> Prop.\n\nHypothesis initial_states_exist:\n  forall s1, initial_state L1 s1 -> exists s2, initial_state L2 s2.\n\nHypothesis match_initial_states:\n  forall s1 s2, initial_state L1 s1 -> initial_state L2 s2 ->\n  exists s1', initial_state L1 s1' /\\ match_states s1' s2.\n\nHypothesis match_final_states:\n  forall s1 s2 r,\n  match_states s1 s2 -> final_state L2 s2 r -> final_state L1 s1 r.\n\nHypothesis progress:\n  forall s1 s2,\n  match_states s1 s2 -> safe L1 s1 ->\n  (exists r, final_state L2 s2 r) \\/\n  (exists t, exists s2', Step L2 s2 t s2').\n\nSection BACKWARD_SIMULATION_PLUS.\n\nHypothesis simulation:\n  forall s2 t s2', Step L2 s2 t s2' ->\n  forall s1, match_states s1 s2 -> safe L1 s1 ->\n  exists s1', Plus L1 s1 t s1' /\\ match_states s1' s2'.\n\nLemma backward_simulation_plus: backward_simulation L1 L2.\nProof.\n  apply Backward_simulation with\n    (fun (x y: unit) => False)\n    (fun (i: unit) s1 s2 => match_states s1 s2);\n  constructor; auto.\n- red; intros; constructor; intros. contradiction.\n- intros. exists tt; eauto.\n- intros. exists s1; split. apply star_refl. eauto.\n- intros. exploit simulation; eauto. intros [s1' [A B]].\n  exists tt; exists s1'; auto.\nQed.\n\nEnd BACKWARD_SIMULATION_PLUS.\n\nEnd BACKWARD_SIMU_DIAGRAMS.\n\n(** ** Backward simulation of transition sequences *)\n\nSection BACKWARD_SIMULATION_SEQUENCES.\n\nContext {RETVAL: Type}.\nContext (L1 L2: _ RETVAL) index order match_states (S: bsim_properties L1 L2 index order match_states).\n\nLemma bsim_E0_star:\n  forall s2 s2', Star L2 s2 E0 s2' ->\n  forall i s1, match_states i s1 s2 -> safe L1 s1 ->\n  exists i', exists s1', Star L1 s1 E0 s1' /\\ match_states i' s1' s2'.\nProof.\n  intros s20 s20' STAR0. pattern s20, s20'. eapply star_E0_ind; eauto.\n- (* base case *)\n  intros. exists i; exists s1; split; auto. apply star_refl.\n- (* inductive case *)\n  intros. exploit @bsim_simulation; eauto. intros [i' [s1' [A B]]].\n  assert (Star L1 s0 E0 s1'). intuition. apply plus_star; auto.\n  exploit H0. eauto. eapply star_safe; eauto. intros [i'' [s1'' [C D]]].\n  exists i''; exists s1''; split; auto. eapply star_trans; eauto.\nQed.\n\nLemma bsim_safe:\n  forall i s1 s2,\n  match_states i s1 s2 -> safe L1 s1 -> safe L2 s2.\nProof.\n  intros; red; intros.\n  exploit bsim_E0_star; eauto. intros [i' [s1' [A B]]].\n  eapply bsim_progress; eauto. eapply star_safe; eauto.\nQed.\n\nLemma bsim_E0_plus:\n  forall s2 t s2', Plus L2 s2 t s2' -> t = E0 ->\n  forall i s1, match_states i s1 s2 -> safe L1 s1 ->\n     (exists i', exists s1', Plus L1 s1 E0 s1' /\\ match_states i' s1' s2')\n  \\/ (exists i', clos_trans _ order i' i /\\ match_states i' s1 s2').\nProof.\n  induction 1 using plus_ind2; intros; subst t.\n- (* base case *)\n  exploit bsim_simulation'; eauto. intros [[i' [s1' [A B]]] | [i' [A [B C]]]].\n+ left; exists i'; exists s1'; auto.\n+ right; exists i'; intuition.\n- (* inductive case *)\n  exploit Eapp_E0_inv; eauto. intros [EQ1 EQ2]; subst.\n  exploit bsim_simulation'; eauto. intros [[i' [s1' [A B]]] | [i' [A [B C]]]].\n+ exploit bsim_E0_star. apply plus_star; eauto. eauto. eapply star_safe; eauto. apply plus_star; auto.\n  intros [i'' [s1'' [P Q]]].\n  left; exists i''; exists s1''; intuition. eapply plus_star_trans; eauto.\n+ exploit IHplus; eauto. intros [P | [i'' [P Q]]].\n  left; auto.\n  right; exists i''; intuition. eapply t_trans; eauto. apply t_step; auto.\nQed.\n\nLemma star_non_E0_split:\n  forall s2 t s2', Star L2 s2 t s2' -> (length t = 1)%nat ->\n  exists s2x, exists s2y, Star L2 s2 E0 s2x /\\ Step L2 s2x t s2y /\\ Star L2 s2y E0 s2'.\nProof.\n  induction 1; intros.\n  simpl in H; discriminate.\n  subst t.\n  assert (EITHER: t1 = E0 \\/ t2 = E0).\n    unfold Eapp in H2; rewrite app_length in H2.\n    destruct t1; auto. destruct t2; auto. simpl in H2; omegaContradiction.\n  destruct EITHER; subst.\n  exploit IHstar; eauto. intros [s2x [s2y [A [B C]]]].\n  exists s2x; exists s2y; intuition. eapply star_left; eauto.\n  rewrite E0_right. exists s1; exists s2; intuition. apply star_refl.\nQed.\n\nEnd BACKWARD_SIMULATION_SEQUENCES.\n\n(** ** Composing two backward simulations *)\n\nSection COMPOSE_BACKWARD_SIMULATIONS.\n\nContext {RETVAL: Type}.\nVariable L1: semantics RETVAL.\nVariable L2: semantics RETVAL.\nVariable L3: semantics RETVAL.\nHypothesis L3_single_events: single_events L3.\nContext index order match_states (S12: bsim_properties L1 L2 index order match_states).\nContext index' order' match_states' (S23: bsim_properties L2 L3 index' order' match_states').\n\nLet bb_index : Type := (index * index')%type.\n\nDefinition bb_order : bb_index -> bb_index -> Prop := lex_ord (clos_trans _ order) order'.\n\nInductive bb_match_states: bb_index -> state L1 -> state L3 -> Prop :=\n  | bb_match_later: forall i1 i2 s1 s3 s2x s2y,\n      match_states i1 s1 s2x -> Star L2 s2x E0 s2y -> match_states' i2 s2y s3 ->\n      bb_match_states (i1, i2) s1 s3.\n\nLemma bb_match_at: forall i1 i2 s1 s3 s2,\n  match_states i1 s1 s2 -> match_states' i2 s2 s3 ->\n  bb_match_states (i1, i2) s1 s3.\nProof.\n  intros. econstructor; eauto. apply star_refl.\nQed.\n\nLemma bb_simulation_base:\n  forall s3 t s3', Step L3 s3 t s3' ->\n  forall i1 s1 i2 s2, match_states i1 s1 s2 -> match_states' i2 s2 s3 -> safe L1 s1 ->\n  exists i', exists s1',\n    (Plus L1 s1 t s1' \\/ (Star L1 s1 t s1' /\\ bb_order i' (i1, i2)))\n    /\\ bb_match_states i' s1' s3'.\nProof.\n  intros.\n  exploit (bsim_simulation' S23); eauto. eapply bsim_safe; eauto.\n  intros [ [i2' [s2' [PLUS2 MATCH2]]] | [i2' [ORD2 [EQ MATCH2]]]].\n- (* 1 L2 makes one or several transitions *)\n  assert (EITHER: t = E0 \\/ (length t = 1)%nat).\n  { exploit L3_single_events; eauto.\n    destruct t; auto. destruct t; auto. simpl. intros. omegaContradiction. }\n  destruct EITHER.\n+ (* 1.1 these are silent transitions *)\n  subst t. exploit (bsim_E0_plus S12); eauto.\n  intros [ [i1' [s1' [PLUS1 MATCH1]]] | [i1' [ORD1 MATCH1]]].\n* (* 1.1.1 L1 makes one or several transitions *)\n  exists (i1', i2'); exists s1'; split. auto. eapply bb_match_at; eauto.\n* (* 1.1.2 L1 makes no transitions *)\n  exists (i1', i2'); exists s1; split.\n  right; split. apply star_refl. left; auto.\n  eapply bb_match_at; eauto.\n+ (* 1.2 non-silent transitions *)\n  exploit @star_non_E0_split. apply plus_star; eauto. auto.\n  intros [s2x [s2y [P [Q R]]]].\n  exploit (bsim_E0_star S12). eexact P. eauto. auto. intros [i1' [s1x [X Y]]].\n  exploit (bsim_simulation' S12). eexact Q. eauto. eapply star_safe; eauto.\n  intros [[i1'' [s1y [U V]]] | [i1'' [U [V W]]]]; try (subst t; discriminate).\n  exists (i1'', i2'); exists s1y; split.\n  left. eapply star_plus_trans; eauto. eapply bb_match_later; eauto.\n- (* 2. L2 makes no transitions *)\n  subst. exists (i1, i2'); exists s1; split.\n  right; split. apply star_refl. right; auto.\n  eapply bb_match_at; eauto.\nQed.\n\nLemma bb_simulation:\n  forall s3 t s3', Step L3 s3 t s3' ->\n  forall i s1, bb_match_states i s1 s3 -> safe L1 s1 ->\n  exists i', exists s1',\n    (Plus L1 s1 t s1' \\/ (Star L1 s1 t s1' /\\ bb_order i' i))\n    /\\ bb_match_states i' s1' s3'.\nProof.\n  intros. inv H0.\n  exploit star_inv; eauto. intros [[EQ1 EQ2] | PLUS].\n- (* 1. match at *)\n  subst. eapply bb_simulation_base; eauto.\n- (* 2. match later *)\n  exploit (bsim_E0_plus S12); eauto.\n  intros [[i1' [s1' [A B]]] | [i1' [A B]]].\n+ (* 2.1 one or several silent transitions *)\n  exploit bb_simulation_base. eauto. auto. eexact B. eauto.\n    eapply star_safe; eauto. eapply plus_star; eauto.\n  intros [i'' [s1'' [C D]]].\n  exists i''; exists s1''; split; auto.\n  left. eapply plus_star_trans; eauto.\n  destruct C as [P | [P Q]]. apply plus_star; eauto. eauto.\n  traceEq.\n+ (* 2.2 no silent transition *)\n  exploit bb_simulation_base. eauto. auto. eexact B. eauto. auto.\n  intros [i'' [s1'' [C D]]].\n  exists i''; exists s1''; split; auto.\n  intuition. right; intuition.\n  inv H6. left. eapply t_trans; eauto. left; auto.\nQed.\n\nEnd COMPOSE_BACKWARD_SIMULATIONS.\n\nLemma compose_backward_simulation:\n  forall RETVAL: Type,\n  forall L1 L2 L3: _ RETVAL,\n  single_events L3 -> backward_simulation L1 L2 -> backward_simulation L2 L3 ->\n  backward_simulation L1 L3.\nProof.\n  intro RETVAL.\n  intros L1 L2 L3 L3single S12 S23.\n  destruct S12 as [index order match_states props].\n  destruct S23 as [index' order' match_states' props'].\n  apply Backward_simulation with (bb_order order order') (bb_match_states L1 L2 L3 match_states match_states');\n  constructor.\n- (* well founded *)\n  unfold bb_order. apply wf_lex_ord. apply wf_clos_trans. eapply bsim_order_wf; eauto. eapply bsim_order_wf; eauto.\n- (* initial states exist *)\n  intros. exploit (bsim_initial_states_exist props); eauto. intros [s2 A].\n  eapply (bsim_initial_states_exist props'); eauto.\n- (* match initial states *)\n  intros s1 s3 INIT1 INIT3.\n  exploit (bsim_initial_states_exist props); eauto. intros [s2 INIT2].\n  exploit (bsim_match_initial_states props'); eauto. intros [i2 [s2' [INIT2' M2]]].\n  exploit (bsim_match_initial_states props); eauto. intros [i1 [s1' [INIT1' M1]]].\n  exists (i1, i2); exists s1'; intuition auto. eapply bb_match_at; eauto.\n- (* match final states *)\n  intros i s1 s3 r MS SAFE FIN. inv MS.\n  exploit (bsim_match_final_states props'); eauto.\n    eapply star_safe; eauto. eapply bsim_safe; eauto.\n  intros [s2' [A B]].\n  exploit (bsim_E0_star props). eapply star_trans. eexact H0. eexact A. auto. eauto. auto.\n  intros [i1' [s1' [C D]]].\n  exploit (bsim_match_final_states props); eauto. eapply star_safe; eauto.\n  intros [s1'' [P Q]].\n  exists s1''; split; auto. eapply star_trans; eauto.\n- (* progress *)\n  intros i s1 s3 MS SAFE. inv MS.\n  eapply (bsim_progress props'). eauto. eapply star_safe; eauto. eapply bsim_safe; eauto.\n- (* simulation *)\n  apply bb_simulation; auto.\n- (* symbols *)\n  intros. transitivity (Senv.public_symbol (symbolenv L2) id); eapply bsim_public_preserved; eauto.\nQed.\n\n(** ** Converting a forward simulation to a backward simulation *)\n\nSection FORWARD_TO_BACKWARD.\n\nContext {RETVAL} (L1 L2: _ RETVAL) index order match_states (FS: fsim_properties L1 L2 index order match_states).\nHypothesis L1_receptive: receptive L1.\nHypothesis L2_determinate: determinate L2.\n\n(** Exploiting forward simulation *)\n\nInductive f2b_transitions: state L1 -> state L2 -> Prop :=\n  | f2b_trans_final: forall s1 s2 s1' r,\n      Star L1 s1 E0 s1' ->\n      final_state L1 s1' r ->\n      final_state L2 s2 r ->\n      f2b_transitions s1 s2\n  | f2b_trans_step: forall s1 s2 s1' t s1'' s2' i' i'',\n      Star L1 s1 E0 s1' ->\n      Step L1 s1' t s1'' ->\n      Plus L2 s2 t s2' ->\n      match_states i' s1' s2 ->\n      match_states i'' s1'' s2' ->\n      f2b_transitions s1 s2.\n\nLemma f2b_progress:\n  forall i s1 s2, match_states i s1 s2 -> safe L1 s1 -> f2b_transitions s1 s2.\nProof.\n  intros i0; pattern i0. apply well_founded_ind with (R := order).\n  eapply fsim_order_wf; eauto.\n  intros i REC s1 s2 MATCH SAFE.\n  destruct (SAFE s1) as [[r FINAL] | [t [s1' STEP1]]]. apply star_refl.\n- (* final state reached *)\n  eapply f2b_trans_final; eauto.\n  apply star_refl.\n  eapply fsim_match_final_states; eauto.\n- (* L1 can make one step *)\n  exploit (fsim_simulation FS); eauto. intros [i' [s2' [A MATCH']]].\n  assert (B: Plus L2 s2 t s2' \\/ (s2' = s2 /\\ t = E0 /\\ order i' i)).\n    intuition auto.\n    destruct (star_inv H0); intuition auto.\n  clear A. destruct B as [PLUS2 | [EQ1 [EQ2 ORDER]]].\n+ eapply f2b_trans_step; eauto. apply star_refl.\n+ subst. exploit REC; eauto. eapply star_safe; eauto. apply star_one; auto.\n  intros TRANS; inv TRANS.\n* eapply f2b_trans_final; eauto. eapply star_left; eauto.\n* eapply f2b_trans_step; eauto. eapply star_left; eauto.\nQed.\n\nLemma fsim_simulation_not_E0:\n  forall s1 t s1', Step L1 s1 t s1' -> t <> E0 ->\n  forall i s2, match_states i s1 s2 ->\n  exists i', exists s2', Plus L2 s2 t s2' /\\ match_states i' s1' s2'.\nProof.\n  intros. exploit (fsim_simulation FS); eauto. intros [i' [s2' [A B]]].\n  exists i'; exists s2'; split; auto.\n  destruct A. auto. destruct H2. exploit star_inv; eauto. intros [[EQ1 EQ2] | P]; auto.\n  congruence.\nQed.\n\n(** Exploiting determinacy *)\n\nRemark silent_or_not_silent:\n  forall t, t = E0 \\/ t <> E0.\nProof.\n  intros; unfold E0; destruct t; auto; right; congruence.\nQed.\n\nRemark not_silent_length:\n  forall t1 t2, (length (t1 ** t2) <= 1)%nat -> t1 = E0 \\/ t2 = E0.\nProof.\n  unfold Eapp, E0; intros. rewrite app_length in H.\n  destruct t1; destruct t2; auto. simpl in H. omegaContradiction.\nQed.\n\nLemma f2b_determinacy_inv:\n  forall s2 t' s2' t'' s2'',\n  Step L2 s2 t' s2' -> Step L2 s2 t'' s2'' ->\n  (t' = E0 /\\ t'' = E0 /\\ s2' = s2'')\n  \\/ (t' <> E0 /\\ t'' <> E0 /\\ match_traces (symbolenv L1) t' t'').\nProof.\n  intros.\n  assert (match_traces (symbolenv L2) t' t'').\n    eapply sd_determ_1; eauto.\n  destruct (silent_or_not_silent t').\n  subst. inv H1.\n  left; intuition. eapply sd_determ; eauto.\n  destruct (silent_or_not_silent t'').\n  subst. inv H1. elim H2; auto.\n  right; intuition.\n  eapply match_traces_preserved with (ge1 := (symbolenv L2)); auto.\n  intros; symmetry; apply (fsim_public_preserved FS).\nQed.\n\nLemma f2b_determinacy_star:\n  forall s s1, Star L2 s E0 s1 ->\n  forall t s2 s3,\n  Step L2 s1 t s2 -> t <> E0 ->\n  Star L2 s t s3 ->\n  Star L2 s1 t s3.\nProof.\n  intros s0 s01 ST0. pattern s0, s01. eapply star_E0_ind; eauto.\n  intros. inv H3. congruence.\n  exploit f2b_determinacy_inv. eexact H. eexact H4.\n  intros [[EQ1 [EQ2 EQ3]] | [NEQ1 [NEQ2 MT]]].\n  subst. simpl in *. eauto.\n  congruence.\nQed.\n\n(** Orders *)\n\nInductive f2b_index : Type :=\n  | F2BI_before (n: nat)\n  | F2BI_after (n: nat).\n\nInductive f2b_order: f2b_index -> f2b_index -> Prop :=\n  | f2b_order_before: forall n n',\n      (n' < n)%nat ->\n      f2b_order (F2BI_before n') (F2BI_before n)\n  | f2b_order_after: forall n n',\n      (n' < n)%nat ->\n      f2b_order (F2BI_after n') (F2BI_after n)\n  | f2b_order_switch: forall n n',\n      f2b_order (F2BI_before n') (F2BI_after n).\n\nLemma wf_f2b_order:\n  well_founded f2b_order.\nProof.\n  assert (ACC1: forall n, Acc f2b_order (F2BI_before n)).\n    intros n0; pattern n0; apply lt_wf_ind; intros.\n    constructor; intros. inv H0. auto.\n  assert (ACC2: forall n, Acc f2b_order (F2BI_after n)).\n    intros n0; pattern n0; apply lt_wf_ind; intros.\n    constructor; intros. inv H0. auto. auto.\n  red; intros. destruct a; auto.\nQed.\n\n(** Constructing the backward simulation *)\n\nInductive f2b_match_states: f2b_index -> state L1 -> state L2 -> Prop :=\n  | f2b_match_at: forall i s1 s2,\n      match_states i s1 s2 ->\n      f2b_match_states (F2BI_after O) s1 s2\n  | f2b_match_before: forall s1 t s1' s2b s2 n s2a i,\n      Step L1 s1 t s1' ->  t <> E0 ->\n      Star L2 s2b E0 s2 ->\n      starN (step L2) (globalenv L2) n s2 t s2a ->\n      match_states i s1 s2b ->\n      f2b_match_states (F2BI_before n) s1 s2\n  | f2b_match_after: forall n s2 s2a s1 i,\n      starN (step L2) (globalenv L2) (S n) s2 E0 s2a ->\n      match_states i s1 s2a ->\n      f2b_match_states (F2BI_after (S n)) s1 s2.\n\nRemark f2b_match_after':\n  forall n s2 s2a s1 i,\n  starN (step L2) (globalenv L2) n s2 E0 s2a ->\n  match_states i s1 s2a ->\n  f2b_match_states (F2BI_after n) s1 s2.\nProof.\n  intros. inv H.\n  econstructor; eauto.\n  econstructor; eauto. econstructor; eauto.\nQed.\n\n(** Backward simulation of L2 steps *)\n\nLemma f2b_simulation_step:\n  forall s2 t s2', Step L2 s2 t s2' ->\n  forall i s1, f2b_match_states i s1 s2 -> safe L1 s1 ->\n  exists i', exists s1',\n    (Plus L1 s1 t s1' \\/ (Star L1 s1 t s1' /\\ f2b_order i' i))\n     /\\ f2b_match_states i' s1' s2'.\nProof.\n  intros s2 t s2' STEP2 i s1 MATCH SAFE.\n  inv MATCH.\n- (* 1. At matching states *)\n  exploit f2b_progress; eauto. intros TRANS; inv TRANS.\n+ (* 1.1  L1 can reach final state and L2 is at final state: impossible! *)\n  exploit (sd_final_nostep L2_determinate); eauto. contradiction.\n+ (* 1.2  L1 can make 0 or several steps; L2 can make 1 or several matching steps. *)\n  inv H2.\n  exploit f2b_determinacy_inv. eexact H5. eexact STEP2.\n  intros [[EQ1 [EQ2 EQ3]] | [NOT1 [NOT2 MT]]].\n* (* 1.2.1  L2 makes a silent transition *)\n  destruct (silent_or_not_silent t2).\n  (* 1.2.1.1  L1 makes a silent transition too: perform transition now and go to \"after\" state *)\n  subst. simpl in *. destruct (star_starN H6) as [n STEPS2].\n  exists (F2BI_after n); exists s1''; split.\n  left. eapply plus_right; eauto.\n  eapply f2b_match_after'; eauto.\n  (* 1.2.1.2 L1 makes a non-silent transition: keep it for later and go to \"before\" state *)\n  subst. simpl in *. destruct (star_starN H6) as [n STEPS2].\n  exists (F2BI_before n); exists s1'; split.\n  right; split. auto. constructor.\n  econstructor. eauto. auto. apply star_one; eauto. eauto. eauto.\n* (* 1.2.2 L2 makes a non-silent transition, and so does L1 *)\n  exploit not_silent_length. eapply (sr_traces L1_receptive); eauto. intros [EQ | EQ].\n  congruence.\n  subst t2. rewrite E0_right in H1.\n  (* Use receptiveness to equate the traces *)\n  exploit (sr_receptive L1_receptive); eauto. intros [s1''' STEP1].\n  exploit fsim_simulation_not_E0. eexact STEP1. auto. eauto.\n  intros [i''' [s2''' [P Q]]]. inv P.\n  (* Exploit determinacy *)\n  exploit not_silent_length. eapply (sr_traces L1_receptive); eauto. intros [EQ | EQ].\n  subst t0. simpl in *. exploit @sd_determ_1. eauto. eexact STEP2. eexact H2.\n  intros. elim NOT2. inv H8. auto.\n  subst t2. rewrite E0_right in *.\n  assert (s4 = s2'). eapply sd_determ_2; eauto. subst s4.\n  (* Perform transition now and go to \"after\" state *)\n  destruct (star_starN H7) as [n STEPS2]. exists (F2BI_after n); exists s1'''; split.\n  left. eapply plus_right; eauto.\n  eapply f2b_match_after'; eauto.\n\n- (* 2. Before *)\n  inv H2. congruence.\n  exploit f2b_determinacy_inv. eexact H4. eexact STEP2.\n  intros [[EQ1 [EQ2 EQ3]] | [NOT1 [NOT2 MT]]].\n+ (* 2.1 L2 makes a silent transition: remain in \"before\" state *)\n  subst. simpl in *. exists (F2BI_before n0); exists s1; split.\n  right; split. apply star_refl. constructor. omega.\n  econstructor; eauto. eapply star_right; eauto.\n+ (* 2.2 L2 make a non-silent transition *)\n  exploit not_silent_length. eapply (sr_traces L1_receptive); eauto. intros [EQ | EQ].\n  congruence.\n  subst. rewrite E0_right in *.\n  (* Use receptiveness to equate the traces *)\n  exploit (sr_receptive L1_receptive); eauto. intros [s1''' STEP1].\n  exploit fsim_simulation_not_E0. eexact STEP1. auto. eauto.\n  intros [i''' [s2''' [P Q]]].\n  (* Exploit determinacy *)\n  exploit f2b_determinacy_star. eauto. eexact STEP2. auto. apply plus_star; eauto.\n  intro R. inv R. congruence.\n  exploit not_silent_length. eapply (sr_traces L1_receptive); eauto. intros [EQ | EQ].\n  subst. simpl in *. exploit @sd_determ_1. eauto. eexact STEP2. eexact H2.\n  intros. elim NOT2. inv H7; auto.\n  subst. rewrite E0_right in *.\n  assert (s3 = s2'). eapply sd_determ_2; eauto. subst s3.\n  (* Perform transition now and go to \"after\" state *)\n  destruct (star_starN H6) as [n STEPS2]. exists (F2BI_after n); exists s1'''; split.\n  left. apply plus_one; auto.\n  eapply f2b_match_after'; eauto.\n\n- (* 3. After *)\n  inv H. exploit Eapp_E0_inv; eauto. intros [EQ1 EQ2]; subst.\n  exploit f2b_determinacy_inv. eexact H2. eexact STEP2.\n  intros [[EQ1 [EQ2 EQ3]] | [NOT1 [NOT2 MT]]].\n  subst. exists (F2BI_after n); exists s1; split.\n  right; split. apply star_refl. constructor; omega.\n  eapply f2b_match_after'; eauto.\n  congruence.\nQed.\n\nEnd FORWARD_TO_BACKWARD.\n\n(** The backward simulation *)\n\nLemma forward_to_backward_simulation:\n  forall {RETVAL: Type},\n  forall L1 L2: _ RETVAL,\n  forward_simulation L1 L2 -> receptive L1 -> determinate L2 ->\n  backward_simulation L1 L2.\nProof.\n  intro RETVAL.\n  intros L1 L2 FS L1_receptive L2_determinate.\n  destruct FS as [index order match_states FS].\n  apply Backward_simulation with f2b_order (f2b_match_states L1 L2 match_states); constructor.\n- (* well founded *)\n  apply wf_f2b_order.\n- (* initial states exist *)\n  intros. exploit (fsim_match_initial_states FS); eauto. intros [i [s2 [A B]]].\n  exists s2; auto.\n- (* initial states *)\n  intros. exploit (fsim_match_initial_states FS); eauto. intros [i [s2' [A B]]].\n  assert (s2 = s2') by (eapply sd_initial_determ; eauto). subst s2'.\n  exists (F2BI_after O); exists s1; split; auto. econstructor; eauto.\n- (* final states *)\n  intros. inv H.\n  exploit @f2b_progress; eauto. intros TRANS; inv TRANS.\n  assert (r0 = r) by (eapply (sd_final_determ L2_determinate); eauto). subst r0.\n  exists s1'; auto.\n  inv H4. exploit (sd_final_nostep L2_determinate); eauto. contradiction.\n  inv H5. congruence. exploit (sd_final_nostep L2_determinate); eauto. contradiction.\n  inv H2. exploit (sd_final_nostep L2_determinate); eauto. contradiction.\n- (* progress *)\n  intros. inv H.\n  exploit @f2b_progress; eauto. intros TRANS; inv TRANS.\n  left; exists r; auto.\n  inv H3. right; econstructor; econstructor; eauto.\n  inv H4. congruence. right; econstructor; econstructor; eauto.\n  inv H1. right; econstructor; econstructor; eauto.\n- (* simulation *)\n  eapply f2b_simulation_step; eauto.\n- (* symbols preserved *)\n  exact (fsim_public_preserved FS).\nQed.\n\n(** * Transforming a semantics into a single-event, equivalent semantics *)\n\nDefinition well_behaved_traces {RETVAL: Type} (L: semantics RETVAL) : Prop :=\n  forall s t s', Step L s t s' ->\n  match t with nil => True | ev :: t' => output_trace t' end.\n\nSection ATOMIC.\n\nContext {RETVAL: Type}.\nVariable L: semantics RETVAL.\n\nHypothesis Lwb: well_behaved_traces L.\n\nInductive atomic_step (ge: genvtype L): (trace * state L) -> trace -> (trace * state L) -> Prop :=\n  | atomic_step_silent: forall s s',\n      Step L s E0 s' ->\n      atomic_step ge (E0, s) E0 (E0, s')\n  | atomic_step_start: forall s ev t s',\n      Step L s (ev :: t) s' ->\n      atomic_step ge (E0, s) (ev :: nil) (t, s')\n  | atomic_step_continue: forall ev t s,\n      output_trace (ev :: t) ->\n      atomic_step ge (ev :: t, s) (ev :: nil) (t, s).\n\nDefinition atomic : semantics RETVAL := {|\n  state := (trace * state L)%type;\n  genvtype := genvtype L;\n  step := atomic_step;\n  initial_state := fun s => initial_state L (snd s) /\\ fst s = E0;\n  final_state := fun s r => final_state L (snd s) r /\\ fst s = E0;\n  globalenv := globalenv L;\n  symbolenv := symbolenv L\n|}.\n\nEnd ATOMIC.\n\n(** A forward simulation from a semantics [L1] to a single-event semantics [L2]\n  can be \"factored\" into a forward simulation from [atomic L1] to [L2]. *)\n\nSection FACTOR_FORWARD_SIMULATION.\n\nContext {RETVAL: Type}.\nVariable L1: semantics RETVAL.\nVariable L2: semantics RETVAL.\nContext index order match_states (sim: fsim_properties L1 L2 index order match_states).\nHypothesis L2single: single_events L2.\n\nInductive ffs_match: index -> (trace * state L1) -> state L2 -> Prop :=\n  | ffs_match_at: forall i s1 s2,\n      match_states i s1 s2 ->\n      ffs_match i (E0, s1) s2\n  | ffs_match_buffer: forall i ev t s1 s2 s2',\n      Star L2 s2 (ev :: t) s2' -> match_states i s1 s2' ->\n      ffs_match i (ev :: t, s1) s2.\n\nLemma star_non_E0_split':\n  forall s2 t s2', Star L2 s2 t s2' ->\n  match t with\n  | nil => True\n  | ev :: t' => exists s2x, Plus L2 s2 (ev :: nil) s2x /\\ Star L2 s2x t' s2'\n  end.\nProof.\n  induction 1. simpl. auto.\n  exploit L2single; eauto. intros LEN.\n  destruct t1. simpl in *. subst. destruct t2. auto.\n  destruct IHstar as [s2x [A B]]. exists s2x; split; auto.\n  eapply plus_left. eauto. apply plus_star; eauto. auto.\n  destruct t1. simpl in *. subst t. exists s2; split; auto. apply plus_one; auto.\n  simpl in LEN. omegaContradiction.\nQed.\n\nLemma ffs_simulation:\n  forall s1 t s1', Step (atomic L1) s1 t s1' ->\n  forall i s2, ffs_match i s1 s2 ->\n  exists i', exists s2',\n     (Plus L2 s2 t s2' \\/ (Star L2 s2 t s2') /\\ order i' i)\n  /\\ ffs_match i' s1' s2'.\nProof.\n  induction 1; intros.\n- (* silent step *)\n  inv H0.\n  exploit (fsim_simulation sim); eauto.\n  intros [i' [s2' [A B]]].\n  exists i'; exists s2'; split. auto. constructor; auto.\n- (* start step *)\n  inv H0.\n  exploit (fsim_simulation sim); eauto.\n  intros [i' [s2' [A B]]].\n  destruct t as [ | ev' t].\n+ (* single event *)\n  exists i'; exists s2'; split. auto. constructor; auto.\n+ (* multiple events *)\n  assert (C: Star L2 s2 (ev :: ev' :: t) s2'). intuition. apply plus_star; auto.\n  exploit star_non_E0_split'. eauto. simpl. intros [s2x [P Q]].\n  exists i'; exists s2x; split. auto. econstructor; eauto.\n- (* continue step *)\n  inv H0.\n  exploit star_non_E0_split'. eauto. simpl. intros [s2x [P Q]].\n  destruct t.\n  exists i; exists s2'; split. left. eapply plus_star_trans; eauto. constructor; auto.\n  exists i; exists s2x; split. auto. econstructor; eauto.\nQed.\n\nEnd FACTOR_FORWARD_SIMULATION.\n\nTheorem factor_forward_simulation:\n  forall {RETVAL: Type},\n  forall L1 L2: _ RETVAL,\n  forward_simulation L1 L2 -> single_events L2 ->\n  forward_simulation (atomic L1) L2.\nProof.\n  intro RETVAL.\n  intros L1 L2 FS L2single.\n  destruct FS as [index order match_states sim].\n  apply Forward_simulation with order (ffs_match L1 L2 match_states); constructor.\n- (* wf *)\n  eapply fsim_order_wf; eauto.\n- (* initial states *)\n  intros. destruct s1 as [t1 s1]. simpl in H. destruct H. subst.\n  exploit (fsim_match_initial_states sim); eauto. intros [i [s2 [A B]]].\n  exists i; exists s2; split; auto. constructor; auto.\n- (* final states *)\n  intros. destruct s1 as [t1 s1]. simpl in H0; destruct H0; subst. inv H.\n  eapply (fsim_match_final_states sim); eauto.\n- (* simulation *)\n  eapply ffs_simulation; eauto.\n- (* symbols preserved *)\n  simpl. exact (fsim_public_preserved sim).\nQed.\n\n(** Likewise, a backward simulation from a single-event semantics [L1] to a semantics [L2]\n  can be \"factored\" as a backward simulation from [L1] to [atomic L2]. *)\n\nSection FACTOR_BACKWARD_SIMULATION.\n\nContext {RETVAL: Type}.\nVariable L1: semantics RETVAL.\nVariable L2: semantics RETVAL.\nContext index order match_states (sim: bsim_properties L1 L2 index order match_states).\nHypothesis L1single: single_events L1.\nHypothesis L2wb: well_behaved_traces L2.\n\nInductive fbs_match: index -> state L1 -> (trace * state L2) -> Prop :=\n  | fbs_match_intro: forall i s1 t s2 s1',\n      Star L1 s1 t s1' -> match_states i s1' s2 ->\n      t = E0 \\/ output_trace t ->\n      fbs_match i s1 (t, s2).\n\nLemma fbs_simulation:\n  forall s2 t s2', Step (atomic L2) s2 t s2' ->\n  forall i s1, fbs_match i s1 s2 -> safe L1 s1 ->\n  exists i', exists s1',\n     (Plus L1 s1 t s1' \\/ (Star L1 s1 t s1' /\\ order i' i))\n     /\\ fbs_match i' s1' s2'.\nProof.\n  induction 1; intros.\n- (* silent step *)\n  inv H0.\n  exploit (bsim_simulation sim); eauto. eapply star_safe; eauto.\n  intros [i' [s1'' [A B]]].\n  exists i'; exists s1''; split.\n  destruct A as [P | [P Q]]. left. eapply star_plus_trans; eauto. right; split; auto. eapply star_trans; eauto.\n  econstructor. apply star_refl. auto. auto.\n- (* start step *)\n  inv H0.\n  exploit (bsim_simulation sim); eauto. eapply star_safe; eauto.\n  intros [i' [s1'' [A B]]].\n  assert (C: Star L1 s1 (ev :: t) s1'').\n    eapply star_trans. eauto. destruct A as [P | [P Q]]. apply plus_star; eauto. eauto. auto.\n  exploit @star_non_E0_split'; eauto. simpl. intros [s1x [P Q]].\n  exists i'; exists s1x; split.\n  left; auto.\n  econstructor; eauto.\n  exploit L2wb; eauto.\n- (* continue step *)\n  inv H0. unfold E0 in H8; destruct H8; try congruence.\n  exploit @star_non_E0_split'; eauto. simpl. intros [s1x [P Q]].\n  exists i; exists s1x; split. left; auto. econstructor; eauto. simpl in H0; tauto.\nQed.\n\nLemma fbs_progress:\n  forall i s1 s2,\n  fbs_match i s1 s2 -> safe L1 s1 ->\n  (exists r, final_state (atomic L2) s2 r) \\/\n  (exists t, exists s2', Step (atomic L2) s2 t s2').\nProof.\n  intros. inv H. destruct t.\n- (* 1. no buffered events *)\n  exploit (bsim_progress sim); eauto. eapply star_safe; eauto.\n  intros [[r A] | [t [s2' A]]].\n+ (* final state *)\n  left; exists r; simpl; auto.\n+ (* L2 can step *)\n  destruct t.\n  right; exists E0; exists (nil, s2'). constructor. auto.\n  right; exists (e :: nil); exists (t, s2'). constructor. auto.\n- (* 2. some buffered events *)\n  unfold E0 in H3; destruct H3. congruence.\n  right; exists (e :: nil); exists (t, s3). constructor. auto.\nQed.\n\nEnd FACTOR_BACKWARD_SIMULATION.\n\nTheorem factor_backward_simulation:\n  forall {RETVAL: Type},\n  forall L1 L2: _ RETVAL,\n  backward_simulation L1 L2 -> single_events L1 -> well_behaved_traces L2 ->\n  backward_simulation L1 (atomic L2).\nProof.\n  intro RETVAL.\n  intros L1 L2 BS L1single L2wb. \n  destruct BS as [index order match_states sim].\n  apply Backward_simulation with order (fbs_match L1 L2 match_states); constructor.\n- (* wf *)\n  eapply bsim_order_wf; eauto.\n- (* initial states exist *)\n  intros. exploit (bsim_initial_states_exist sim); eauto. intros [s2 A].\n  exists (E0, s2). simpl; auto.\n- (* initial states match *)\n  intros. destruct s2 as [t s2]; simpl in H0; destruct H0; subst.\n  exploit (bsim_match_initial_states sim); eauto. intros [i [s1' [A B]]].\n  exists i; exists s1'; split. auto. econstructor. apply star_refl. auto. auto.\n- (* final states match *)\n  intros. destruct s2 as [t s2]; simpl in H1; destruct H1; subst.\n  inv H. exploit (bsim_match_final_states sim); eauto. eapply star_safe; eauto.\n  intros [s1'' [A B]]. exists s1''; split; auto. eapply star_trans; eauto.\n- (* progress *)\n  eapply fbs_progress; eauto.\n- (* simulation *)\n  eapply fbs_simulation; eauto.\n- (* symbols *)\n  simpl. exact (bsim_public_preserved sim).\nQed.\n\n(** Receptiveness of [atomic L]. *)\n\nRecord strongly_receptive {RETVAL: Type} (L: semantics RETVAL) : Prop :=\n  Strongly_receptive {\n    ssr_receptive: forall s ev1 t1 s1 ev2,\n      Step L s (ev1 :: t1) s1 ->\n      match_traces (symbolenv L) (ev1 :: nil) (ev2 :: nil) ->\n      exists s2, exists t2, Step L s (ev2 :: t2) s2;\n    ssr_well_behaved:\n      well_behaved_traces L\n  }.\n\nTheorem atomic_receptive:\n  forall {RETVAL: Type},\n  forall (L: _ RETVAL), strongly_receptive L -> receptive (atomic L).\nProof.\n  intros. constructor; intros.\n(* receptive *)\n  inv H0.\n  (* silent step *)\n  inv H1. exists (E0, s'). constructor; auto.\n  (* start step *)\n  assert (exists ev2, t2 = ev2 :: nil). inv H1; econstructor; eauto.\n  destruct H0 as [ev2 EQ]; subst t2.\n  exploit @ssr_receptive; eauto. intros [s2 [t2 P]].\n  exploit @ssr_well_behaved. eauto. eexact P. simpl; intros Q.\n  exists (t2, s2). constructor; auto.\n  (* continue step *)\n  simpl in H2; destruct H2.\n  assert (t2 = ev :: nil). inv H1; simpl in H0; tauto.\n  subst t2. exists (t, s0). constructor; auto. simpl; auto.\n(* single-event *)\n  red. intros. inv H0; simpl; omega.\nQed.\n\n(** * Connections with big-step semantics *)\n\n(** The general form of a big-step semantics *)\n\nRecord bigstep_semantics (RETVAL: Type) : Type :=\n  Bigstep_semantics {\n    bigstep_terminates: trace -> RETVAL -> Prop;\n    bigstep_diverges: traceinf -> Prop\n  }.\n\n(** Soundness with respect to a small-step semantics *)\n\nRecord bigstep_sound {RETVAL: Type} (B: bigstep_semantics RETVAL) (L: semantics RETVAL) : Prop :=\n  Bigstep_sound {\n    bigstep_terminates_sound:\n      forall t r,\n      bigstep_terminates B t r ->\n      exists s1, exists s2, initial_state L s1 /\\ Star L s1 t s2 /\\ final_state L s2 r;\n    bigstep_diverges_sound:\n      forall T,\n      bigstep_diverges B T ->\n      exists s1, initial_state L s1 /\\ forever (step L) (globalenv L) s1 T\n}.\n\n*)\n"
  },
  {
    "path": "src/backend/Statements/StmtMiniC.v",
    "content": "Require Import cclib.Coqlib.\nRequire Import cclib.Errors.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.AST.\nRequire Import backend.Expressions.ExpMiniC.\nRequire Import backend.Environments.Globalenvs.\nRequire Import backend.Ctypes.\nRequire Import backend.Cop. \nRequire Import backend.MachineModel.\n\nInductive statement : Type :=\n  | Sskip : statement                   (**r do nothing *)\n  | Sassign : expr -> expr -> statement (**r assignment to evm storage.  [lvalue = rvalue], so the left side is computed as pointer.  *)\n  | Sset : ident -> expr -> statement   (**r assignment to local env, i.e. the EVM stack. [tempvar = rvalue] *)\n  (* Clight's Scall does a full internal function call. (as opposed to a method call) \n    Clike splits this into the simpler tasks of pushing arguments and saving the return value *)\n  | Scall: option ident (* where the return value goes *) -> label (*name of function to call. *) -> list expr -> statement (**r function call *)\n  | Ssequence : statement -> statement -> statement  (**r sequence *)\n  | Sifthenelse : expr  -> statement -> statement -> statement (**r conditional *)\n  | Sloop: statement -> statement (**r infinite loop *)\n  | Sbreak : statement                      (**r [break] statement *)\n  | Sreturn : option ident -> statement      (**r [return] statement with var for return *)\n\n  (* custom ethereum statements *)\n  | Stransfer : expr -> expr -> statement (** address.transfer(value) *)\n  (* call public external function on address, identified by an int, given a value (the amount of money you send), with multiple return values and arguments *)\n  | Scallmethod : expr (*address*) -> list ident (* return values *) -> int (* method signature, a hash of function name and arguments*) -> expr (* value*) -> option expr (* gas *) -> list expr (* args*) -> statement\n  | Slog : list expr -> list expr -> statement (** LOG0-6. The first argument is a list of \"topics\" (at most 6), the second is a list of non-indexed arguments. *)\n  | Srevert : statement\n  .\n\n(** The C loops are derived forms. *)\n\nDefinition Swhile (e: expr) (s: statement) :=\n  Sloop (Sifthenelse e s Sbreak).\n\nDefinition Sdowhile (s: statement) (e: expr) :=\n  Sloop (Ssequence s (Sifthenelse e Sskip Sbreak)).\n\n(* for (s1; e; s4) s3; *)\nDefinition Sfor (s1: statement) (e2: expr) (s3: statement) (s4: statement) :=\n  Ssequence s1 (Sloop (Sifthenelse e2 (Ssequence s3 s4) Sbreak)).\n\n(** ** Functions *)\n\n(** A function definition is composed of its return type ([fn_return]),\n  the names and types of its parameters ([fn_params]), the names\n  and types of its temps ([fn_temps]), and the body of the\n  function (a statement, [fn_body]). *)\n\nRecord function : Type := mkfunction {\n  fn_return: type;\n  fn_params: list (ident * type);\n  fn_temps: list (ident * type);\n  fn_locals: list (ident * type);\n  fn_body: statement\n}.\n\nDefinition var_names (vars: list(ident * type)) : list ident :=\n  List.map (@fst ident type) vars.\n\n(** The semantics uses two environments.  The global environment\n  maps names of functions and global variables to memory block references,\n  and function pointers to their definitions.  (See module [Globalenvs].) *)\n\nDefinition genv := Genv.t function type.\n\n(* This function is for convenience when writing tests. *)\nDefinition new_genv := Genv.new_genv function type.\n"
  },
  {
    "path": "src/backend/SymbolicKeccak.v",
    "content": "(* Ethereum contracts use Keccak256 hashes a lot, both as an operation\navailable to the user, and in order to implement hash mappings etc.\n\nIn order for the compiled code to run correctly, we must assume that\nthere are no hash collissions. This is of course not provable for the\nreal hash implementation, so instead we use the \"symbolic\" model\ndefined in this file, where the hash functions just construct values\nin an algebraic data type. Eventually, there will be a compiler phase\nthat replaces the symbolic hashes with the real ones, withan axiom\nstating that this does not introduce collissions.\n*)\n\nRequire Import cclib.Integers.\nRequire Import backend.IndexLib.\nRequire Import backend.Values.HighValues.\n\nDefinition sha_1 v :=\n  Vhash v.\n\nDefinition sha_2 v1 v2 :=\n  Vhash2 v1 v2.\n  \nLemma sha_1_range : forall v i, sha_1 v <> Vint i.\nProof.\n  intros.\n  unfold sha_1.\n  congruence.\nQed.\n\nLemma sha_2_range : forall v v' i, sha_2 v v' <> Vint i.\nProof.\n  intros.\n  unfold sha_2; destruct v; destruct v'; simpl;\n  congruence.\nQed.\n\nLemma sha_1_sha_2_range : forall v v' u, sha_2 v v' <> sha_1 u.\nProof.\n  intros.\n  unfold sha_1, sha_2.\n  destruct v; destruct v'; simpl; congruence.\nQed.\n  \nLemma sha_1_injective : forall v u,\n    sha_1 v = sha_1 u ->\n    v = u. \nProof.\n  unfold sha_1.\n  intros; congruence.\nQed.    \n\nLemma sha_2_injective : forall v1 v2 u1 u2,\n    sha_2 v1 v2 = sha_2 u1 u2 ->\n    v1 = u1 /\\ v2 = u2.\nProof.\n  intros.\n  destruct v1; destruct v2; destruct u1; destruct u2; simpl in * ; split; inversion H; auto.\nQed.\n  \n(* The function must satisfy this property:\n  me_query_SHA2Pointers: forall a1p a2i,\n    me_query (Qcall2 Bsha_2 (Vptr a1p) (Vint a2i)) = (Vptr (Ihash a1p a2i))\n*)\n"
  },
  {
    "path": "src/backend/TempModel.v",
    "content": "\n(* Model of function temps (and args) *)\n\nRequire Import cclib.Coqlib.\nRequire Import backend.AST.\nRequire Import backend.Ctypes.\nRequire Import cclib.Maps.\nRequire Import backend.Environments.AllEnvironments.\nRequire Import backend.Values.HighValues.\nRequire Import backend.Options.\nRequire Import cclib.Integers.\n\n(* All the different intermediate languages (down to stack, which gets rid of temps) represent args and temps as a list of this form: *)\nDefinition typed_idents : Type := list (positive * type).\n\nSection FILTER.\n\n  (* The peq in the standard library is opaque, but for us it's better if\n     it computes. *)\n  Definition my_peq : forall x y : positive, {x = y} + {x <> y}.\n  decide equality.\n  Defined.\n  \n(* filter t by removing ones with duplicate identifiers and removing the ones from excl.\n\nThis is used in the semantics whenever you use temps, in order to\nenforce that there are no duplicates. E.g. at the top level, when\nestimating gas for calling a function, the compiled code will not push\nduplicates, so it also calls this filter function to get a tighter\nbound.\n\n*)\nFixpoint unique_temps_excl (t: typed_idents) (excl: typed_idents) : typed_idents :=\n  match t with nil => nil\n  | (tmp, ty) :: rest => let utemps := unique_temps_excl rest excl in\n    match in_dec my_peq tmp (map fst utemps) with\n    | left tmp_in => utemps (* found in the rest of t, remove duplicate *)\n    | right tmp_notin => match in_dec my_peq tmp (map fst excl) with\n      | left tmp_excl => utemps (* found in excl, remove *)\n      | right tmp_notexcl => (tmp, ty) :: utemps\n      end\n    end\n  end.\n\nLemma unique_temps_excl_norepet: forall t excl,\n  list_norepet (map fst (unique_temps_excl t excl)).\nProof.\ninduction t; simpl; intros.\nconstructor.\ndestruct a.\ndestruct (in_dec my_peq p (map fst (unique_temps_excl t excl))); auto.\ndestruct (in_dec my_peq p (map fst excl)); auto.\nsimpl. constructor; auto.\nQed.\n\nLemma unique_temps_excl_in: forall t excl x,\n  In x (map fst (unique_temps_excl t excl)) ->\n  In x (map fst t).\nProof.\ninduction t; simpl; intros.\nauto.\ndestruct a.\ndestruct (in_dec my_peq p (map fst (unique_temps_excl t excl))).\napply IHt in H. auto.\ndestruct (in_dec my_peq p (map fst excl)).\napply IHt in H. auto.\nsimpl in H.\ndestruct H. subst. auto.\napply IHt in H. auto.\nQed.\n\nLemma unique_temps_excl_disjoint: forall t excl,\n  list_disjoint (map fst (unique_temps_excl t excl)) (map fst excl).\nProof.\ninduction t; simpl; intros.\nunfold list_disjoint. simpl. auto.\ndestruct a.\ndestruct (in_dec my_peq p (map fst (unique_temps_excl t excl))).\napply IHt.\ndestruct (in_dec my_peq p (map fst excl)).\napply IHt.\nsimpl.\nunfold list_disjoint; simpl; intros.\ndestruct H; intro; subst. contradiction.\nunfold list_disjoint in IHt. assert (A := IHt excl y y H H0). auto.\nQed.\n\nLemma unique_temps_excl_defined : forall i ty lst excl,\n    In (i,ty) lst ->\n    ~In i (map fst excl) ->\n    In i (map fst (unique_temps_excl lst excl)).\nProof.\n  induction lst.\n  - intros.\n    simpl in *.\n    auto.\n  - intros.\n    simpl in *.\n    destruct a.\n    destruct (in_dec my_peq p (map fst (unique_temps_excl lst excl))).\n    + destruct H.\n      * inversion H.\n        subst.\n        assumption.\n      * apply IHlst;\n        assumption.\n    + destruct H.\n      * inversion H.\n        subst.\n        destruct (in_dec my_peq i (map fst excl)).\n          tauto.\n          simpl; auto.\n      * destruct (in_dec my_peq p (map fst excl)).\n          apply IHlst; assumption.\n          simpl. right. apply IHlst; assumption.\nQed.\n\nDefinition unique_temps (t: typed_idents) : typed_idents :=\n  unique_temps_excl t nil.\n\nLemma unique_temps_disjoint: forall t excl,\n  list_disjoint (map fst (unique_temps_excl t excl)) (map fst (unique_temps excl)).\nProof.\nunfold list_disjoint. intros. intro; subst.\napply unique_temps_excl_in in H0.\nassert (A := unique_temps_excl_disjoint t excl y y H H0). auto.\nQed.\n\nDefinition unique_all_temps (t: typed_idents) (t': typed_idents) : typed_idents :=\n  unique_temps_excl t t' ++ unique_temps t'.\n\nLemma norepet_disjoint: forall A (t t': list A),\n  list_disjoint t t' ->\n  list_norepet t ->\n  list_norepet t' ->\n  list_norepet (t ++ t').\nProof.\ninduction t; simpl; intros.\nauto.\ninv H0.\nassert (~ In a t'). { intro. unfold list_disjoint in H. unfold not in H. eapply H; eauto. simpl. auto. }\napply list_disjoint_cons_left in H.\nconstructor.\nintro. apply in_app_or in H2. destruct H2; contradiction.\napply IHt; auto.\nQed.\n\nLemma unique_all_temps_norepet: forall t t',\n  list_norepet (map fst (unique_all_temps t t')).\nProof.\nunfold unique_all_temps.\nintros.\nrewrite map_app.\napply norepet_disjoint.\napply unique_temps_disjoint.\napply unique_temps_excl_norepet.\napply unique_temps_excl_norepet.\nQed.\n\nEnd FILTER.\n\nSection INIT.\n\n(* Functions and lemmas related to setting the initial args in the temp_env. *)\n  \n(*\ninit_args is the first part of the semantics of calling a function, then init_temps adds zeros for actual temporaries. \n\nFor proof's sake, add these to the temp_env in the order that they get pushed to the stack. \nOutputs None if args and vals are different lengths.\n *)\nFixpoint init_args (args: typed_idents) (vals: list val) : option temp_env :=\n  match args, vals with\n  | nil, nil => Some (PTree.empty _)\n  | (name, _)::rest, v::vs => r <- init_args rest vs ;; Some ((PTree.set name v r):temp_env)\n  | _, _ => None\n  end.\n\nRemark init_args_len: forall args vals le,\n  init_args args vals = Some le -> length args = length vals.\nProof. induction args; induction vals; simpl; intros.\nauto. discriminate. destruct a; discriminate. destruct a.\nBindSome H r r_eq. SomeSome H le. replace (length vals) with (length args).\nauto. eapply IHargs; eauto.\nQed.\n\nLemma init_args_defined : forall (args: typed_idents) (vals: list val) i ty t,\n    In (i, ty) args ->\n    init_args args vals = Some t ->\n    exists v, PTree.get i t = Some v.\nProof.\n  induction args; destruct vals; simpl; try congruence; try tauto.\n  - destruct a; intros; simpl in *.\n    congruence.\n  - intros.    \n    destruct H.\n    + subst; simpl in *.\n      destruct (init_args args vals) as [t'|]; simpl in *; [|congruence].\n      simpl in *.\n      inversion H0.\n      subst.\n      exists v.\n      rewrite PTree.gss.\n      reflexivity.\n    + destruct a as [i' v'].\n      destruct (init_args args vals) as [t'|] eqn:H_eqt'; simpl in *; [|congruence].\n      specialize (IHargs vals _ ty t' H H_eqt').\n      inversion H0.\n      destruct (peq i' i).\n      * subst.\n        rewrite PTree.gss.\n        eauto.\n      * rewrite PTree.gso by congruence.\n        exact IHargs.\nQed.\n\nFixpoint init_temps (temps: typed_idents) (base: temp_env) : temp_env :=\n  match temps with\n  | nil => base\n  | (name, _)::rest => init_temps rest (PTree.set name (Vint Int256.zero) base)\n  end.\n\n\nEnd INIT.\n\n(* generic function with temps *)\nRecord ftemps : Type := mkftemps {\n  f_t : Type;\n  f_temps : f_t -> typed_idents;\n  f_args : f_t -> typed_idents\n}.\n\nSection FUNCTIONTYPE.\n\n(* All the intermediate langauges have a notion of arguments and temps, so here we prove some lemmas about those. *)\n  \n\nVariable ftype : ftemps.\nDefinition function : Type := f_t ftype.\nDefinition fn_temps := f_temps ftype.\nDefinition fn_params := f_args ftype.\n\nSection FUNCTION.\n\nVariable f : function.\nDefinition temps := fn_temps f.\nDefinition params := fn_params f.\n\n(* The function temps and args after removing duplicates. *)\nDefinition some_temps : typed_idents :=\n  unique_temps_excl temps params.\n\nDefinition some_args : typed_idents :=\n  unique_temps params.\n\n\nLemma some_args_defined : forall i ty,\n     In (i, ty) params ->\n     exists ty', In (i,ty') some_args.\nProof.\n  unfold some_args.\n  intros i ty.\n  induction params.\n  - simpl; intros; tauto.\n  - simpl.\n    unfold unique_temps.\n    simpl.\n    intros [H | H].\n    + subst.\n      destruct (in_dec my_peq i (map fst (unique_temps_excl t nil))) as [i0 | i0].\n      * apply list_in_map_inv in i0.\n        destruct i0 as [[i' ty'] [Hi' H']].\n        simpl in Hi'.\n        subst.\n        exists ty'.\n        exact H'.\n      * exists ty.\n        simpl.\n        auto.\n    + specialize (IHt H).\n      destruct a as [i0 ty0].\n      assert (Hin: In i (map fst (unique_temps_excl t nil))).\n        {\n          apply unique_temps_excl_defined with ty.\n          assumption.\n          simpl; auto.\n        }\n        apply list_in_map_inv in Hin.\n        destruct Hin as [[i' ty'] [Hin1 Hin2]].\n      destruct (in_dec my_peq i0 (map fst (unique_temps_excl t nil))).\n      * simpl in *; subst.\n        exists ty'.\n        assumption.\n      * simpl in *; subst.\n        exists ty'.\n        right.\n        assumption.\n  Qed.\n\n        (*\nWhen combining temps, we want a few properties which are required by how they are used on the Stack.\n1. The temps should be have unique identifiers. This allows random access sets and gets, with nice proofs.\n2. Args are pushed first, and temps pushed after, so in list form they are (temps ++ args)\n*)\nDefinition all_temps : typed_idents :=\n  unique_all_temps temps params.\n\nRemark all_temps_split: all_temps = some_temps ++ some_args.\nProof. auto. Qed.\n\n(* Returns None if the length of the argument list is different form the number of values provided. *)\nDefinition function_initial_temps (vals: list val) : option temp_env :=\n  args_initial <- init_args some_args vals ;;\n  Some (init_temps some_temps args_initial).\n\nLemma init_temps_defined : forall i ty lst te,\n    In (i, ty) lst \\/ PTree.get i te <> None ->\n    exists v, PTree.get i (init_temps lst te) = Some v.\nProof.\n  induction lst.\n  - inversion 1.\n    + inversion H0.\n    + simpl.\n      destruct (PTree.get i te) as [|v].\n      * eexists; reflexivity.\n      * congruence.\n  - intros.\n    simpl in H.\n    destruct H as [[H|H] | H].\n    + subst.\n      simpl.\n      apply IHlst.\n      right.\n      rewrite PTree.gss.\n      congruence.\n    + destruct a as [a aty].\n      simpl.      \n      destruct (IHlst (PTree.set a (Vint Int256.zero) te)) as [v Hv].\n      left; assumption.\n      exists v; apply Hv.\n    + destruct a as [a aty].\n      simpl.\n      destruct (IHlst (PTree.set a (Vint Int256.zero) te)) as [v Hv].\n      { right.\n        destruct (my_peq a i).\n        - subst.\n          rewrite PTree.gss.\n          congruence.\n        - rewrite PTree.gso; congruence.\n      }\n      exists v; apply Hv.\nQed.\n\n\n\n\nEnd FUNCTION.\n\nEnd FUNCTIONTYPE.\n\n\n(* match two functions that have the same temps but different type.\n\n  This is used in the proofs when going between two intermediate\n  languages which both have functions with temps and args. The lemmas\n  says that the corresponding enviroments in the two langauges are the\n  same.\n *)\nSection FUNCTIONMATCH.\n\nVariable ftype1 : ftemps.\nDefinition function1 : Type := f_t ftype1.\nDefinition fn_temps1 := f_temps ftype1.\nDefinition fn_params1 := f_args ftype1.\n\nVariable ftype2 : ftemps.\nDefinition function2 : Type := f_t ftype2.\nDefinition fn_temps2 := f_temps ftype2.\nDefinition fn_params2 := f_args ftype2.\n\n\nInductive match_ftemps: function1 -> function2 -> Prop :=\n  | match_ftemps_intro: forall f f',\n    fn_temps1 f = fn_temps2 f' ->\n    fn_params1 f = fn_params2 f' ->\n    match_ftemps f f'.\n\nLemma match_some_temps: forall f f',\n  match_ftemps f f' ->\n  some_temps ftype1 f = some_temps ftype2 f'.\nProof.\nintros. inv H. unfold some_temps.\nreplace (temps ftype1 f) with (temps ftype2 f').\nreplace (params ftype1 f) with (params ftype2 f').\nauto.\nQed.\n\nLemma match_some_args: forall f f',\n  match_ftemps f f' ->\n  some_args ftype1 f = some_args ftype2 f'.\nProof.\nintros. inv H. unfold some_args.\nreplace (params ftype1 f) with (params ftype2 f').\nauto.\nQed.\n\nLemma match_all_temps: forall f f',\n  match_ftemps f f' ->\n  all_temps ftype1 f = all_temps ftype2 f'.\nProof.\nintros. inv H. unfold all_temps.\nreplace (temps ftype1 f) with (temps ftype2 f').\nreplace (params ftype1 f) with (params ftype2 f').\nauto.\nQed.\n\nLemma match_initial_temps: forall f f' vals le,\n  match_ftemps f f' ->\n  function_initial_temps ftype1 f vals = Some le ->\n  function_initial_temps ftype2 f' vals = Some le.\nProof.\nunfold function_initial_temps.\nintros. BindSome H0 args_initial args_eq. SomeSome H0 le.\nreplace (some_args ftype2 f') with (some_args ftype1 f).\nreplace (some_temps ftype2 f') with (some_temps ftype1 f).\nrewrite args_eq. simpl. auto.\napply match_some_temps; auto. apply match_some_args; auto.\nQed.\n\n\nEnd FUNCTIONMATCH.\n\nLemma function_initial_temps_defined : forall i ty (ftype  : ftemps) (f :function ftype) t,\n    In (i, ty) (fn_temps ftype f) ->\n    ~In i (map fst (params ftype f))  ->\n   exists v, PTree.get i\n               (init_temps (some_temps ftype f)\n                           t)\n             = Some v.\nProof.\n  intros i ty ftype f t Hin Hnin.\n  assert (in_some_temps\n   := unique_temps_excl_defined i ty (fn_temps ftype f) _ Hin Hnin).\n  apply list_in_map_inv in in_some_temps.\n  destruct in_some_temps as [ [i' ty'] [i'_eq Hin']].\n  subst.\n  \n  destruct (init_temps_defined i' ty' (some_temps ftype f) t) as [v H].\n  { left.\n    exact Hin'.\n  }\n  exists v.\n  exact H.\nQed.\n\n\nDefinition function_initial_temps_defined2\n  : forall (ftype:ftemps) (f:function ftype)\n           (vals: list val) (i:positive) (ty:type) t,\n   In (i, ty) (params ftype f) ->\n   function_initial_temps ftype f vals = Some t ->\n   exists v, PTree.get i t = Some v.\nProof.\n  intros ftype f vals i ty t Hin Hinitial_temps.\n  unfold function_initial_temps in Hinitial_temps.\n  destruct (init_args (some_args ftype f) vals) as [t'|] eqn:Hinit_args; simpl in *; [|congruence] .\n  assert (Hin': exists ty', In (i,ty') (some_args ftype f) ).\n  {\n    apply some_args_defined with ty.\n    exact Hin.\n  }\n  destruct Hin' as [ty' Hin'].\n  destruct (init_args_defined (some_args ftype f) vals i ty' t' Hin' Hinit_args).\n  destruct (init_temps_defined i ty' (some_temps ftype f) t') as [v Hv].\n  { right.\n    congruence.\n  }\n  inversion Hinitial_temps.    \n  exists v.\n  exact Hv.\nQed.\n\n\n(* Helper function for (possibly) setting temps.*)\nDefinition optset (key: option ident) (v: val) (le: temp_env) : temp_env :=\n  match key with None => le\n  | Some id => PTree.set id v le \n  end.\n\n(* Helper function to set a list of keys to a list of values.\nFor the sake of the proof, order matters. The first ident/value pair is set first.\nNot a total function because the lists must be the same length *)\nFixpoint listset (keys: list ident) (vals: list val) (le: temp_env) : option temp_env :=\n  match keys, vals with\n  | nil, nil => Some le\n  | k::ks, v::vs => listset ks vs (PTree.set k v le)\n  | _, _ => None\n  end.\n\nRemark listset_len: forall rv_keys rvs le le',\n  listset rv_keys rvs le = Some le' -> length rvs = length rv_keys.\nProof. induction rv_keys; induction rvs; intros; inv H. auto. simpl.\nreplace (length rv_keys) with (length rvs). auto. eapply IHrv_keys; eauto.\nQed.\n"
  },
  {
    "path": "src/backend/Values/HighValues.v",
    "content": "(* This may need to be changed quite a bit, see the readme file. \n\n*)\n\n(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** This module defines the type of values that is used in the dynamic\n  semantics of all our intermediate languages. *)\n\nRequire Import cclib.Coqlib.\nRequire Import cclib.Integers.\nRequire Import cclib.Maps.\nRequire Import backend.AST.\nRequire Import backend.IndexLib.\nRequire Import backend.Values.LowValues.\n\n\n(* we want maps that are initialized to 0 by default,\nwhich requires an IMap instead of a PTree *)\nModule IdentIndexed <: INDEXED_TYPE.\n\nDefinition t := positive.\nDefinition index (i: positive) : positive := i.\nDefinition index_inv (i: positive) : positive := i.\n\nLemma index_invertible : forall x, index_inv (index x) = x.\nProof. reflexivity. Qed.\n\nLemma index_inj: forall (x y: positive), index x = index y -> x = y.\nProof.\nsimpl. intros x y H. exact H.\nQed.\nDefinition eq := peq.\n\nEnd IdentIndexed.\n\nModule IdentMap := IMap(IdentIndexed).\n\n(* Extended identifier,\nso a single identifier (i.e. array name)\ncan refer to multiple values *)\n\nSection ExtendedIdent.\n\n  (*Extended Ident 2:\n    An extended identifier has a base that is either Global or Local,\n    with a positive integer used to distinguish local contexts. From\n    the base new extended identifiers are generated by indexing into\n    an array or accessing an identifier as a field in a struct (treating\n    top-level variables as fields as well.) *)\n  \n  Inductive ident_ext : Type :=\n  | Global: ident_ext\n  | Local:  int256 -> ident_ext\n  | Field: ident_ext -> ident -> ident_ext\n  | Index: ident_ext -> int256 -> ident_ext\n  .\n\nEnd ExtendedIdent.\n\n(* Allow extended identifiers to be used as the index of a map. *)\nModule IdentExtIndexed <: INDEXED_TYPE.\n\n  Definition t := ident_ext.\n\n  Fixpoint index (eid : ident_ext) : positive :=\n    match eid with\n    | Global => xH\n    | Local ctx => int_index ctx\n    | Field eid id => inject_positive (index eid) id\n    | Index eid i => inject_positive (index eid) (int_index i)\n    end.\n\nDefinition index_inv (p : positive) : ident_ext.\nAdmitted.\n\nLemma index_invertible : forall x, index_inv (index x) = x.\nAdmitted.\n\nLemma index_inj: forall (x y: ident_ext), index x = index y -> x = y.\nProof.\nAdmitted.\n(*  induction x; intro y; destruct y; try discriminate.\n-\n  unfold index. intro H; injection H; clear H.\n  intro H; rewrite H; reflexivity.\n-\n  simpl. intro H; injection H; clear H.\n  intro.\n  assert ((index x)=(index y)).\n  apply injective_positive_1 with (int_index i) (int_index i0). exact H.\n  replace y with x.\n  assert ((int_index i)=(int_index i0)).\n  apply injective_positive_2 with (index x) (index y). exact H. clear H.\n  replace i0 with i.\n  reflexivity.\n  apply int_index_injective; assumption.\n  apply IHx; assumption.\nQed.*)\n\nLemma eq: forall (x y: ident_ext), {x = y} + {x <> y}.\nProof.\n  induction x; destruct y; intros; decide equality;\n  try decide equality; try apply Int256.eq_dec;\n    try apply Pos.eq_dec.\nQed.\n\nEnd IdentExtIndexed.\n\nModule IdentExtMap := IMap(IdentExtIndexed).\n\n(* `ident_ext_extends i1 i2` is true if `i2` is of the form\n   `Ihash (Ihash ... i1 ... ofs') ofs`. In other words, i2\n    designates a sub-part of the object located at i1. *)\nInductive ident_ext_extends : forall (i1 i2 : ident_ext), Prop :=\n| IIE_refl : forall eid, ident_ext_extends eid eid\n| IIE_index : forall eid1 eid2 i,\n    ident_ext_extends eid1 eid2 ->\n    ident_ext_extends eid1 (Index eid2 i)\n| IIE_field : forall eid1 eid2 id,\n    ident_ext_extends eid1 eid2 ->\n    ident_ext_extends eid1 (Field eid2 id).\n\nDefinition ident_ext_extends_inversion': forall i i2,\n    ident_ext_extends i i2 ->\n    forall i1 o f, (i = (Index i1 o) \\/ i = (Field i1 f)) ->\n    ident_ext_extends i1 i2.\nProof.                      \n  induction 1; destruct 1; subst; constructor. \n  - constructor.\n  - constructor.\n  - unshelve (eapply IHident_ext_extends; eauto); (exact (1%positive) || exact Int256.zero).\n  - unshelve (eapply IHident_ext_extends; eauto); (exact (1%positive) || exact Int256.zero).\n  - unshelve (eapply IHident_ext_extends; eauto); (exact (1%positive) || exact Int256.zero).\n  - unshelve (eapply IHident_ext_extends; eauto); (exact (1%positive) || exact Int256.zero).\nQed.    \n\nLemma ident_ext_extends_inversion_Index: forall i1 i2 o,\n    ident_ext_extends (Index i1 o) i2 ->\n    ident_ext_extends i1 i2.\nProof.                      \n  intros; eapply ident_ext_extends_inversion' with (f:= 1%positive); eauto.\nQed.\n\nLemma ident_ext_extends_inversion_Field: forall i1 i2 f,\n    ident_ext_extends (Field i1 f) i2 ->\n    ident_ext_extends i1 i2.\nProof.                      \n  intros; eapply ident_ext_extends_inversion' with (o := Int256.zero); eauto.\nQed.\n\nFixpoint ident_ext_length i :=\n  match i with\n  | Global => O\n  | Local _ => O\n  | Field i _ => S (ident_ext_length i)\n  | Index i _ => S (ident_ext_length i)\n  end.\n\nLemma ident_ext_extends_longer : forall i j,\n    ident_ext_extends i j ->\n    (ident_ext_length i <= ident_ext_length j)%nat.\nProof.\n  induction 1; simpl; omega.\nQed.\n\nLemma ident_ext_extends_disjoint_Index : forall o1 o2,\n    o1 <> o2 ->\n    forall i' i0,\n    ident_ext_extends (Index i0 o1) i' ->\n    ~ ident_ext_extends (Index i0 o2) i'.\nProof.\n  intros o1 o2 Hneq.\n  unfold not.\n  induction i'; intros i0 H1 H2.\n  - inversion H1.\n  - inversion H1.\n  - inversion H1; inversion H2; subst.\n    apply IHi' with i0; auto.\n  - inversion H1; inversion H2; subst.\n    + congruence.\n    + apply ident_ext_extends_longer in H6.\n      simpl in H6.\n      omega.\n    + apply ident_ext_extends_longer in H3.\n      simpl in H3.\n      omega.\n    + unfold not in IHi'; eapply IHi'; eassumption.\nQed.\n\nFixpoint ident_ext_base (eid : ident_ext) : ident :=\n  match eid with\n  | Field Global id => id\n  | Field (Local _) id => id\n  | Field eid _ => ident_ext_base eid\n  | Index eid _ => ident_ext_base eid\n  | Global => 1%positive  (* dummy, should not happen *)\n  | Local _ => 1%positive  (* dummy, should not happen *)\n  end.\n\n\n\nSection HValue.\n\n  (** A high value extends low values with extended-identifier pointers: *)\n  Inductive val : Type :=\n  | Vunit: val\n  | Vint: int256 -> val\n  | Vptr: lval -> val\n  | Vhash: val -> val\n  | Vhash2: val -> val -> val\n  with lval :=\n  | LVeid: ident_ext -> lval\n  | LVhash: int256 -> lval\n  | LVhash2: lval -> int256 -> lval.\n\n  Definition Vzero: val := Vint Int256.zero.\n  Definition Vone: val := Vint Int256.one.\n  Definition Vmone: val := Vint Int256.mone.\n\n  Definition Vtrue: val := Vint Int256.one.\n  Definition Vfalse: val := Vint Int256.zero.\n\n  Fixpoint OfLow (v:LowValues.val) : val :=\n    match v with\n    | LowValues.Vunit => Vunit\n    | LowValues.Vint i => Vint i\n    | LowValues.Vhash v => Vhash (OfLow v)\n    | LowValues.Vhash2 v1 v2 => Vhash2 (OfLow v1) (OfLow v2)\n    end.\n\n  Fixpoint ToLowErr (v:val) : option LowValues.val :=\n    match v with\n    | Vunit => Some LowValues.Vunit\n    | Vint i => Some (LowValues.Vint i)\n    | Vhash v => option_map LowValues.Vhash (ToLowErr v) \n    | Vhash2 v1 v2 =>\n      match ToLowErr v1, ToLowErr v2 with\n      | Some v1', Some v2' => Some (LowValues.Vhash2 v1' v2')\n      | _,_ => None\n      end\n    | Vptr _ => None\n    end.\n  \nEnd HValue.\n"
  },
  {
    "path": "src/backend/Values/LowValues.v",
    "content": "(* This may need to be changed quite a bit, see the readme file. \n\n*)\n\n(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** This module defines the type of values that is used in the dynamic\n  semantics of all our intermediate languages. *)\n\nRequire Import cclib.Coqlib.\nRequire Import cclib.Integers.\nRequire Import cclib.Maps.\nRequire Import backend.AST.\nRequire Import backend.IndexLib.\n\n\n(* we want maps that are initialized to 0 by default,\nwhich requires an IMap instead of a PTree *)\nModule IdentIndexed <: INDEXED_TYPE.\n\nDefinition t := positive.\nDefinition index (i: positive) : positive := i.\nDefinition index_inv (i: positive) : positive := i.\n\nLemma index_invertible : forall x, index_inv (index x) = x.\nProof. reflexivity. Qed.\n  \nLemma index_inj: forall (x y: positive), index x = index y -> x = y.\nProof.\nsimpl. intros x y H. exact H.\nQed.\nDefinition eq := peq.\n\nEnd IdentIndexed.\n\nModule Int256Map := IMap(Int256Indexed).\n\n(* Currently skipping hashes; should come back to do the rest. *)\n(* `ident_ext_extends i1 i2` is true if `i2` is of the form\n   `Ihash (Ihash ... i1 ... ofs') ofs`. In other words, i2\n    designates a sub-part of the object located at i1. *)\nInductive ident_ext_extends : int256 -> int256 -> Prop :=\n| IIE_refl : forall i, ident_ext_extends i i.\n\n(*| IIE_index : forall eid1 eid2 i,\n    ident_ext_extends eid1 eid2 ->\n    ident_ext_extends eid1 (Index eid2 i)\n| IIE_field : forall eid1 eid2 id,\n    ident_ext_extends eid1 eid2 ->\n    ident_ext_extends eid1 (Field eid2 id).*)\n\n(*Definition ident_ext_extends_inversion': forall i i2,\n    ident_ext_extends i i2 ->\n    forall i1 o, i = (Ihash i1 o) ->\n    ident_ext_extends i1 i2.\nProof.                      \n  induction 1; intros; subst.\n  - constructor; constructor.\n  - constructor.\n    eapply IHident_ext_extends.\n    reflexivity.\nQed.    \n\nLemma ident_ext_extends_inversion: forall i1 i2 o,\n    ident_ext_extends (Ihash i1 o) i2 ->\n    ident_ext_extends i1 i2.\nProof.                      \n  intros; eauto using ident_ext_extends_inversion'.\nQed.\n\nFixpoint ident_ext_length i :=\n  match i with\n  | Iident _ => O\n  | Ihash i _ => S (ident_ext_length i)\n  end.\n\nLemma ident_ext_extends_longer : forall i j,\n    ident_ext_extends i j ->\n    (ident_ext_length i <= ident_ext_length j)%nat.\nProof.\n  induction 1.\n  - omega.\n  - simpl.\n    omega.\n Qed.\n\nLemma ident_ext_extends_disjoint : forall o1 o2,\n    o1 <> o2 ->\n    forall i' i0,\n    ident_ext_extends (Ihash i0 o1) i' ->\n    ~ ident_ext_extends (Ihash i0 o2) i'.\nProof.\n  intros o1 o2 Hneq.\n  unfold not.\n  induction i'; intros i0 H1 H2.\n  - inversion H1.\n  - inversion H1; inversion H2; subst.\n    + congruence.\n    + apply ident_ext_extends_longer in H6.\n      simpl in H6.\n      omega.\n    + apply ident_ext_extends_longer in H3.\n      simpl in H3.\n      omega.\n    + unfold not in IHi'; eapply IHi'; eassumption.\nQed.\n *)\n\n(** A value is either:\n- Vunit. When a function returns unit, we compile it to code which actually pushes a value to the stack, namely this value.\n- a machine integer;\n- a pointer, which is also a machine integer;\n- a hash\n *)\nInductive val: Type :=\n| Vunit: val\n| Vint: int256 -> val\n| Vhash: val -> val\n| Vhash2: val -> val -> val\n.\n    \nDefinition Vzero: val := Vint Int256.zero.\nDefinition Vone: val := Vint Int256.one.\nDefinition Vmone: val := Vint Int256.mone.\n\nDefinition Vtrue: val := Vint Int256.one.\nDefinition Vfalse: val := Vint Int256.zero.\n"
  },
  {
    "path": "src/backend/extraction/ASM.ml",
    "content": "open Integers\nopen StmtCGraph\nopen ExpCintptr\n\nmodule Links = Map.Make(struct type t = AST.label let compare = compare end)\n\ntype asm =\n| EVM_STOP\n| EVM_ADD\n| EVM_MUL\n| EVM_SUB\n| EVM_DIV\n| EVM_SDIV\n| EVM_MOD\n| EVM_SMOD\n| EVM_ADDMOD\n| EVM_MULMOD\n| EVM_EXP\n| EVM_SIGNEXTEND\n| EVM_LT\n| EVM_GT\n| EVM_SLT\n| EVM_SGT\n| EVM_EQ\n| EVM_ISZERO\n| EVM_AND\n| EVM_OR\n| EVM_XOR\n| EVM_NOT\n| EVM_BYTE\n| EVM_SHA3\n| EVM_ADDRESS\n| EVM_BALANCE\n| EVM_ORIGIN\n| EVM_CALLER\n| EVM_CALLVALUE\n| EVM_CALLDATALOAD\n| EVM_CALLDATASIZE\n| EVM_CODESIZE\n| EVM_GASPRICE\n| EVM_EXTCODESIZE\n| EVM_BLOCKHASH\n| EVM_COINBASE\n| EVM_TIMESTAMP\n| EVM_NUMBER\n| EVM_DIFFICULTY\n| EVM_GASLIMIT\n| EVM_CHAINID\n| EVM_SELFBALANCE\n| EVM_GAS\n| EVM_CODECOPY\n| EVM_POP\n| EVM_MLOAD\n| EVM_MSTORE\n| EVM_MSTORE8\n| EVM_SLOAD\n| EVM_SSTORE\n| EVM_JUMP\n| EVM_JUMPI\n| EVM_JUMPDEST of string\n| EVM_PUSH of int * string\n| EVM_DUP of int\n| EVM_SWAP of int\n| EVM_LOG of int\n| EVM_CALL\n| EVM_REVERT\n| EVM_RETURN\n| EVM_TOTAL_LENGTH of int\n\ntype asm_program  = asm list\ntype evm_program  = EVM.evm list\n\ntype intermediate = {\n    constructor : evm_program ;\n    body        : evm_program\n  }\n\n(* we assume jump destinations can fit in 4 bytes *)\nlet address_bytes = 4\n\n\nlet pad len s =\n  String.make (len - (String.length s)) '0' ^ s\n\n(* compute number of bytes needed to represent a value *)\nlet allocate =\n  let allocate' p =\n    let rec count_digits = function\n      | BinNums.Coq_xI v -> 1 + count_digits v\n      | BinNums.Coq_xO v -> 1 + count_digits v\n      | BinNums.Coq_xH   -> 1\n    in (count_digits p + 7) / 8\n  in function\n  | BinNums.Z0 -> 1\n  | BinNums.Zpos x -> allocate' x\n  | BinNums.Zneg x -> raise (Failure \"allocate is undefined on negative numbers\")\n\n(* construct a mapping from label -> PC *)\nlet map_labels program = \n  let rec map_labels' program counter =\n    match program with\n    | [] -> Links.empty\n    | (x :: xs) ->\n       match x with\n       | EVM.Coq_evm_label l -> Links.add l counter (map_labels' xs (counter + 1))\n       | EVM.Coq_evm_totallength l -> map_labels' xs (counter + 3)\n       | EVM.Coq_evm_push_label l -> map_labels' xs (counter + 5)\n       | EVM.Coq_evm_push v -> map_labels' xs (counter + 1 + allocate v)\n       | _ -> map_labels' xs (counter + 1)\n  in map_labels' program 0\n\nlet hex x = Printf.sprintf \"%x\" x\n\n(* compute the bytecode for some push data *) \nlet assemble_pushdata n data =\n  let hex_of_coq_int =\n    let rec hex_of_coq_pos partial count =\n      let rec pow2 = function\n        | 0 -> 1\n        | n -> 2 * (pow2 (n-1)) in\n      let lastchar = if count == 4 then Printf.sprintf \"%x\" partial else \"\"\n      and partial = if count == 4 then 0 else partial\n      and count = count mod 4\n      in function\n      | BinNums.Coq_xI rest -> (hex_of_coq_pos (partial + (pow2 count)) (count + 1) rest) ^ lastchar\n      | BinNums.Coq_xO rest -> (hex_of_coq_pos partial (count + 1) rest) ^ lastchar\n      | BinNums.Coq_xH -> (hex (partial + (pow2 count))) ^ lastchar\n    in function\n    | BinNums.Z0 -> \"0\"\n    | BinNums.Zpos v -> hex_of_coq_pos 0 0 v\n    | BinNums.Zneg v -> raise (Failure \"undefined\")\n  in\n  pad (n * 2) (hex_of_coq_int data)\n\nlet rec hex_of_coq_pos partial count =\n  let rec pow2 = function\n    | 0 -> 1\n    | n -> 2 * (pow2 (n-1)) in\n  let lastchar = if count == 4 then Printf.sprintf \"%x\" partial else \"\"\n  and partial = if count == 4 then 0 else partial\n  and count = count mod 4\n  in function\n  | BinNums.Coq_xI rest -> (hex_of_coq_pos (partial + (pow2 count)) (count + 1) rest) ^ lastchar\n  | BinNums.Coq_xO rest -> (hex_of_coq_pos partial (count + 1) rest) ^ lastchar\n  | BinNums.Coq_xH -> (hex (partial + (pow2 count))) ^ lastchar\n\n(* hex_of_coq_pos 0 0 v *)\n\nlet rec scgraph_expr e = \n  let spos = hex_of_coq_pos 0 0 in\n  match e with\n  | Econst_int (i, t) -> \"int\"\n  | Econst_int256 (v, t) -> \"0x\" ^ assemble_pushdata (allocate v) v\n  | Etempvar (i, t) -> \"tempvar_\" ^ spos i\n  | Esload (e, t) -> \"(sload \" ^ scgraph_expr e ^ \")\"\n  | Emload (e, t) -> \"(mload \" ^ scgraph_expr e ^ \")\"\n  | Eaddr (e, t) -> \"(addr \" ^ scgraph_expr e ^ \")\"\n  | Eunop (uo, e, t) -> \"(unop @ \" ^ scgraph_expr e ^ \")\"\n  | Ebinop (bo, e1, e2, t) -> \"(binop @ \" ^ scgraph_expr e1 ^ \" \" ^ scgraph_expr e2 ^ \")\"\n  | Ecall0 (b0, t) -> \"call0\"\n  | Ecall1 (b1, e, t) -> \"(call1 \" ^ scgraph_expr e ^ \")\"\n\nlet getlabel id s = \n  let spos = hex_of_coq_pos 0 0 in\n  match s with \n  | StmtCGraph.Sskip n -> \n    \"\\\"\" ^ (spos id) ^ \" : skip\\\"\"\n  | Ssassign (e1, e2, n) -> \n    \"\\\"\" ^ (spos id) ^ \" : \" ^ scgraph_expr e1 ^ \" :s= \" ^ scgraph_expr e2 ^ \"\\\"\"\n  | Smassign (e1, e2, n) -> \n    \"\\\"\" ^ (spos id) ^ \" : \" ^ scgraph_expr e1 ^ \" :m= \" ^ scgraph_expr e2 ^ \"\\\"\"\n  | Sset (i, e, n) -> \n    \"\\\"\" ^ (spos id) ^ \" : \" ^ \"tempvar_\" ^ spos i ^ \" = \" ^ scgraph_expr e ^ \"\\\"\"\n  | Scall (retval, l, el, n) -> \n    \"\\\"\" ^ (spos id) ^ \" : call\\\"\"\n  | Scond (e, n, n') -> \n    \"\\\"\" ^ (spos id) ^ \" : if \" ^ scgraph_expr e ^ \"\\\"\"\n  | Shash (e1, e2, eo, n') -> \n    \"\\\"\" ^ (spos id) ^ \" : shash  \\\"\"\n  | Sreturn (eo, n) -> \n    \"\\\"\" ^ (spos id) ^ \" : return \\\"\"\n  | Sdone -> \n    \"\\\"\" ^ (spos id) ^ \" : done \\\"\"\n  | Stransfer (e1, e2, n, n') -> \n    \"\\\"\" ^ (spos id) ^ \" : transfer \\\"\"\n  | StmtCGraph.Scallmethod (eil, il, i, e, eo, el, n, n') ->\n    \"\\\"\" ^ (spos id) ^ \" : callmethod \\\"\"\n  | Slog (el1, el2, n) -> \n    \"\\\"\" ^ (spos id) ^ \" : log \\\"\"\n  | Srevert ->\n    \"\\\"\" ^ (spos id) ^ \" : revert \\\"\"\n\nlet mnemonics_cgraph cd en = \n  let spos = hex_of_coq_pos 0 0 in\n  \"digraph mygraph {\n  node [shape=box];\n\n  \\\"entry\\\"\n  \\\"entry\\\" -> \\\"\" ^ spos en ^ \"\\\"\\n\" ^  \n  String.concat \"\\n\"\n  (List.map (fun x -> \n    match x with\n    | (id, s) ->\n      let label = getlabel id s in\n      let transitionsn n = \n        String.concat \"\\n\"\n        (List.map\n        (fun x -> match x with | (id, s') -> label ^ \" -> \" ^ getlabel id s')\n        (List.filter (fun x -> match x with | (id, s) -> if id = n then true else false) cd))\n      in\n      match s with\n      | Sskip n -> \n        label ^ \"\\n\" ^ transitionsn n\n      | Smassign (e1, e2, n) -> \n        label ^ \"\\n\" ^ transitionsn n\n      | Ssassign (e1, e2, n) -> \n        label ^ \"\\n\" ^ transitionsn n\n      | Sset (i, e, n) -> \n        label ^ \"\\n\" ^ transitionsn n\n      | Scall (io, l, el, n) -> \n        label ^ \"\\n\" ^ transitionsn n\n      | Scond (e, n1, n2) -> \n        label ^ \"\\n\" ^ transitionsn n1 ^ \"\\n\" ^ transitionsn n2\n      | Sreturn (eo, n) -> \n        label ^ \"\\n\" ^ transitionsn n\n      | Shash (e1, e2, eo, n) -> \n        label ^ \"\\n\" ^ transitionsn n\n      | Sdone -> \n        label ^ \"\\n\"\n      | Stransfer (e1, e2, n1, n2) -> \n        label ^ \"\\n\" ^ transitionsn n1 ^ \"\\n\" ^ transitionsn n2\n      | Scallmethod (eil, il, i, e, eo, el, n1, n2) ->\n        label ^ \"\\n\" ^ transitionsn n1 ^ \"\\n\" ^ transitionsn n2\n      | Slog (el1, el2, n) -> \n        label ^ \"\\n\" ^ transitionsn n\n      | Srevert -> \n        label ^ \"\\n\"\n    ) cd)\n  ^ \"\\n}\"\n\nlet mnemonics_clash cg = \n  let spos = hex_of_coq_pos 0 0 in\n  \"digraph mygraph {\n  node [shape=box];\\n\" ^\n  String.concat \"\\n\"\n  (List.map (fun x -> \n    let label a = \"\\\" tempvar_\" ^ (spos a) ^ \" \\\"\" in\n    match x with\n    | (id, l) ->\n      label id ^ \"\\n\" ^ \n      (String.concat \"\\n\"\n      (List.map (fun xx -> \n        label id ^ \" -> \" ^ label xx\n      ) l))\n    ) cg)\n  ^ \"\\n}\"\n\nlet constructor_counter = ref (-1)\n\n(* compute the bytecode for an opcode *)\nlet assemble_op x = pad 2 (hex x)\n\n(* evm -> asm *)\nlet transform_inst links = function\n  | EVM.Coq_evm_stop               -> EVM_STOP\n  | EVM.Coq_evm_add                -> EVM_ADD\n  | EVM.Coq_evm_mul                -> EVM_MUL\n  | EVM.Coq_evm_sub                -> EVM_SUB\n  | EVM.Coq_evm_div                -> EVM_DIV\n  | EVM.Coq_evm_sdiv               -> EVM_SDIV\n  | EVM.Coq_evm_mod                -> EVM_MOD\n  | EVM.Coq_evm_smod               -> EVM_SMOD\n  | EVM.Coq_evm_addmod             -> EVM_ADDMOD\n  | EVM.Coq_evm_mulmod             -> EVM_MULMOD\n  | EVM.Coq_evm_exp                -> EVM_EXP\n  | EVM.Coq_evm_signextend         -> EVM_SIGNEXTEND\n  | EVM.Coq_evm_lt                 -> EVM_LT\n  | EVM.Coq_evm_gt                 -> EVM_GT\n  | EVM.Coq_evm_slt                -> EVM_SLT\n  | EVM.Coq_evm_sgt                -> EVM_SGT\n  | EVM.Coq_evm_eq                 -> EVM_EQ\n  | EVM.Coq_evm_iszero             -> EVM_ISZERO\n  | EVM.Coq_evm_and                -> EVM_AND\n  | EVM.Coq_evm_or                 -> EVM_OR\n  | EVM.Coq_evm_xor                -> EVM_XOR\n  | EVM.Coq_evm_not                -> EVM_NOT\n  | EVM.Coq_evm_byte               -> EVM_BYTE\n  | EVM.Coq_evm_sha3               -> EVM_SHA3\n  | EVM.Coq_evm_address            -> EVM_ADDRESS\n  | EVM.Coq_evm_balance            -> EVM_BALANCE\n  | EVM.Coq_evm_origin             -> EVM_ORIGIN\n  | EVM.Coq_evm_caller             -> EVM_CALLER\n  | EVM.Coq_evm_callvalue          -> EVM_CALLVALUE\n  | EVM.Coq_evm_calldataload       -> EVM_CALLDATALOAD\n  | EVM.Coq_evm_calldatasize       -> EVM_CALLDATASIZE\n  | EVM.Coq_evm_codesize           -> EVM_CODESIZE\n  | EVM.Coq_evm_gasprice           -> EVM_GASPRICE\n  | EVM.Coq_evm_extcodesize        -> EVM_EXTCODESIZE\n  | EVM.Coq_evm_blockhash          -> EVM_BLOCKHASH\n  | EVM.Coq_evm_coinbase           -> EVM_COINBASE\n  | EVM.Coq_evm_timestamp          -> EVM_TIMESTAMP\n  | EVM.Coq_evm_number             -> EVM_NUMBER\n  | EVM.Coq_evm_chainid            -> EVM_CHAINID\n  | EVM.Coq_evm_selfbalance        -> EVM_SELFBALANCE\n  | EVM.Coq_evm_difficulty         -> EVM_DIFFICULTY\n  | EVM.Coq_evm_gaslimit           -> EVM_GASLIMIT\n  | EVM.Coq_evm_gas                -> EVM_GAS\n  | EVM.Coq_evm_codecopy           -> EVM_CODECOPY\n  | EVM.Coq_evm_pop                -> EVM_POP\n  | EVM.Coq_evm_mload              -> EVM_MLOAD\n  | EVM.Coq_evm_mstore             -> EVM_MSTORE\n  | EVM.Coq_evm_mstore8            -> EVM_MSTORE8\n  | EVM.Coq_evm_sload              -> EVM_SLOAD\n  | EVM.Coq_evm_sstore             -> EVM_SSTORE\n  | EVM.Coq_evm_jump               -> EVM_JUMP\n  | EVM.Coq_evm_jumpi              -> EVM_JUMPI\n  | EVM.Coq_evm_label l            -> EVM_JUMPDEST (Printf.sprintf \"%08x\" (Links.find l links))\n  | EVM.Coq_evm_push x ->\n     EVM_PUSH (allocate x, assemble_pushdata (allocate x) x)\n  | EVM.Coq_evm_push_label l ->\n     EVM_PUSH (address_bytes, Printf.sprintf \"%08x\" (Links.find l links))\n  | EVM.Coq_evm_dup n ->\n     EVM_DUP (DatatypesExt.eval_nat n)\n  | EVM.Coq_evm_swap n ->\n     EVM_SWAP (DatatypesExt.eval_nat n)\n  | EVM.Coq_evm_log n              -> EVM_LOG (DatatypesExt.eval_nat n)\n  | EVM.Coq_evm_call               -> EVM_CALL\n  | EVM.Coq_evm_revert             -> EVM_REVERT\n  | EVM.Coq_evm_return             -> EVM_RETURN\n  | EVM.Coq_evm_totallength n      -> EVM_TOTAL_LENGTH (DatatypesExt.eval_nat n)\n\n(* asm -> bytecode *)\nlet assemble_inst programsize = function\n  | EVM_STOP -> \"00\"\n  | EVM_ADD -> \"01\"\n  | EVM_MUL -> \"02\"\n  | EVM_SUB -> \"03\"\n  | EVM_DIV -> \"04\"\n  | EVM_SDIV -> \"05\"\n  | EVM_MOD -> \"06\"\n  | EVM_SMOD -> \"07\"\n  | EVM_ADDMOD -> \"08\"\n  | EVM_MULMOD -> \"09\"\n  | EVM_EXP -> \"0a\"\n  | EVM_SIGNEXTEND -> \"0b\"\n  | EVM_LT -> \"10\"\n  | EVM_GT -> \"11\"\n  | EVM_SLT -> \"12\"\n  | EVM_SGT -> \"13\"\n  | EVM_EQ -> \"14\"\n  | EVM_ISZERO -> \"15\"\n  | EVM_AND -> \"16\"\n  | EVM_OR -> \"17\"\n  | EVM_XOR -> \"18\"\n  | EVM_NOT -> \"19\"\n  | EVM_BYTE -> \"1a\"\n  | EVM_SHA3 -> \"20\"\n  | EVM_ADDRESS -> \"30\"\n  | EVM_BALANCE -> \"31\"\n  | EVM_ORIGIN -> \"32\"\n  | EVM_CALLER -> \"33\"\n  | EVM_CALLVALUE -> \"34\"\n  | EVM_CALLDATALOAD -> \"35\"\n  | EVM_CALLDATASIZE -> \"36\"\n  | EVM_CODESIZE -> \"38\"\n  | EVM_GASPRICE -> \"3a\"\n  | EVM_EXTCODESIZE -> \"3b\"\n  | EVM_BLOCKHASH -> \"40\"\n  | EVM_COINBASE -> \"41\"\n  | EVM_TIMESTAMP -> \"42\"\n  | EVM_NUMBER -> \"43\"\n  | EVM_DIFFICULTY -> \"44\"\n  | EVM_GASLIMIT -> \"45\"\n  | EVM_CHAINID -> \"46\"\n  | EVM_SELFBALANCE -> \"47\"\n  | EVM_GAS -> \"5a\"\n  | EVM_CODECOPY -> \"39\"\n  | EVM_POP -> \"50\"\n  | EVM_MLOAD -> \"51\"\n  | EVM_MSTORE -> \"52\"\n  | EVM_MSTORE8 -> \"53\"\n  | EVM_SLOAD -> \"54\"\n  | EVM_SSTORE -> \"55\"\n  | EVM_JUMP -> \"56\"\n  | EVM_JUMPI -> \"57\"\n  | EVM_JUMPDEST l -> \"5b\"\n  | EVM_PUSH (n, data) ->\n     (assemble_op (95 + n)) ^ data\n  | EVM_DUP n -> (* print_endline (string_of_int n); if n > 16 then \"DUP error\" else *) assemble_op (127 + n)\n  | EVM_SWAP n -> assemble_op (143 + n)\n  | EVM_LOG n -> assemble_op (160 + n) \n  | EVM_CALL -> \"f1\"\n  | EVM_REVERT -> \"fd\"\n  | EVM_RETURN -> \"f3\"\n  | EVM_TOTAL_LENGTH n -> let total_length =  hex(programsize + ((n) * 32)) in\n                         \"61\" ^ (pad 4 total_length)\n\nlet show_asm_inst = function\n  | EVM_STOP -> \"STOP\"\n  | EVM_ADD -> \"ADD\"\n  | EVM_MUL -> \"MUL\"\n  | EVM_SUB -> \"SUB\"\n  | EVM_DIV -> \"DIV\"\n  | EVM_SDIV -> \"SDIV\"\n  | EVM_MOD -> \"MOD\"\n  | EVM_SMOD -> \"SMOD\"\n  | EVM_ADDMOD -> \"ADDMOD\"\n  | EVM_MULMOD -> \"MULMOD\"\n  | EVM_EXP -> \"EXP\"\n  | EVM_SIGNEXTEND -> \"SIGNEXTEND\"\n  | EVM_LT -> \"LT\"\n  | EVM_GT -> \"GT\"\n  | EVM_SLT -> \"SLT\"\n  | EVM_SGT -> \"SGT\"\n  | EVM_EQ -> \"EQ\"\n  | EVM_ISZERO -> \"ISZERO\"\n  | EVM_AND -> \"AND\"\n  | EVM_OR -> \"OR\"\n  | EVM_XOR -> \"XOR\"\n  | EVM_NOT -> \"NOT\"\n  | EVM_BYTE -> \"BYTE\"\n  | EVM_SHA3 -> \"SHA3\"\n  | EVM_ADDRESS -> \"ADDRESS\"\n  | EVM_BALANCE -> \"BALANCE\"\n  | EVM_ORIGIN -> \"ORIGIN\"\n  | EVM_CALLER -> \"CALLER\"\n  | EVM_CALLVALUE -> \"CALLVALUE\"\n  | EVM_CALLDATALOAD -> \"CALLDATALOAD\"\n  | EVM_CALLDATASIZE -> \"CALLDATASIZE\"\n  | EVM_CODESIZE -> \"CODESIZE\"\n  | EVM_GASPRICE -> \"GASPRICE\"\n  | EVM_EXTCODESIZE -> \"EXTCODESIZE\"\n  | EVM_BLOCKHASH -> \"BLOCKHASH\"\n  | EVM_COINBASE -> \"COINBASE\"\n  | EVM_TIMESTAMP -> \"TIMESTAMP\"\n  | EVM_NUMBER -> \"NUMBER\"\n  | EVM_DIFFICULTY -> \"DIFFICULTY\"\n  | EVM_GASLIMIT -> \"GASLIMIT\"\n  | EVM_CHAINID -> \"CHAINID\"\n  | EVM_SELFBALANCE -> \"SELFBALANCE\"\n  | EVM_GAS -> \"GAS\"\n  | EVM_CODECOPY -> \"CODECOPY\"\n  | EVM_POP -> \"POP\"\n  | EVM_MLOAD -> \"MLOAD\"\n  | EVM_MSTORE -> \"MSTORE\"\n  | EVM_MSTORE8 -> \"MSTORE8\"\n  | EVM_SLOAD -> \"SLOAD\"\n  | EVM_SSTORE -> \"SSTORE\"\n  | EVM_JUMP -> \"JUMP\"\n  | EVM_JUMPI -> \"JUMPI\"\n  | EVM_JUMPDEST l -> (\"L\"^ l ^ \": JUMPDEST\")\n  | EVM_PUSH (n, data) ->\n     Printf.sprintf \"%-16s %s\" (Printf.sprintf \"PUSH%d\" n) data\n  | EVM_DUP n -> Printf.sprintf \"DUP%d\" n\n  | EVM_SWAP n -> Printf.sprintf \"SWAP%d\" n\n  | EVM_CALL -> \"CALL\"\n  | EVM_REVERT -> \"REVERT\"\n  | EVM_RETURN -> \"RETURN\"\n  | EVM_LOG n -> Printf.sprintf \"LOG%d\" n\n  | EVM_TOTAL_LENGTH n ->  Printf.sprintf \"TOTAL_LENGTH%d\" n (* this is a dummy total length for futher calculation when push the constructor arguments *)\n\nlet show_evm program =\n  List.fold_left (fun acc x -> acc ^ \"\\n\" ^ (EVMExt.show x)) \"\" program\n\nlet split program label =\n  let rec constructor_helper target acc = function\n    | x :: xs ->\n       if (x = target) then\n         acc\n       else\n         constructor_helper target (acc @ [x]) xs\n    | [] -> []\n  and body_helper target = function\n    | x :: xs ->\n       if (x = target) then\n         x :: xs\n       else\n         body_helper target xs\n    | [] -> []\n  in\n  {\n    constructor = constructor_helper (EVM.Coq_evm_label label) [] program ;\n    body = body_helper (EVM.Coq_evm_label label) program\n  }\n\nlet size_of_inst = function\n  | EVM_PUSH (n, data) -> 1 + n\n  | EVM_TOTAL_LENGTH n -> 3\n  | _ -> 1\n\nlet size_of_program asm =\n  List.fold_left (fun acc x -> acc + (size_of_inst x)) 0 asm \n\nlet assemble program =\n  let programsize = size_of_program program in\n  let bytecode_list = List.map (assemble_inst programsize) program in\n  List.fold_left (fun acc x -> acc ^ x) \"\" bytecode_list\n\nlet transform program entrypoint =\n  let transform_intermediate program =\n    let transform' links p =\n      List.map (transform_inst links) p in\n    let chop_links n =\n      Links.map (fun x -> x - n) in\n    let links = map_labels (program.constructor @ program.body) in\n    let constructor_asm = transform' links program.constructor in\n    let constructor_size = size_of_program constructor_asm in\n    let links' = chop_links constructor_size links in\n    let body_asm = transform' links' program.body in\n    (constructor_asm @ body_asm), body_asm\n  in\n  transform_intermediate (split program entrypoint)\n\nlet mnemonics program =\n  List.fold_left (fun acc x -> acc ^ \"\\n\" ^ (show_asm_inst x)) \"\" program\n\n\n(* Frontend for WebAssembly *)\n\n(* coq_module = { coq_M_types : functype list; coq_M_funcs : func list;\n                    coq_M_tables : table list; coq_M_mems : mem list;\n                    coq_M_globals : global list; coq_M_elem : elem list;\n                    coq_M_data : data list; coq_M_start : start option;\n                    coq_M_imports : import list; coq_M_exports : export list } *)\n\n(* type func = { coq_F_type : nat; coq_F_locals : valtype list; coq_F_body : expr } *)\n\nlet rec indent lvl = \n  if lvl = 0 then \"\" else \"  \"  ^ indent (lvl - 1)\n\nlet matchtypes tx = \n  match tx with\n  | Types.T_i32 -> \"i32\"\n  | Types.T_i64 -> \"i64\"\n  | Types.T_f32 -> \"f32\"\n  | Types.T_f64 -> \"f64\"\n\n(* address, data, value, result, path, topic1, topic2, topic3, topic4 *)\n(* corresponds to 0, 256, 256 * 2, 256 * 3, ... *)\nlet wasm_frontend_data = \n  (* wasm_f131_data ^ \"\\n\" ^ *)\n  (String.concat \"\\n\"\n  [\n    (*\n    (indent 1) ^ \"(data (i32.const 1179648) \\\"0\\\")\"; (* address *)\n    (indent 1) ^ \"(data (i32.const 1179904) \\\"0\\\")\"; (* data *)\n    (indent 1) ^ \"(data (i32.const 1180160) \\\"0\\\")\"; (* value *)\n    (indent 1) ^ \"(data (i32.const 1180416) \\\"0\\\")\"; (* result *)\n    (indent 1) ^ \"(data (i32.const 1180672) \\\"0\\\")\"; (* path *)\n    (indent 1) ^ \"(data (i32.const 1180928) \\\"0\\\")\"; (* topic1 *)\n    (indent 1) ^ \"(data (i32.const 1181184) \\\"0\\\")\"; (* topic2 *)\n    (indent 1) ^ \"(data (i32.const 1181440) \\\"0\\\")\"; (* topic3 *)\n    (indent 1) ^ \"(data (i32.const 1181696) \\\"0\\\")\"; (* topic4 *)\n    *)\n\n    (indent 1) ^ \"(data (i32.const 0) \\\"0\\\")\"; (* address *)\n    (indent 1) ^ \"(data (i32.const 256) \\\"0\\\")\"; (* data *)\n    (indent 1) ^ \"(data (i32.const 512) \\\"0\\\")\"; (* value *)\n    (indent 1) ^ \"(data (i32.const 768) \\\"0\\\")\"; (* result *)\n    (indent 1) ^ \"(data (i32.const 1024) \\\"0\\\")\"; (* path *)\n    (indent 1) ^ \"(data (i32.const 1280) \\\"0\\\")\"; (* topic1 *)\n    (indent 1) ^ \"(data (i32.const 1536) \\\"0\\\")\"; (* topic2 *)\n    (indent 1) ^ \"(data (i32.const 1792) \\\"0\\\")\"; (* topic3 *)\n    (indent 1) ^ \"(data (i32.const 2048) \\\"0\\\")\"; (* topic4 *)\n  ])\n\n(* three globals reserved for scratch space *)\nlet wasm_frontend_global =\n  indent 1 ^ \"(global (mut i32) (i32.const 0))\" ^ \n  indent 1 ^ \"(global (mut i32) (i32.const 0))\" ^ \n  indent 1 ^ \"(global (mut i32) (i32.const 0))\"\n\nlet wasm_frontend_mems = \n  (indent 1) ^ \"(memory (;0;) 20)\"\n\n(* aux function definitions *)\nlet wasm_frontend_aux_fucs : string =\n  (* pow *)\n  indent 1 ^ \"(func $f128 (param $0 i32) (param $1 i32) (result i32)\n    (local $2 i32)\n    (local $3 i32)\n    (local.set $3\n    (select\n      (local.get $0)\n      (i32.const 1)\n      (i32.and\n      (local.get $1)\n      (i32.const 1)\n      )\n    )\n    )\n    (block $label$0\n    (br_if $label$0\n      (i32.eqz\n      (local.tee $1\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n    )\n    (loop $label$1\n      (local.set $3\n      (i32.mul\n        (select\n        (local.tee $0\n          (i32.mul\n          (local.get $0)\n          (local.get $0)\n          )\n        )\n        (i32.const 1)\n        (i32.and\n          (local.get $1)\n          (i32.const 1)\n        )\n        )\n        (local.get $3)\n      )\n      )\n      (local.set $1\n      (local.tee $2\n        (i32.shr_s\n        (local.get $1)\n        (i32.const 1)\n        )\n      )\n      )\n      (br_if $label$1\n      (local.get $2)\n      )\n    )\n    )\n    (local.get $3))\" ^ \"\\n\" ^ \n  (* sha1, $f129, not used *)\n  indent 1 ^ \"(func $f129 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\" ^ \"\\n\" ^\n  (* sha2, $f130, not used *)\n  indent 1 ^ \"(func $f130 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\" ^ \"\\n\" ^\n  (* sha3, $f131, seperate definition *)\n  (* wasm_f131_func ^ \"\\n\" ^ *)\n  (* indent 1 ^ \"(func $f131 (param $p0 i32) (param $p1 i32) (result i32) \n      local.get 0\n    )\" ^ \"\\n\" ^ *)\n  (* notint, $f132 *)\n  indent 1 ^ \"(func $f132 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const -1\n    i32.xor)\" ^ \"\\n\" ^ \n  (* setup return state, used for debugging & revert messages *)\n  indent 1 ^ \"(func $set_returndata (param $value i32) (result )\n    i32.const 256 ;; offset to store\n    local.get $value ;; valut to store\n    i32.store\n  )\" ^ \"\\n\" ^ \n  (* fallback, reverts state *)\n  indent 1 ^ \"(func $fallback (param ) (result) \n    i32.const 256\n    i32.const 4\n    call $f28\n    )\" ^ \"\\n\" ^ \n  indent 1 ^ \"(func $chendian32 (param $p0 i32) (result i32)\n    local.get $p0\n    i32.const 24\n    i32.shl\n    local.get $p0\n    i32.const 8\n    i32.shl\n    i32.const 16711680\n    i32.and\n    i32.or\n    local.get $p0\n    i32.const 8\n    i32.shr_u\n    i32.const 65280\n    i32.and\n    local.get $p0\n    i32.const 24\n    i32.shr_u\n    i32.or\n    i32.or)\"\n\nlet wasm_frontend_imports is_runtime = \n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getAddress\\\"  (func $f0 (param i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getExternalBalance\\\"  (func $f1 (param i32 i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getBlockHash\\\"  (func $f2 (param i64 i32) (result i32)))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"callDataCopy\\\"  (func $f4 (param i32 i32 i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getCallDataSize\\\"  (func $f5 (param ) (result i32)))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"callDelegate\\\"  (func $f7 (param i64 i32 i32 i32) (result i32)))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"storageStore\\\"  (func $f8 (param i32 i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"storageLoad\\\"  (func $f9 (param i32 i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getCaller\\\"  (func $f10 (param i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getCallValue\\\"  (func $f11 (param i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getBlockCoinbase\\\"  (func $f14 (param i32) (result i32)))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getBlockDifficulty\\\"  (func $f16 (param i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getGasLeft\\\"  (func $f19 (param ) (result i64)))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getBlockGasLimit\\\"  (func $f20 (param ) (result i64)))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getTxGasPrice\\\"  (func $f21 (param i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"log\\\"  (func $f22 (param i32 i32 i32 i32 i32 i32 i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getBlockNumber\\\"  (func $f23 (param ) (result i64)))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getTxOrigin\\\"  (func $f24 (param i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"useGas\\\"  (func $f25 (param i64) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getBlockTimestamp\\\"  (func $f27 (param ) (result i64)))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"revert\\\"  (func $f28 (param i32 i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getReturnDataSize\\\"  (func $f29 (param ) (result i32)))\" ^ \"\\n\" ^ (* special EEI for SOLL *)\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"returnDataCopy\\\"  (func $f30 (param i32 i32 i32) (result )))\" ^ \"\\n\" ^\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"call\\\"  (func $f3 (param i64 i32 i32 i32 i32) (result i32)))\" ^ \"\\n\" ^\n\n  (if is_runtime then \"\" else (\n    (* (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"selfDestruct\\\"  (func $f26 (param i32) (result )))\" ^ \"\\n\" ^ *)\n    (* (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"externalCodeCopy\\\"  (func $f17 (param i32 i32 i32 i32) (result )))\" ^ \"\\n\" ^ *)\n    (* (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getExternalCodeSize\\\"  (func $f18 (param i32) (result i32)))\" ^ \"\\n\" ^ *)\n    (* (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"create\\\"  (func $f15 (param i32 i32 i32 i32) (result i32)))\" ^ \"\\n\" ^ *)\n    (* (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"callCode\\\"  (func $f6 (param i64 i32 i32 i32 i32) (result i32)))\" ^ \"\\n\" ^ *)\n    (* (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"codeCopy\\\"  (func $f12 (param i32 i32 i32) (result )))\" ^ \"\\n\" ^ *)\n    (* (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"getCodeSize\\\"  (func $f13 (param ) (result i32)))\" ^ \"\\n\" *)\n    \"\" (* disabled above abi for SOLL *)\n  )) ^ \n\n  (indent 1) ^ \"(import  \\\"ethereum\\\" \\\"finish\\\"  (func $finish (param i32 i32) (result )))\"\n\nlet wasm_frontend_exports = \n  String.concat \"\\n\"\n  [ \n    (indent 1) ^ \"(export \\\"memory\\\" (memory 0))\";\n    (indent 1) ^ \"(export \\\"main\\\" (func $main))\";\n  ]\n\n(* typeidx still start from 0, since it cannot be indexed by name *)\nlet wasm_frontend_types (tl: Types.functype list) = \n  String.concat \"\\n\"\n  (List.mapi (fun idx tlx -> \n                          let idx = idx in\n                          match tlx with\n                          | Types.FT (pt, rt) -> \n                            indent 1 ^ \n                            \"(type \" ^ \"(;\" ^ string_of_int idx ^ \";) \" ^ \"(func \" ^\n                            \"(param \" ^\n                            (String.concat \" \" (List.map matchtypes (DatatypesExt.caml_list pt))) ^\n                            \")\" ^ \" \" ^\n                            \"(result \" ^ \n                            (String.concat \" \" (List.map matchtypes (DatatypesExt.caml_list rt))) ^\n                            \")\" ^ \")\" ^ \")\"\n              ) tl)\n\nlet matchblocktype (bt: Structure.blocktype) = \n  match bt with\n  | BT_typeidx n -> \"(type \" ^ string_of_int (DatatypesExt.eval_nat n) ^ \")\"\n  | BT_valtype vo -> \n    (match DatatypesExt.caml_option vo with \n    | None -> \"\"\n    | Some vt -> \"(result \" ^ matchtypes vt ^ \")\")\n\nlet rec wasm_frontend_expr (i: Structure.instr) (ind: int): string = \n  match i with\n  | Const v -> \n    (match v with\n    | Coq_i32 vl -> indent ind ^  \"i32.const \" ^ string_of_int (DatatypesExt.eval_nat (Int0.I32.to_nat vl))\n    | _ -> print_endline \"unexpected value other than i32\"; exit 1)\n  | Const_256 v -> \n    indent ind ^  \"i32.const 0x\" ^ assemble_pushdata (allocate v) v\n  | Const_nat v -> \n    indent ind ^  \"i32.const \" ^ string_of_int (DatatypesExt.eval_nat v)\n  | Unop unop -> \n    (match unop with\n    | Values.Coq_i32 cunop -> \n      (match cunop with \n      | Clz -> indent ind ^ \"i32.clz\"\n      | Ctz -> indent ind ^ \"i32.ctz\"\n      | Popcnt -> indent ind ^ \"i32.popcnt\")\n    | _ -> print_endline \"unexpected value other than i32\"; exit 1)\n  | Binop binop ->\n    (match binop with\n    | Values.Coq_i32 cbinop -> \n      (match cbinop with \n      | Add -> indent ind ^ \"i32.add\"\n      | Sub -> indent ind ^ \"i32.sub\"\n      | Mul -> indent ind ^ \"i32.mul\"\n      | Div sx -> indent ind ^ \"i32.div_u\"\n      | Rem sx -> indent ind ^ \"i32.rem_u\"\n      | And -> indent ind ^ \"i32.and\"\n      | Or -> indent ind ^ \"i32.or\"\n      | Xor -> indent ind ^ \"i32.xor\"\n      | Shl -> indent ind ^ \"i32.shl\"\n      | Shr sx -> indent ind ^ \"i32.shr_u\"\n      | Rotl -> indent ind ^ \"i32.rotl\"\n      | Rotr -> indent ind ^ \"i32.rotr\")\n    | _ -> print_endline \"unexpected value other than i32\"; exit 1)\n  | Testop testop ->\n    (match testop with\n    | Values.Coq_i32 ctestop -> indent ind ^ \"i32.eqz\"\n    | _ -> print_endline \"unexpected value other than i32\"; exit 1)\n  | Relop relop -> \n    (match relop with\n    | Values.Coq_i32 crelop -> \n      (match crelop with \n      | Eq -> indent ind ^ \"i32.eq\"\n      | Ne -> indent ind ^ \"i32.ne\"\n      | Lt sx -> indent ind ^ \"i32.lt_u\"\n      | Gt sx -> indent ind ^ \"i32.gt_u\"\n      | Le sx -> indent ind ^ \"i32.le_u\"\n      | Ge sx -> indent ind ^ \"i32.ge_u\")\n    | _ -> print_endline \"unexpected value other than i32\"; exit 1)\n  | Memop memop -> \n    (match memop with\n    | Values.Coq_i32 cmemop -> \n      (match cmemop with \n      | Store -> indent ind ^ \"i32.store\"\n      | Load -> indent ind ^ \"i32.load\")\n    | _ -> print_endline \"unexpected value other than i32\"; exit 1)\n  | Cvtop cvtop -> \n    (match cvtop with\n    | Values.Coq_i32 ccvtop -> \n      (match ccvtop with \n      | Wrap_i64 -> indent ind ^ \"i32.wrap_i64\"\n      | Extend_i32 sx -> indent ind ^ \"i64.extend_i32_u\"\n      | Trunc_f32 sx -> indent ind ^ \"i32.trunc_f32_u\"\n      | Trunc_f64 sx -> indent ind ^ \"i32.trunc_f64_u\"\n      | Reinterpret -> indent ind ^ \"i32.reinterpret_f32\")\n    | _ -> print_endline \"unexpected value other than i32\"; exit 1)\n  | Drop -> indent ind ^ \"drop\"\n  | Select -> indent ind ^ \"select\"\n  | Local_get n -> indent ind ^ \"local.get \" ^ string_of_int (DatatypesExt.eval_nat n)\n  | Local_set n -> indent ind ^ \"local.set \" ^ string_of_int (DatatypesExt.eval_nat n)\n  | Local_tee n -> indent ind ^ \"indent ind ^ local.tee \" ^ string_of_int (DatatypesExt.eval_nat n)\n  | Global_get n -> indent ind ^ \"global.get \" ^ string_of_int (DatatypesExt.eval_nat n)\n  | Global_set n -> indent ind ^ \"global.set \" ^ string_of_int (DatatypesExt.eval_nat n)\n  | Nop -> indent ind ^ \"nop\"\n  | Unreachable -> indent ind ^ \"unreachable\"\n  | Block (bt, il) -> \n    indent ind ^ \"(block \" ^ matchblocktype bt ^ \"\\n\" ^\n    String.concat \"\\n\"\n    (List.map\n      (fun fx -> wasm_frontend_expr fx (ind + 1))\n      (DatatypesExt.caml_list il)) ^ \"\\n\" ^\n    indent ind ^ \")\"\n  | Loop (bt, il) -> \n    indent ind ^ \"(block loop \" ^ matchblocktype bt ^ \"\\n\" ^\n    String.concat \"\\n\"\n    (List.map\n      (fun fx -> wasm_frontend_expr fx (ind + 1))\n      (DatatypesExt.caml_list il)) ^ \"\\n\" ^\n    indent (ind+1) ^ \"br 0\" ^ \"\\n\" ^ \n    indent ind ^ \"end)\"\n  | If (bt, ilt, ile) -> \n    (* if *)\n    indent ind ^ \"if \" ^ matchblocktype bt ^ \"\\n\" ^\n    (* then *)\n    String.concat \"\\n\"\n    (List.map\n      (fun fx -> wasm_frontend_expr fx (ind+1))\n      (DatatypesExt.caml_list ilt)) ^ \"\\n\" ^\n    (* else *)\n    indent (ind) ^ \"else \" ^ \"\\n\" ^ \n    String.concat \"\\n\"\n    (List.map\n      (fun fx -> wasm_frontend_expr fx (ind+1))\n      (DatatypesExt.caml_list ile)) ^ \"\\n\" ^\n    indent ind ^ \"end\"\n  | Br n -> indent ind ^ \"br \" ^ string_of_int (DatatypesExt.eval_nat n)\n  | Br_if n -> indent ind ^ \"br_if \" ^ string_of_int (DatatypesExt.eval_nat n)\n  | Br_table (nl, n) -> (print_endline \"unexpected command br_table\"; exit 1) (* not supported *)\n  | Return -> indent ind ^ \"return\"\n  | Call n -> indent ind ^ \"call $f\" ^ string_of_int (DatatypesExt.eval_nat n)\n  | Call_indirect n -> indent ind ^ \"call_indirect $f\" ^ string_of_int (DatatypesExt.eval_nat n)\n\nlet rec list_make n = \n  (if n == 0 then [] else List.cons 0 (list_make (n-1)))\n\nlet rec change_endian s = \n  let len = String.length s in \n  String.mapi (fun idx c -> (if idx mod 2 = 0 then String.get s (len - idx - 2) else String.get s (len - idx))) s\n\n(* DeepSEA ABI: first 4 bytes for hash, then 4 bytes for each parameter *)\nlet wasm_frontend_multiplexer func_abi has_constructor tl is_runtime =\n  (* call constructor --> disabled for now *)\n  (* (if ((not is_runtime) && has_constructor) then indent 2 ^ \"call $constructor\\n\" else \"\") ^ *)\n      indent 2 ^ \"call $f5\n    global.set 0\n    global.get 0\n    i32.const 3\n    i32.le_u\n    if \n      i32.const 21\n      call $set_returndata\n      call $fallback\n    else \n      nop\n    end\n    global.get 0\n    i32.const 4\n    i32.sub\n    global.set 0\n    i32.const 4\n    global.set 1\\n\" ^\n    (* (loop\n      global.get 1\n      global.get 0\n      i32.eq\n      if (result i32)\n        (br 1)\n      else \n        i32.const 768\n        global.get 1\n        i32.const 4\n        call $f4\n        i32.const 768\n        i32.load\n        (i32.add (global.get 1) (i32.const 4))\n        (global.set 1)\n      end\n      (br 0)\n    ) *)\n    indent 2 ^ \"i32.const 768\n    i32.const 0\n    i32.const 4\n    call $f4\n    i32.const 768\n    i32.load\n    call $chendian32\n    global.set 2\\n\" ^ \n\n  String.concat \"\\n\"\n  (List.mapi \n    (fun idx v -> \n      let funcoffset = (if has_constructor then 1 else 0) in\n      let ptn = (match List.nth tl (idx+funcoffset) with\n      | Types.FT (pt, rt) -> \n      (List.length (DatatypesExt.caml_list pt))) in\n      let rtn = (match List.nth tl (idx+funcoffset) with\n      | Types.FT (pt, rt) -> \n      (List.length (DatatypesExt.caml_list rt))) in\n      indent 2 ^ \"global.get 2\\n\" ^ \n      indent 2 ^ \"i32.const 0x\" ^ \n      assemble_pushdata (allocate v) v ^ \n      (* (let orig_endian = assemble_pushdata (allocate v) v in if is_runtime then change_endian orig_endian else orig_endian) ^  *)\n      \"\\n\" ^  (* need to reverse for runtime *)\n      indent 2 ^ \"i32.eq\\n\" ^\n      indent 2 ^ \"if \\n\" ^ \n      indent 3 ^ \"global.get 0\n      i32.const \" ^ string_of_int (ptn * 32) ^ \"\\n\" ^\n      indent 3 ^ \"i32.eq\n      i32.eqz\n      if \n        i32.const 22\" ^ string_of_int idx ^ \" \n        call $set_returndata\n        call $fallback\n      else \n        nop\n      end\n      i32.const 32 ;; 4 + 7 * 4 = 32, setting offset exclude name\n      global.set 1\\n\" ^ \n      (String.concat \"\\n\"\n      (List.map \n        (fun _ -> \n        indent 3 ^ \"i32.const 768\n      global.get 1\n      i32.const 4\n      call $f4\n      i32.const 768\n      i32.load ;; load argument, which is i32\n      call $chendian32\n      (i32.add (global.get 1) (i32.const 32)) ;; + 8 * 4 = + 32\n      (global.set 1)\")\n      (list_make ptn))) ^ \"\\n\" ^\n      indent 3 ^ \"(call \" ^ (\"$f\" ^ string_of_int (idx+256+funcoffset)) ^ \")\\n\" ^ \n\n      (* display problem for burrow *)\n      (* indent 3 ^ \"(call $chendian32)\\n\" ^ *)\n\n      (* store the return value *)\n      (if rtn = 0 then \"\" else \n      indent 3 ^ \"global.set 1\n      i32.const 256\n      global.get 1\n      i32.store\\n\") ^ \n      (* Dealing of `finish` *)\n      indent 3 ^ \"i32.const 256\\n\" ^\n      indent 3 ^ \"i32.const \" ^  \n        string_of_int (rtn * 4)\n      ^ \"\\n\" ^\n      indent 3 ^ \"(call $finish)\\n\" ^ \n      indent 2 ^ \"else\"\n    )\n  func_abi) ^ \"\\n\" ^\n  indent 3 ^ \"i32.const 22\\n\" ^ \n  indent 3 ^ \"call $set_returndata\\n\" ^ \n  indent 3 ^ \"(call $fallback)\" ^ \"\\n\" ^ \n  (String.concat \"\\n\"\n    (List.map \n      (fun x -> indent 3 ^ \"end\")\n  func_abi)) ^ \"\\n\"\n\n(* funcidx start from 256, first 255 is reserved for EEI and aux, aux starts at 128 *)\nlet wasm_frontend_funcs (fl: Structure.func list) (has_constructor: bool) \n(func_abi: Int.int list) (tl: Types.functype list) (is_runtime: bool) =\n  let printflx (idx: int) (flx: Structure.func) = \n    let ptn = (match List.nth tl (idx) with\n    | Types.FT (pt, rt) -> \n    (List.length (DatatypesExt.caml_list pt))) in\n    let rtn = (match List.nth tl (idx) with\n    | Types.FT (pt, rt) -> \n    (List.length (DatatypesExt.caml_list rt))) in\n    let idx = idx + 256 in\n    (* dealing of constructor *)\n    let name = if (idx = 256 && has_constructor) then \"$constructor\" else (\"$f\" ^ string_of_int idx) in\n    (* let thisABIRaw = List.nth func_abi (idx-256) in *)\n    (* function signature *)\n    (* indent 1 ^ \";; function ABI: \" ^ \"0x\" ^ assemble_pushdata (allocate thisABIRaw) thisABIRaw ^ \"\\n\" ^  *)\n    indent 1 ^ \n    \"(func \" ^ name ^ \" \" ^\n    \"(type \" ^ (string_of_int ((DatatypesExt.eval_nat flx.coq_F_type))) ^ \")\" ^ \"\\n\" ^\n    (* function local declaration *)\n    (* (if List.length (list_make ptn) = 0 then \"\" else\n    (String.concat \"\\n\"\n    (List.mapi \n      (fun idx lx -> indent 2 ^ \"(local \" ^ \"$l\" ^ string_of_int idx ^ \" i32)\")\n      (list_make ptn)) ^ \"\\n\")) ^ *)\n    (* parameter above *)\n    (if List.length (DatatypesExt.caml_list flx.coq_F_locals) = 0 then \"\" else\n    (String.concat \"\\n\"\n    (List.mapi \n      (fun idx lx -> indent 2 ^ \"(local \" ^ \"$l\" ^ string_of_int (idx+ptn) ^ \" \" ^ matchtypes lx ^ \")\")\n      (DatatypesExt.caml_list flx.coq_F_locals)) ^ \"\\n\")) ^\n    (* function body *)\n    String.concat \"\\n\"\n    (List.map\n      (fun fx -> wasm_frontend_expr fx 2)\n      (DatatypesExt.caml_list flx.coq_F_body)) ^ \"\\n\" ^\n    (* function end *)\n    indent 1 ^ \")\"\n  in\n  wasm_frontend_aux_fucs ^ \"\\n\" ^\n  (* main: multiplexer *)\n  indent 1 ^ \"(func $main (param ) (result )\\n\" ^ \n  wasm_frontend_multiplexer func_abi has_constructor tl is_runtime ^ \"\\n\" ^ \n  indent 1 ^ \")\" ^ \"\\n\" ^ \n\n  (if (not has_constructor) then indent 1 ^ \"(func $constructor (param ) (result) \n    nop\n    )\\n\" else \"\") ^ \n  String.concat \"\\n\"\n  (List.mapi printflx fl)\n  \nlet wasm_frontend_exports_debug (fl: Structure.func list) = \n  String.concat \"\\n\"\n  (List.mapi \n    (fun idx flx -> \n      if idx = 0 then \"\" else\n      (indent 1) ^ \"(export \\\"\" ^ (\"f\" ^ string_of_int (idx+256)) ^ \"\\\" (func \" ^ (\"$f\" ^ string_of_int (idx+256)) ^ \"))\")\n  fl)\n\n(* SPEC: typeidx and funcidx 0-255 is reserved for EEI functions *)\nlet mnemonics_wasm (program: Structure.coq_module) (has_constructor: bool) (func_abi: Int.int list) (is_runtime: bool) = \n  (* if has_constructor then \"has\" else \"no\"  *)\n  (* wasm_frontend_types (DatatypesExt.caml_list program.coq_M_types) *)\n\n  \"(module\" ^ \"\\n\" ^\n  (String.concat \"\\n\"\n  [ \n    (wasm_frontend_types (DatatypesExt.caml_list program.coq_M_types)) (*^ \"\\n\" ^ wasm_f131_types*) ;\n    wasm_frontend_imports is_runtime;\n    (* wasm_f131_table; *)\n    wasm_frontend_mems;\n    (*wasm_f131_data ^ \"\\n\" ^*) wasm_frontend_data;\n    (wasm_frontend_global) (*^ \"\\n\" ^ wasm_f131_global*);\n    wasm_frontend_exports;\n    (* if is_debug then (wasm_frontend_exports_debug (DatatypesExt.caml_list program.coq_M_funcs)) else \"\"; *)\n    wasm_frontend_funcs (DatatypesExt.caml_list program.coq_M_funcs) has_constructor func_abi (DatatypesExt.caml_list program.coq_M_types) is_runtime;\n    (* (string_of_int (List.length (DatatypesExt.caml_list program.coq_M_funcs))); *)\n  ])\n  ^ \"\\n\" ^\n  \")\"\n"
  },
  {
    "path": "src/backend/extraction/ASM.mli",
    "content": "open Integers\nopen StmtCGraph\n\ntype asm (* representation corresponding directly to real EVM instructions *)\ntype asm_program  = asm list\ntype evm_program  = EVM.evm list\ntype intermediate = {\n    constructor : evm_program ;\n    body        : evm_program\n  }\n\n(* It returns both the entire program (including deployment part) \n   and also just the runtime part.  *)\nval transform : evm_program -> AST.label -> (asm_program * asm_program)\n\n(* final bytecode output *)\nval assemble  : asm_program -> string\n\n(* representation for humans *)\nval mnemonics : asm_program  -> string\nval mnemonics_wasm : Structure.coq_module -> bool -> Int.int list -> bool -> string\n\nval size_of_program : asm list -> int\nval mnemonics_cgraph : (BinNums.positive * StmtCGraph.statement) list -> BinNums.positive -> string\nval mnemonics_clash : (BinNums.positive * (BinNums.positive list)) list -> string\n"
  },
  {
    "path": "src/backend/extraction/AST.ml",
    "content": "open BinNums\nopen Coqlib\nopen Specif\n\ntype ident = positive\n\n(** val ident_eq : positive -> positive -> sumbool **)\n\nlet ident_eq =\n  peq\n\ntype label = ident\n"
  },
  {
    "path": "src/backend/extraction/AST.mli",
    "content": "open BinNums\nopen Coqlib\nopen Specif\n\ntype ident = positive\n\nval ident_eq : positive -> positive -> sumbool\n\ntype label = ident\n"
  },
  {
    "path": "src/backend/extraction/Ascii.ml",
    "content": "open Datatypes\n\ntype ascii =\n| Ascii of bool * bool * bool * bool * bool * bool * bool * bool\n"
  },
  {
    "path": "src/backend/extraction/Ascii.mli",
    "content": "open Datatypes\n\ntype ascii =\n| Ascii of bool * bool * bool * bool * bool * bool * bool * bool\n"
  },
  {
    "path": "src/backend/extraction/BinInt.ml",
    "content": "open BinNat\nopen BinNums\nopen BinPos\nopen Datatypes\nopen Specif\n\nmodule Z =\n struct\n  (** val double : coq_Z -> coq_Z **)\n\n  let double = function\n  | Z0 -> Z0\n  | Zpos p -> Zpos (Coq_xO p)\n  | Zneg p -> Zneg (Coq_xO p)\n\n  (** val succ_double : coq_Z -> coq_Z **)\n\n  let succ_double = function\n  | Z0 -> Zpos Coq_xH\n  | Zpos p -> Zpos (Coq_xI p)\n  | Zneg p -> Zneg (Pos.pred_double p)\n\n  (** val pred_double : coq_Z -> coq_Z **)\n\n  let pred_double = function\n  | Z0 -> Zneg Coq_xH\n  | Zpos p -> Zpos (Pos.pred_double p)\n  | Zneg p -> Zneg (Coq_xI p)\n\n  (** val pos_sub : positive -> positive -> coq_Z **)\n\n  let rec pos_sub x y =\n    match x with\n    | Coq_xI p ->\n      (match y with\n       | Coq_xI q -> double (pos_sub p q)\n       | Coq_xO q -> succ_double (pos_sub p q)\n       | Coq_xH -> Zpos (Coq_xO p))\n    | Coq_xO p ->\n      (match y with\n       | Coq_xI q -> pred_double (pos_sub p q)\n       | Coq_xO q -> double (pos_sub p q)\n       | Coq_xH -> Zpos (Pos.pred_double p))\n    | Coq_xH ->\n      (match y with\n       | Coq_xI q -> Zneg (Coq_xO q)\n       | Coq_xO q -> Zneg (Pos.pred_double q)\n       | Coq_xH -> Z0)\n\n  (** val add : coq_Z -> coq_Z -> coq_Z **)\n\n  let add x y =\n    match x with\n    | Z0 -> y\n    | Zpos x' ->\n      (match y with\n       | Z0 -> x\n       | Zpos y' -> Zpos (Pos.add x' y')\n       | Zneg y' -> pos_sub x' y')\n    | Zneg x' ->\n      (match y with\n       | Z0 -> x\n       | Zpos y' -> pos_sub y' x'\n       | Zneg y' -> Zneg (Pos.add x' y'))\n\n  (** val opp : coq_Z -> coq_Z **)\n\n  let opp = function\n  | Z0 -> Z0\n  | Zpos x0 -> Zneg x0\n  | Zneg x0 -> Zpos x0\n\n  (** val pred : coq_Z -> coq_Z **)\n\n  let pred x =\n    add x (Zneg Coq_xH)\n\n  (** val sub : coq_Z -> coq_Z -> coq_Z **)\n\n  let sub m n =\n    add m (opp n)\n\n  (** val mul : coq_Z -> coq_Z -> coq_Z **)\n\n  let mul x y =\n    match x with\n    | Z0 -> Z0\n    | Zpos x' ->\n      (match y with\n       | Z0 -> Z0\n       | Zpos y' -> Zpos (Pos.mul x' y')\n       | Zneg y' -> Zneg (Pos.mul x' y'))\n    | Zneg x' ->\n      (match y with\n       | Z0 -> Z0\n       | Zpos y' -> Zneg (Pos.mul x' y')\n       | Zneg y' -> Zpos (Pos.mul x' y'))\n\n  (** val compare : coq_Z -> coq_Z -> comparison **)\n\n  let compare x y =\n    match x with\n    | Z0 -> (match y with\n             | Z0 -> Eq\n             | Zpos _ -> Lt\n             | Zneg _ -> Gt)\n    | Zpos x' -> (match y with\n                  | Zpos y' -> Pos.compare x' y'\n                  | _ -> Gt)\n    | Zneg x' ->\n      (match y with\n       | Zneg y' -> coq_CompOpp (Pos.compare x' y')\n       | _ -> Lt)\n\n  (** val leb : coq_Z -> coq_Z -> bool **)\n\n  let leb x y =\n    match compare x y with\n    | Gt -> Coq_false\n    | _ -> Coq_true\n\n  (** val ltb : coq_Z -> coq_Z -> bool **)\n\n  let ltb x y =\n    match compare x y with\n    | Lt -> Coq_true\n    | _ -> Coq_false\n\n  (** val max : coq_Z -> coq_Z -> coq_Z **)\n\n  let max n m =\n    match compare n m with\n    | Lt -> m\n    | _ -> n\n\n  (** val of_nat : nat -> coq_Z **)\n\n  let of_nat = function\n  | O -> Z0\n  | S n0 -> Zpos (Pos.of_succ_nat n0)\n\n  (** val of_N : coq_N -> coq_Z **)\n\n  let of_N = function\n  | N0 -> Z0\n  | Npos p -> Zpos p\n\n  (** val iter : coq_Z -> ('a1 -> 'a1) -> 'a1 -> 'a1 **)\n\n  let iter n f x =\n    match n with\n    | Zpos p -> Pos.iter f x p\n    | _ -> x\n\n  (** val pos_div_eucl : positive -> coq_Z -> (coq_Z, coq_Z) prod **)\n\n  let rec pos_div_eucl a b =\n    match a with\n    | Coq_xI a' ->\n      let Coq_pair (q, r) = pos_div_eucl a' b in\n      let r' = add (mul (Zpos (Coq_xO Coq_xH)) r) (Zpos Coq_xH) in\n      (match ltb r' b with\n       | Coq_true -> Coq_pair ((mul (Zpos (Coq_xO Coq_xH)) q), r')\n       | Coq_false ->\n         Coq_pair ((add (mul (Zpos (Coq_xO Coq_xH)) q) (Zpos Coq_xH)),\n           (sub r' b)))\n    | Coq_xO a' ->\n      let Coq_pair (q, r) = pos_div_eucl a' b in\n      let r' = mul (Zpos (Coq_xO Coq_xH)) r in\n      (match ltb r' b with\n       | Coq_true -> Coq_pair ((mul (Zpos (Coq_xO Coq_xH)) q), r')\n       | Coq_false ->\n         Coq_pair ((add (mul (Zpos (Coq_xO Coq_xH)) q) (Zpos Coq_xH)),\n           (sub r' b)))\n    | Coq_xH ->\n      (match leb (Zpos (Coq_xO Coq_xH)) b with\n       | Coq_true -> Coq_pair (Z0, (Zpos Coq_xH))\n       | Coq_false -> Coq_pair ((Zpos Coq_xH), Z0))\n\n  (** val div_eucl : coq_Z -> coq_Z -> (coq_Z, coq_Z) prod **)\n\n  let div_eucl a b =\n    match a with\n    | Z0 -> Coq_pair (Z0, Z0)\n    | Zpos a' ->\n      (match b with\n       | Z0 -> Coq_pair (Z0, Z0)\n       | Zpos _ -> pos_div_eucl a' b\n       | Zneg b' ->\n         let Coq_pair (q, r) = pos_div_eucl a' (Zpos b') in\n         (match r with\n          | Z0 -> Coq_pair ((opp q), Z0)\n          | _ -> Coq_pair ((opp (add q (Zpos Coq_xH))), (add b r))))\n    | Zneg a' ->\n      (match b with\n       | Z0 -> Coq_pair (Z0, Z0)\n       | Zpos _ ->\n         let Coq_pair (q, r) = pos_div_eucl a' b in\n         (match r with\n          | Z0 -> Coq_pair ((opp q), Z0)\n          | _ -> Coq_pair ((opp (add q (Zpos Coq_xH))), (sub b r)))\n       | Zneg b' ->\n         let Coq_pair (q, r) = pos_div_eucl a' (Zpos b') in\n         Coq_pair (q, (opp r)))\n\n  (** val div : coq_Z -> coq_Z -> coq_Z **)\n\n  let div a b =\n    let Coq_pair (q, _) = div_eucl a b in q\n\n  (** val modulo : coq_Z -> coq_Z -> coq_Z **)\n\n  let modulo a b =\n    let Coq_pair (_, r) = div_eucl a b in r\n\n  (** val quotrem : coq_Z -> coq_Z -> (coq_Z, coq_Z) prod **)\n\n  let quotrem a b =\n    match a with\n    | Z0 -> Coq_pair (Z0, Z0)\n    | Zpos a0 ->\n      (match b with\n       | Z0 -> Coq_pair (Z0, a)\n       | Zpos b0 ->\n         let Coq_pair (q, r) = N.pos_div_eucl a0 (Npos b0) in\n         Coq_pair ((of_N q), (of_N r))\n       | Zneg b0 ->\n         let Coq_pair (q, r) = N.pos_div_eucl a0 (Npos b0) in\n         Coq_pair ((opp (of_N q)), (of_N r)))\n    | Zneg a0 ->\n      (match b with\n       | Z0 -> Coq_pair (Z0, a)\n       | Zpos b0 ->\n         let Coq_pair (q, r) = N.pos_div_eucl a0 (Npos b0) in\n         Coq_pair ((opp (of_N q)), (opp (of_N r)))\n       | Zneg b0 ->\n         let Coq_pair (q, r) = N.pos_div_eucl a0 (Npos b0) in\n         Coq_pair ((of_N q), (opp (of_N r))))\n\n  (** val quot : coq_Z -> coq_Z -> coq_Z **)\n\n  let quot a b =\n    fst (quotrem a b)\n\n  (** val rem : coq_Z -> coq_Z -> coq_Z **)\n\n  let rem a b =\n    snd (quotrem a b)\n\n  (** val odd : coq_Z -> bool **)\n\n  let odd = function\n  | Z0 -> Coq_false\n  | Zpos p -> (match p with\n               | Coq_xO _ -> Coq_false\n               | _ -> Coq_true)\n  | Zneg p -> (match p with\n               | Coq_xO _ -> Coq_false\n               | _ -> Coq_true)\n\n  (** val div2 : coq_Z -> coq_Z **)\n\n  let div2 = function\n  | Z0 -> Z0\n  | Zpos p -> (match p with\n               | Coq_xH -> Z0\n               | _ -> Zpos (Pos.div2 p))\n  | Zneg p -> Zneg (Pos.div2_up p)\n\n  (** val testbit : coq_Z -> coq_Z -> bool **)\n\n  let testbit a = function\n  | Z0 -> odd a\n  | Zpos p ->\n    (match a with\n     | Z0 -> Coq_false\n     | Zpos a0 -> Pos.testbit a0 (Npos p)\n     | Zneg a0 -> negb (N.testbit (Pos.pred_N a0) (Npos p)))\n  | Zneg _ -> Coq_false\n\n  (** val shiftl : coq_Z -> coq_Z -> coq_Z **)\n\n  let shiftl a = function\n  | Z0 -> a\n  | Zpos p -> Pos.iter (mul (Zpos (Coq_xO Coq_xH))) a p\n  | Zneg p -> Pos.iter div2 a p\n\n  (** val shiftr : coq_Z -> coq_Z -> coq_Z **)\n\n  let shiftr a n =\n    shiftl a (opp n)\n\n  (** val coq_lor : coq_Z -> coq_Z -> coq_Z **)\n\n  let coq_lor a b =\n    match a with\n    | Z0 -> b\n    | Zpos a0 ->\n      (match b with\n       | Z0 -> a\n       | Zpos b0 -> Zpos (Pos.coq_lor a0 b0)\n       | Zneg b0 -> Zneg (N.succ_pos (N.ldiff (Pos.pred_N b0) (Npos a0))))\n    | Zneg a0 ->\n      (match b with\n       | Z0 -> a\n       | Zpos b0 -> Zneg (N.succ_pos (N.ldiff (Pos.pred_N a0) (Npos b0)))\n       | Zneg b0 ->\n         Zneg (N.succ_pos (N.coq_land (Pos.pred_N a0) (Pos.pred_N b0))))\n\n  (** val coq_land : coq_Z -> coq_Z -> coq_Z **)\n\n  let coq_land a b =\n    match a with\n    | Z0 -> Z0\n    | Zpos a0 ->\n      (match b with\n       | Z0 -> Z0\n       | Zpos b0 -> of_N (Pos.coq_land a0 b0)\n       | Zneg b0 -> of_N (N.ldiff (Npos a0) (Pos.pred_N b0)))\n    | Zneg a0 ->\n      (match b with\n       | Z0 -> Z0\n       | Zpos b0 -> of_N (N.ldiff (Npos b0) (Pos.pred_N a0))\n       | Zneg b0 ->\n         Zneg (N.succ_pos (N.coq_lor (Pos.pred_N a0) (Pos.pred_N b0))))\n\n  (** val coq_lxor : coq_Z -> coq_Z -> coq_Z **)\n\n  let coq_lxor a b =\n    match a with\n    | Z0 -> b\n    | Zpos a0 ->\n      (match b with\n       | Z0 -> a\n       | Zpos b0 -> of_N (Pos.coq_lxor a0 b0)\n       | Zneg b0 -> Zneg (N.succ_pos (N.coq_lxor (Npos a0) (Pos.pred_N b0))))\n    | Zneg a0 ->\n      (match b with\n       | Z0 -> a\n       | Zpos b0 -> Zneg (N.succ_pos (N.coq_lxor (Pos.pred_N a0) (Npos b0)))\n       | Zneg b0 -> of_N (N.coq_lxor (Pos.pred_N a0) (Pos.pred_N b0)))\n\n  (** val eq_dec : coq_Z -> coq_Z -> sumbool **)\n\n  let eq_dec x y =\n    match x with\n    | Z0 -> (match y with\n             | Z0 -> Coq_left\n             | _ -> Coq_right)\n    | Zpos x0 -> (match y with\n                  | Zpos p0 -> Pos.eq_dec x0 p0\n                  | _ -> Coq_right)\n    | Zneg x0 -> (match y with\n                  | Zneg p0 -> Pos.eq_dec x0 p0\n                  | _ -> Coq_right)\n end\n"
  },
  {
    "path": "src/backend/extraction/BinInt.mli",
    "content": "open BinNat\nopen BinNums\nopen BinPos\nopen Datatypes\nopen Specif\n\nmodule Z :\n sig\n  val double : coq_Z -> coq_Z\n\n  val succ_double : coq_Z -> coq_Z\n\n  val pred_double : coq_Z -> coq_Z\n\n  val pos_sub : positive -> positive -> coq_Z\n\n  val add : coq_Z -> coq_Z -> coq_Z\n\n  val opp : coq_Z -> coq_Z\n\n  val pred : coq_Z -> coq_Z\n\n  val sub : coq_Z -> coq_Z -> coq_Z\n\n  val mul : coq_Z -> coq_Z -> coq_Z\n\n  val compare : coq_Z -> coq_Z -> comparison\n\n  val leb : coq_Z -> coq_Z -> bool\n\n  val ltb : coq_Z -> coq_Z -> bool\n\n  val max : coq_Z -> coq_Z -> coq_Z\n\n  val of_nat : nat -> coq_Z\n\n  val of_N : coq_N -> coq_Z\n\n  val iter : coq_Z -> ('a1 -> 'a1) -> 'a1 -> 'a1\n\n  val pos_div_eucl : positive -> coq_Z -> (coq_Z, coq_Z) prod\n\n  val div_eucl : coq_Z -> coq_Z -> (coq_Z, coq_Z) prod\n\n  val div : coq_Z -> coq_Z -> coq_Z\n\n  val modulo : coq_Z -> coq_Z -> coq_Z\n\n  val quotrem : coq_Z -> coq_Z -> (coq_Z, coq_Z) prod\n\n  val quot : coq_Z -> coq_Z -> coq_Z\n\n  val rem : coq_Z -> coq_Z -> coq_Z\n\n  val odd : coq_Z -> bool\n\n  val div2 : coq_Z -> coq_Z\n\n  val testbit : coq_Z -> coq_Z -> bool\n\n  val shiftl : coq_Z -> coq_Z -> coq_Z\n\n  val shiftr : coq_Z -> coq_Z -> coq_Z\n\n  val coq_lor : coq_Z -> coq_Z -> coq_Z\n\n  val coq_land : coq_Z -> coq_Z -> coq_Z\n\n  val coq_lxor : coq_Z -> coq_Z -> coq_Z\n\n  val eq_dec : coq_Z -> coq_Z -> sumbool\n end\n"
  },
  {
    "path": "src/backend/extraction/BinNat.ml",
    "content": "open BinNums\nopen BinPos\nopen Datatypes\n\nmodule N =\n struct\n  (** val succ_double : coq_N -> coq_N **)\n\n  let succ_double = function\n  | N0 -> Npos Coq_xH\n  | Npos p -> Npos (Coq_xI p)\n\n  (** val double : coq_N -> coq_N **)\n\n  let double = function\n  | N0 -> N0\n  | Npos p -> Npos (Coq_xO p)\n\n  (** val succ_pos : coq_N -> positive **)\n\n  let succ_pos = function\n  | N0 -> Coq_xH\n  | Npos p -> Pos.succ p\n\n  (** val sub : coq_N -> coq_N -> coq_N **)\n\n  let sub n m =\n    match n with\n    | N0 -> N0\n    | Npos n' ->\n      (match m with\n       | N0 -> n\n       | Npos m' ->\n         (match Pos.sub_mask n' m' with\n          | Pos.IsPos p -> Npos p\n          | _ -> N0))\n\n  (** val compare : coq_N -> coq_N -> comparison **)\n\n  let compare n m =\n    match n with\n    | N0 -> (match m with\n             | N0 -> Eq\n             | Npos _ -> Lt)\n    | Npos n' -> (match m with\n                  | N0 -> Gt\n                  | Npos m' -> Pos.compare n' m')\n\n  (** val leb : coq_N -> coq_N -> bool **)\n\n  let leb x y =\n    match compare x y with\n    | Gt -> Coq_false\n    | _ -> Coq_true\n\n  (** val pos_div_eucl : positive -> coq_N -> (coq_N, coq_N) prod **)\n\n  let rec pos_div_eucl a b =\n    match a with\n    | Coq_xI a' ->\n      let Coq_pair (q, r) = pos_div_eucl a' b in\n      let r' = succ_double r in\n      (match leb b r' with\n       | Coq_true -> Coq_pair ((succ_double q), (sub r' b))\n       | Coq_false -> Coq_pair ((double q), r'))\n    | Coq_xO a' ->\n      let Coq_pair (q, r) = pos_div_eucl a' b in\n      let r' = double r in\n      (match leb b r' with\n       | Coq_true -> Coq_pair ((succ_double q), (sub r' b))\n       | Coq_false -> Coq_pair ((double q), r'))\n    | Coq_xH ->\n      (match b with\n       | N0 -> Coq_pair (N0, (Npos Coq_xH))\n       | Npos p ->\n         (match p with\n          | Coq_xH -> Coq_pair ((Npos Coq_xH), N0)\n          | _ -> Coq_pair (N0, (Npos Coq_xH))))\n\n  (** val coq_lor : coq_N -> coq_N -> coq_N **)\n\n  let coq_lor n m =\n    match n with\n    | N0 -> m\n    | Npos p -> (match m with\n                 | N0 -> n\n                 | Npos q -> Npos (Pos.coq_lor p q))\n\n  (** val coq_land : coq_N -> coq_N -> coq_N **)\n\n  let coq_land n m =\n    match n with\n    | N0 -> N0\n    | Npos p -> (match m with\n                 | N0 -> N0\n                 | Npos q -> Pos.coq_land p q)\n\n  (** val ldiff : coq_N -> coq_N -> coq_N **)\n\n  let rec ldiff n m =\n    match n with\n    | N0 -> N0\n    | Npos p -> (match m with\n                 | N0 -> n\n                 | Npos q -> Pos.ldiff p q)\n\n  (** val coq_lxor : coq_N -> coq_N -> coq_N **)\n\n  let coq_lxor n m =\n    match n with\n    | N0 -> m\n    | Npos p -> (match m with\n                 | N0 -> n\n                 | Npos q -> Pos.coq_lxor p q)\n\n  (** val testbit : coq_N -> coq_N -> bool **)\n\n  let testbit a n =\n    match a with\n    | N0 -> Coq_false\n    | Npos p -> Pos.testbit p n\n end\n"
  },
  {
    "path": "src/backend/extraction/BinNat.mli",
    "content": "open BinNums\nopen BinPos\nopen Datatypes\n\nmodule N :\n sig\n  val succ_double : coq_N -> coq_N\n\n  val double : coq_N -> coq_N\n\n  val succ_pos : coq_N -> positive\n\n  val sub : coq_N -> coq_N -> coq_N\n\n  val compare : coq_N -> coq_N -> comparison\n\n  val leb : coq_N -> coq_N -> bool\n\n  val pos_div_eucl : positive -> coq_N -> (coq_N, coq_N) prod\n\n  val coq_lor : coq_N -> coq_N -> coq_N\n\n  val coq_land : coq_N -> coq_N -> coq_N\n\n  val ldiff : coq_N -> coq_N -> coq_N\n\n  val coq_lxor : coq_N -> coq_N -> coq_N\n\n  val testbit : coq_N -> coq_N -> bool\n end\n"
  },
  {
    "path": "src/backend/extraction/BinNums.ml",
    "content": "\ntype positive =\n| Coq_xI of positive\n| Coq_xO of positive\n| Coq_xH\n\ntype coq_N =\n| N0\n| Npos of positive\n\ntype coq_Z =\n| Z0\n| Zpos of positive\n| Zneg of positive\n"
  },
  {
    "path": "src/backend/extraction/BinNums.mli",
    "content": "\ntype positive =\n| Coq_xI of positive\n| Coq_xO of positive\n| Coq_xH\n\ntype coq_N =\n| N0\n| Npos of positive\n\ntype coq_Z =\n| Z0\n| Zpos of positive\n| Zneg of positive\n"
  },
  {
    "path": "src/backend/extraction/BinNumsExt.ml",
    "content": "open BinNums\n\nlet rec show_pos_bin = function\n  | Coq_xI v -> (show_pos_bin v) ^ \"1\"\n  | Coq_xO v -> (show_pos_bin v) ^ \"0\"\n  | Coq_xH   -> \"1\"\n\nlet rec int_of_pos p =\n    let bin = show_pos_bin p in\n    Z.of_string (\"0b\" ^ bin)\n\nlet rec show_pos p =\n    let dec = int_of_pos p in\n    Z.to_string dec\n\nlet rec show_int_bin = function\n  | Z0 -> \"Z0\"\n  | Zpos x -> Printf.sprintf \"ZPOS%s\" (show_pos x)\n  | Zneg x -> Printf.sprintf \"ZNEG-%s\" (show_pos x)\n\nlet rec int_of_coq_int = function\n    | Z0 -> Z.zero\n    | Zpos x -> int_of_pos x\n    | Zneg x -> Z.neg (int_of_pos x)\n\nlet show_coq_int i = Z.to_string (int_of_coq_int i)\n\nlet rec show_nat = function\n  | N0     -> \"N0\"\n  | Npos x -> \"N\" ^ show_pos x\n\nlet (--) i j =\n    let rec aux n acc =\n      if n < i then acc else aux (n-1) (n :: acc)\n    in aux j []\n\nlet cons_bit = function\n  | true, None -> Some Coq_xH\n  | false, None -> None\n  | true , Some v -> Some (Coq_xI v)\n  | false, Some v -> Some (Coq_xO v)\n\nlet positive_of_byte b rest =\n  List.fold_right\n    (fun i v -> cons_bit ((b land (1 lsl i) <> 0), v))\n    (0--7)\n    rest\n\nlet positive_of_bytestring_aux bytes rest =\n  List.fold_right\n    (fun i v -> positive_of_byte (int_of_char (String.get bytes i)) v)\n    (List.rev (0--(String.length bytes -1)))\n    rest\n\nlet z_of_bytestring bytes =\n  match positive_of_bytestring_aux bytes None with\n  | None -> Z0\n  | Some v -> Zpos v\n\nlet positive_of_num b rest base =\n  List.fold_right\n    (fun i v -> cons_bit ((b land (1 lsl i) <> 0), v))\n    (0--base)\n    rest\n\nlet rec positive_of_int n =\n    if n = 1 then\n      Coq_xH\n    else if (n land 1) = 1 then\n      Coq_xI (positive_of_int (n asr 1))\n    else\n      Coq_xO (positive_of_int (n asr 1))\n\nlet rec positive_of_Z n =\n    if n = Z.one then\n      Coq_xH\n    else if (Z.logand n Z.one) = Z.one then\n      Coq_xI (positive_of_Z (Z.shift_right n 1))\n    else\n      Coq_xO (positive_of_Z (Z.shift_right n 1))\n\nlet coq_Z_of_int n =\n    if n = 0 then Z0\n    else if n > 0 then Zpos (positive_of_int n)\n    else Zneg (positive_of_int (-n))\n\nlet coq_Z_of_Z n =\n    if n = Z.zero then Z0\n    else if n > Z.zero then Zpos (positive_of_Z n)\n    else Zneg (positive_of_Z (Z.neg n))\n\nlet positive_of_numstring_base bytes rest base =\n  let base_len =\n    match base with\n    \"0x\" -> 3\n    | \"0o\" -> 2\n    | \"0b\" -> 0\n    | _ -> raise (Failure \"not supported number prefix\")\n  in\n\n  List.fold_right\n    (fun i v -> positive_of_num (int_of_string (base ^ (String.sub bytes i 1))) v base_len)\n    (List.rev (0--(String.length bytes -1)))\n    rest\n\nlet decimalstring2binarystring bytes =\n  let odds2one c =\n    match c with\n    '1' | '3' | '5' | '7' | '9' -> 1\n    | _ -> 0\n  in\n  let dividebytwo bytes =\n    let rec dividebytwo_wise bytes new_s add =\n\n      let c = String.get bytes 0 in\n      let bytes = String.sub bytes 1 (String.length bytes -1) in\n      let new_dgt = ((int_of_char c) - (int_of_char '0')) / 2 + add  in\n      let new_s = Printf.sprintf  (\"%s%d\") new_s new_dgt in\n      let add = odds2one(c) * 5 in\n      if String.length bytes = 0 then new_s\n      else\n      dividebytwo_wise bytes new_s add\n    in\n    dividebytwo_wise bytes \"\" 0\n  in\n  let rec decimal2bin bytes stack =\n    let rec zerotrim bytes =\n      begin\n      if String.length bytes > 1 && String.get bytes 0 = '0' then\n        zerotrim (String.sub bytes 1 (String.length bytes - 1))\n      else\n        bytes\n      end\n    in\n    let bytes = if String.length bytes > 0 then zerotrim bytes else bytes in\n    if bytes = \"0\" then\n      begin\n      match stack with\n      \"\" -> \"0\"\n      | _ -> stack\n      end\n    else\n      let new_bytes = dividebytwo bytes in\n      let new_dgt = odds2one (String.get bytes (String.length bytes -1)) in\n      let stack = Printf.sprintf (\"%d%s\") new_dgt stack in\n      decimal2bin new_bytes stack\n  in\n  \"0b\" ^ (decimal2bin bytes \"\")\n\nlet stringaddstring a b =\n  let rec straddstr a b add stack =\n\n    match a, b, add with\n    | \"\", \"\", true -> Printf.sprintf (\"%d%s\") 1 stack\n    | \"\", _, false -> Printf.sprintf (\"%s%s\") b stack\n    | _, \"\", false -> Printf.sprintf (\"%s%s\") a stack\n    | \"\", _, true ->\n      let b_end = String.get b (String.length b -1) in\n      let b' = String.sub b 0 (String.length b -1) in\n      begin\n      match b_end with\n      | '9' ->\n        begin\n        let stack = Printf.sprintf (\"%c%s\") '0' stack in\n        straddstr \"\" b' true stack\n        end\n      | _ ->\n        let c = char_of_int(int_of_char b_end + 1) in\n        let stack = Printf.sprintf (\"%c%s\") c stack in\n        straddstr \"\" b' false stack\n        end\n    | _, \"\", true ->\n      let a_end = String.get a (String.length a -1) in\n      let a' = String.sub a 0 (String.length a -1) in\n      begin\n      match a_end with\n      | '9' ->\n        begin\n        let stack = Printf.sprintf (\"%c%s\") '0' stack in\n        straddstr  a' \"\" true stack\n        end\n      | _ ->\n        let c = char_of_int (int_of_char a_end + 1) in\n        let stack = Printf.sprintf (\"%c%s\") c stack in\n        straddstr \"\" a' false stack\n        end\n    | _, _, _ ->\n      let a_end = String.get a (String.length a -1) in\n      let b_end = String.get b (String.length b -1) in\n      let a' = String.sub a 0 (String.length a -1) in\n      let b' = String.sub b 0 (String.length b -1) in\n      let c = if add\n        then int_of_char a_end + int_of_char b_end +1 - (int_of_char '0') * 2\n        else int_of_char a_end + int_of_char b_end - (int_of_char '0') * 2\n      in\n      let add' = (c / 10 = 1) in\n      let c' = String.get (Printf.sprintf (\"%d\") c)\n        (String.length (Printf.sprintf (\"%d\") c) -1)  in\n      let stack' = Printf.sprintf (\"%c%s\") c' stack in\n      straddstr a' b' add' stack'\n  in\n  straddstr a b false \"\"\n\nlet rec strtimenum bytes n =\n  match n with\n  | 0 -> \"0\"\n  | 1 -> bytes\n  | n  -> stringaddstring bytes (strtimenum bytes (n-1))\n\nlet numstring2decimalstring bytes =\n  if String.length bytes > 2 then\n  let bytes_left = String.sub bytes 2 (String.length bytes -2) in\n  begin\n  let num_prefix =  String.sub bytes 0 2 in\n  let base =\n  match num_prefix with\n  \"0x\" -> 16\n  | \"0o\" -> 8\n  | \"0b\" -> 2\n  | _ -> 10\n  in\n  if base = 10 then bytes\n  else\n  begin\n  let rec num2decimal bytes stack base_t =\n    if String.length bytes = 0 then stack\n    else\n    let bytes_end = String.sub bytes (String.length bytes -1) 1 in\n    let bytes_end_num = int_of_string (num_prefix ^ bytes_end) in\n    let bytes_left = String.sub bytes 0 (String.length bytes -1) in\n    let stack' = stringaddstring stack (strtimenum base_t bytes_end_num )\n    in\n    num2decimal bytes_left stack' (strtimenum base_t base)\n  in\n  num2decimal bytes_left \"0\" \"1\"\n  end\n  end\n  else\n  bytes\n\n\n(* TODO: support large decimal string to Coq z int *)\nlet z_of_numstring bytes =\n  if String.length bytes > 2 then\n    let num_prefix =  String.sub bytes 0 2 in\n    let num_literal = String.sub bytes 2 (String.length bytes -2) in\n    let z =\n      match num_prefix with\n      | \"0x\" | \"0o\" | \"0b\" ->\n      begin\n      match (positive_of_numstring_base num_literal None num_prefix) with\n      | None -> Z0\n      | Some v -> Zpos v\n      end\n      | _ -> coq_Z_of_int (int_of_string bytes)\n    in\n    z\n  else\n    coq_Z_of_int (int_of_string bytes)\n\n"
  },
  {
    "path": "src/backend/extraction/BinNumsExt.mli",
    "content": "(*\nthis module defines extensions to the generated BinNums module\n *)\n\nval show_pos : BinNums.positive -> string\nval show_nat : BinNums.coq_N -> string\nval show_coq_int : BinNums.coq_Z -> string\n\nval int_of_pos : BinNums.positive -> Z.t\nval int_of_coq_int : BinNums.coq_Z -> Z.t\n\nval z_of_bytestring : string -> BinNums.coq_Z\nval z_of_numstring : string -> BinNums.coq_Z\nval decimalstring2binarystring : string -> string\nval numstring2decimalstring: string -> string\n\nval positive_of_int : int -> BinNums.positive\nval coq_Z_of_int: int -> BinNums.coq_Z\nval coq_Z_of_Z: Z.t -> BinNums.coq_Z\n"
  },
  {
    "path": "src/backend/extraction/BinPos.ml",
    "content": "open BinNums\nopen BinPosDef\nopen Datatypes\nopen Nat0\nopen Specif\n\nmodule Pos =\n struct\n  (** val succ : positive -> positive **)\n\n  let rec succ = function\n  | Coq_xI p -> Coq_xO (succ p)\n  | Coq_xO p -> Coq_xI p\n  | Coq_xH -> Coq_xO Coq_xH\n\n  (** val add : positive -> positive -> positive **)\n\n  let rec add x y =\n    match x with\n    | Coq_xI p ->\n      (match y with\n       | Coq_xI q -> Coq_xO (add_carry p q)\n       | Coq_xO q -> Coq_xI (add p q)\n       | Coq_xH -> Coq_xO (succ p))\n    | Coq_xO p ->\n      (match y with\n       | Coq_xI q -> Coq_xI (add p q)\n       | Coq_xO q -> Coq_xO (add p q)\n       | Coq_xH -> Coq_xI p)\n    | Coq_xH ->\n      (match y with\n       | Coq_xI q -> Coq_xO (succ q)\n       | Coq_xO q -> Coq_xI q\n       | Coq_xH -> Coq_xO Coq_xH)\n\n  (** val add_carry : positive -> positive -> positive **)\n\n  and add_carry x y =\n    match x with\n    | Coq_xI p ->\n      (match y with\n       | Coq_xI q -> Coq_xI (add_carry p q)\n       | Coq_xO q -> Coq_xO (add_carry p q)\n       | Coq_xH -> Coq_xI (succ p))\n    | Coq_xO p ->\n      (match y with\n       | Coq_xI q -> Coq_xO (add_carry p q)\n       | Coq_xO q -> Coq_xI (add p q)\n       | Coq_xH -> Coq_xO (succ p))\n    | Coq_xH ->\n      (match y with\n       | Coq_xI q -> Coq_xI (succ q)\n       | Coq_xO q -> Coq_xO (succ q)\n       | Coq_xH -> Coq_xI Coq_xH)\n\n  (** val pred_double : positive -> positive **)\n\n  let rec pred_double = function\n  | Coq_xI p -> Coq_xI (Coq_xO p)\n  | Coq_xO p -> Coq_xI (pred_double p)\n  | Coq_xH -> Coq_xH\n\n  (** val pred_N : positive -> coq_N **)\n\n  let pred_N = function\n  | Coq_xI p -> Npos (Coq_xO p)\n  | Coq_xO p -> Npos (pred_double p)\n  | Coq_xH -> N0\n\n  type mask = Pos.mask =\n  | IsNul\n  | IsPos of positive\n  | IsNeg\n\n  (** val succ_double_mask : mask -> mask **)\n\n  let succ_double_mask = function\n  | IsNul -> IsPos Coq_xH\n  | IsPos p -> IsPos (Coq_xI p)\n  | IsNeg -> IsNeg\n\n  (** val double_mask : mask -> mask **)\n\n  let double_mask = function\n  | IsPos p -> IsPos (Coq_xO p)\n  | x0 -> x0\n\n  (** val double_pred_mask : positive -> mask **)\n\n  let double_pred_mask = function\n  | Coq_xI p -> IsPos (Coq_xO (Coq_xO p))\n  | Coq_xO p -> IsPos (Coq_xO (pred_double p))\n  | Coq_xH -> IsNul\n\n  (** val sub_mask : positive -> positive -> mask **)\n\n  let rec sub_mask x y =\n    match x with\n    | Coq_xI p ->\n      (match y with\n       | Coq_xI q -> double_mask (sub_mask p q)\n       | Coq_xO q -> succ_double_mask (sub_mask p q)\n       | Coq_xH -> IsPos (Coq_xO p))\n    | Coq_xO p ->\n      (match y with\n       | Coq_xI q -> succ_double_mask (sub_mask_carry p q)\n       | Coq_xO q -> double_mask (sub_mask p q)\n       | Coq_xH -> IsPos (pred_double p))\n    | Coq_xH -> (match y with\n                 | Coq_xH -> IsNul\n                 | _ -> IsNeg)\n\n  (** val sub_mask_carry : positive -> positive -> mask **)\n\n  and sub_mask_carry x y =\n    match x with\n    | Coq_xI p ->\n      (match y with\n       | Coq_xI q -> succ_double_mask (sub_mask_carry p q)\n       | Coq_xO q -> double_mask (sub_mask p q)\n       | Coq_xH -> IsPos (pred_double p))\n    | Coq_xO p ->\n      (match y with\n       | Coq_xI q -> double_mask (sub_mask_carry p q)\n       | Coq_xO q -> succ_double_mask (sub_mask_carry p q)\n       | Coq_xH -> double_pred_mask p)\n    | Coq_xH -> IsNeg\n\n  (** val mul : positive -> positive -> positive **)\n\n  let rec mul x y =\n    match x with\n    | Coq_xI p -> add y (Coq_xO (mul p y))\n    | Coq_xO p -> Coq_xO (mul p y)\n    | Coq_xH -> y\n\n  (** val iter : ('a1 -> 'a1) -> 'a1 -> positive -> 'a1 **)\n\n  let rec iter f x = function\n  | Coq_xI n' -> f (iter f (iter f x n') n')\n  | Coq_xO n' -> iter f (iter f x n') n'\n  | Coq_xH -> f x\n\n  (** val div2 : positive -> positive **)\n\n  let div2 = function\n  | Coq_xI p0 -> p0\n  | Coq_xO p0 -> p0\n  | Coq_xH -> Coq_xH\n\n  (** val div2_up : positive -> positive **)\n\n  let div2_up = function\n  | Coq_xI p0 -> succ p0\n  | Coq_xO p0 -> p0\n  | Coq_xH -> Coq_xH\n\n  (** val size : positive -> positive **)\n\n  let rec size = function\n  | Coq_xI p0 -> succ (size p0)\n  | Coq_xO p0 -> succ (size p0)\n  | Coq_xH -> Coq_xH\n\n  (** val compare_cont : comparison -> positive -> positive -> comparison **)\n\n  let rec compare_cont r x y =\n    match x with\n    | Coq_xI p ->\n      (match y with\n       | Coq_xI q -> compare_cont r p q\n       | Coq_xO q -> compare_cont Gt p q\n       | Coq_xH -> Gt)\n    | Coq_xO p ->\n      (match y with\n       | Coq_xI q -> compare_cont Lt p q\n       | Coq_xO q -> compare_cont r p q\n       | Coq_xH -> Gt)\n    | Coq_xH -> (match y with\n                 | Coq_xH -> r\n                 | _ -> Lt)\n\n  (** val compare : positive -> positive -> comparison **)\n\n  let compare =\n    compare_cont Eq\n\n  (** val eqb : positive -> positive -> bool **)\n\n  let rec eqb p q =\n    match p with\n    | Coq_xI p0 -> (match q with\n                    | Coq_xI q0 -> eqb p0 q0\n                    | _ -> Coq_false)\n    | Coq_xO p0 -> (match q with\n                    | Coq_xO q0 -> eqb p0 q0\n                    | _ -> Coq_false)\n    | Coq_xH -> (match q with\n                 | Coq_xH -> Coq_true\n                 | _ -> Coq_false)\n\n  (** val coq_Nsucc_double : coq_N -> coq_N **)\n\n  let coq_Nsucc_double = function\n  | N0 -> Npos Coq_xH\n  | Npos p -> Npos (Coq_xI p)\n\n  (** val coq_Ndouble : coq_N -> coq_N **)\n\n  let coq_Ndouble = function\n  | N0 -> N0\n  | Npos p -> Npos (Coq_xO p)\n\n  (** val coq_lor : positive -> positive -> positive **)\n\n  let rec coq_lor p q =\n    match p with\n    | Coq_xI p0 ->\n      (match q with\n       | Coq_xI q0 -> Coq_xI (coq_lor p0 q0)\n       | Coq_xO q0 -> Coq_xI (coq_lor p0 q0)\n       | Coq_xH -> p)\n    | Coq_xO p0 ->\n      (match q with\n       | Coq_xI q0 -> Coq_xI (coq_lor p0 q0)\n       | Coq_xO q0 -> Coq_xO (coq_lor p0 q0)\n       | Coq_xH -> Coq_xI p0)\n    | Coq_xH -> (match q with\n                 | Coq_xO q0 -> Coq_xI q0\n                 | _ -> q)\n\n  (** val coq_land : positive -> positive -> coq_N **)\n\n  let rec coq_land p q =\n    match p with\n    | Coq_xI p0 ->\n      (match q with\n       | Coq_xI q0 -> coq_Nsucc_double (coq_land p0 q0)\n       | Coq_xO q0 -> coq_Ndouble (coq_land p0 q0)\n       | Coq_xH -> Npos Coq_xH)\n    | Coq_xO p0 ->\n      (match q with\n       | Coq_xI q0 -> coq_Ndouble (coq_land p0 q0)\n       | Coq_xO q0 -> coq_Ndouble (coq_land p0 q0)\n       | Coq_xH -> N0)\n    | Coq_xH -> (match q with\n                 | Coq_xO _ -> N0\n                 | _ -> Npos Coq_xH)\n\n  (** val ldiff : positive -> positive -> coq_N **)\n\n  let rec ldiff p q =\n    match p with\n    | Coq_xI p0 ->\n      (match q with\n       | Coq_xI q0 -> coq_Ndouble (ldiff p0 q0)\n       | Coq_xO q0 -> coq_Nsucc_double (ldiff p0 q0)\n       | Coq_xH -> Npos (Coq_xO p0))\n    | Coq_xO p0 ->\n      (match q with\n       | Coq_xI q0 -> coq_Ndouble (ldiff p0 q0)\n       | Coq_xO q0 -> coq_Ndouble (ldiff p0 q0)\n       | Coq_xH -> Npos p)\n    | Coq_xH -> (match q with\n                 | Coq_xO _ -> Npos Coq_xH\n                 | _ -> N0)\n\n  (** val coq_lxor : positive -> positive -> coq_N **)\n\n  let rec coq_lxor p q =\n    match p with\n    | Coq_xI p0 ->\n      (match q with\n       | Coq_xI q0 -> coq_Ndouble (coq_lxor p0 q0)\n       | Coq_xO q0 -> coq_Nsucc_double (coq_lxor p0 q0)\n       | Coq_xH -> Npos (Coq_xO p0))\n    | Coq_xO p0 ->\n      (match q with\n       | Coq_xI q0 -> coq_Nsucc_double (coq_lxor p0 q0)\n       | Coq_xO q0 -> coq_Ndouble (coq_lxor p0 q0)\n       | Coq_xH -> Npos (Coq_xI p0))\n    | Coq_xH ->\n      (match q with\n       | Coq_xI q0 -> Npos (Coq_xO q0)\n       | Coq_xO q0 -> Npos (Coq_xI q0)\n       | Coq_xH -> N0)\n\n  (** val testbit : positive -> coq_N -> bool **)\n\n  let rec testbit p n =\n    match p with\n    | Coq_xI p0 ->\n      (match n with\n       | N0 -> Coq_true\n       | Npos n0 -> testbit p0 (pred_N n0))\n    | Coq_xO p0 ->\n      (match n with\n       | N0 -> Coq_false\n       | Npos n0 -> testbit p0 (pred_N n0))\n    | Coq_xH -> (match n with\n                 | N0 -> Coq_true\n                 | Npos _ -> Coq_false)\n\n  (** val iter_op : ('a1 -> 'a1 -> 'a1) -> positive -> 'a1 -> 'a1 **)\n\n  let rec iter_op op p a =\n    match p with\n    | Coq_xI p0 -> op a (iter_op op p0 (op a a))\n    | Coq_xO p0 -> iter_op op p0 (op a a)\n    | Coq_xH -> a\n\n  (** val to_nat : positive -> nat **)\n\n  let to_nat x =\n    iter_op Nat0.add x (S O)\n\n  (** val of_nat : nat -> positive **)\n\n  let rec of_nat = function\n  | O -> Coq_xH\n  | S x -> (match x with\n            | O -> Coq_xH\n            | S _ -> succ (of_nat x))\n\n  (** val of_succ_nat : nat -> positive **)\n\n  let rec of_succ_nat = function\n  | O -> Coq_xH\n  | S x -> succ (of_succ_nat x)\n\n  (** val eq_dec : positive -> positive -> sumbool **)\n\n  let rec eq_dec p x0 =\n    match p with\n    | Coq_xI p0 -> (match x0 with\n                    | Coq_xI p1 -> eq_dec p0 p1\n                    | _ -> Coq_right)\n    | Coq_xO p0 -> (match x0 with\n                    | Coq_xO p1 -> eq_dec p0 p1\n                    | _ -> Coq_right)\n    | Coq_xH -> (match x0 with\n                 | Coq_xH -> Coq_left\n                 | _ -> Coq_right)\n end\n"
  },
  {
    "path": "src/backend/extraction/BinPos.mli",
    "content": "open BinNums\nopen BinPosDef\nopen Datatypes\nopen Nat0\nopen Specif\n\nmodule Pos :\n sig\n  val succ : positive -> positive\n\n  val add : positive -> positive -> positive\n\n  val add_carry : positive -> positive -> positive\n\n  val pred_double : positive -> positive\n\n  val pred_N : positive -> coq_N\n\n  type mask = Pos.mask =\n  | IsNul\n  | IsPos of positive\n  | IsNeg\n\n  val succ_double_mask : mask -> mask\n\n  val double_mask : mask -> mask\n\n  val double_pred_mask : positive -> mask\n\n  val sub_mask : positive -> positive -> mask\n\n  val sub_mask_carry : positive -> positive -> mask\n\n  val mul : positive -> positive -> positive\n\n  val iter : ('a1 -> 'a1) -> 'a1 -> positive -> 'a1\n\n  val div2 : positive -> positive\n\n  val div2_up : positive -> positive\n\n  val size : positive -> positive\n\n  val compare_cont : comparison -> positive -> positive -> comparison\n\n  val compare : positive -> positive -> comparison\n\n  val eqb : positive -> positive -> bool\n\n  val coq_Nsucc_double : coq_N -> coq_N\n\n  val coq_Ndouble : coq_N -> coq_N\n\n  val coq_lor : positive -> positive -> positive\n\n  val coq_land : positive -> positive -> coq_N\n\n  val ldiff : positive -> positive -> coq_N\n\n  val coq_lxor : positive -> positive -> coq_N\n\n  val testbit : positive -> coq_N -> bool\n\n  val iter_op : ('a1 -> 'a1 -> 'a1) -> positive -> 'a1 -> 'a1\n\n  val to_nat : positive -> nat\n\n  val of_nat : nat -> positive\n\n  val of_succ_nat : nat -> positive\n\n  val eq_dec : positive -> positive -> sumbool\n end\n"
  },
  {
    "path": "src/backend/extraction/BinPosDef.ml",
    "content": "open BinNums\n\nmodule Pos =\n struct\n  type mask =\n  | IsNul\n  | IsPos of positive\n  | IsNeg\n end\n"
  },
  {
    "path": "src/backend/extraction/BinPosDef.mli",
    "content": "open BinNums\n\nmodule Pos :\n sig\n  type mask =\n  | IsNul\n  | IsPos of positive\n  | IsNeg\n end\n"
  },
  {
    "path": "src/backend/extraction/BuiltinSemanticsExt.ml",
    "content": "let show0 = function\n  | MachineModel.Baddress     -> \"address\"\n  | MachineModel.Borigin      -> \"origin\"\n  | MachineModel.Bcaller      -> \"caller\"\n  | MachineModel.Bcallvalue   -> \"callvalue\"\n  | MachineModel.Bcoinbase    -> \"coinbase\"\n  | MachineModel.Btimestamp   -> \"timestamp\"\n  | MachineModel.Bnumber      -> \"number\"\n  | MachineModel.Bchainid     -> \"chainid\"\n  | MachineModel.Bselfbalance -> \"selfbalance\"\n\nlet show1 = function\n  | MachineModel.Bbalance   -> \"balance\"\n  | MachineModel.Bblockhash -> \"blockhash\"\n"
  },
  {
    "path": "src/backend/extraction/BuiltinSemanticsExt.mli",
    "content": "(*\nthis module defines extensions to the generated BuiltinSemantics module\n *)\n\nval show0 : MachineModel.builtin0 -> string\nval show1 : MachineModel.builtin1 -> string\n"
  },
  {
    "path": "src/backend/extraction/BytecodeExt.ml",
    "content": "open ASM\nopen Datatypes\nopen DatatypesExt\nopen Glue\nopen OptErrMonad\n\nlet exit_evm_fail msg =\n  print_endline (\"Internal error: compilation failed in EVM backend\\n\"\n                 ^ \"with error message: \"\n                 ^ caml_string msg);\n  exit 1\n\nlet get_bytecode_params genv =\n  match full_compile_genv genv with\n  | Error msg -> exit_evm_fail msg\n  | Success (Coq_pair (program, entrypoint)) ->\n    let (asm, asm_runtime) = transform\n        (List.rev (caml_list program))\n        entrypoint in\n    let programsize = size_of_program asm in\n    asm, asm_runtime, programsize\n\nlet bytecode runtime genv =\n  let asm, asm_runtime, programsize = get_bytecode_params genv in\n  match runtime with\n  | false -> assemble asm\n  | true -> assemble asm_runtime\n\nlet assembly runtime genv =\n  let asm , asm_runtime, _ = get_bytecode_params genv in\n  match runtime with\n  | false -> mnemonics asm\n  | true -> mnemonics asm_runtime\n\nlet ewasm runtime genv =\n  match Glue.full_compile_genv_wasm genv with\n  | Error msg -> exit_evm_fail msg\n  | Success md_n_hc ->\n    let (mnd, fabi) = caml_prod md_n_hc in\n    let (md, hc) = caml_prod mnd in\n    mnemonics_wasm md\n      (caml_bool hc)\n      (caml_list fabi) runtime\n"
  },
  {
    "path": "src/backend/extraction/Compiled.ml",
    "content": "open Datatypes\nopen EVM\nopen Monad\nopen OptErrMonad\nopen String0\n\ntype compiled = evm list optErr\n\n(** val command_compiled : evm -> compiled **)\n\nlet command_compiled cmd =\n  ret (Obj.magic coq_Monad_optErr) (Coq_cons (cmd, Coq_nil))\n\n(** val error_compiled : string -> compiled **)\n\nlet error_compiled msg =\n  Error msg\n\n(** val empty_compiled : compiled **)\n\nlet empty_compiled =\n  ret (Obj.magic coq_Monad_optErr) Coq_nil\n\n(** val append_compiled : evm -> compiled -> compiled **)\n\nlet append_compiled cmd rest =\n  bind (Obj.magic coq_Monad_optErr) rest (fun code ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (cmd, code)))\n\n(** val concatenate_compiled : compiled -> compiled -> compiled **)\n\nlet concatenate_compiled chunk1 chunk2 =\n  bind (Obj.magic coq_Monad_optErr) chunk1 (fun code1 ->\n    bind (Obj.magic coq_Monad_optErr) chunk2 (fun code2 ->\n      ret (Obj.magic coq_Monad_optErr) (app code2 code1)))\n"
  },
  {
    "path": "src/backend/extraction/Compiled.mli",
    "content": "open Datatypes\nopen EVM\nopen Monad\nopen OptErrMonad\nopen String0\n\ntype compiled = evm list optErr\n\nval command_compiled : evm -> compiled\n\nval error_compiled : string -> compiled\n\nval empty_compiled : compiled\n\nval append_compiled : evm -> compiled -> compiled\n\nval concatenate_compiled : compiled -> compiled -> compiled\n"
  },
  {
    "path": "src/backend/extraction/Cop.ml",
    "content": "\ntype unary_operation =\n| Onotbool\n| Onotint\n| Oneg\n| Osha_1\n\ntype binary_operation =\n| Oadd\n| Osub\n| Omul\n| Odiv\n| Omod\n| Oexp\n| Oand\n| Oor\n| Oxor\n| Oshl\n| Oshr\n| Oeq\n| One\n| Olt\n| Ogt\n| Ole\n| Oge\n| Osha_2\n"
  },
  {
    "path": "src/backend/extraction/Cop.mli",
    "content": "\ntype unary_operation =\n| Onotbool\n| Onotint\n| Oneg\n| Osha_1\n\ntype binary_operation =\n| Oadd\n| Osub\n| Omul\n| Odiv\n| Omod\n| Oexp\n| Oand\n| Oor\n| Oxor\n| Oshl\n| Oshr\n| Oeq\n| One\n| Olt\n| Ogt\n| Ole\n| Oge\n| Osha_2\n"
  },
  {
    "path": "src/backend/extraction/CopExt.ml",
    "content": "let show_unop = function\n  | Cop.Onotbool -> \"notbool\"\n  | Cop.Onotint  -> \"notint\"\n  | Cop.Oneg     -> \"neg\"\n  | Cop.Osha_1   -> \"sha_1\"\n\nlet show_unop_symb = function\n  | Cop.Onotbool -> \"!\"\n  | Cop.Onotint  -> \"~\"\n  | Cop.Oneg     -> \"-\"\n  | Cop.Osha_1   -> \"sha1 \"\n\nlet show_binop = function\n  | Cop.Oadd -> \"add\"\n  | Cop.Osub -> \"sub\"\n  | Cop.Omul -> \"mul\"\n  | Cop.Odiv -> \"div\"\n  | Cop.Omod -> \"mod\"\n  | Cop.Oexp -> \"exp\"\n  | Cop.Oand -> \"and\"\n  | Cop.Oor  -> \"or\"\n  | Cop.Oxor -> \"xor\"\n  | Cop.Oshl -> \"shl\"\n  | Cop.Oshr -> \"shr\"\n  | Cop.Oeq  -> \"eq\"\n  | Cop.One  -> \"ne\"\n  | Cop.Olt  -> \"lt\"\n  | Cop.Ogt  -> \"gt\"\n  | Cop.Ole  -> \"le\"\n  | Cop.Oge  -> \"ge\"\n  | Cop.Osha_2 -> \"sha_2\"\n\nlet show_binop_symb = function\n  | Cop.Oadd -> \"+\"\n  | Cop.Osub -> \"-\"\n  | Cop.Omul -> \"*\"\n  | Cop.Odiv -> \"/\"\n  | Cop.Omod -> \"%\"\n  | Cop.Oexp -> \"**\"\n  | Cop.Oand -> \"&\"\n  | Cop.Oor  -> \"|\"\n  | Cop.Oxor -> \"^\"\n  | Cop.Oshl -> \"<<\"\n  | Cop.Oshr -> \">>\"\n  | Cop.Oeq  -> \"==\"\n  | Cop.One  -> \"!=\"\n  | Cop.Olt  -> \"<\"\n  | Cop.Ogt  -> \">\"\n  | Cop.Ole  -> \"<=\"\n  | Cop.Oge  -> \">=\"\n  | Cop.Osha_2 -> \"sha2\"\n"
  },
  {
    "path": "src/backend/extraction/CopExt.mli",
    "content": "(*\nthis module defines extensions to the generated Cop module\n *)\n\nval show_unop : Cop.unary_operation -> string\nval show_unop_symb : Cop.unary_operation -> string\nval show_binop : Cop.binary_operation -> string\nval show_binop_symb : Cop.binary_operation -> string\n"
  },
  {
    "path": "src/backend/extraction/Coqlib.ml",
    "content": "open BinInt\nopen BinNums\nopen BinPos\nopen Datatypes\nopen List0\nopen Specif\nopen ZArith_dec\n\n(** val peq : positive -> positive -> sumbool **)\n\nlet peq =\n  Pos.eq_dec\n\n(** val plt : positive -> positive -> sumbool **)\n\nlet plt x y =\n  let c = Pos.compare x y in (match c with\n                              | Lt -> Coq_left\n                              | _ -> Coq_right)\n\n(** val zeq : coq_Z -> coq_Z -> sumbool **)\n\nlet zeq =\n  Z.eq_dec\n\n(** val zlt : coq_Z -> coq_Z -> sumbool **)\n\nlet zlt =\n  coq_Z_lt_dec\n\n(** val zle : coq_Z -> coq_Z -> sumbool **)\n\nlet zle =\n  coq_Z_le_gt_dec\n\n(** val option_map : ('a1 -> 'a2) -> 'a1 option -> 'a2 option **)\n\nlet option_map f = function\n| Some y -> Some (f y)\n| None -> None\n\n(** val list_fold_left : ('a1 -> 'a2 -> 'a2) -> 'a2 -> 'a1 list -> 'a2 **)\n\nlet rec list_fold_left f accu = function\n| Coq_nil -> accu\n| Coq_cons (x, l') -> list_fold_left f (f x accu) l'\n\n(** val list_fold_right : ('a1 -> 'a2 -> 'a2) -> 'a1 list -> 'a2 -> 'a2 **)\n\nlet list_fold_right f l base =\n  list_fold_left f base (rev' l)\n\n(** val proj_sumbool : sumbool -> bool **)\n\nlet proj_sumbool = function\n| Coq_left -> Coq_true\n| Coq_right -> Coq_false\n"
  },
  {
    "path": "src/backend/extraction/Coqlib.mli",
    "content": "open BinInt\nopen BinNums\nopen BinPos\nopen Datatypes\nopen List0\nopen Specif\nopen ZArith_dec\n\nval peq : positive -> positive -> sumbool\n\nval plt : positive -> positive -> sumbool\n\nval zeq : coq_Z -> coq_Z -> sumbool\n\nval zlt : coq_Z -> coq_Z -> sumbool\n\nval zle : coq_Z -> coq_Z -> sumbool\n\nval option_map : ('a1 -> 'a2) -> 'a1 option -> 'a2 option\n\nval list_fold_left : ('a1 -> 'a2 -> 'a2) -> 'a2 -> 'a1 list -> 'a2\n\nval list_fold_right : ('a1 -> 'a2 -> 'a2) -> 'a1 list -> 'a2 -> 'a2\n\nval proj_sumbool : sumbool -> bool\n"
  },
  {
    "path": "src/backend/extraction/Ctypes.ml",
    "content": "open AST\nopen BinInt\nopen BinNums\nopen Datatypes\nopen Monad\nopen OptionMonad\nopen Specif\n\ntype signedness =\n| Signed\n| Unsigned\n\ntype intsize =\n| I8\n| I16\n| I32\n| I256\n| IBool\n\ntype ptrkind =\n| Coq_mem\n| Coq_stor\n| Coq_call\n\ntype coq_type =\n| Tvoid\n| Tint of intsize * signedness\n| Tpointer of ptrkind * coq_type\n| Tarray of coq_type * coq_Z\n| Thashmap of coq_type * coq_type\n| Tfunction of typelist * coq_type\n| Tstruct of ident * fieldlist\n| Tunion of ident * fieldlist\n| Tcomp_ptr of ident\nand typelist =\n| Tnil\n| Tcons of coq_type * typelist\nand fieldlist =\n| Fnil\n| Fcons of ident * coq_type * fieldlist\n\n(** val sizeof_words : coq_type -> coq_Z **)\n\nlet rec sizeof_words = function\n| Tarray (t', n) -> Z.mul (sizeof_words t') (Z.max Z0 n)\n| Tstruct (_, fld) -> sizeof_struct_words fld Z0\n| _ -> Zpos Coq_xH\n\n(** val sizeof_struct_words : fieldlist -> coq_Z -> coq_Z **)\n\nand sizeof_struct_words fld pos =\n  match fld with\n  | Fnil -> pos\n  | Fcons (_, t, fld') ->\n    sizeof_struct_words fld' (Z.add pos (sizeof_words t))\n\n(** val struct_field : fieldlist -> ident -> (nat, coq_type) prod option **)\n\nlet rec struct_field fld id =\n  match fld with\n  | Fnil -> None\n  | Fcons (id', t, fld') ->\n    (match ident_eq id' id with\n     | Coq_left -> Some (Coq_pair (O, t))\n     | Coq_right ->\n       bind2 (Obj.magic coq_Monad_option) (struct_field fld' id)\n         (fun offset t' -> Some (Coq_pair ((S offset), t'))))\n"
  },
  {
    "path": "src/backend/extraction/Ctypes.mli",
    "content": "open AST\nopen BinInt\nopen BinNums\nopen Datatypes\nopen Monad\nopen OptionMonad\nopen Specif\n\ntype signedness =\n| Signed\n| Unsigned\n\ntype intsize =\n| I8\n| I16\n| I32\n| I256\n| IBool\n\ntype ptrkind =\n| Coq_mem\n| Coq_stor\n| Coq_call\n\ntype coq_type =\n| Tvoid\n| Tint of intsize * signedness\n| Tpointer of ptrkind * coq_type\n| Tarray of coq_type * coq_Z\n| Thashmap of coq_type * coq_type\n| Tfunction of typelist * coq_type\n| Tstruct of ident * fieldlist\n| Tunion of ident * fieldlist\n| Tcomp_ptr of ident\nand typelist =\n| Tnil\n| Tcons of coq_type * typelist\nand fieldlist =\n| Fnil\n| Fcons of ident * coq_type * fieldlist\n\nval sizeof_words : coq_type -> coq_Z\n\nval sizeof_struct_words : fieldlist -> coq_Z -> coq_Z\n\nval struct_field : fieldlist -> ident -> (nat, coq_type) prod option\n"
  },
  {
    "path": "src/backend/extraction/CtypesExt.ml",
    "content": "module C = Ctypes\nmodule P = Printing\n\nlet sprintf = Printf.sprintf\nlet show_pos = BinNumsExt.show_pos\nlet show_int = BinNumsExt.show_coq_int\nlet int_of_pos = BinNumsExt.int_of_pos\n\nlet rec flatten_fieldlist = function\n  | C.Fnil -> []\n  | C.Fcons (i, t, fl) -> (i, t) :: (flatten_fieldlist fl)\n\nlet show_kind = function\n  | C.Coq_mem -> \"mem\"\n  | C.Coq_stor -> \"stor\"\n  | C.Coq_call -> \"call\"\n\nlet rec show_type = function\n  | C.Tvoid -> \"void\"\n  | C.Tint (intsize, signedness) -> (\n    match intsize with\n    | C.IBool -> \"bool\"\n    | _ ->\n     let signed = match signedness with\n       | C.Signed -> raise (Failure \"signed ints not supported\")\n       | C.Unsigned -> \"int\"\n     and size = match intsize with\n       | C.I8    -> \"8\"\n       | C.I16   -> \"16\"\n       | C.I32   -> \"32\"\n       | C.I256  -> \"256\"\n       | C.IBool -> raise (Failure \"unreachable\") in\n     signed ^ size )\n  | C.Tpointer (k, t) -> sprintf \"%s* // Kind: %s\" (show_type t) (show_kind k)\n  | C.Tarray (t, z) -> sprintf \"%s[%s]\" (show_type t) (show_int z)\n  | C.Thashmap (t1, t2) -> sprintf \"%s#[%s]\" (show_type t1) (show_type t2)\n  | C.Tfunction (ts, t) -> sprintf \"(%s function)\" (show_typelist ts)\n  | C.Tstruct (ident, fs) ->\n    sprintf \"struct %s %s\" (P.show_struct ident) (show_fieldlist fs)\n  | C.Tunion (ident, fs) ->\n    sprintf \"union %s %s\" (P.show_struct ident) (show_fieldlist fs)\n  | C.Tcomp_ptr ident -> sprintf \"(%s comp_ptr)\" (show_pos ident)\nand show_typelist types =\n  let rec show_typelist' = function\n    | C.Tnil -> \"\"\n    | C.Tcons (t, ts) -> (show_type t) ^ \", \" ^ (show_typelist' ts) in\n  sprintf \"[ %s]\" (show_typelist' types)\nand show_fieldlist fields =\n  let caml_fields = flatten_fieldlist fields in\n  let sorted = List.sort\n      (fun f1 f2 -> compare (int_of_pos (fst f1))(int_of_pos (fst f2))) caml_fields in\n  let mapped = List.map (fun (ident, t) ->\n      sprintf \"%s%s %s;\" (P.tab) (show_type t) (P.show_field ident)) sorted in\n  String.concat \"\\n\" ([\"{\"] @ mapped @ [\"}\"])\n"
  },
  {
    "path": "src/backend/extraction/CtypesExt.mli",
    "content": "(*\nthis module defines extensions to the generated Ctypes module\n *)\n\nval show_type : Ctypes.coq_type -> string\n"
  },
  {
    "path": "src/backend/extraction/Datatypes.ml",
    "content": "\ntype coq_unit =\n| Coq_tt\n\ntype bool =\n| Coq_true\n| Coq_false\n\n(** val negb : bool -> bool **)\n\nlet negb = function\n| Coq_true -> Coq_false\n| Coq_false -> Coq_true\n\ntype nat =\n| O\n| S of nat\n\ntype 'a option =\n| Some of 'a\n| None\n\ntype ('a, 'b) sum =\n| Coq_inl of 'a\n| Coq_inr of 'b\n\ntype ('a, 'b) prod =\n| Coq_pair of 'a * 'b\n\n(** val fst : ('a1, 'a2) prod -> 'a1 **)\n\nlet fst = function\n| Coq_pair (x, _) -> x\n\n(** val snd : ('a1, 'a2) prod -> 'a2 **)\n\nlet snd = function\n| Coq_pair (_, y) -> y\n\ntype 'a list =\n| Coq_nil\n| Coq_cons of 'a * 'a list\n\n(** val length : 'a1 list -> nat **)\n\nlet rec length = function\n| Coq_nil -> O\n| Coq_cons (_, l') -> S (length l')\n\n(** val app : 'a1 list -> 'a1 list -> 'a1 list **)\n\nlet rec app l m =\n  match l with\n  | Coq_nil -> m\n  | Coq_cons (a, l1) -> Coq_cons (a, (app l1 m))\n\ntype comparison =\n| Eq\n| Lt\n| Gt\n\n(** val coq_CompOpp : comparison -> comparison **)\n\nlet coq_CompOpp = function\n| Eq -> Eq\n| Lt -> Gt\n| Gt -> Lt\n"
  },
  {
    "path": "src/backend/extraction/Datatypes.mli",
    "content": "\ntype coq_unit =\n| Coq_tt\n\ntype bool =\n| Coq_true\n| Coq_false\n\nval negb : bool -> bool\n\ntype nat =\n| O\n| S of nat\n\ntype 'a option =\n| Some of 'a\n| None\n\ntype ('a, 'b) sum =\n| Coq_inl of 'a\n| Coq_inr of 'b\n\ntype ('a, 'b) prod =\n| Coq_pair of 'a * 'b\n\nval fst : ('a1, 'a2) prod -> 'a1\n\nval snd : ('a1, 'a2) prod -> 'a2\n\ntype 'a list =\n| Coq_nil\n| Coq_cons of 'a * 'a list\n\nval length : 'a1 list -> nat\n\nval app : 'a1 list -> 'a1 list -> 'a1 list\n\ntype comparison =\n| Eq\n| Lt\n| Gt\n\nval coq_CompOpp : comparison -> comparison\n"
  },
  {
    "path": "src/backend/extraction/DatatypesExt.ml",
    "content": "module D = Datatypes\n\nlet rec eval_nat_tail d n = \n  match d with\n  | D.O -> n\n  | D.S rest -> (eval_nat_tail rest (n+1))\n\nlet rec eval_nat d = eval_nat_tail d 0\n\nlet rec caml_list = function\n  | D.Coq_nil -> []\n  | D.Coq_cons (a, l) -> a :: caml_list l\n\nlet caml_prod = function\n  | D.Coq_pair (a, b) -> (a, b)\n\nlet caml_bool = function\n  | D.Coq_true -> true\n  | D.Coq_false -> false\n\nlet caml_option = function\n  | D.Some a -> Some a\n  | D.None -> None\n\nlet coq_option = function\n  | Some a -> D.Some a\n  | None -> D.None\n\nlet bit_of_bool = function\n  | D.Coq_true -> 1\n  | D.Coq_false -> 0\n\nlet char_of_ascii = function\n  | Ascii.Ascii(b0, b1, b2, b3, b4, b5, b6, b7) ->\n     Char.chr (bit_of_bool b0\n               +   2 * bit_of_bool b1\n               +   4 * bit_of_bool b2\n               +   8 * bit_of_bool b3\n               +  16 * bit_of_bool b4\n               +  32 * bit_of_bool b5\n               +  64 * bit_of_bool b6\n               + 128 * bit_of_bool b7)\n\nlet rec caml_string = function\n  | String0.EmptyString -> \"\"\n  | String0.String(a, s) -> String.make 1 (char_of_ascii a) ^ caml_string s\n\nlet rec coqlist_of_list = function\n  | [] -> D.Coq_nil\n  | x::xs -> D.(Coq_cons (x, coqlist_of_list xs))\n"
  },
  {
    "path": "src/backend/extraction/DatatypesExt.mli",
    "content": "(*\nthis module defines extensions to the generated Datatypes module\n *)\n\nmodule D = Datatypes\n\nval eval_nat : D.nat -> int\nval caml_list : 'a D.list -> 'a list\nval caml_prod : ('a, 'b) D.prod -> 'a * 'b \nval caml_bool : D.bool -> bool\nval caml_option : 'a D.option -> 'a option\nval coq_option: 'a option -> 'a D.option\nval caml_string : String0.string -> string                                          \nval coqlist_of_list : 'a list -> 'a D.list\n"
  },
  {
    "path": "src/backend/extraction/Decimal.ml",
    "content": "\ntype uint =\n| Nil\n| D0 of uint\n| D1 of uint\n| D2 of uint\n| D3 of uint\n| D4 of uint\n| D5 of uint\n| D6 of uint\n| D7 of uint\n| D8 of uint\n| D9 of uint\n"
  },
  {
    "path": "src/backend/extraction/Decimal.mli",
    "content": "\ntype uint =\n| Nil\n| D0 of uint\n| D1 of uint\n| D2 of uint\n| D3 of uint\n| D4 of uint\n| D5 of uint\n| D6 of uint\n| D7 of uint\n| D8 of uint\n| D9 of uint\n"
  },
  {
    "path": "src/backend/extraction/EVM.ml",
    "content": "open AST\nopen Datatypes\nopen Integers\n\ntype evm =\n| Coq_evm_stop\n| Coq_evm_add\n| Coq_evm_mul\n| Coq_evm_sub\n| Coq_evm_div\n| Coq_evm_sdiv\n| Coq_evm_mod\n| Coq_evm_smod\n| Coq_evm_addmod\n| Coq_evm_mulmod\n| Coq_evm_exp\n| Coq_evm_signextend\n| Coq_evm_lt\n| Coq_evm_gt\n| Coq_evm_slt\n| Coq_evm_sgt\n| Coq_evm_eq\n| Coq_evm_iszero\n| Coq_evm_and\n| Coq_evm_or\n| Coq_evm_xor\n| Coq_evm_not\n| Coq_evm_byte\n| Coq_evm_sha3\n| Coq_evm_address\n| Coq_evm_balance\n| Coq_evm_origin\n| Coq_evm_caller\n| Coq_evm_callvalue\n| Coq_evm_calldataload\n| Coq_evm_calldatasize\n| Coq_evm_codesize\n| Coq_evm_gasprice\n| Coq_evm_extcodesize\n| Coq_evm_blockhash\n| Coq_evm_coinbase\n| Coq_evm_timestamp\n| Coq_evm_number\n| Coq_evm_chainid\n| Coq_evm_selfbalance\n| Coq_evm_difficulty\n| Coq_evm_gaslimit\n| Coq_evm_gas\n| Coq_evm_codecopy\n| Coq_evm_pop\n| Coq_evm_mload\n| Coq_evm_mstore\n| Coq_evm_mstore8\n| Coq_evm_sload\n| Coq_evm_sstore\n| Coq_evm_jump\n| Coq_evm_jumpi\n| Coq_evm_totallength of nat\n| Coq_evm_label of label\n| Coq_evm_push of Int256.int\n| Coq_evm_push_label of label\n| Coq_evm_dup of nat\n| Coq_evm_swap of nat\n| Coq_evm_log of nat\n| Coq_evm_call\n| Coq_evm_revert\n| Coq_evm_return\n"
  },
  {
    "path": "src/backend/extraction/EVM.mli",
    "content": "open AST\nopen Datatypes\nopen Integers\n\ntype evm =\n| Coq_evm_stop\n| Coq_evm_add\n| Coq_evm_mul\n| Coq_evm_sub\n| Coq_evm_div\n| Coq_evm_sdiv\n| Coq_evm_mod\n| Coq_evm_smod\n| Coq_evm_addmod\n| Coq_evm_mulmod\n| Coq_evm_exp\n| Coq_evm_signextend\n| Coq_evm_lt\n| Coq_evm_gt\n| Coq_evm_slt\n| Coq_evm_sgt\n| Coq_evm_eq\n| Coq_evm_iszero\n| Coq_evm_and\n| Coq_evm_or\n| Coq_evm_xor\n| Coq_evm_not\n| Coq_evm_byte\n| Coq_evm_sha3\n| Coq_evm_address\n| Coq_evm_balance\n| Coq_evm_origin\n| Coq_evm_caller\n| Coq_evm_callvalue\n| Coq_evm_calldataload\n| Coq_evm_calldatasize\n| Coq_evm_codesize\n| Coq_evm_gasprice\n| Coq_evm_extcodesize\n| Coq_evm_blockhash\n| Coq_evm_coinbase\n| Coq_evm_timestamp\n| Coq_evm_number\n| Coq_evm_chainid\n| Coq_evm_selfbalance\n| Coq_evm_difficulty\n| Coq_evm_gaslimit\n| Coq_evm_gas\n| Coq_evm_codecopy\n| Coq_evm_pop\n| Coq_evm_mload\n| Coq_evm_mstore\n| Coq_evm_mstore8\n| Coq_evm_sload\n| Coq_evm_sstore\n| Coq_evm_jump\n| Coq_evm_jumpi\n| Coq_evm_totallength of nat\n| Coq_evm_label of label\n| Coq_evm_push of Int256.int\n| Coq_evm_push_label of label\n| Coq_evm_dup of nat\n| Coq_evm_swap of nat\n| Coq_evm_log of nat\n| Coq_evm_call\n| Coq_evm_revert\n| Coq_evm_return\n"
  },
  {
    "path": "src/backend/extraction/EVMExt.ml",
    "content": "\n(* evm -> human readable *)\nlet show = function\n  | EVM.Coq_evm_stop -> \"STOP\"\n  | EVM.Coq_evm_add -> \"ADD\"\n  | EVM.Coq_evm_mul -> \"MUL\"\n  | EVM.Coq_evm_sub -> \"SUB\"\n  | EVM.Coq_evm_div -> \"DIV\"\n  | EVM.Coq_evm_sdiv -> \"SDIV\"\n  | EVM.Coq_evm_mod -> \"MOD\"\n  | EVM.Coq_evm_smod -> \"SMOD\"\n  | EVM.Coq_evm_addmod -> \"ADDMOD\"\n  | EVM.Coq_evm_mulmod -> \"MULMOD\"\n  | EVM.Coq_evm_exp -> \"EXP\"\n  | EVM.Coq_evm_signextend -> \"SIGNEXTEND\"\n  | EVM.Coq_evm_lt -> \"LT\"\n  | EVM.Coq_evm_gt -> \"GT\"\n  | EVM.Coq_evm_slt -> \"SLT\"\n  | EVM.Coq_evm_sgt -> \"SGT\"\n  | EVM.Coq_evm_eq -> \"EQ\"\n  | EVM.Coq_evm_iszero -> \"ISZERO\"\n  | EVM.Coq_evm_and -> \"AND\"\n  | EVM.Coq_evm_or -> \"OR\"\n  | EVM.Coq_evm_xor -> \"XOR\"\n  | EVM.Coq_evm_not -> \"NOT\"\n  | EVM.Coq_evm_byte -> \"BYTE\"\n  | EVM.Coq_evm_sha3 -> \"SHA3\"\n  | EVM.Coq_evm_address -> \"ADDRESS\"\n  | EVM.Coq_evm_balance -> \"BALANCE\"\n  | EVM.Coq_evm_origin -> \"ORIGIN\"\n  | EVM.Coq_evm_caller -> \"CALLER\"\n  | EVM.Coq_evm_callvalue -> \"CALLVALUE\"\n  | EVM.Coq_evm_calldataload -> \"CALLDATALOAD\"\n  | EVM.Coq_evm_calldatasize -> \"CALLDATASIZE\"\n  | EVM.Coq_evm_codesize -> \"CODESIZE\"\n  | EVM.Coq_evm_gasprice -> \"GASPRICE\"\n  | EVM.Coq_evm_extcodesize -> \"EXTCODESIZE\"\n  | EVM.Coq_evm_blockhash -> \"BLOCKHASH\"\n  | EVM.Coq_evm_coinbase -> \"COINBASE\"\n  | EVM.Coq_evm_timestamp -> \"TIMESTAMP\"\n  | EVM.Coq_evm_number -> \"NUMBER\"\n  | EVM.Coq_evm_chainid -> \"CHAINID\"\n  | EVM.Coq_evm_selfbalance -> \"SELFBALANCE\"\n  | EVM.Coq_evm_difficulty -> \"DIFFICULTY\"\n  | EVM.Coq_evm_gaslimit -> \"GASLIMIT\"\n  | EVM.Coq_evm_gas -> \"GAS\"\n  | EVM.Coq_evm_codecopy -> \"CODECOPY\"\n  | EVM.Coq_evm_pop -> \"POP\"\n  | EVM.Coq_evm_mload -> \"MLOAD\"\n  | EVM.Coq_evm_mstore -> \"MSTORE\"\n  | EVM.Coq_evm_mstore8 -> \"MSTORE8\"\n  | EVM.Coq_evm_sload -> \"SLOAD\"\n  | EVM.Coq_evm_sstore -> \"SSTORE\"\n  | EVM.Coq_evm_jump -> \"JUMP\"\n  | EVM.Coq_evm_jumpi -> \"JUMPI\"\n  | EVM.Coq_evm_label l -> Printf.sprintf \"%-16s %s\" \"LABEL\" (BinNumsExt.show_pos l)\n  | EVM.Coq_evm_push x -> Printf.sprintf \"%-16s %s\" \"PUSH\" (BinNumsExt.show_coq_int x)\n  | EVM.Coq_evm_push_label l -> Printf.sprintf \"%-16s %s\" \"PUSH_LABEL\" (BinNumsExt.show_pos l)\n  | EVM.Coq_evm_dup n -> Printf.sprintf \"DUP N%d\" (DatatypesExt.eval_nat n)\n  | EVM.Coq_evm_swap n -> Printf.sprintf \"SWAP N%d\" (DatatypesExt.eval_nat n)\n  | EVM.Coq_evm_call -> \"CALL\"\n  | EVM.Coq_evm_revert -> \"REVERT\"\n  | EVM.Coq_evm_return -> \"RETURN\"\n  | EVM.Coq_evm_log n ->  Printf.sprintf \"LOG N%d\" (DatatypesExt.eval_nat n)\n  | EVM.Coq_evm_totallength n -> Printf.sprintf \"TOTAL LENGTH%d\" (DatatypesExt.eval_nat n)\n"
  },
  {
    "path": "src/backend/extraction/EVMExt.mli",
    "content": "(*\nthis module defines extensions to the generated EVM module\n *)\n\nval show : EVM.evm -> string\n"
  },
  {
    "path": "src/backend/extraction/ExpCintptr.ml",
    "content": "open AST\nopen Cop\nopen Ctypes\nopen Integers\nopen MachineModel\n\ntype expr =\n| Econst_int of Int.int * coq_type\n| Econst_int256 of Int256.int * coq_type\n| Etempvar of ident * coq_type\n| Esload of expr * coq_type\n| Emload of expr * coq_type\n| Eaddr of expr * coq_type\n| Eunop of unary_operation * expr * coq_type\n| Ebinop of binary_operation * expr * expr * coq_type\n| Ecall0 of builtin0 * coq_type\n| Ecall1 of builtin1 * expr * coq_type\n\n(** val typeof : expr -> coq_type **)\n\nlet typeof = function\n| Econst_int (_, ty) -> ty\n| Econst_int256 (_, ty) -> ty\n| Etempvar (_, ty) -> ty\n| Esload (_, ty) -> ty\n| Emload (_, ty) -> ty\n| Eaddr (_, ty) -> ty\n| Eunop (_, _, ty) -> ty\n| Ebinop (_, _, _, ty) -> ty\n| Ecall0 (_, ty) -> ty\n| Ecall1 (_, _, ty) -> ty\n"
  },
  {
    "path": "src/backend/extraction/ExpCintptr.mli",
    "content": "open AST\nopen Cop\nopen Ctypes\nopen Integers\nopen MachineModel\n\ntype expr =\n| Econst_int of Int.int * coq_type\n| Econst_int256 of Int256.int * coq_type\n| Etempvar of ident * coq_type\n| Esload of expr * coq_type\n| Emload of expr * coq_type\n| Eaddr of expr * coq_type\n| Eunop of unary_operation * expr * coq_type\n| Ebinop of binary_operation * expr * expr * coq_type\n| Ecall0 of builtin0 * coq_type\n| Ecall1 of builtin1 * expr * coq_type\n\nval typeof : expr -> coq_type\n"
  },
  {
    "path": "src/backend/extraction/ExpMiniC.ml",
    "content": "open AST\nopen Cop\nopen Ctypes\nopen Integers\nopen MachineModel\n\ntype expr =\n| Econst_int of Int.int * coq_type\n| Econst_int256 of Int256.int * coq_type\n| Evar of ident * coq_type\n| Eglob of ident * coq_type\n| Etempvar of ident * coq_type\n| Ederef of expr * coq_type\n| Eaddr of expr * coq_type\n| Eunop of unary_operation * expr * coq_type\n| Ebinop of binary_operation * expr * expr * coq_type\n| Efield of expr * ident * coq_type\n| Eindex of expr * expr * coq_type\n| Ecall0 of builtin0 * coq_type\n| Ecall1 of builtin1 * expr * coq_type\n\n(** val typeof : expr -> coq_type **)\n\nlet typeof = function\n| Econst_int (_, ty) -> ty\n| Econst_int256 (_, ty) -> ty\n| Evar (_, ty) -> ty\n| Eglob (_, ty) -> ty\n| Etempvar (_, ty) -> ty\n| Ederef (_, ty) -> ty\n| Eaddr (_, ty) -> ty\n| Eunop (_, _, ty) -> ty\n| Ebinop (_, _, _, ty) -> ty\n| Efield (_, _, ty) -> ty\n| Eindex (_, _, ty) -> ty\n| Ecall0 (_, ty) -> ty\n| Ecall1 (_, _, ty) -> ty\n"
  },
  {
    "path": "src/backend/extraction/ExpMiniC.mli",
    "content": "open AST\nopen Cop\nopen Ctypes\nopen Integers\nopen MachineModel\n\ntype expr =\n| Econst_int of Int.int * coq_type\n| Econst_int256 of Int256.int * coq_type\n| Evar of ident * coq_type\n| Eglob of ident * coq_type\n| Etempvar of ident * coq_type\n| Ederef of expr * coq_type\n| Eaddr of expr * coq_type\n| Eunop of unary_operation * expr * coq_type\n| Ebinop of binary_operation * expr * expr * coq_type\n| Efield of expr * ident * coq_type\n| Eindex of expr * expr * coq_type\n| Ecall0 of builtin0 * coq_type\n| Ecall1 of builtin1 * expr * coq_type\n\nval typeof : expr -> coq_type\n"
  },
  {
    "path": "src/backend/extraction/ExpStacked.ml",
    "content": "open AST\nopen Cop\nopen Datatypes\nopen Integers\nopen MachineModel\n\ntype expr =\n| Econst_int256 of Int256.int\n| Eglob of ident\n| Etempvar of nat\n| Emload\n| Esload\n| Eunop of unary_operation\n| Ebinop of binary_operation * bool\n| Ecall0 of builtin0\n| Ecall1 of builtin1\n\ntype ret_type =\n| Tvoid_fun\n| Tvoid_method\n| Tvoid_constructor\n| Terror\n| Tsome_fun\n| Tsome_method\n| Tsome_constructor\n\ntype typed_label =\n| Linternal of label\n| Lcall of label\n| Lreturn of label\n"
  },
  {
    "path": "src/backend/extraction/ExpStacked.mli",
    "content": "open AST\nopen Cop\nopen Datatypes\nopen Integers\nopen MachineModel\n\ntype expr =\n| Econst_int256 of Int256.int\n| Eglob of ident\n| Etempvar of nat\n| Emload\n| Esload\n| Eunop of unary_operation\n| Ebinop of binary_operation * bool\n| Ecall0 of builtin0\n| Ecall1 of builtin1\n\ntype ret_type =\n| Tvoid_fun\n| Tvoid_method\n| Tvoid_constructor\n| Terror\n| Tsome_fun\n| Tsome_method\n| Tsome_constructor\n\ntype typed_label =\n| Linternal of label\n| Lcall of label\n| Lreturn of label\n"
  },
  {
    "path": "src/backend/extraction/ExprCompile.ml",
    "content": "open Ascii\nopen BinNums\nopen Compiled\nopen Cop\nopen Datatypes\nopen EVM\nopen Integers\nopen MachineModel\nopen Monad\nopen OptErrMonad\nopen PeanoNat\nopen String0\n\n(** val dup_ident : nat -> compiled **)\n\nlet dup_ident required_index =\n  match Nat.leb required_index (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n          O))))))))))))))) with\n  | Coq_true -> command_compiled (Coq_evm_dup (S required_index))\n  | Coq_false ->\n    error_compiled (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val binop_compiled : binary_operation -> bool -> compiled **)\n\nlet binop_compiled op signed =\n  match op with\n  | Oadd -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_add, Coq_nil))\n  | Osub -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_sub, Coq_nil))\n  | Omul -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_mul, Coq_nil))\n  | Odiv ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons\n      ((match signed with\n        | Coq_true -> Coq_evm_sdiv\n        | Coq_false -> Coq_evm_div), Coq_nil))\n  | Omod ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons\n      ((match signed with\n        | Coq_true -> Coq_evm_smod\n        | Coq_false -> Coq_evm_mod), Coq_nil))\n  | Oexp -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_exp, Coq_nil))\n  | Oand -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_and, Coq_nil))\n  | Oor -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_or, Coq_nil))\n  | Oxor -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_xor, Coq_nil))\n  | Oshl ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_mul, (Coq_cons\n      (Coq_evm_exp, (Coq_cons ((Coq_evm_push\n      (Int256.repr (Zpos (Coq_xO Coq_xH)))), (Coq_cons ((Coq_evm_swap (S O)),\n      Coq_nil))))))))\n  | Oshr ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_div, (Coq_cons\n      ((Coq_evm_swap (S O)), (Coq_cons (Coq_evm_exp, (Coq_cons ((Coq_evm_push\n      (Int256.repr (Zpos (Coq_xO Coq_xH)))), (Coq_cons ((Coq_evm_swap (S O)),\n      Coq_nil))))))))))\n  | Oeq -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_eq, Coq_nil))\n  | One ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_iszero, (Coq_cons\n      (Coq_evm_eq, Coq_nil))))\n  | Olt ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons\n      ((match signed with\n        | Coq_true -> Coq_evm_slt\n        | Coq_false -> Coq_evm_lt), Coq_nil))\n  | Ogt ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons\n      ((match signed with\n        | Coq_true -> Coq_evm_sgt\n        | Coq_false -> Coq_evm_gt), Coq_nil))\n  | Ole ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_iszero, (Coq_cons\n      ((match signed with\n        | Coq_true -> Coq_evm_sgt\n        | Coq_false -> Coq_evm_gt), Coq_nil))))\n  | Oge ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (Coq_evm_iszero, (Coq_cons\n      ((match signed with\n        | Coq_true -> Coq_evm_slt\n        | Coq_false -> Coq_evm_lt), Coq_nil))))\n  | Osha_2 ->\n    Error (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)),\n      EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val unop_compiled : unary_operation -> compiled **)\n\nlet unop_compiled = function\n| Onotbool -> command_compiled Coq_evm_iszero\n| Onotint -> command_compiled Coq_evm_not\n| Oneg ->\n  append_compiled Coq_evm_sub (command_compiled (Coq_evm_push Int256.zero))\n| Osha_1 ->\n  Error (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val builtin0_compiled : builtin0 -> evm **)\n\nlet builtin0_compiled = function\n| Baddress -> Coq_evm_address\n| Borigin -> Coq_evm_origin\n| Bcaller -> Coq_evm_caller\n| Bcallvalue -> Coq_evm_callvalue\n| Bcoinbase -> Coq_evm_coinbase\n| Btimestamp -> Coq_evm_timestamp\n| Bnumber -> Coq_evm_number\n| Bchainid -> Coq_evm_chainid\n| Bselfbalance -> Coq_evm_selfbalance\n\n(** val builtin1_compiled : builtin1 -> evm **)\n\nlet builtin1_compiled = function\n| Bbalance -> Coq_evm_balance\n| Bblockhash -> Coq_evm_blockhash\n"
  },
  {
    "path": "src/backend/extraction/ExprCompile.mli",
    "content": "open Ascii\nopen BinNums\nopen Compiled\nopen Cop\nopen Datatypes\nopen EVM\nopen Integers\nopen MachineModel\nopen Monad\nopen OptErrMonad\nopen PeanoNat\nopen String0\n\nval dup_ident : nat -> compiled\n\nval binop_compiled : binary_operation -> bool -> compiled\n\nval unop_compiled : unary_operation -> compiled\n\nval builtin0_compiled : builtin0 -> evm\n\nval builtin1_compiled : builtin1 -> evm\n"
  },
  {
    "path": "src/backend/extraction/Float.ml",
    "content": "open Datatypes\n\nmodule type Rep =\n sig\n  val bitwidth : nat\n end\n\nmodule Rep32 =\n struct\n  (** val bitwidth : nat **)\n\n  let bitwidth =\n    S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S O)))))))))))))))))))))))))))))))\n end\n\nmodule Rep64 =\n struct\n  (** val bitwidth : nat **)\n\n  let bitwidth =\n    S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n end\n\nmodule type S =\n sig\n  type t\n\n  val bitwidth : nat\n\n  val zero : t\n end\n\nmodule Make =\n functor (R:Rep) ->\n struct\n  (** val bitwidth : nat **)\n\n  let bitwidth =\n    R.bitwidth\n\n  type t = nat\n\n  (** val zero : t **)\n\n  let zero =\n    O\n end\n\nmodule F32 = Make(Rep32)\n\nmodule F64 = Make(Rep64)\n"
  },
  {
    "path": "src/backend/extraction/Float.mli",
    "content": "open Datatypes\n\nmodule type Rep =\n sig\n  val bitwidth : nat\n end\n\nmodule Rep32 :\n sig\n  val bitwidth : nat\n end\n\nmodule Rep64 :\n sig\n  val bitwidth : nat\n end\n\nmodule type S =\n sig\n  type t\n\n  val bitwidth : nat\n\n  val zero : t\n end\n\nmodule Make :\n functor (R:Rep) ->\n S\n\nmodule F32 :\n sig\n  type t\n\n  val bitwidth : nat\n\n  val zero : t\n end\n\nmodule F64 :\n sig\n  type t\n\n  val bitwidth : nat\n\n  val zero : t\n end\n"
  },
  {
    "path": "src/backend/extraction/FramesLabelsCintptr.ml",
    "content": "open StmtClinear\nopen TempModelLow\n\n(** val ftype : ftemps **)\n\nlet ftype =\n  { f_temps = (Obj.magic StmtClinear.fn_temps); f_args =\n    (Obj.magic StmtClinear.fn_params) }\n"
  },
  {
    "path": "src/backend/extraction/FramesLabelsCintptr.mli",
    "content": "open StmtClinear\nopen TempModelLow\n\nval ftype : ftemps\n"
  },
  {
    "path": "src/backend/extraction/Gen.ml",
    "content": "open Ascii\nopen BinNums\nopen Cop\nopen Ctypes\nopen Datatypes\nopen ExpMiniC\nopen Globalenvs\nopen Integers\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen StmtMiniC\nopen String0\nopen Trees\n\n(** val constofpos : positive -> expr **)\n\nlet constofpos p =\n  Econst_int256 ((Int256.repr (Zpos p)), (Tpointer (Coq_stor, Tvoid)))\n\n(** val clike_rvalue : expr -> expr optErr **)\n\nlet rec clike_rvalue = function\n| Econst_int (_, _) ->\n  Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Evar (id, ty) ->\n  ret (Obj.magic coq_Monad_optErr) (Ederef ((Evar (id, (Tpointer (Coq_mem,\n    ty)))), ty))\n| Eglob (id, ty) ->\n  ret (Obj.magic coq_Monad_optErr) (Ederef ((Eunop (Osha_1, (constofpos id),\n    (Tpointer (Coq_stor, ty)))), ty))\n| Ederef (ex0, ty) ->\n  bind (Obj.magic coq_Monad_optErr) (clike_lvalue ex0) (fun ex' ->\n    ret (Obj.magic coq_Monad_optErr) (Ederef (ex', ty)))\n| Eaddr (ex0, _) -> clike_lvalue ex0\n| Eunop (op, ex0, ty) ->\n  bind (Obj.magic coq_Monad_optErr) (clike_rvalue ex0) (fun ex' ->\n    ret (Obj.magic coq_Monad_optErr) (Eunop (op, ex', ty)))\n| Ebinop (op, ex1, ex2, ty) ->\n  bind (Obj.magic coq_Monad_optErr) (clike_rvalue ex1) (fun ex1' ->\n    bind (Obj.magic coq_Monad_optErr) (clike_rvalue ex2) (fun ex2' ->\n      ret (Obj.magic coq_Monad_optErr) (Ebinop (op, ex1', ex2', ty))))\n| Efield (ex0, id, ty) ->\n  bind (Obj.magic coq_Monad_optErr) (clike_lvalue ex0) (fun ex' ->\n    match typeof ex' with\n    | Tpointer (p, _) ->\n      (match p with\n       | Coq_mem ->\n         ret (Obj.magic coq_Monad_optErr) (Ederef ((Efield (ex', id,\n           (Tpointer (Coq_mem, ty)))), ty))\n       | Coq_stor ->\n         ret (Obj.magic coq_Monad_optErr) (Ederef ((Ebinop (Osha_2, ex',\n           (constofpos id), (Tpointer (Coq_stor, ty)))), ty))\n       | Coq_call ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | _ ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)),\n        EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Eindex (ex1, ex2, ty) ->\n  bind (Obj.magic coq_Monad_optErr) (clike_lvalue ex1) (fun ex1' ->\n    bind (Obj.magic coq_Monad_optErr) (clike_rvalue ex2) (fun ex2' ->\n      match typeof ex1' with\n      | Tpointer (p, _) ->\n        (match p with\n         | Coq_mem ->\n           ret (Obj.magic coq_Monad_optErr) (Ederef ((Eindex (ex1', ex2',\n             (Tpointer (Coq_mem, ty)))), ty))\n         | Coq_stor ->\n           ret (Obj.magic coq_Monad_optErr) (Ederef ((Ebinop (Osha_2, ex1',\n             ex2', (Tpointer (Coq_stor, ty)))), ty))\n         | Coq_call ->\n           Error (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n             Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n             (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n             Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n             (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n             Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n             Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_false, Coq_false)),\n             EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n      | _ ->\n        Error (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_false)),\n          EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Ecall1 (b, ex0, ty) ->\n  bind (Obj.magic coq_Monad_optErr) (clike_rvalue ex0) (fun ex' ->\n    ret (Obj.magic coq_Monad_optErr) (Ecall1 (b, ex', ty)))\n| x -> ret (Obj.magic coq_Monad_optErr) x\n\n(** val clike_lvalue : expr -> expr optErr **)\n\nand clike_lvalue = function\n| Evar (id, ty) ->\n  ret (Obj.magic coq_Monad_optErr) (Evar (id, (Tpointer (Coq_mem, ty))))\n| Eglob (id, ty) ->\n  ret (Obj.magic coq_Monad_optErr) (Eunop (Osha_1, (constofpos id), (Tpointer\n    (Coq_stor, ty))))\n| Ederef (ex0, _) -> clike_rvalue ex0\n| Efield (ex0, id, ty) ->\n  bind (Obj.magic coq_Monad_optErr) (clike_lvalue ex0) (fun ex' ->\n    match typeof ex' with\n    | Tpointer (p, _) ->\n      (match p with\n       | Coq_mem ->\n         ret (Obj.magic coq_Monad_optErr) (Efield (ex', id, (Tpointer\n           (Coq_mem, ty))))\n       | Coq_stor ->\n         ret (Obj.magic coq_Monad_optErr) (Ebinop (Osha_2, ex',\n           (constofpos id), (Tpointer (Coq_stor, ty))))\n       | Coq_call ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | _ ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)),\n        EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Eindex (ex1, ex2, ty) ->\n  bind (Obj.magic coq_Monad_optErr) (clike_lvalue ex1) (fun ex1' ->\n    bind (Obj.magic coq_Monad_optErr) (clike_rvalue ex2) (fun ex2' ->\n      match typeof ex1' with\n      | Tpointer (p, _) ->\n        (match p with\n         | Coq_mem ->\n           ret (Obj.magic coq_Monad_optErr) (Eindex (ex1', ex2', (Tpointer\n             (Coq_mem, ty))))\n         | Coq_stor ->\n           ret (Obj.magic coq_Monad_optErr) (Ebinop (Osha_2, ex1', ex2',\n             (Tpointer (Coq_stor, ty))))\n         | Coq_call ->\n           Error (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n             Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n             (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n             Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n             (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n             Coq_true, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n             Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n             Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n             Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n             EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n      | _ ->\n        Error (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n          Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n          Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n          Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n          Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false)),\n          EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| _ ->\n  Error (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val clike_rvalue_list : expr list -> expr list optErr **)\n\nlet rec clike_rvalue_list = function\n| Coq_nil -> ret (Obj.magic coq_Monad_optErr) Coq_nil\n| Coq_cons (hd, tl) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue hd) (fun first ->\n    bind (Obj.magic coq_Monad_optErr) (clike_rvalue_list tl) (fun rest ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_cons (first, rest))))\n\n(** val clike_rvalue_option : expr option -> expr option optErr **)\n\nlet rec clike_rvalue_option = function\n| Some e ->\n  let e' = clike_rvalue e in\n  (match e' with\n   | Success s -> ret (Obj.magic coq_Monad_optErr) (Some s)\n   | Error msg -> Error msg)\n| None -> ret (Obj.magic coq_Monad_optErr) None\n\n(** val clike_stm : statement -> statement optErr **)\n\nlet rec clike_stm = function\n| Sassign (lv, rv) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_lvalue lv) (fun lv' ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue rv) (fun rv' ->\n      ret (Obj.magic coq_Monad_optErr) (Sassign (lv', rv'))))\n| Sset (id, rv) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue rv) (fun rv' ->\n    ret (Obj.magic coq_Monad_optErr) (Sset (id, rv')))\n| Scall (id, label, args) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue_list args)\n    (fun rv_list ->\n    ret (Obj.magic coq_Monad_optErr) (Scall (id, label, rv_list)))\n| Ssequence (stm1, stm2) ->\n  bind (Obj.magic coq_Monad_optErr) (clike_stm stm1) (fun seq1 ->\n    bind (Obj.magic coq_Monad_optErr) (clike_stm stm2) (fun seq2 ->\n      ret (Obj.magic coq_Monad_optErr) (Ssequence (seq1, seq2))))\n| Sifthenelse (ex, stm1, stm2) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue ex) (fun ex0 ->\n    bind (Obj.magic coq_Monad_optErr) (clike_stm stm1) (fun true_stm ->\n      bind (Obj.magic coq_Monad_optErr) (clike_stm stm2) (fun false_stm ->\n        ret (Obj.magic coq_Monad_optErr) (Sifthenelse (ex0, true_stm,\n          false_stm)))))\n| Sloop loop ->\n  bind (Obj.magic coq_Monad_optErr) (clike_stm loop) (fun loop0 ->\n    ret (Obj.magic coq_Monad_optErr) (Sloop loop0))\n| Stransfer (addr, val0) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue addr)\n    (fun addr0 ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue val0)\n      (fun val1 -> ret (Obj.magic coq_Monad_optErr) (Stransfer (addr0, val1))))\n| Scallmethod (addr, retvals, funsig, val0, gas, args) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue addr)\n    (fun addr0 ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue val0)\n      (fun val1 ->\n      bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue_option gas)\n        (fun gas0 ->\n        bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue_list args)\n          (fun args0 ->\n          ret (Obj.magic coq_Monad_optErr) (Scallmethod (addr0, retvals,\n            funsig, val1, gas0, args0))))))\n| Slog (topics, args) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue_list topics)\n    (fun topics0 ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_rvalue_list args)\n      (fun args0 -> ret (Obj.magic coq_Monad_optErr) (Slog (topics0, args0))))\n| x -> ret (Obj.magic coq_Monad_optErr) x\n\n(** val clike_function : coq_function -> coq_function optErr **)\n\nlet clike_function f =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_stm f.fn_body)\n    (fun stm ->\n    ret (Obj.magic coq_Monad_optErr) { fn_return = f.fn_return; fn_params =\n      f.fn_params; fn_temps = f.fn_temps; fn_locals = f.fn_locals; fn_body =\n      stm })\n\n(** val clike_constructor :\n    coq_function option -> coq_function option optErr **)\n\nlet clike_constructor = function\n| Some f0 ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_function f0) (fun f1 ->\n    ret (Obj.magic coq_Monad_optErr) (Some f1))\n| None -> ret (Obj.magic coq_Monad_optErr) None\n\n(** val clike_functions :\n    coq_function PTree.t -> coq_function PTree.t optErr **)\n\nlet clike_functions defs =\n  transl_tree clike_function defs\n\n(** val clike_methoddefs :\n    coq_function option IntMap.t -> coq_function option IntMap.t optErr **)\n\nlet clike_methoddefs defs =\n  transl_map clike_function defs\n\n(** val clike_genv : genv -> genv optErr **)\n\nlet clike_genv ge =\n  let vars = ge.Genv.genv_vars in\n  let defs = ge.Genv.genv_defs in\n  let names = ge.Genv.genv_funcs in\n  let functions = ge.Genv.genv_fundefs in\n  let sigs = ge.Genv.genv_methods in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_functions functions)\n    (fun functions0 ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_methoddefs methoddefs)\n      (fun methoddefs0 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (Obj.magic clike_constructor constructor) (fun constructor0 ->\n        ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n          Genv.genv_funcs = names; Genv.genv_methods = sigs; Genv.genv_defs =\n          defs; Genv.genv_fundefs = functions0; Genv.genv_methoddefs =\n          methoddefs0; Genv.genv_constructor = constructor0 })))\n"
  },
  {
    "path": "src/backend/extraction/Gen.mli",
    "content": "open Ascii\nopen BinNums\nopen Cop\nopen Ctypes\nopen Datatypes\nopen ExpMiniC\nopen Globalenvs\nopen Integers\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen StmtMiniC\nopen String0\nopen Trees\n\nval constofpos : positive -> expr\n\nval clike_rvalue : expr -> expr optErr\n\nval clike_lvalue : expr -> expr optErr\n\nval clike_rvalue_list : expr list -> expr list optErr\n\nval clike_rvalue_option : expr option -> expr option optErr\n\nval clike_stm : statement -> statement optErr\n\nval clike_function : coq_function -> coq_function optErr\n\nval clike_constructor : coq_function option -> coq_function option optErr\n\nval clike_functions : coq_function PTree.t -> coq_function PTree.t optErr\n\nval clike_methoddefs :\n  coq_function option IntMap.t -> coq_function option IntMap.t optErr\n\nval clike_genv : genv -> genv optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen0.ml",
    "content": "open AST\nopen Ascii\nopen BinPos\nopen Cop\nopen Ctypes\nopen Datatypes\nopen ExpMiniC\nopen Globalenvs\nopen Maps0\nopen Monad\nopen Nat0\nopen OptErrMonad\nopen PeanoNat\nopen StmtClocal\nopen StmtMiniC\nopen String0\nopen Trees\n\n(** val sequentialize : StmtClocal.statement list -> StmtClocal.statement **)\n\nlet rec sequentialize = function\n| Coq_nil -> StmtClocal.Sskip\n| Coq_cons (s, ss0) -> StmtClocal.Ssequence (s, (sequentialize ss0))\n\n(** val clocal_rvalue :\n    (nat -> expr) -> (expr -> nat -> (StmtClocal.statement, nat) prod optErr)\n    -> expr -> nat -> (StmtClocal.statement, nat) prod optErr **)\n\nlet clocal_rvalue scrmap =\n  let rec clocal_rvalue0 cont ex scr =\n    match ex with\n    | Econst_int (_, _) ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Eglob (_, _) ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Ederef (ex0, ty) ->\n      let cont' = fun ex' scr' -> cont (Ederef (ex', ty)) scr' in\n      clocal_lvalue0 cont' ex0 scr\n    | Eaddr (ex0, _) -> clocal_lvalue0 cont ex0 scr\n    | Eunop (op, ex0, ty) ->\n      (match op with\n       | Osha_1 ->\n         let cont' = fun ex' scr' ->\n           let scre = scrmap scr' in\n           let s0 = Smassign (scre, ex') in\n           let s1 = Shash (scre, scre, None) in\n           bind coq_Monad_optErr\n             (Obj.magic cont (Ederef (scre, ty)) (add scr' (S O)))\n             (fun res ->\n             let Coq_pair (s2, scr'') = res in\n             ret coq_Monad_optErr (Coq_pair\n               ((sequentialize (Coq_cons (s0, (Coq_cons (s1, (Coq_cons (s2,\n                  Coq_nil))))))), scr'')))\n         in\n         Obj.magic clocal_rvalue0 cont' ex0 scr\n       | _ ->\n         let cont' = fun ex' scr' -> cont (Eunop (op, ex', ty)) scr' in\n         clocal_rvalue0 cont' ex0 scr)\n    | Ebinop (op, ex1, ex2, ty) ->\n      (match op with\n       | Osha_2 ->\n         let cont' = fun ex1' scr1 ->\n           let cont'' = fun ex2' scr2 ->\n             let scre1 = scrmap scr2 in\n             let scre2 = scrmap (add scr2 (S O)) in\n             let s0 = Smassign (scre1, ex1') in\n             let s1 = Smassign (scre2, ex2') in\n             let s2 = Shash (scre1, scre1, (Some scre2)) in\n             bind coq_Monad_optErr\n               (Obj.magic cont (Ederef (scre1, ty)) (add scr2 (S (S O))))\n               (fun res ->\n               let Coq_pair (s3, scr') = res in\n               ret coq_Monad_optErr (Coq_pair\n                 ((sequentialize (Coq_cons (s0, (Coq_cons (s1, (Coq_cons (s2,\n                    (Coq_cons (s3, Coq_nil))))))))), scr')))\n           in\n           Obj.magic clocal_rvalue0 cont'' ex2 scr1\n         in\n         clocal_rvalue0 cont' ex1 scr\n       | _ ->\n         let cont' = fun ex1' scr1 ->\n           let cont'' = fun ex2' scr2 ->\n             cont (Ebinop (op, ex1', ex2', ty)) scr2\n           in\n           clocal_rvalue0 cont'' ex2 scr1\n         in\n         clocal_rvalue0 cont' ex1 scr)\n    | Efield (_, _, _) ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Eindex (_, _, _) ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Ecall1 (b, ex0, ty) ->\n      let cont' = fun ex' scr' -> cont (Ecall1 (b, ex', ty)) scr' in\n      clocal_rvalue0 cont' ex0 scr\n    | x -> cont x scr\n  and clocal_lvalue0 cont ex scr =\n    match ex with\n    | Evar (id, t0) ->\n      (match t0 with\n       | Tpointer (p, ty) ->\n         (match p with\n          | Coq_mem -> cont (Evar (id, (Tpointer (Coq_mem, ty)))) scr\n          | _ ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Etempvar (id, ty) -> cont (Etempvar (id, ty)) scr\n    | Ederef (ex0, _) -> clocal_rvalue0 cont ex0 scr\n    | Eunop (u, ex0, t0) ->\n      (match u with\n       | Osha_1 ->\n         (match t0 with\n          | Tpointer (p, ty) ->\n            (match p with\n             | Coq_stor ->\n               let cont' = fun ex' scr' ->\n                 let scre = scrmap scr' in\n                 let s0 = Smassign (scre, ex') in\n                 let s1 = Shash (scre, scre, None) in\n                 bind coq_Monad_optErr\n                   (Obj.magic cont (Ederef (scre, (Tpointer (Coq_stor, ty))))\n                     (add scr' (S O))) (fun res ->\n                   let Coq_pair (s2, scr'') = res in\n                   ret coq_Monad_optErr (Coq_pair\n                     ((sequentialize (Coq_cons (s0, (Coq_cons (s1, (Coq_cons\n                        (s2, Coq_nil))))))), scr'')))\n               in\n               Obj.magic clocal_rvalue0 cont' ex0 scr\n             | _ ->\n               Error (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false)),\n                 EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n          | _ ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Ebinop (b, ex1, ex2, t0) ->\n      (match b with\n       | Osha_2 ->\n         (match t0 with\n          | Tpointer (p, ty) ->\n            (match p with\n             | Coq_stor ->\n               let cont' = fun ex1' scr1 ->\n                 let cont'' = fun ex2' scr2 ->\n                   let scre1 = scrmap scr2 in\n                   let scre2 = scrmap (add scr2 (S O)) in\n                   let s0 = Smassign (scre1, ex1') in\n                   let s1 = Smassign (scre2, ex2') in\n                   let s2 = Shash (scre1, scre1, (Some scre2)) in\n                   bind coq_Monad_optErr\n                     (Obj.magic cont (Ederef (scre1, (Tpointer (Coq_stor,\n                       ty)))) (add scr2 (S (S O)))) (fun res ->\n                     let Coq_pair (s3, scr') = res in\n                     ret coq_Monad_optErr (Coq_pair\n                       ((sequentialize (Coq_cons (s0, (Coq_cons (s1,\n                          (Coq_cons (s2, (Coq_cons (s3, Coq_nil))))))))),\n                       scr')))\n                 in\n                 Obj.magic clocal_rvalue0 cont'' ex2 scr1\n               in\n               clocal_rvalue0 cont' ex1 scr\n             | _ ->\n               Error (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false)),\n                 EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n          | _ ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Efield (ex0, id, t0) ->\n      (match t0 with\n       | Tpointer (p, ty) ->\n         (match p with\n          | Coq_mem ->\n            let cont' = fun ex' ->\n              cont (Efield (ex', id, (Tpointer (Coq_mem, ty))))\n            in\n            clocal_lvalue0 cont' ex0 scr\n          | _ ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Eindex (ex1, ex2, t0) ->\n      (match t0 with\n       | Tpointer (p, ty) ->\n         (match p with\n          | Coq_mem ->\n            let cont' = fun ex1' scr1 ->\n              let cont'' = fun ex2' scr2 ->\n                cont (Eindex (ex1', ex2', (Tpointer (Coq_mem, ty)))) scr2\n              in\n              clocal_rvalue0 cont'' ex2 scr1\n            in\n            clocal_lvalue0 cont' ex1 scr\n          | _ ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | _ ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  in clocal_rvalue0\n\n(** val clocal_lvalue :\n    (nat -> expr) -> (expr -> nat -> (StmtClocal.statement, nat) prod optErr)\n    -> expr -> nat -> (StmtClocal.statement, nat) prod optErr **)\n\nlet clocal_lvalue scrmap =\n  let rec clocal_rvalue0 cont ex scr =\n    match ex with\n    | Econst_int (_, _) ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Eglob (_, _) ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Ederef (ex0, ty) ->\n      let cont' = fun ex' scr' -> cont (Ederef (ex', ty)) scr' in\n      clocal_lvalue0 cont' ex0 scr\n    | Eaddr (ex0, _) -> clocal_lvalue0 cont ex0 scr\n    | Eunop (op, ex0, ty) ->\n      (match op with\n       | Osha_1 ->\n         let cont' = fun ex' scr' ->\n           let scre = scrmap scr' in\n           let s0 = Smassign (scre, ex') in\n           let s1 = Shash (scre, scre, None) in\n           bind coq_Monad_optErr\n             (Obj.magic cont (Ederef (scre, ty)) (add scr' (S O)))\n             (fun res ->\n             let Coq_pair (s2, scr'') = res in\n             ret coq_Monad_optErr (Coq_pair\n               ((sequentialize (Coq_cons (s0, (Coq_cons (s1, (Coq_cons (s2,\n                  Coq_nil))))))), scr'')))\n         in\n         Obj.magic clocal_rvalue0 cont' ex0 scr\n       | _ ->\n         let cont' = fun ex' scr' -> cont (Eunop (op, ex', ty)) scr' in\n         clocal_rvalue0 cont' ex0 scr)\n    | Ebinop (op, ex1, ex2, ty) ->\n      (match op with\n       | Osha_2 ->\n         let cont' = fun ex1' scr1 ->\n           let cont'' = fun ex2' scr2 ->\n             let scre1 = scrmap scr2 in\n             let scre2 = scrmap (add scr2 (S O)) in\n             let s0 = Smassign (scre1, ex1') in\n             let s1 = Smassign (scre2, ex2') in\n             let s2 = Shash (scre1, scre1, (Some scre2)) in\n             bind coq_Monad_optErr\n               (Obj.magic cont (Ederef (scre1, ty)) (add scr2 (S (S O))))\n               (fun res ->\n               let Coq_pair (s3, scr') = res in\n               ret coq_Monad_optErr (Coq_pair\n                 ((sequentialize (Coq_cons (s0, (Coq_cons (s1, (Coq_cons (s2,\n                    (Coq_cons (s3, Coq_nil))))))))), scr')))\n           in\n           Obj.magic clocal_rvalue0 cont'' ex2 scr1\n         in\n         clocal_rvalue0 cont' ex1 scr\n       | _ ->\n         let cont' = fun ex1' scr1 ->\n           let cont'' = fun ex2' scr2 ->\n             cont (Ebinop (op, ex1', ex2', ty)) scr2\n           in\n           clocal_rvalue0 cont'' ex2 scr1\n         in\n         clocal_rvalue0 cont' ex1 scr)\n    | Efield (_, _, _) ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Eindex (_, _, _) ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Ecall1 (b, ex0, ty) ->\n      let cont' = fun ex' scr' -> cont (Ecall1 (b, ex', ty)) scr' in\n      clocal_rvalue0 cont' ex0 scr\n    | x -> cont x scr\n  and clocal_lvalue0 cont ex scr =\n    match ex with\n    | Evar (id, t0) ->\n      (match t0 with\n       | Tpointer (p, ty) ->\n         (match p with\n          | Coq_mem -> cont (Evar (id, (Tpointer (Coq_mem, ty)))) scr\n          | _ ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Etempvar (id, ty) -> cont (Etempvar (id, ty)) scr\n    | Ederef (ex0, _) -> clocal_rvalue0 cont ex0 scr\n    | Eunop (u, ex0, t0) ->\n      (match u with\n       | Osha_1 ->\n         (match t0 with\n          | Tpointer (p, ty) ->\n            (match p with\n             | Coq_stor ->\n               let cont' = fun ex' scr' ->\n                 let scre = scrmap scr' in\n                 let s0 = Smassign (scre, ex') in\n                 let s1 = Shash (scre, scre, None) in\n                 bind coq_Monad_optErr\n                   (Obj.magic cont (Ederef (scre, (Tpointer (Coq_stor, ty))))\n                     (add scr' (S O))) (fun res ->\n                   let Coq_pair (s2, scr'') = res in\n                   ret coq_Monad_optErr (Coq_pair\n                     ((sequentialize (Coq_cons (s0, (Coq_cons (s1, (Coq_cons\n                        (s2, Coq_nil))))))), scr'')))\n               in\n               Obj.magic clocal_rvalue0 cont' ex0 scr\n             | _ ->\n               Error (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false)),\n                 EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n          | _ ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Ebinop (b, ex1, ex2, t0) ->\n      (match b with\n       | Osha_2 ->\n         (match t0 with\n          | Tpointer (p, ty) ->\n            (match p with\n             | Coq_stor ->\n               let cont' = fun ex1' scr1 ->\n                 let cont'' = fun ex2' scr2 ->\n                   let scre1 = scrmap scr2 in\n                   let scre2 = scrmap (add scr2 (S O)) in\n                   let s0 = Smassign (scre1, ex1') in\n                   let s1 = Smassign (scre2, ex2') in\n                   let s2 = Shash (scre1, scre1, (Some scre2)) in\n                   bind coq_Monad_optErr\n                     (Obj.magic cont (Ederef (scre1, (Tpointer (Coq_stor,\n                       ty)))) (add scr2 (S (S O)))) (fun res ->\n                     let Coq_pair (s3, scr') = res in\n                     ret coq_Monad_optErr (Coq_pair\n                       ((sequentialize (Coq_cons (s0, (Coq_cons (s1,\n                          (Coq_cons (s2, (Coq_cons (s3, Coq_nil))))))))),\n                       scr')))\n                 in\n                 Obj.magic clocal_rvalue0 cont'' ex2 scr1\n               in\n               clocal_rvalue0 cont' ex1 scr\n             | _ ->\n               Error (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_false, Coq_false)),\n                 EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n          | _ ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Efield (ex0, id, t0) ->\n      (match t0 with\n       | Tpointer (p, ty) ->\n         (match p with\n          | Coq_mem ->\n            let cont' = fun ex' ->\n              cont (Efield (ex', id, (Tpointer (Coq_mem, ty))))\n            in\n            clocal_lvalue0 cont' ex0 scr\n          | _ ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Eindex (ex1, ex2, t0) ->\n      (match t0 with\n       | Tpointer (p, ty) ->\n         (match p with\n          | Coq_mem ->\n            let cont' = fun ex1' scr1 ->\n              let cont'' = fun ex2' scr2 ->\n                cont (Eindex (ex1', ex2', (Tpointer (Coq_mem, ty)))) scr2\n              in\n              clocal_rvalue0 cont'' ex2 scr1\n            in\n            clocal_lvalue0 cont' ex1 scr\n          | _ ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | _ ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  in clocal_lvalue0\n\n(** val clocal_expr_list :\n    (nat -> expr) -> (expr list -> nat -> (StmtClocal.statement, nat) prod\n    optErr) -> expr list -> nat -> (StmtClocal.statement, nat) prod optErr **)\n\nlet rec clocal_expr_list scrmap cont exps scr =\n  match exps with\n  | Coq_nil -> cont Coq_nil O\n  | Coq_cons (e, exps0) ->\n    let cont' = fun exps' scr' ->\n      let expr_cont = fun e' scr'' -> cont (Coq_cons (e', exps')) scr'' in\n      clocal_rvalue scrmap expr_cont e scr'\n    in\n    clocal_expr_list scrmap cont' exps0 scr\n\n(** val split_exps :\n    nat -> expr list -> (expr list, expr list) prod optErr **)\n\nlet rec split_exps n exps =\n  match n with\n  | O -> ret (Obj.magic coq_Monad_optErr) (Coq_pair (Coq_nil, exps))\n  | S n0 ->\n    (match exps with\n     | Coq_nil ->\n       Error (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), EmptyString))))))))))))))))))))))))))))))))))\n     | Coq_cons (e, exps0) ->\n       bind (Obj.magic coq_Monad_optErr) (split_exps n0 exps0) (fun res ->\n         let Coq_pair (l, r) = res in\n         ret (Obj.magic coq_Monad_optErr) (Coq_pair ((Coq_cons (e, l)), r))))\n\n(** val clocal_stm :\n    (nat -> expr) -> statement -> (StmtClocal.statement, nat) prod optErr **)\n\nlet rec clocal_stm scrmap = function\n| Sskip -> ret (Obj.magic coq_Monad_optErr) (Coq_pair (StmtClocal.Sskip, O))\n| Sassign (lv, rv) ->\n  (match typeof lv with\n   | Tpointer (p, _) ->\n     (match p with\n      | Coq_mem ->\n        let cont = fun lv' scr ->\n          let cont' = fun rv' scr' ->\n            ret coq_Monad_optErr (Coq_pair ((Smassign (lv', rv')), scr'))\n          in\n          clocal_rvalue scrmap (Obj.magic cont') rv scr\n        in\n        clocal_lvalue scrmap cont lv O\n      | Coq_stor ->\n        let cont = fun lv' scr ->\n          let cont' = fun rv' scr' ->\n            ret coq_Monad_optErr (Coq_pair ((Ssassign (lv', rv')), scr'))\n          in\n          clocal_rvalue scrmap (Obj.magic cont') rv scr\n        in\n        clocal_lvalue scrmap cont lv O\n      | Coq_call ->\n        Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n          Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n   | _ ->\n     Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Sset (id, rv) ->\n  clocal_rvalue scrmap (fun rv' scr ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_pair ((StmtClocal.Sset (id, rv')),\n      scr))) rv O\n| Scall (id, label, args) ->\n  let cont = fun args' scr ->\n    ret coq_Monad_optErr (Coq_pair ((StmtClocal.Scall (id, label, args')),\n      scr))\n  in\n  clocal_expr_list scrmap (Obj.magic cont) args O\n| Ssequence (stm1, stm2) ->\n  bind (Obj.magic coq_Monad_optErr) (clocal_stm scrmap stm1) (fun res1 ->\n    let Coq_pair (seq1, scr1) = res1 in\n    bind (Obj.magic coq_Monad_optErr) (clocal_stm scrmap stm2) (fun res2 ->\n      let Coq_pair (seq2, scr2) = res2 in\n      ret (Obj.magic coq_Monad_optErr) (Coq_pair ((StmtClocal.Ssequence\n        (seq1, seq2)), (Nat.max scr1 scr2)))))\n| Sifthenelse (ex, stm1, stm2) ->\n  bind (Obj.magic coq_Monad_optErr) (clocal_stm scrmap stm1) (fun true_res ->\n    let Coq_pair (true_stm, scr1) = true_res in\n    bind (Obj.magic coq_Monad_optErr) (clocal_stm scrmap stm2)\n      (fun false_res ->\n      let Coq_pair (false_stm, scr2) = false_res in\n      let scr = Nat.max scr1 scr2 in\n      clocal_rvalue scrmap (fun ex' scr' ->\n        ret (Obj.magic coq_Monad_optErr) (Coq_pair ((StmtClocal.Sifthenelse\n          (ex', true_stm, false_stm)), (Nat.max scr scr')))) ex O))\n| Sloop loop ->\n  bind (Obj.magic coq_Monad_optErr) (clocal_stm scrmap loop) (fun res ->\n    let Coq_pair (loop0, scr) = res in\n    ret (Obj.magic coq_Monad_optErr) (Coq_pair ((StmtClocal.Sloop loop0),\n      scr)))\n| Sbreak -> ret (Obj.magic coq_Monad_optErr) (Coq_pair (StmtClocal.Sbreak, O))\n| Sreturn retvar ->\n  ret (Obj.magic coq_Monad_optErr) (Coq_pair ((StmtClocal.Sreturn retvar), O))\n| Stransfer (addr, val0) ->\n  let cont = fun addr' scr ->\n    let cont' = fun val' scr' ->\n      ret coq_Monad_optErr (Coq_pair ((StmtClocal.Stransfer (addr', val')),\n        scr'))\n    in\n    clocal_rvalue scrmap (Obj.magic cont') val0 scr\n  in\n  clocal_rvalue scrmap cont addr O\n| Scallmethod (addr, retvals, funsig, val0, gas, args) ->\n  let cont = fun all_exps scr ->\n    match all_exps with\n    | Coq_nil ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Coq_cons (_, l) ->\n      (match l with\n       | Coq_nil ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)),\n           EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | Coq_cons (_, _) ->\n         ret coq_Monad_optErr (Coq_pair ((StmtClocal.Scallmethod (addr,\n           retvals, funsig, val0, gas, args)), scr)))\n  in\n  let cont' = fun all_exps scr ->\n    match all_exps with\n    | Coq_nil ->\n      Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Coq_cons (_, l) ->\n      (match l with\n       | Coq_nil ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)),\n           EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | Coq_cons (_, l0) ->\n         (match l0 with\n          | Coq_nil ->\n            Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n              Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)),\n              EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))\n          | Coq_cons (_, _) ->\n            ret coq_Monad_optErr (Coq_pair ((StmtClocal.Scallmethod (addr,\n              retvals, funsig, val0, gas, args)), scr))))\n  in\n  (match gas with\n   | Some g ->\n     clocal_expr_list scrmap (Obj.magic cont') (Coq_cons (addr, (Coq_cons\n       (val0, (Coq_cons (g, args)))))) O\n   | None ->\n     clocal_expr_list scrmap (Obj.magic cont) (Coq_cons (addr, (Coq_cons\n       (val0, args)))) O)\n| Slog (topics, args) ->\n  let cont = fun all_exps scr ->\n    bind coq_Monad_optErr (Obj.magic split_exps (length topics) all_exps)\n      (fun res ->\n      let Coq_pair (topics', args') = res in\n      ret coq_Monad_optErr (Coq_pair ((StmtClocal.Slog (topics', args')),\n        scr)))\n  in\n  clocal_expr_list scrmap (Obj.magic cont) (app topics args) O\n| Srevert ->\n  ret (Obj.magic coq_Monad_optErr) (Coq_pair (StmtClocal.Srevert, O))\n\n(** val max_id : (ident, coq_type) prod list -> nat **)\n\nlet rec max_id = function\n| Coq_nil -> O\n| Coq_cons (p, locs0) ->\n  let Coq_pair (id, _) = p in Nat.max (Pos.to_nat id) (max_id locs0)\n\n(** val make_scrmap : nat -> nat -> expr **)\n\nlet make_scrmap base n =\n  Evar ((Pos.of_nat (add base n)), (Tpointer (Coq_mem, (Tpointer (Coq_stor,\n    Tvoid)))))\n\n(** val ptr_type : coq_type **)\n\nlet ptr_type =\n  Tpointer (Coq_mem, (Tpointer (Coq_stor, Tvoid)))\n\n(** val extend_locs :\n    nat -> nat -> (ident, coq_type) prod list -> (ident, coq_type) prod list **)\n\nlet rec extend_locs n base locs =\n  match n with\n  | O -> locs\n  | S n0 ->\n    Coq_cons ((Coq_pair ((Pos.of_nat (add base n0)), ptr_type)),\n      (extend_locs n0 base locs))\n\n(** val clocal_function : coq_function -> StmtClocal.coq_function optErr **)\n\nlet clocal_function f =\n  let base = add (max_id f.fn_locals) (S O) in\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic clocal_stm (make_scrmap base) f.fn_body) (fun res ->\n    let Coq_pair (stm, n) = res in\n    let locs = extend_locs n base f.fn_locals in\n    ret (Obj.magic coq_Monad_optErr) { StmtClocal.fn_return = f.fn_return;\n      StmtClocal.fn_params = f.fn_params; StmtClocal.fn_temps = f.fn_temps;\n      StmtClocal.fn_locals = locs; StmtClocal.fn_body = stm })\n\n(** val clocal_constructor :\n    coq_function option -> StmtClocal.coq_function option optErr **)\n\nlet clocal_constructor = function\n| Some f0 ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clocal_function f0) (fun f1 ->\n    ret (Obj.magic coq_Monad_optErr) (Some f1))\n| None -> ret (Obj.magic coq_Monad_optErr) None\n\n(** val clocal_functions :\n    coq_function PTree.t -> StmtClocal.coq_function PTree.t optErr **)\n\nlet clocal_functions defs =\n  transl_tree clocal_function defs\n\n(** val clocal_methoddefs :\n    coq_function option IntMap.t -> StmtClocal.coq_function option IntMap.t\n    optErr **)\n\nlet clocal_methoddefs defs =\n  transl_map clocal_function defs\n\n(** val clocal_genv : genv -> StmtClocal.genv optErr **)\n\nlet clocal_genv ge =\n  let vars = ge.Genv.genv_vars in\n  let defs = ge.Genv.genv_defs in\n  let names = ge.Genv.genv_funcs in\n  let functions = ge.Genv.genv_fundefs in\n  let sigs = ge.Genv.genv_methods in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clocal_functions functions)\n    (fun functions0 ->\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic clocal_methoddefs methoddefs) (fun methoddefs0 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (Obj.magic clocal_constructor constructor) (fun constructor0 ->\n        ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n          Genv.genv_funcs = names; Genv.genv_methods = sigs; Genv.genv_defs =\n          defs; Genv.genv_fundefs = functions0; Genv.genv_methoddefs =\n          methoddefs0; Genv.genv_constructor = constructor0 })))\n"
  },
  {
    "path": "src/backend/extraction/Gen0.mli",
    "content": "open AST\nopen Ascii\nopen BinPos\nopen Cop\nopen Ctypes\nopen Datatypes\nopen ExpMiniC\nopen Globalenvs\nopen Maps0\nopen Monad\nopen Nat0\nopen OptErrMonad\nopen PeanoNat\nopen StmtClocal\nopen StmtMiniC\nopen String0\nopen Trees\n\nval sequentialize : StmtClocal.statement list -> StmtClocal.statement\n\nval clocal_rvalue :\n  (nat -> expr) -> (expr -> nat -> (StmtClocal.statement, nat) prod optErr)\n  -> expr -> nat -> (StmtClocal.statement, nat) prod optErr\n\nval clocal_lvalue :\n  (nat -> expr) -> (expr -> nat -> (StmtClocal.statement, nat) prod optErr)\n  -> expr -> nat -> (StmtClocal.statement, nat) prod optErr\n\nval clocal_expr_list :\n  (nat -> expr) -> (expr list -> nat -> (StmtClocal.statement, nat) prod\n  optErr) -> expr list -> nat -> (StmtClocal.statement, nat) prod optErr\n\nval split_exps : nat -> expr list -> (expr list, expr list) prod optErr\n\nval clocal_stm :\n  (nat -> expr) -> statement -> (StmtClocal.statement, nat) prod optErr\n\nval max_id : (ident, coq_type) prod list -> nat\n\nval make_scrmap : nat -> nat -> expr\n\nval ptr_type : coq_type\n\nval extend_locs :\n  nat -> nat -> (ident, coq_type) prod list -> (ident, coq_type) prod list\n\nval clocal_function : coq_function -> StmtClocal.coq_function optErr\n\nval clocal_constructor :\n  coq_function option -> StmtClocal.coq_function option optErr\n\nval clocal_functions :\n  coq_function PTree.t -> StmtClocal.coq_function PTree.t optErr\n\nval clocal_methoddefs :\n  coq_function option IntMap.t -> StmtClocal.coq_function option IntMap.t\n  optErr\n\nval clocal_genv : genv -> StmtClocal.genv optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen1.ml",
    "content": "open Ascii\nopen BinNums\nopen BinPos\nopen Coqlib\nopen Ctypes\nopen Datatypes\nopen Globalenvs\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Specif\nopen StmtCGraph\nopen StmtCintptr\nopen String0\nopen Trees\n\ntype __ = Obj.t\n\ntype state = { st_nextnode : positive; st_code : code }\n\n(** val st_nextnode : state -> positive **)\n\nlet st_nextnode x = x.st_nextnode\n\n(** val st_code : state -> code **)\n\nlet st_code x = x.st_code\n\n(** val init_state : state **)\n\nlet init_state =\n  { st_nextnode = Coq_xH; st_code = PTree.empty }\n\ntype 'a res =\n| Fail\n| OK of 'a * state\n\ntype 'a mon = state -> 'a res\n\n(** val coq_Monad_mon : __ mon coq_Monad **)\n\nlet coq_Monad_mon =\n  { ret = (fun _ x s -> OK (x, s)); bind = (fun _ _ f g s ->\n    match f s with\n    | Fail -> Fail\n    | OK (a, s') -> g a s') }\n\n(** val error : 'a1 mon **)\n\nlet error _ =\n  Fail\n\n(** val add_instr : StmtCGraph.statement -> node mon **)\n\nlet add_instr i s =\n  let n = s.st_nextnode in\n  OK (n, { st_nextnode = (Pos.succ n); st_code = (PTree.set n i s.st_code) })\n\n(** val reserve_instr : node mon **)\n\nlet reserve_instr s =\n  let n = s.st_nextnode in\n  OK (n, { st_nextnode = (Pos.succ n); st_code = s.st_code })\n\n(** val check_empty_node : state -> node -> sumbool **)\n\nlet check_empty_node s n =\n  match PTree.get n s.st_code with\n  | Some _ -> Coq_right\n  | None -> Coq_left\n\n(** val update_instr : node -> StmtCGraph.statement -> coq_unit mon **)\n\nlet update_instr n i s =\n  match plt n s.st_nextnode with\n  | Coq_left ->\n    (match check_empty_node s n with\n     | Coq_left ->\n       OK (Coq_tt, { st_nextnode = s.st_nextnode; st_code =\n         (PTree.set n i s.st_code) })\n     | Coq_right -> Fail)\n  | Coq_right -> Fail\n\n(** val cgraph_statement :\n    statement -> node -> node -> node -> node option -> node mon **)\n\nlet rec cgraph_statement s nd nret nrev nbrk =\n  match s with\n  | Sskip -> ret (Obj.magic coq_Monad_mon) nd\n  | Ssassign (lv, rv) -> add_instr (StmtCGraph.Ssassign (lv, rv, nd))\n  | Smassign (lv, rv) -> add_instr (StmtCGraph.Smassign (lv, rv, nd))\n  | Sset (id, rv) -> add_instr (StmtCGraph.Sset (id, rv, nd))\n  | Scall (retval, lab, args) ->\n    add_instr (StmtCGraph.Scall (retval, lab, args, nd))\n  | Ssequence (s1, s2) ->\n    bind (Obj.magic coq_Monad_mon) (cgraph_statement s2 nd nret nrev nbrk)\n      (fun ns -> cgraph_statement s1 ns nret nrev nbrk)\n  | Sifthenelse (c, strue, sfalse) ->\n    bind (Obj.magic coq_Monad_mon)\n      (cgraph_statement sfalse nd nret nrev nbrk) (fun nfalse ->\n      bind (Obj.magic coq_Monad_mon)\n        (cgraph_statement strue nd nret nrev nbrk) (fun ntrue ->\n        add_instr (Scond (c, ntrue, nfalse))))\n  | Sloop sbody ->\n    bind (Obj.magic coq_Monad_mon) reserve_instr (fun n1 ->\n      bind (Obj.magic coq_Monad_mon)\n        (cgraph_statement sbody n1 nret nrev (Some nd)) (fun n2 ->\n        bind (Obj.magic coq_Monad_mon)\n          (Obj.magic update_instr n1 (StmtCGraph.Sskip n2)) (fun _ ->\n          ret (Obj.magic coq_Monad_mon) n1)))\n  | Sbreak ->\n    (match nbrk with\n     | Some nbrk0 -> ret (Obj.magic coq_Monad_mon) nbrk0\n     | None -> error)\n  | Sreturn retvar -> add_instr (StmtCGraph.Sreturn (retvar, nret))\n  | Shash (ex1, ex2, exo) -> add_instr (StmtCGraph.Shash (ex1, ex2, exo, nd))\n  | Stransfer (a, v) -> add_instr (StmtCGraph.Stransfer (a, v, nrev, nd))\n  | Scallmethod (a, rvs, sig0, v, g, args) ->\n    add_instr (StmtCGraph.Scallmethod (a, rvs, sig0, v, g, args, nrev, nd))\n  | Slog (topics, args) -> add_instr (StmtCGraph.Slog (topics, args, nd))\n  | Srevert -> ret (Obj.magic coq_Monad_mon) nrev\n\n(** val cgraph_function : coq_function -> StmtCGraph.coq_function optErr **)\n\nlet cgraph_function f =\n  let cgraph_fun =\n    bind (Obj.magic coq_Monad_mon) (add_instr Sdone) (fun nret ->\n      bind (Obj.magic coq_Monad_mon) (add_instr StmtCGraph.Srevert)\n        (fun nrev -> cgraph_statement f.fn_body nret nret nrev None))\n  in\n  (match cgraph_fun init_state with\n   | Fail ->\n     Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)),\n       EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))\n   | OK (nentry, s) ->\n     ret (Obj.magic coq_Monad_optErr) { StmtCGraph.fn_return = f.fn_return;\n       StmtCGraph.fn_params = f.fn_params; StmtCGraph.fn_temps = f.fn_temps;\n       StmtCGraph.fn_locals = f.fn_locals; fn_code = s.st_code;\n       fn_entrypoint = nentry; fn_nextnode = s.st_nextnode })\n\n(** val empty_constructor : coq_function **)\n\nlet empty_constructor =\n  { fn_return = Tvoid; fn_params = Coq_nil; fn_temps = Coq_nil; fn_locals =\n    Coq_nil; fn_body = Sskip }\n\n(** val cgraph_constructor :\n    coq_function option -> StmtCGraph.coq_function option optErr **)\n\nlet cgraph_constructor = function\n| Some f0 ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cgraph_function f0) (fun cf ->\n    ret (Obj.magic coq_Monad_optErr) (Some cf))\n| None ->\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic cgraph_function empty_constructor) (fun cf ->\n    ret (Obj.magic coq_Monad_optErr) (Some cf))\n\n(** val cgraph_functions :\n    coq_function PTree.t -> StmtCGraph.coq_function PTree.t optErr **)\n\nlet cgraph_functions defs =\n  transl_tree cgraph_function defs\n\n(** val cgraph_methoddefs :\n    coq_function option IntMap.t -> StmtCGraph.coq_function option IntMap.t\n    optErr **)\n\nlet cgraph_methoddefs defs =\n  transl_map cgraph_function defs\n\n(** val cgraph_genv : genv -> StmtCGraph.genv optErr **)\n\nlet cgraph_genv ge =\n  let vars = ge.Genv.genv_vars in\n  let names = ge.Genv.genv_funcs in\n  let fundefs = ge.Genv.genv_fundefs in\n  let sigs = ge.Genv.genv_methods in\n  let defs = ge.Genv.genv_defs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cgraph_functions fundefs)\n    (fun fundefs0 ->\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic cgraph_methoddefs methoddefs) (fun methoddefs0 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (Obj.magic cgraph_constructor constructor) (fun constructor0 ->\n        ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n          Genv.genv_funcs = names; Genv.genv_methods = sigs; Genv.genv_defs =\n          defs; Genv.genv_fundefs = fundefs0; Genv.genv_methoddefs =\n          methoddefs0; Genv.genv_constructor = constructor0 })))\n"
  },
  {
    "path": "src/backend/extraction/Gen1.mli",
    "content": "open Ascii\nopen BinNums\nopen BinPos\nopen Coqlib\nopen Ctypes\nopen Datatypes\nopen Globalenvs\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Specif\nopen StmtCGraph\nopen StmtCintptr\nopen String0\nopen Trees\n\ntype __ = Obj.t\n\ntype state = { st_nextnode : positive; st_code : code }\n\nval st_nextnode : state -> positive\n\nval st_code : state -> code\n\nval init_state : state\n\ntype 'a res =\n| Fail\n| OK of 'a * state\n\ntype 'a mon = state -> 'a res\n\nval coq_Monad_mon : __ mon coq_Monad\n\nval error : 'a1 mon\n\nval add_instr : StmtCGraph.statement -> node mon\n\nval reserve_instr : node mon\n\nval check_empty_node : state -> node -> sumbool\n\nval update_instr : node -> StmtCGraph.statement -> coq_unit mon\n\nval cgraph_statement :\n  statement -> node -> node -> node -> node option -> node mon\n\nval cgraph_function : coq_function -> StmtCGraph.coq_function optErr\n\nval empty_constructor : coq_function\n\nval cgraph_constructor :\n  coq_function option -> StmtCGraph.coq_function option optErr\n\nval cgraph_functions :\n  coq_function PTree.t -> StmtCGraph.coq_function PTree.t optErr\n\nval cgraph_methoddefs :\n  coq_function option IntMap.t -> StmtCGraph.coq_function option IntMap.t\n  optErr\n\nval cgraph_genv : genv -> StmtCGraph.genv optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen10.ml",
    "content": "open AST\nopen Ascii\nopen BinNums\nopen BinPos\nopen Cop\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen GlobalenvCompile\nopen Globalenvs\nopen Int0\nopen Integers\nopen Language0\nopen List0\nopen Maps0\nopen Monad\nopen Nat0\nopen OptErrMonad\nopen Options\nopen PeanoNat\nopen StackEnv\nopen StmtCintptr\nopen String0\nopen Structure\nopen Trees\nopen Values\n\nlet __ = let rec f _ = Obj.repr f in Obj.repr f\n\n(** val wasm_expr :\n    nat PTree.t -> ExpCintptr.expr -> bool -> instr list optErr **)\n\nlet rec wasm_expr temps e rvalue =\n  match e with\n  | Econst_int (_, _) ->\n    Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n      Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Econst_int256 (i, _) ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Const_256 i), Coq_nil))\n  | Etempvar (i, _) ->\n    (match rvalue with\n     | Coq_true ->\n       bind (Obj.magic coq_Monad_optErr)\n         (fromOption (PTree.get i (Obj.magic temps)) (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n         (fun ind ->\n         ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Local_get ind),\n           Coq_nil)))\n     | Coq_false ->\n       Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Esload (e0, _) ->\n    bind (Obj.magic coq_Monad_optErr) (wasm_expr temps e0 Coq_false)\n      (fun e' ->\n      ret (Obj.magic coq_Monad_optErr)\n        (app e'\n          (app\n            (set_eeiOffset Coq_nil Coq_pathOffset (S (S (S (S (S (S (S (S\n              O)))))))))\n            (app (Coq_cons ((Const_nat\n              (get_idx_eei_mem_offset Coq_pathOffset)), (Coq_cons ((Const_nat\n              (get_idx_eei_mem_offset Coq_resultOffset)), (Coq_cons ((Call\n              (get_idx_eei Coq_eei_storageLoad)), Coq_nil))))))\n              (load_resultOffset (S O))))))\n  | Emload (e0, t0) ->\n    bind (Obj.magic coq_Monad_optErr) (wasm_expr temps e0 Coq_false)\n      (fun e' ->\n      bind (Obj.magic coq_Monad_optErr)\n        (match t0 with\n         | Tpointer (p, _) ->\n           (match p with\n            | Coq_stor ->\n              Success (Coq_cons ((Const_nat (S (S (S (S (S (S (S (S (S (S (S\n                (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n                (S O))))))))))))))))))))))))))))))))), (Coq_cons ((Binop\n                (Coq_i32 IOp32.Add)), (Coq_cons ((Global_set\n                scratch_global_idx2),\n                (app Coq_nil\n                  (load_len_hash (S (S (S (S (S (S (S (S O))))))))))))))))\n            | _ -> Success (Coq_cons ((Memop (Coq_i32 IOp32.Load)), Coq_nil)))\n         | _ -> Success (Coq_cons ((Memop (Coq_i32 IOp32.Load)), Coq_nil)))\n        (fun l -> ret (Obj.magic coq_Monad_optErr) (app e' l)))\n  | Eaddr (e0, _) ->\n    (match rvalue with\n     | Coq_true ->\n       bind (Obj.magic coq_Monad_optErr) (wasm_expr temps e0 Coq_false)\n         (fun e' -> ret (Obj.magic coq_Monad_optErr) e')\n     | Coq_false ->\n       Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Eunop (o, e0, _) ->\n    (match rvalue with\n     | Coq_true ->\n       bind (Obj.magic coq_Monad_optErr) (wasm_expr temps e0 Coq_true)\n         (fun e' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (match o with\n            | Onotbool -> Success (Coq_cons ((Testop (Coq_i32 __)), Coq_nil))\n            | Onotint ->\n              Success (Coq_cons ((Call (get_idx_aux Coq_aux_notint)),\n                Coq_nil))\n            | Oneg ->\n              Success (Coq_cons ((Const (Coq_i32 I32.zero)), (Coq_cons\n                ((Binop (Coq_i32 IOp32.Sub)), Coq_nil))))\n            | Osha_1 ->\n              Error (String ((Ascii (Coq_false, Coq_false, Coq_false,\n                Coq_true, Coq_false, Coq_false, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n                Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n                ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n                ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n                Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n                Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n                Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n                ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n                Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n                ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n                Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n                Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n                Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n                Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n                ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n                Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n                Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n                Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n           (fun o' -> ret (Obj.magic coq_Monad_optErr) (app e' o')))\n     | Coq_false ->\n       Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Ebinop (o, e1, e2, _) ->\n    bind (Obj.magic coq_Monad_optErr) (wasm_expr temps e1 rvalue) (fun e1' ->\n      bind (Obj.magic coq_Monad_optErr) (wasm_expr temps e2 Coq_true)\n        (fun e2' ->\n        bind (Obj.magic coq_Monad_optErr)\n          (match o with\n           | Oadd -> Success (Coq_cons ((Binop (Coq_i32 IOp32.Add)), Coq_nil))\n           | Osub -> Success (Coq_cons ((Binop (Coq_i32 IOp32.Sub)), Coq_nil))\n           | Omul -> Success (Coq_cons ((Binop (Coq_i32 IOp32.Mul)), Coq_nil))\n           | Odiv ->\n             Success (Coq_cons ((Binop (Coq_i32 (IOp32.Div Unsigned))),\n               Coq_nil))\n           | Omod ->\n             Success (Coq_cons ((Binop (Coq_i32 (IOp32.Rem Unsigned))),\n               Coq_nil))\n           | Oexp ->\n             Success (Coq_cons ((Call (get_idx_aux Coq_aux_pow)), Coq_nil))\n           | Oand -> Success (Coq_cons ((Binop (Coq_i32 IOp32.And)), Coq_nil))\n           | Oor -> Success (Coq_cons ((Binop (Coq_i32 IOp32.Or)), Coq_nil))\n           | Oxor -> Success (Coq_cons ((Binop (Coq_i32 IOp32.Xor)), Coq_nil))\n           | Oshl -> Success (Coq_cons ((Binop (Coq_i32 IOp32.Shl)), Coq_nil))\n           | Oshr ->\n             Success (Coq_cons ((Binop (Coq_i32 (IOp32.Shr Unsigned))),\n               Coq_nil))\n           | Oeq -> Success (Coq_cons ((Relop (Coq_i32 IOp32.Eq)), Coq_nil))\n           | One -> Success (Coq_cons ((Relop (Coq_i32 IOp32.Ne)), Coq_nil))\n           | Olt ->\n             Success (Coq_cons ((Relop (Coq_i32 (IOp32.Lt Unsigned))),\n               Coq_nil))\n           | Ogt ->\n             Success (Coq_cons ((Relop (Coq_i32 (IOp32.Gt Unsigned))),\n               Coq_nil))\n           | Ole ->\n             Success (Coq_cons ((Relop (Coq_i32 (IOp32.Le Unsigned))),\n               Coq_nil))\n           | Oge ->\n             Success (Coq_cons ((Relop (Coq_i32 (IOp32.Ge Unsigned))),\n               Coq_nil))\n           | Osha_2 ->\n             Error (String ((Ascii (Coq_false, Coq_false, Coq_false,\n               Coq_true, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n               (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n               (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n               Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n               (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n               (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n               (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n               Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n               (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n               Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n               Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)),\n               EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n          (fun o' -> ret (Obj.magic coq_Monad_optErr) (app e1' (app e2' o')))))\n  | Ecall0 (b, _) ->\n    (match rvalue with\n     | Coq_true ->\n       bind (Obj.magic coq_Monad_optErr) (wasm_builtin0 b) (fun b' ->\n         ret (Obj.magic coq_Monad_optErr) b')\n     | Coq_false ->\n       Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Ecall1 (b, e0, _) ->\n    (match rvalue with\n     | Coq_true ->\n       bind (Obj.magic coq_Monad_optErr) (wasm_expr temps e0 Coq_true)\n         (fun e' ->\n         bind (Obj.magic coq_Monad_optErr) (Success (wasm_builtin1 b))\n           (fun b' -> ret (Obj.magic coq_Monad_optErr) (app e' b')))\n     | Coq_false ->\n       Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val wasm_exprs :\n    nat PTree.t -> ExpCintptr.expr list -> instr list optErr **)\n\nlet rec wasm_exprs temps = function\n| Coq_nil -> ret (Obj.magic coq_Monad_optErr) Coq_nil\n| Coq_cons (e, rest) ->\n  bind (Obj.magic coq_Monad_optErr) (wasm_expr temps e Coq_true) (fun e' ->\n    bind (Obj.magic coq_Monad_optErr) (wasm_exprs temps rest) (fun rest' ->\n      ret (Obj.magic coq_Monad_optErr) (app rest' e')))\n\n(** val optident : nat PTree.t -> ident option -> instrs optErr **)\n\nlet optident temps = function\n| Some b ->\n  (match PTree.get b temps with\n   | Some v ->\n     ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Local_set v), Coq_nil))\n   | None ->\n     Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n       Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n       ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)),\n       EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))\n| None -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Drop, Coq_nil))\n\n(** val wasm_statement :\n    (positive, nat) prod list -> nat PTree.t -> coq_type -> statement -> nat\n    -> instrs optErr **)\n\nlet rec wasm_statement funident_map temps return_type s cstack_depth =\n  match s with\n  | Sskip -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Nop, Coq_nil))\n  | Ssassign (lv, rv) ->\n    bind (Obj.magic coq_Monad_optErr) (wasm_expr temps lv Coq_false)\n      (fun lv' ->\n      bind (Obj.magic coq_Monad_optErr) (wasm_expr temps rv Coq_true)\n        (fun rv' ->\n        ret (Obj.magic coq_Monad_optErr)\n          (app lv'\n            (app\n              (set_eeiOffset Coq_nil Coq_pathOffset (S (S (S (S (S (S (S (S\n                O)))))))))\n              (app (set_eeiOffset rv' Coq_valueOffset (S O)) (Coq_cons\n                ((Const_nat (get_idx_eei_mem_offset Coq_pathOffset)),\n                (Coq_cons ((Const_nat\n                (get_idx_eei_mem_offset Coq_valueOffset)), (Coq_cons ((Call\n                (get_idx_eei Coq_eei_storageStore)), Coq_nil)))))))))))\n  | Smassign (lv, rv) ->\n    bind (Obj.magic coq_Monad_optErr) (wasm_expr temps lv Coq_false)\n      (fun lv' ->\n      bind (Obj.magic coq_Monad_optErr) (wasm_expr temps rv Coq_true)\n        (fun rv' ->\n        match typeof lv with\n        | Tpointer (_, _) ->\n          (match rv with\n           | Econst_int (_, _) ->\n             ret (Obj.magic coq_Monad_optErr)\n               (app lv'\n                 (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)), Coq_nil))))\n           | Econst_int256 (_, _) ->\n             ret (Obj.magic coq_Monad_optErr)\n               (app lv'\n                 (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)), Coq_nil))))\n           | Etempvar (_, _) ->\n             ret (Obj.magic coq_Monad_optErr)\n               (app lv'\n                 (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)), Coq_nil))))\n           | Esload (_, _) ->\n             ret (Obj.magic coq_Monad_optErr)\n               (app lv'\n                 (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)), Coq_nil))))\n           | Emload (_, t0) ->\n             (match t0 with\n              | Tpointer (mem, _) ->\n                (match mem with\n                 | Coq_mem ->\n                   ret (Obj.magic coq_Monad_optErr)\n                     (app lv'\n                       (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)),\n                         Coq_nil))))\n                 | Coq_stor ->\n                   ret (Obj.magic coq_Monad_optErr)\n                     (app rv'\n                       (store_len lv' (S (S (S (S (S (S (S (S O))))))))))\n                 | Coq_call ->\n                   ret (Obj.magic coq_Monad_optErr)\n                     (app lv'\n                       (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)),\n                         Coq_nil)))))\n              | _ ->\n                Error (String ((Ascii (Coq_false, Coq_true, Coq_false,\n                  Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                  (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n                  Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                  (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n                  Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                  (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                  Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                  (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                  Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                  Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                  Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                  Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                  Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                  Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                  Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                  Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                  Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                  Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                  Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                  Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n                  Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                  Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                  Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                  Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                  Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                  Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                  Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                  Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                  Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                  Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                  Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                  Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                  Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                  Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                  Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n                  Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                  (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                  Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                  (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                  Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                  (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                  Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                  (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                  Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                  (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n                  Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                  (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n                  Coq_false, Coq_true, Coq_false)), (String ((Ascii\n                  (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n                  Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                  Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                  Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                  Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                  Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                  Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n                  Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n                  Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                  (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n                  Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                  (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                  Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                  (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                  Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                  (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                  Coq_true, Coq_true, Coq_false)),\n                  EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n           | Eaddr (_, _) ->\n             ret (Obj.magic coq_Monad_optErr)\n               (app lv'\n                 (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)), Coq_nil))))\n           | Eunop (_, _, _) ->\n             ret (Obj.magic coq_Monad_optErr)\n               (app lv'\n                 (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)), Coq_nil))))\n           | Ebinop (_, _, _, _) ->\n             ret (Obj.magic coq_Monad_optErr)\n               (app lv'\n                 (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)), Coq_nil))))\n           | Ecall0 (_, _) ->\n             ret (Obj.magic coq_Monad_optErr)\n               (app lv'\n                 (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)), Coq_nil))))\n           | Ecall1 (_, _, _) ->\n             ret (Obj.magic coq_Monad_optErr)\n               (app lv'\n                 (app rv' (Coq_cons ((Memop (Coq_i32 IOp32.Store)), Coq_nil)))))\n        | _ ->\n          Error (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)),\n            EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Sset (id, rv) ->\n    bind (Obj.magic coq_Monad_optErr) (wasm_expr temps rv Coq_true)\n      (fun rv' ->\n      bind (Obj.magic coq_Monad_optErr)\n        (match rv with\n         | Emload (_, t0) ->\n           (match t0 with\n            | Tpointer (p, _) ->\n              (match p with\n               | Coq_stor ->\n                 Success (Coq_cons (Drop, (Coq_cons (Drop, (Coq_cons (Drop,\n                   (Coq_cons (Drop, (Coq_cons (Drop, (Coq_cons (Drop,\n                   (Coq_cons (Drop, Coq_nil))))))))))))))\n               | _ -> Success Coq_nil)\n            | _ -> Success Coq_nil)\n         | _ -> Success Coq_nil) (fun d ->\n        let set_lookup =\n          match PTree.get id temps with\n          | Some v -> Coq_cons ((Local_set v), Coq_nil)\n          | None -> Coq_nil\n        in\n        ret (Obj.magic coq_Monad_optErr) (app rv' (app d set_lookup))))\n  | Scall (retval, lab, args) ->\n    bind (Obj.magic coq_Monad_optErr) (optident temps retval) (fun t0 ->\n      bind (Obj.magic coq_Monad_optErr) (wasm_exprs temps args) (fun args' ->\n        let ido =\n          fold_left (fun xs x ->\n            match xs with\n            | Some _ -> xs\n            | None ->\n              (match Pos.eqb (fst x) lab with\n               | Coq_true -> Some (snd x)\n               | Coq_false -> None)) funident_map None\n        in\n        (match ido with\n         | Some id ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app args' (app (Coq_cons ((Call id), Coq_nil)) t0))\n         | None ->\n           Error (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n             Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n             Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n             Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n             EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Ssequence (s1, s2) ->\n    bind (Obj.magic coq_Monad_optErr)\n      (wasm_statement funident_map temps return_type s1 cstack_depth)\n      (fun x1 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (wasm_statement funident_map temps return_type s2 cstack_depth)\n        (fun x2 -> ret (Obj.magic coq_Monad_optErr) (app x1 x2)))\n  | Sifthenelse (c, strue, sfalse) ->\n    bind (Obj.magic coq_Monad_optErr)\n      (wasm_statement funident_map temps return_type sfalse\n        (add cstack_depth (S O))) (fun nfalse ->\n      bind (Obj.magic coq_Monad_optErr)\n        (wasm_statement funident_map temps return_type strue\n          (add cstack_depth (S O))) (fun ntrue ->\n        bind (Obj.magic coq_Monad_optErr) (wasm_expr temps c Coq_true)\n          (fun cond ->\n          ret (Obj.magic coq_Monad_optErr)\n            (app cond (Coq_cons ((If ((BT_valtype None), ntrue, nfalse)),\n              Coq_nil))))))\n  | Sloop sbody ->\n    bind (Obj.magic coq_Monad_optErr)\n      (wasm_statement funident_map temps return_type sbody\n        (add cstack_depth (S O))) (fun n2 ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Loop ((BT_valtype None),\n        n2)), Coq_nil)))\n  | Sbreak ->\n    (match Nat.eqb cstack_depth O with\n     | Coq_true ->\n       Error (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_true, Coq_false)),\n         EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n     | Coq_false ->\n       ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Br cstack_depth),\n         Coq_nil)))\n  | Sreturn retval ->\n    bind (Obj.magic coq_Monad_optErr)\n      (match retval with\n       | Some i -> wasm_expr temps (Etempvar (i, return_type)) Coq_true\n       | None -> Success (Coq_cons ((Const_nat O), Coq_nil))) (fun rv' ->\n      ret (Obj.magic coq_Monad_optErr) (app rv' (Coq_cons (Return, Coq_nil))))\n  | Shash (ex1, ex2, exo) ->\n    bind (Obj.magic coq_Monad_optErr) (wasm_expr temps ex1 Coq_true)\n      (fun ex1' ->\n      bind (Obj.magic coq_Monad_optErr) (wasm_expr temps ex2 Coq_true)\n        (fun ex2' ->\n        bind (Obj.magic coq_Monad_optErr)\n          (match exo with\n           | Some ex -> wasm_expr temps ex Coq_true\n           | None -> ret (Obj.magic coq_Monad_optErr) ex2') (fun exo' ->\n          ret (Obj.magic coq_Monad_optErr)\n            (app ex2'\n              (app (Coq_cons ((Memop (Coq_i32 IOp32.Load)), Coq_nil))\n                (app exo'\n                  (app (Coq_cons ((Memop (Coq_i32 IOp32.Load)), Coq_nil))\n                    (app callExternalSha256TwoParam\n                      (store_len ex1' (S (S (S (S (S (S (S (S O)))))))))))))))))\n  | Stransfer (a, v) ->\n    bind (Obj.magic coq_Monad_optErr) (wasm_expr temps a Coq_true) (fun a' ->\n      bind (Obj.magic coq_Monad_optErr) (wasm_expr temps v Coq_true)\n        (fun v' ->\n        ret (Obj.magic coq_Monad_optErr)\n          (app (set_eeiOffset a' Coq_addressOffset (S O))\n            (app (set_eeiOffset v' Coq_valueOffset (S O))\n              (app (set_eeiOffset Coq_nil Coq_dataOffset (S O)) (Coq_cons\n                ((Const_nat default_gas_limit), (Coq_cons ((Cvtop (Coq_i32\n                (IOp32.Extend_i32 Unsigned))), (Coq_cons ((Const_nat\n                (get_idx_eei_mem_offset Coq_addressOffset)), (Coq_cons\n                ((Const_nat (get_idx_eei_mem_offset Coq_valueOffset)),\n                (Coq_cons ((Const_nat\n                (get_idx_eei_mem_offset Coq_dataOffset)), (Coq_cons\n                ((Const_nat O), (Coq_cons ((Call (get_idx_eei Coq_eei_call)),\n                Coq_nil)))))))))))))))))))\n  | Scallmethod (a, _, _, v, _, args) ->\n    bind (Obj.magic coq_Monad_optErr) (wasm_expr temps a Coq_true) (fun a' ->\n      bind (Obj.magic coq_Monad_optErr)\n        (fold_left (fun xs x ->\n          bind (Obj.magic coq_Monad_optErr) xs (fun xsl ->\n            bind (Obj.magic coq_Monad_optErr) (wasm_expr temps x Coq_true)\n              (fun rst -> ret (Obj.magic coq_Monad_optErr) (app xsl rst))))\n          args (ret (Obj.magic coq_Monad_optErr) Coq_nil)) (fun _ ->\n        bind (Obj.magic coq_Monad_optErr) (wasm_expr temps v Coq_true)\n          (fun v' ->\n          ret (Obj.magic coq_Monad_optErr)\n            (app (set_eeiOffset a' Coq_addressOffset (S O))\n              (app (set_eeiOffset v' Coq_valueOffset (S O))\n                (app (set_eeiOffset Coq_nil Coq_dataOffset (S O)) (Coq_cons\n                  ((Const_nat default_gas_limit), (Coq_cons ((Cvtop (Coq_i32\n                  (IOp32.Extend_i32 Unsigned))), (Coq_cons ((Const_nat\n                  (get_idx_eei_mem_offset Coq_addressOffset)), (Coq_cons\n                  ((Const_nat (get_idx_eei_mem_offset Coq_valueOffset)),\n                  (Coq_cons ((Const_nat\n                  (get_idx_eei_mem_offset Coq_dataOffset)), (Coq_cons\n                  ((Const_nat O), (Coq_cons ((Call\n                  (get_idx_eei Coq_eei_call)), Coq_nil))))))))))))))))))))\n  | Slog (topics, args) ->\n    bind (Obj.magic coq_Monad_optErr)\n      (fold_left (fun xs x ->\n        bind (Obj.magic coq_Monad_optErr) xs (fun xsl ->\n          bind (Obj.magic coq_Monad_optErr)\n            (match x with\n             | Econst_int256 (i, _) ->\n               Success (Coq_cons ((Const_256\n                 (Int256.shru\n                   (Int256.shl i\n                     (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                       (Coq_xO (Coq_xI (Coq_xI Coq_xH))))))))))\n                   (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                     (Coq_xI (Coq_xI Coq_xH))))))))))), (Coq_cons ((Const_256\n                 (Int256.shru\n                   (Int256.shl i\n                     (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                       (Coq_xO (Coq_xO (Coq_xI Coq_xH))))))))))\n                   (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                     (Coq_xI (Coq_xI Coq_xH))))))))))), (Coq_cons ((Const_256\n                 (Int256.shru\n                   (Int256.shl i\n                     (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                       (Coq_xO (Coq_xI (Coq_xO Coq_xH))))))))))\n                   (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                     (Coq_xI (Coq_xI Coq_xH))))))))))), (Coq_cons ((Const_256\n                 (Int256.shru\n                   (Int256.shl i\n                     (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                       (Coq_xO (Coq_xO (Coq_xO Coq_xH))))))))))\n                   (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                     (Coq_xI (Coq_xI Coq_xH))))))))))), (Coq_cons ((Const_256\n                 (Int256.shru\n                   (Int256.shl i\n                     (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                       (Coq_xO (Coq_xI Coq_xH)))))))))\n                   (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                     (Coq_xI (Coq_xI Coq_xH))))))))))), (Coq_cons ((Const_256\n                 (Int256.shru\n                   (Int256.shl i\n                     (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                       (Coq_xO (Coq_xO Coq_xH)))))))))\n                   (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                     (Coq_xI (Coq_xI Coq_xH))))))))))), (Coq_cons ((Const_256\n                 (Int256.shru\n                   (Int256.shl i\n                     (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                       (Coq_xO Coq_xH))))))))\n                   (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                     (Coq_xI (Coq_xI Coq_xH))))))))))), (Coq_cons ((Const_256\n                 (Int256.shru (Int256.shl i (Int256.repr Z0))\n                   (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                     (Coq_xI (Coq_xI Coq_xH))))))))))),\n                 Coq_nil))))))))))))))))\n             | _ ->\n               Error (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false)),\n                 EmptyString)))))))))))))))))))))))))))))))))))))))))))))\n            (fun rst -> ret (Obj.magic coq_Monad_optErr) (app xsl rst))))\n        topics (ret (Obj.magic coq_Monad_optErr) Coq_nil)) (fun topics' ->\n      bind (Obj.magic coq_Monad_optErr)\n        (fold_left (fun xs x ->\n          bind (Obj.magic coq_Monad_optErr) xs (fun xsl ->\n            bind (Obj.magic coq_Monad_optErr) (wasm_expr temps x Coq_true)\n              (fun rst -> ret (Obj.magic coq_Monad_optErr) (app xsl rst))))\n          args (ret (Obj.magic coq_Monad_optErr) Coq_nil)) (fun args' ->\n        let topicsnumber =\n          match topics with\n          | Coq_nil -> O\n          | Coq_cons (_, l) ->\n            (match l with\n             | Coq_nil -> S O\n             | Coq_cons (_, l0) ->\n               (match l0 with\n                | Coq_nil -> S (S O)\n                | Coq_cons (_, l1) ->\n                  (match l1 with\n                   | Coq_nil -> S (S (S O))\n                   | Coq_cons (_, l2) ->\n                     (match l2 with\n                      | Coq_nil -> S (S (S (S O)))\n                      | Coq_cons (_, _) -> S (S (S (S (S O))))))))\n        in\n        let argsnumber = length args in\n        let compiledInstrs =\n          app args'\n            (app (storeLogArgs argsnumber)\n              (app topics'\n                (app\n                  (match topics with\n                   | Coq_nil -> Coq_nil\n                   | Coq_cons (_, l) ->\n                     (match l with\n                      | Coq_nil ->\n                        set_eeiOffset Coq_nil Coq_topic1Offset (S (S (S (S (S\n                          (S (S (S O))))))))\n                      | Coq_cons (_, l0) ->\n                        (match l0 with\n                         | Coq_nil ->\n                           app\n                             (set_eeiOffset Coq_nil Coq_topic1Offset (S (S (S\n                               (S (S (S (S (S O)))))))))\n                             (set_eeiOffset Coq_nil Coq_topic2Offset (S (S (S\n                               (S (S (S (S (S O)))))))))\n                         | Coq_cons (_, l1) ->\n                           (match l1 with\n                            | Coq_nil ->\n                              app\n                                (set_eeiOffset Coq_nil Coq_topic1Offset (S (S\n                                  (S (S (S (S (S (S O)))))))))\n                                (app\n                                  (set_eeiOffset Coq_nil Coq_topic2Offset (S\n                                    (S (S (S (S (S (S (S O)))))))))\n                                  (set_eeiOffset Coq_nil Coq_topic3Offset (S\n                                    (S (S (S (S (S (S (S O))))))))))\n                            | Coq_cons (_, l2) ->\n                              (match l2 with\n                               | Coq_nil ->\n                                 app\n                                   (set_eeiOffset Coq_nil Coq_topic1Offset (S\n                                     (S (S (S (S (S (S (S O)))))))))\n                                   (app\n                                     (set_eeiOffset Coq_nil Coq_topic2Offset\n                                       (S (S (S (S (S (S (S (S O)))))))))\n                                     (app\n                                       (set_eeiOffset Coq_nil\n                                         Coq_topic3Offset (S (S (S (S (S (S\n                                         (S (S O)))))))))\n                                       (set_eeiOffset Coq_nil\n                                         Coq_topic4Offset (S (S (S (S (S (S\n                                         (S (S O)))))))))))\n                               | Coq_cons (_, _) -> Coq_nil))))) (Coq_cons\n                  ((Const_nat (get_idx_eei_mem_offset Coq_dataOffset)),\n                  (Coq_cons ((Const_nat (mul argsnumber (S (S (S (S O)))))),\n                  (Coq_cons ((Const_nat topicsnumber), (Coq_cons ((Const_nat\n                  (get_idx_eei_mem_offset Coq_topic1Offset)), (Coq_cons\n                  ((Const_nat (get_idx_eei_mem_offset Coq_topic2Offset)),\n                  (Coq_cons ((Const_nat\n                  (get_idx_eei_mem_offset Coq_topic3Offset)), (Coq_cons\n                  ((Const_nat (get_idx_eei_mem_offset Coq_topic4Offset)),\n                  (Coq_cons ((Call (get_idx_eei Coq_eei_log)),\n                  Coq_nil)))))))))))))))))))\n        in\n        (match Nat.eqb topicsnumber (S (S (S (S (S O))))) with\n         | Coq_true ->\n           Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n             Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n             (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n             (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n             Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_false)),\n             EmptyString))))))))))))))))))))))))))))))))))))))))))))))\n         | Coq_false -> ret (Obj.magic coq_Monad_optErr) compiledInstrs)))\n  | Srevert ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Const_nat\n      (get_idx_eei_mem_offset Coq_dataOffset)), (Coq_cons ((Const_nat\n      eei_revert_output_data_length), (Coq_cons ((Call\n      (get_idx_eei Coq_eei_revert)), Coq_nil))))))\n\n(** val allocate_temps : (ident, coq_type) prod list -> nat -> nat PTree.t **)\n\nlet rec allocate_temps ids base =\n  match ids with\n  | Coq_nil -> PTree.empty\n  | Coq_cons (p, rest) ->\n    let Coq_pair (id, _) = p in\n    PTree.set id base (allocate_temps rest (S base))\n\n(** val allocate_all_temps : (ident, coq_type) prod list -> nat PTree.t **)\n\nlet allocate_all_temps ids =\n  allocate_temps ids O\n\n(** val allocate_fn_temps : coq_function -> nat PTree.t **)\n\nlet allocate_fn_temps f =\n  allocate_all_temps (app f.fn_params f.fn_temps)\n\n(** val wasm_function :\n    coq_Z PTree.t -> (positive, nat) prod list -> coq_function ->\n    Language0.coq_function optErr **)\n\nlet wasm_function _ funident_map f =\n  let wasm_fb =\n    wasm_statement funident_map (allocate_fn_temps f) f.fn_return f.fn_body O\n  in\n  (match wasm_fb with\n   | Success insts ->\n     ret (Obj.magic coq_Monad_optErr) { Language0.fn_return = f.fn_return;\n       Language0.fn_params = f.fn_params; Language0.fn_temps = f.fn_temps;\n       Language0.fn_locals = f.fn_locals; Language0.fn_body =\n       (app (Coq_cons ((Const_256 sp), (Coq_cons ((Const_256 sb), (Coq_cons\n         ((Memop (Coq_i32 IOp32.Store)), Coq_nil)))))) insts) }\n   | Error msg ->\n     Error\n       (append (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)),\n         EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n         msg))\n\n(** val wasm_constructor :\n    coq_function option -> coq_Z PTree.t -> (positive, nat) prod list ->\n    Language0.coq_function option optErr **)\n\nlet wasm_constructor f global funident_map =\n  match f with\n  | Some f0 ->\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic wasm_function global funident_map f0) (fun cf ->\n      ret (Obj.magic coq_Monad_optErr) (Some cf))\n  | None -> ret (Obj.magic coq_Monad_optErr) None\n\n(** val wasm_functions :\n    coq_function PTree.t -> coq_Z PTree.t -> (positive, nat) prod list ->\n    Language0.coq_function PTree.t optErr **)\n\nlet wasm_functions defs global funident_map =\n  transl_tree (wasm_function global funident_map) defs\n\n(** val wasm_methoddefs :\n    coq_function option IntMap.t -> coq_Z PTree.t -> (positive, nat) prod\n    list -> Language0.coq_function option IntMap.t optErr **)\n\nlet wasm_methoddefs defs global funident_map =\n  transl_map (wasm_function global funident_map) defs\n\n(** val wasm_func_identifier :\n    (positive, 'a1) prod list -> nat -> nat -> (positive, nat) prod list **)\n\nlet rec wasm_func_identifier a idx base =\n  match a with\n  | Coq_nil -> Coq_nil\n  | Coq_cons (x, xs) ->\n    Coq_cons ((Coq_pair ((fst x), (add idx base))),\n      (wasm_func_identifier xs (add idx (S O)) base))\n\n(** val wasm_genv : genv -> Language0.genv optErr **)\n\nlet wasm_genv ge =\n  let vars = ge.Genv.genv_vars in\n  let names = ge.Genv.genv_funcs in\n  let fundefs = ge.Genv.genv_fundefs in\n  let sigs = ge.Genv.genv_methods in\n  let defs = ge.Genv.genv_defs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  let wasm_func_id_base =\n    add (length sigs) (match constructor with\n                       | Some _ -> S O\n                       | None -> O)\n  in\n  let funident_map =\n    wasm_func_identifier (PTree.elements fundefs) O\n      (add wasm_func_id_base (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n        (S (S (S (S (S (S (S (S (S (S\n        O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  in\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic allocate_addrs ge.Genv.genv_vars Z0 ge.Genv.genv_defs)\n    (fun allocated ->\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic wasm_functions fundefs allocated funident_map)\n      (fun fundefs0 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (Obj.magic wasm_methoddefs methoddefs allocated funident_map)\n        (fun methoddefs0 ->\n        bind (Obj.magic coq_Monad_optErr)\n          (Obj.magic wasm_constructor constructor allocated funident_map)\n          (fun constructor0 ->\n          ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n            Genv.genv_funcs = names; Genv.genv_methods = sigs;\n            Genv.genv_defs = defs; Genv.genv_fundefs = fundefs0;\n            Genv.genv_methoddefs = methoddefs0; Genv.genv_constructor =\n            constructor0 }))))\n"
  },
  {
    "path": "src/backend/extraction/Gen10.mli",
    "content": "open AST\nopen Ascii\nopen BinNums\nopen BinPos\nopen Cop\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen GlobalenvCompile\nopen Globalenvs\nopen Int0\nopen Integers\nopen Language0\nopen List0\nopen Maps0\nopen Monad\nopen Nat0\nopen OptErrMonad\nopen Options\nopen PeanoNat\nopen StackEnv\nopen StmtCintptr\nopen String0\nopen Structure\nopen Trees\nopen Values\n\nval wasm_expr : nat PTree.t -> ExpCintptr.expr -> bool -> instr list optErr\n\nval wasm_exprs : nat PTree.t -> ExpCintptr.expr list -> instr list optErr\n\nval optident : nat PTree.t -> ident option -> instrs optErr\n\nval wasm_statement :\n  (positive, nat) prod list -> nat PTree.t -> coq_type -> statement -> nat ->\n  instrs optErr\n\nval allocate_temps : (ident, coq_type) prod list -> nat -> nat PTree.t\n\nval allocate_all_temps : (ident, coq_type) prod list -> nat PTree.t\n\nval allocate_fn_temps : coq_function -> nat PTree.t\n\nval wasm_function :\n  coq_Z PTree.t -> (positive, nat) prod list -> coq_function ->\n  Language0.coq_function optErr\n\nval wasm_constructor :\n  coq_function option -> coq_Z PTree.t -> (positive, nat) prod list ->\n  Language0.coq_function option optErr\n\nval wasm_functions :\n  coq_function PTree.t -> coq_Z PTree.t -> (positive, nat) prod list ->\n  Language0.coq_function PTree.t optErr\n\nval wasm_methoddefs :\n  coq_function option IntMap.t -> coq_Z PTree.t -> (positive, nat) prod list\n  -> Language0.coq_function option IntMap.t optErr\n\nval wasm_func_identifier :\n  (positive, 'a1) prod list -> nat -> nat -> (positive, nat) prod list\n\nval wasm_genv : genv -> Language0.genv optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen2.ml",
    "content": "open AST\nopen Ascii\nopen BinNums\nopen BinPos\nopen Datatypes\nopen ExpCintptr\nopen Globalenvs\nopen List0\nopen Maps0\nopen Monad\nopen Nat0\nopen OptErrMonad\nopen PeanoNat\nopen StmtCGraph\nopen String0\nopen Trees\n\ntype set = bool PTree.t\n\ntype coq_LVDomain = set\n\n(** val set_empty : set **)\n\nlet set_empty =\n  PTree.empty\n\n(** val set_union' : positive list -> set -> set -> set -> set **)\n\nlet rec set_union' keys x y r =\n  match keys with\n  | Coq_nil -> r\n  | Coq_cons (hd, rest) ->\n    set_union' rest x y\n      (PTree.set hd\n        (match PTree.get_default Coq_false hd x with\n         | Coq_true -> Coq_true\n         | Coq_false -> PTree.get_default Coq_false hd y) r)\n\n(** val set_union : set -> set -> set **)\n\nlet set_union x y =\n  set_union' (app (PTree.xkeys x Coq_xH) (PTree.xkeys y Coq_xH)) x y\n    PTree.empty\n\n(** val set_minus' : positive list -> set -> set -> set -> set **)\n\nlet rec set_minus' keys x y r =\n  match keys with\n  | Coq_nil -> r\n  | Coq_cons (hd, rest) ->\n    set_minus' rest x y\n      (PTree.set hd\n        (match PTree.get_default Coq_false hd x with\n         | Coq_true -> negb (PTree.get_default Coq_false hd y)\n         | Coq_false -> Coq_false) r)\n\n(** val set_minus : bool PTree.t -> set -> set **)\n\nlet set_minus x y =\n  set_minus' (PTree.xkeys x Coq_xH) x y PTree.empty\n\n(** val set_add : ident -> set -> set **)\n\nlet rec set_add i r =\n  PTree.set i Coq_true r\n\n(** val set_in : ident -> set -> bool **)\n\nlet rec set_in i r =\n  PTree.get_default Coq_false i r\n\n(** val set_card : set -> nat **)\n\nlet rec set_card x =\n  PTree.fold1 (fun acc e ->\n    match e with\n    | Coq_true -> add acc (S O)\n    | Coq_false -> acc) x O\n\n(** val set_eq : set -> set -> bool **)\n\nlet rec set_eq x y =\n  match Nat.eqb (set_card (set_minus x y)) O with\n  | Coq_true -> Nat.eqb (set_card (set_minus y x)) O\n  | Coq_false -> Coq_false\n\n(** val set_fold_left : ('a1 -> ident -> 'a1) -> set -> 'a1 -> 'a1 **)\n\nlet set_fold_left f m v =\n  PTree.fold (fun acc i e ->\n    match e with\n    | Coq_true -> f acc i\n    | Coq_false -> acc) m v\n\n(** val get_use_expr : expr -> coq_LVDomain **)\n\nlet rec get_use_expr = function\n| Etempvar (i, _) -> set_add i set_empty\n| Esload (e0, _) -> get_use_expr e0\n| Emload (e0, _) -> get_use_expr e0\n| Eaddr (e0, _) -> get_use_expr e0\n| Eunop (_, e0, _) -> get_use_expr e0\n| Ebinop (_, e1, e2, _) -> set_union (get_use_expr e1) (get_use_expr e2)\n| Ecall1 (_, e0, _) -> get_use_expr e0\n| _ -> set_empty\n\n(** val get_use_exprs : expr list -> coq_LVDomain **)\n\nlet rec get_use_exprs = function\n| Coq_nil -> set_empty\n| Coq_cons (e, rest) -> set_union (get_use_expr e) (get_use_exprs rest)\n\n(** val get_use : statement -> coq_LVDomain **)\n\nlet get_use = function\n| Smassign (lv, rv, _) -> set_union (get_use_expr lv) (get_use_expr rv)\n| Ssassign (lv, rv, _) -> set_union (get_use_expr lv) (get_use_expr rv)\n| Sset (_, rv, _) -> get_use_expr rv\n| Scall (_, _, args, _) -> get_use_exprs args\n| Scond (cond, _, _) -> get_use_expr cond\n| Sreturn (val0, _) ->\n  (match val0 with\n   | Some e -> set_add e set_empty\n   | None -> set_empty)\n| Shash (e1, e2, eo, _) ->\n  let e1' = get_use_expr e1 in\n  let e2' = get_use_expr e2 in\n  (match eo with\n   | Some eoo ->\n     let eoo' = get_use_expr eoo in set_union (set_union e1' e2') eoo'\n   | None -> set_union e1' e2')\n| Stransfer (a, v, _, _) -> set_union (get_use_expr a) (get_use_expr v)\n| Scallmethod (a, _, _, v, _, args, _, _) ->\n  set_union (set_union (get_use_expr a) (get_use_expr v)) (get_use_exprs args)\n| Slog (topics, args, _) ->\n  set_union (get_use_exprs topics) (get_use_exprs args)\n| _ -> set_empty\n\n(** val get_successor : statement -> node list **)\n\nlet get_successor = function\n| Sskip n -> Coq_cons (n, Coq_nil)\n| Smassign (_, _, n) -> Coq_cons (n, Coq_nil)\n| Ssassign (_, _, n) -> Coq_cons (n, Coq_nil)\n| Sset (_, _, n) -> Coq_cons (n, Coq_nil)\n| Scall (_, _, _, n) -> Coq_cons (n, Coq_nil)\n| Scond (_, ntrue, nfalse) -> Coq_cons (ntrue, (Coq_cons (nfalse, Coq_nil)))\n| Sreturn (_, n) -> Coq_cons (n, Coq_nil)\n| Shash (_, _, _, n) -> Coq_cons (n, Coq_nil)\n| Stransfer (_, _, nfail, n) -> Coq_cons (nfail, (Coq_cons (n, Coq_nil)))\n| Scallmethod (_, _, _, _, _, _, nfail, n) ->\n  Coq_cons (nfail, (Coq_cons (n, Coq_nil)))\n| Slog (_, _, n) -> Coq_cons (n, Coq_nil)\n| _ -> Coq_nil\n\n(** val get_def : statement -> coq_LVDomain **)\n\nlet get_def = function\n| Sset (id, _, _) -> set_add id set_empty\n| Scall (retval, _, _, _) ->\n  (match retval with\n   | Some rv -> set_add rv set_empty\n   | None -> set_empty)\n| Scallmethod (_, rvs, _, _, _, _, _, _) ->\n  fold_left (fun acc e -> set_add e acc) rvs set_empty\n| _ -> set_empty\n\ntype coq_CD = coq_LVDomain PTree.t\n\n(** val f_b : code -> node -> coq_CD -> coq_LVDomain **)\n\nlet f_b cfg block cd =\n  match PTree.get block cfg with\n  | Some s ->\n    let oUT =\n      fold_left (fun acc e ->\n        set_union acc (PTree.get_default set_empty e cd)) (get_successor s)\n        set_empty\n    in\n    set_union (get_use s) (set_minus oUT (get_def s))\n  | None -> set_empty\n\n(** val update_at : code -> coq_CD -> node -> coq_CD **)\n\nlet update_at cfg cd b =\n  PTree.set b (f_b cfg b cd) cd\n\n(** val lv_top : code -> coq_LVDomain **)\n\nlet lv_top cfg =\n  PTree.fold (fun s _ stmt -> set_union s (get_use stmt)) cfg set_empty\n\n(** val cd_top : code -> coq_CD **)\n\nlet cd_top cfg =\n  PTree.map1 (fun _ -> lv_top cfg) cfg\n\n(** val get_lv_once : code -> node list -> coq_CD -> coq_CD **)\n\nlet get_lv_once cfg nodes cd =\n  fold_left (update_at cfg) nodes cd\n\n(** val get_lv_mfp : code -> node list -> nat -> coq_CD -> coq_CD **)\n\nlet rec get_lv_mfp cfg blocks iteration cd =\n  match iteration with\n  | O -> cd\n  | S x ->\n    let new_cd = get_lv_once cfg blocks cd in\n    (match PTree.beq set_eq cd new_cd with\n     | Coq_true -> new_cd\n     | Coq_false -> get_lv_mfp cfg blocks x new_cd)\n\n(** val compute_livevar : code -> nat -> coq_CD optErr **)\n\nlet compute_livevar cfg precision =\n  let blocks = map fst (PTree.elements cfg) in\n  ret (Obj.magic coq_Monad_optErr)\n    (get_lv_mfp cfg blocks precision (cd_top cfg))\n\ntype tvs = set\n\ntype clashg = tvs PTree.t\n\n(** val create_clash_graph : coq_CD -> clashg optErr **)\n\nlet rec create_clash_graph lv =\n  ret (Obj.magic coq_Monad_optErr)\n    (PTree.fold1 (fun acc e ->\n      set_fold_left (fun acc' e' ->\n        PTree.set e' (set_union (PTree.get_default set_empty e' acc') e) acc')\n        e acc) lv PTree.empty)\n\n(** val remove_node_graph : ident -> clashg -> clashg **)\n\nlet rec remove_node_graph t0 g =\n  let g' = PTree.remove t0 g in\n  PTree.fold (fun acc i e ->\n    PTree.set i (set_minus e (set_add t0 set_empty)) acc) g' g'\n\n(** val least_degree : clashg -> ident **)\n\nlet rec least_degree g =\n  let Coq_pair (id, _) =\n    PTree.fold (fun acc i e ->\n      let Coq_pair (_, mn) = acc in\n      let c = set_card e in\n      (match Nat.leb c mn with\n       | Coq_true -> Coq_pair (i, c)\n       | Coq_false -> acc)) g (Coq_pair ((Pos.of_nat O), (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S O))))))))))))))))))\n  in\n  id\n\n(** val pop_graph : nat -> clashg -> ident list -> ident list optErr **)\n\nlet rec pop_graph i g stack =\n  match i with\n  | O ->\n    (match Nat.eqb (length (PTree.elements g)) O with\n     | Coq_true -> ret (Obj.magic coq_Monad_optErr) stack\n     | Coq_false ->\n       Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | S n ->\n    let ldn = least_degree g in\n    pop_graph n (remove_node_graph ldn g) (Coq_cons (ldn, stack))\n\ntype colorMap = nat PTree.t\n\n(** val get_assigned_colors : colorMap -> tvs -> set **)\n\nlet get_assigned_colors c s =\n  PTree.fold (fun acc i e ->\n    match e with\n    | Coq_true ->\n      (match PTree.get i c with\n       | Some cl -> set_add (Pos.of_nat cl) acc\n       | None -> acc)\n    | Coq_false -> acc) s set_empty\n\n(** val colorMapFull : set **)\n\nlet colorMapFull =\n  set_add (Pos.of_nat (S O))\n    (set_add (Pos.of_nat (S (S O)))\n      (set_add (Pos.of_nat (S (S (S O))))\n        (set_add (Pos.of_nat (S (S (S (S O)))))\n          (set_add (Pos.of_nat (S (S (S (S (S O))))))\n            (set_add (Pos.of_nat (S (S (S (S (S (S O)))))))\n              (set_add (Pos.of_nat (S (S (S (S (S (S (S O))))))))\n                (set_add (Pos.of_nat (S (S (S (S (S (S (S (S O)))))))))\n                  (set_add (Pos.of_nat (S (S (S (S (S (S (S (S (S O))))))))))\n                    (set_add\n                      (Pos.of_nat (S (S (S (S (S (S (S (S (S (S O)))))))))))\n                      (set_add\n                        (Pos.of_nat (S (S (S (S (S (S (S (S (S (S (S\n                          O))))))))))))\n                        (set_add\n                          (Pos.of_nat (S (S (S (S (S (S (S (S (S (S (S (S\n                            O)))))))))))))\n                          (set_add\n                            (Pos.of_nat (S (S (S (S (S (S (S (S (S (S (S (S\n                              (S O))))))))))))))\n                            (set_add\n                              (Pos.of_nat (S (S (S (S (S (S (S (S (S (S (S (S\n                                (S (S O)))))))))))))))\n                              (set_add\n                                (Pos.of_nat (S (S (S (S (S (S (S (S (S (S (S\n                                  (S (S (S (S O)))))))))))))))) set_empty))))))))))))))\n\n(** val max_reg : nat **)\n\nlet max_reg =\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))))\n\n(** val default_reg : nat **)\n\nlet default_reg =\n  S O\n\n(** val assign_color : ident list -> clashg -> colorMap -> colorMap optErr **)\n\nlet rec assign_color stack g c =\n  match stack with\n  | Coq_nil -> ret (Obj.magic coq_Monad_optErr) c\n  | Coq_cons (x, xs) ->\n    (match PTree.get x g with\n     | Some lk ->\n       let assignable = set_minus colorMapFull (get_assigned_colors c lk) in\n       (match Nat.ltb O (set_card assignable) with\n        | Coq_true ->\n          (match PTree.fold (fun acc i e ->\n                   match e with\n                   | Coq_true -> Some i\n                   | Coq_false -> acc) assignable None with\n           | Some reg -> assign_color xs g (PTree.set x (Pos.to_nat reg) c)\n           | None ->\n             Error (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n               (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n               Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n               Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n               Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)),\n               EmptyString)))))))))))))))))))))))))))))))))))))))))))))\n        | Coq_false ->\n          Error (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n            Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n     | None ->\n       Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val recolor_expr : expr -> colorMap -> expr optErr **)\n\nlet rec recolor_expr e c =\n  match e with\n  | Etempvar (i, t0) ->\n    ret (Obj.magic coq_Monad_optErr) (Etempvar\n      ((Pos.of_nat (PTree.get_default default_reg i c)), t0))\n  | Esload (e0, t0) ->\n    bind (Obj.magic coq_Monad_optErr) (recolor_expr e0 c) (fun e' ->\n      ret (Obj.magic coq_Monad_optErr) (Esload (e', t0)))\n  | Emload (e0, t0) ->\n    bind (Obj.magic coq_Monad_optErr) (recolor_expr e0 c) (fun e' ->\n      ret (Obj.magic coq_Monad_optErr) (Emload (e', t0)))\n  | Eaddr (e0, t0) ->\n    bind (Obj.magic coq_Monad_optErr) (recolor_expr e0 c) (fun e' ->\n      ret (Obj.magic coq_Monad_optErr) (Eaddr (e', t0)))\n  | Eunop (o, e0, t0) ->\n    bind (Obj.magic coq_Monad_optErr) (recolor_expr e0 c) (fun e' ->\n      ret (Obj.magic coq_Monad_optErr) (Eunop (o, e', t0)))\n  | Ebinop (o, e1, e2, t0) ->\n    bind (Obj.magic coq_Monad_optErr) (recolor_expr e1 c) (fun e1' ->\n      bind (Obj.magic coq_Monad_optErr) (recolor_expr e2 c) (fun e2' ->\n        ret (Obj.magic coq_Monad_optErr) (Ebinop (o, e1', e2', t0))))\n  | Ecall1 (b, e0, t0) ->\n    bind (Obj.magic coq_Monad_optErr) (recolor_expr e0 c) (fun e' ->\n      ret (Obj.magic coq_Monad_optErr) (Ecall1 (b, e', t0)))\n  | _ -> ret (Obj.magic coq_Monad_optErr) e\n\n(** val recolor_exprs : expr list -> colorMap -> expr list optErr **)\n\nlet rec recolor_exprs es c =\n  match es with\n  | Coq_nil -> ret (Obj.magic coq_Monad_optErr) Coq_nil\n  | Coq_cons (e, rest) ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic recolor_expr e c) (fun e' ->\n      bind (Obj.magic coq_Monad_optErr) (recolor_exprs rest c) (fun rest' ->\n        ret (Obj.magic coq_Monad_optErr) (Coq_cons (e', rest'))))\n\n(** val recolor_regs :\n    ident list -> colorMap -> ident list -> ident list optErr **)\n\nlet rec recolor_regs l c r =\n  match l with\n  | Coq_nil -> ret (Obj.magic coq_Monad_optErr) r\n  | Coq_cons (x, xs) ->\n    recolor_regs xs c (Coq_cons\n      ((Pos.of_nat (PTree.get_default default_reg x c)), r))\n\n(** val recolor_reg : ident -> colorMap -> ident **)\n\nlet recolor_reg i c =\n  Pos.of_nat (PTree.get_default default_reg i c)\n\n(** val recolor_expr_opt : expr option -> colorMap -> expr option optErr **)\n\nlet recolor_expr_opt e c =\n  match e with\n  | Some e' ->\n    (match recolor_expr e' c with\n     | Success s -> Success (Some s)\n     | Error s -> Error s)\n  | None -> Success None\n\n(** val recolor :\n    code -> set -> nat -> node -> colorMap -> (code -> code) -> (code ->\n    code) optErr **)\n\nlet rec recolor cfg t0 rd tn c cont =\n  match rd with\n  | O ->\n    Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | S x ->\n    (match PTree.get tn cfg with\n     | Some s ->\n       (match set_in tn t0 with\n        | Coq_true -> ret (Obj.magic coq_Monad_optErr) cont\n        | Coq_false ->\n          let t' = set_union t0 (set_add tn set_empty) in\n          let recolor' = recolor cfg t' x in\n          (match s with\n           | Sskip n -> recolor' n c cont\n           | Smassign (lv, rv, n) ->\n             bind (Obj.magic coq_Monad_optErr) (Obj.magic recolor_expr lv c)\n               (fun lv' ->\n               bind (Obj.magic coq_Monad_optErr)\n                 (Obj.magic recolor_expr rv c) (fun rv' ->\n                 recolor' n c (fun g ->\n                   PTree.set tn (Smassign (lv', rv', n)) (cont g))))\n           | Ssassign (lv, rv, n) ->\n             bind (Obj.magic coq_Monad_optErr) (Obj.magic recolor_expr lv c)\n               (fun lv' ->\n               bind (Obj.magic coq_Monad_optErr)\n                 (Obj.magic recolor_expr rv c) (fun rv' ->\n                 recolor' n c (fun g ->\n                   PTree.set tn (Ssassign (lv', rv', n)) (cont g))))\n           | Sset (id, rv, n) ->\n             bind (Obj.magic coq_Monad_optErr) (Obj.magic recolor_expr rv c)\n               (fun rv' ->\n               recolor' n c (fun g ->\n                 PTree.set tn (Sset ((recolor_reg id c), rv', n)) (cont g)))\n           | Scall (retval, lab, args, n) ->\n             bind (Obj.magic coq_Monad_optErr)\n               (Obj.magic recolor_exprs args c) (fun args' ->\n               match retval with\n               | Some rv ->\n                 recolor' n c (fun g ->\n                   PTree.set tn (Scall ((Some (recolor_reg rv c)), lab,\n                     args', n)) (cont g))\n               | None ->\n                 recolor' n c (fun g ->\n                   PTree.set tn (Scall (retval, lab, args', n)) (cont g)))\n           | Scond (cond, ntrue, nfalse) ->\n             bind (Obj.magic coq_Monad_optErr)\n               (Obj.magic recolor_expr cond c) (fun cond' ->\n               bind (Obj.magic coq_Monad_optErr)\n                 (recolor' ntrue c (fun g -> g)) (fun cont' ->\n                 recolor' nfalse c (fun g ->\n                   PTree.set tn (Scond (cond', ntrue, nfalse))\n                     (cont' (cont g)))))\n           | Sreturn (val0, n) ->\n             (match val0 with\n              | Some v ->\n                recolor' n c (fun g ->\n                  PTree.set tn (Sreturn ((Some (recolor_reg v c)), n))\n                    (cont g))\n              | None -> recolor' n c cont)\n           | Shash (e1, e2, eo, n) ->\n             bind (Obj.magic coq_Monad_optErr) (Obj.magic recolor_expr e1 c)\n               (fun e1' ->\n               bind (Obj.magic coq_Monad_optErr)\n                 (Obj.magic recolor_expr e2 c) (fun e2' ->\n                 match eo with\n                 | Some eoo ->\n                   bind (Obj.magic coq_Monad_optErr)\n                     (Obj.magic recolor_expr eoo c) (fun eoo' ->\n                     recolor' n c (fun g ->\n                       PTree.set tn (Shash (e1', e2', (Some eoo'), n))\n                         (cont g)))\n                 | None ->\n                   recolor' n c (fun g ->\n                     PTree.set tn (Shash (e1', e2', None, n)) (cont g))))\n           | Stransfer (a, v, nfail, n) ->\n             bind (Obj.magic coq_Monad_optErr) (Obj.magic recolor_expr a c)\n               (fun a' ->\n               bind (Obj.magic coq_Monad_optErr) (Obj.magic recolor_expr v c)\n                 (fun v' ->\n                 bind (Obj.magic coq_Monad_optErr)\n                   (recolor' nfail c (fun g -> g)) (fun cont' ->\n                   recolor' n c (fun g ->\n                     PTree.set tn (Stransfer (a', v', nfail, n))\n                       (cont' (cont g))))))\n           | Scallmethod (a, rvs, sig0, v, gas, args, nfail, n) ->\n             bind (Obj.magic coq_Monad_optErr)\n               (Obj.magic recolor_regs rvs c Coq_nil) (fun rvs' ->\n               bind (Obj.magic coq_Monad_optErr) (Obj.magic recolor_expr a c)\n                 (fun a' ->\n                 bind (Obj.magic coq_Monad_optErr)\n                   (Obj.magic recolor_expr v c) (fun v' ->\n                   bind (Obj.magic coq_Monad_optErr)\n                     (Obj.magic recolor_expr_opt gas c) (fun gas' ->\n                     bind (Obj.magic coq_Monad_optErr)\n                       (Obj.magic recolor_exprs args c) (fun args' ->\n                       bind (Obj.magic coq_Monad_optErr)\n                         (recolor' nfail c (fun g -> g)) (fun cont' ->\n                         recolor' n c (fun g ->\n                           PTree.set tn (Scallmethod (a', rvs', sig0, v',\n                             gas', args', nfail, n)) (cont' (cont g)))))))))\n           | Slog (topics, args, n) ->\n             bind (Obj.magic coq_Monad_optErr)\n               (Obj.magic recolor_exprs topics c) (fun topics' ->\n               bind (Obj.magic coq_Monad_optErr)\n                 (Obj.magic recolor_exprs args c) (fun args' ->\n                 recolor' n c (fun g ->\n                   PTree.set tn (Slog (topics', args', n)) (cont g))))\n           | _ -> ret (Obj.magic coq_Monad_optErr) cont))\n     | None ->\n       Error (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val color_graph :\n    code -> nat -> node -> clashg -> (code, colorMap) prod optErr **)\n\nlet color_graph cfg maxnode nentry cg =\n  match PTree.fold (fun acc _ e ->\n          match acc with\n          | Coq_true -> Nat.ltb (set_card e) max_reg\n          | Coq_false -> Coq_false) cg Coq_true with\n  | Coq_true ->\n    let num_tv = length (PTree.elements cg) in\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic pop_graph (length (PTree.elements cg)) cg Coq_nil)\n      (fun stack ->\n      let unique_nodes =\n        Nat.eqb\n          (set_card (fold_left (fun acc e -> set_add e acc) stack set_empty))\n          num_tv\n      in\n      (match unique_nodes with\n       | Coq_true ->\n         bind (Obj.magic coq_Monad_optErr)\n           (Obj.magic assign_color stack cg PTree.empty) (fun colors ->\n           match Nat.eqb (length (PTree.elements colors)) num_tv with\n           | Coq_true ->\n             bind (Obj.magic coq_Monad_optErr)\n               (Obj.magic recolor cfg set_empty maxnode nentry colors\n                 (fun g -> g)) (fun f ->\n               ret (Obj.magic coq_Monad_optErr) (Coq_pair ((f cfg), colors)))\n           | Coq_false ->\n             Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n               (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n               Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n               (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n               Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n               (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n               (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n               (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n               (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n               Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n               (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n               Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n               Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n               (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n               Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n               (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n               (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n               Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n               Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n               (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n               (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n               Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n               (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n               (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n               Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n               (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n               Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n               (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n               Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n               Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n               Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n               ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n               Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n               Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n               Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n               Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n               EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | Coq_false ->\n         Error (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Coq_false ->\n    Error (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val variable_coalescing :\n    code -> nat -> node -> nat -> (code, colorMap) prod optErr **)\n\nlet variable_coalescing cfg maxnode nentry precision =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic compute_livevar cfg precision)\n    (fun lvs ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic create_clash_graph lvs)\n      (fun cg -> color_graph cfg maxnode nentry cg))\n\n(** val get_clash_graph :\n    code -> nat -> (positive, positive list) prod list optErr **)\n\nlet get_clash_graph cfg precision =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic compute_livevar cfg precision)\n    (fun lvs ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic create_clash_graph lvs)\n      (fun cg ->\n      ret (Obj.magic coq_Monad_optErr)\n        (map (fun x ->\n          let Coq_pair (id, tvss) = x in\n          Coq_pair (id,\n          (PTree.fold (fun acc i ind ->\n            match ind with\n            | Coq_true -> Coq_cons (i, acc)\n            | Coq_false -> acc) tvss Coq_nil))) (PTree.elements cg))))\n\n(** val max_iteration : nat **)\n\nlet max_iteration =\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S\n    O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val copt_function : coq_function -> coq_function optErr **)\n\nlet copt_function f =\n  match variable_coalescing f.fn_code (sub (Pos.to_nat f.fn_nextnode) (S O))\n          f.fn_entrypoint max_iteration with\n  | Success p ->\n    let Coq_pair (ncfg, cmap) = p in\n    ret (Obj.magic coq_Monad_optErr) { fn_return = f.fn_return; fn_params =\n      (map (fun e ->\n        let Coq_pair (id, ty) = e in\n        Coq_pair ((Pos.of_nat (PTree.get_default (S O) id cmap)), ty))\n        f.fn_params); fn_temps =\n      (map (fun e ->\n        let Coq_pair (id, ty) = e in\n        Coq_pair ((Pos.of_nat (PTree.get_default (S O) id cmap)), ty))\n        f.fn_temps); fn_locals = f.fn_locals; fn_code = ncfg; fn_entrypoint =\n      f.fn_entrypoint; fn_nextnode = f.fn_nextnode }\n  | Error msg -> Error msg\n\n(** val copt_constructor :\n    coq_function option -> coq_function option optErr **)\n\nlet copt_constructor f = match f with\n| Some f0 ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic copt_function f0) (fun cf ->\n    ret (Obj.magic coq_Monad_optErr) (Some cf))\n| None -> ret (Obj.magic coq_Monad_optErr) f\n\n(** val clash_function :\n    coq_function -> (positive, positive list) prod list optErr **)\n\nlet clash_function f =\n  get_clash_graph f.fn_code max_iteration\n\n(** val copt_functions :\n    coq_function PTree.t -> coq_function PTree.t optErr **)\n\nlet copt_functions defs =\n  transl_tree copt_function defs\n\n(** val copt_methoddefs :\n    coq_function option IntMap.t -> coq_function option IntMap.t optErr **)\n\nlet copt_methoddefs defs =\n  transl_map copt_function defs\n\n(** val graphviz_helper :\n    coq_function -> ((positive, statement) prod list, positive) prod **)\n\nlet graphviz_helper f =\n  Coq_pair ((PTree.elements f.fn_code), f.fn_entrypoint)\n\n(** val clash_viz :\n    genv -> (positive, positive list) prod list list optErr **)\n\nlet clash_viz ge =\n  fold_left (fun acc x ->\n    match acc with\n    | Success acc' ->\n      bind (Obj.magic coq_Monad_optErr) (Obj.magic clash_function x)\n        (fun x' -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (x', acc')))\n    | Error msg -> Error msg) (Genv.all_functions ge) (Success Coq_nil)\n\n(** val cgraph_viz :\n    genv -> ((positive, statement) prod list, positive) prod list optErr **)\n\nlet cgraph_viz ge =\n  fold_left (fun acc x ->\n    match acc with\n    | Success acc' ->\n      bind (Obj.magic coq_Monad_optErr) (Obj.magic copt_function x)\n        (fun x' ->\n        ret (Obj.magic coq_Monad_optErr) (Coq_cons ((graphviz_helper x'),\n          acc')))\n    | Error msg -> Error msg) (Genv.all_functions ge) (Success Coq_nil)\n\n(** val copt_genv : genv -> genv optErr **)\n\nlet copt_genv ge =\n  let vars = ge.Genv.genv_vars in\n  let names = ge.Genv.genv_funcs in\n  let fundefs = ge.Genv.genv_fundefs in\n  let sigs = ge.Genv.genv_methods in\n  let defs = ge.Genv.genv_defs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic copt_functions fundefs)\n    (fun fundefs0 ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic copt_methoddefs methoddefs)\n      (fun methoddefs0 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (Obj.magic copt_constructor constructor) (fun constructor0 ->\n        ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n          Genv.genv_funcs = names; Genv.genv_methods = sigs; Genv.genv_defs =\n          defs; Genv.genv_fundefs = fundefs0; Genv.genv_methoddefs =\n          methoddefs0; Genv.genv_constructor = constructor0 })))\n"
  },
  {
    "path": "src/backend/extraction/Gen2.mli",
    "content": "open AST\nopen Ascii\nopen BinNums\nopen BinPos\nopen Datatypes\nopen ExpCintptr\nopen Globalenvs\nopen List0\nopen Maps0\nopen Monad\nopen Nat0\nopen OptErrMonad\nopen PeanoNat\nopen StmtCGraph\nopen String0\nopen Trees\n\ntype set = bool PTree.t\n\ntype coq_LVDomain = set\n\nval set_empty : set\n\nval set_union' : positive list -> set -> set -> set -> set\n\nval set_union : set -> set -> set\n\nval set_minus' : positive list -> set -> set -> set -> set\n\nval set_minus : bool PTree.t -> set -> set\n\nval set_add : ident -> set -> set\n\nval set_in : ident -> set -> bool\n\nval set_card : set -> nat\n\nval set_eq : set -> set -> bool\n\nval set_fold_left : ('a1 -> ident -> 'a1) -> set -> 'a1 -> 'a1\n\nval get_use_expr : expr -> coq_LVDomain\n\nval get_use_exprs : expr list -> coq_LVDomain\n\nval get_use : statement -> coq_LVDomain\n\nval get_successor : statement -> node list\n\nval get_def : statement -> coq_LVDomain\n\ntype coq_CD = coq_LVDomain PTree.t\n\nval f_b : code -> node -> coq_CD -> coq_LVDomain\n\nval update_at : code -> coq_CD -> node -> coq_CD\n\nval lv_top : code -> coq_LVDomain\n\nval cd_top : code -> coq_CD\n\nval get_lv_once : code -> node list -> coq_CD -> coq_CD\n\nval get_lv_mfp : code -> node list -> nat -> coq_CD -> coq_CD\n\nval compute_livevar : code -> nat -> coq_CD optErr\n\ntype tvs = set\n\ntype clashg = tvs PTree.t\n\nval create_clash_graph : coq_CD -> clashg optErr\n\nval remove_node_graph : ident -> clashg -> clashg\n\nval least_degree : clashg -> ident\n\nval pop_graph : nat -> clashg -> ident list -> ident list optErr\n\ntype colorMap = nat PTree.t\n\nval get_assigned_colors : colorMap -> tvs -> set\n\nval colorMapFull : set\n\nval max_reg : nat\n\nval default_reg : nat\n\nval assign_color : ident list -> clashg -> colorMap -> colorMap optErr\n\nval recolor_expr : expr -> colorMap -> expr optErr\n\nval recolor_exprs : expr list -> colorMap -> expr list optErr\n\nval recolor_regs : ident list -> colorMap -> ident list -> ident list optErr\n\nval recolor_reg : ident -> colorMap -> ident\n\nval recolor_expr_opt : expr option -> colorMap -> expr option optErr\n\nval recolor :\n  code -> set -> nat -> node -> colorMap -> (code -> code) -> (code -> code)\n  optErr\n\nval color_graph :\n  code -> nat -> node -> clashg -> (code, colorMap) prod optErr\n\nval variable_coalescing :\n  code -> nat -> node -> nat -> (code, colorMap) prod optErr\n\nval get_clash_graph :\n  code -> nat -> (positive, positive list) prod list optErr\n\nval max_iteration : nat\n\nval copt_function : coq_function -> coq_function optErr\n\nval copt_constructor : coq_function option -> coq_function option optErr\n\nval clash_function :\n  coq_function -> (positive, positive list) prod list optErr\n\nval copt_functions : coq_function PTree.t -> coq_function PTree.t optErr\n\nval copt_methoddefs :\n  coq_function option IntMap.t -> coq_function option IntMap.t optErr\n\nval graphviz_helper :\n  coq_function -> ((positive, statement) prod list, positive) prod\n\nval clash_viz : genv -> (positive, positive list) prod list list optErr\n\nval cgraph_viz :\n  genv -> ((positive, statement) prod list, positive) prod list optErr\n\nval copt_genv : genv -> genv optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen3.ml",
    "content": "open Ascii\nopen Datatypes\nopen Globalenvs\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Semantics\nopen StmtCGraph\nopen StmtClinear\nopen String0\nopen Trees\n\n(** val cbasic_stm :\n    bool option -> node -> StmtCGraph.statement -> bblock **)\n\nlet cbasic_stm ismethod nthis = function\n| Sskip n -> Coq_cons ((Sjump n), Coq_nil)\n| StmtCGraph.Smassign (lv, rv, n) ->\n  Coq_cons ((Smassign (lv, rv)), (Coq_cons ((Sjump n), Coq_nil)))\n| StmtCGraph.Ssassign (lv, rv, n) ->\n  Coq_cons ((Ssassign (lv, rv)), (Coq_cons ((Sjump n), Coq_nil)))\n| StmtCGraph.Sset (id, rv, n) ->\n  Coq_cons ((Sset (id, rv)), (Coq_cons ((Sjump n), Coq_nil)))\n| StmtCGraph.Scall (retval, lab, args, n) ->\n  Coq_cons ((Scall (retval, lab, args, nthis)), (Coq_cons ((Sjump n),\n    Coq_nil)))\n| Scond (cond, ntrue, nfalse) ->\n  Coq_cons ((Sjumpi (cond, ntrue)), (Coq_cons ((Sjump nfalse), Coq_nil)))\n| StmtCGraph.Sreturn (var, n) ->\n  Coq_cons ((Sreturn var), (Coq_cons ((Sjump n), Coq_nil)))\n| StmtCGraph.Sdone -> Coq_cons ((Sdone ismethod), Coq_nil)\n| StmtCGraph.Shash (ex1, ex2, exo, n) ->\n  Coq_cons ((Shash (ex1, ex2, exo)), (Coq_cons ((Sjump n), Coq_nil)))\n| StmtCGraph.Stransfer (a, v, nfail, n) ->\n  Coq_cons ((Stransfer (a, v, nfail)), (Coq_cons ((Sjump n), Coq_nil)))\n| StmtCGraph.Scallmethod (a, rvs, sig0, v, gas, args, nfail, n) ->\n  Coq_cons ((Scallmethod (a, rvs, sig0, v, gas, args, nfail)), (Coq_cons\n    ((Sjump n), Coq_nil)))\n| StmtCGraph.Slog (topics, args, n) ->\n  Coq_cons ((Slog (topics, args)), (Coq_cons ((Sjump n), Coq_nil)))\n| StmtCGraph.Srevert -> Coq_cons (Srevert, Coq_nil)\n\n(** val cbasic_code : bool option -> StmtCGraph.code -> Semantics.code **)\n\nlet cbasic_code ismethod c =\n  PTree.map (cbasic_stm ismethod) c\n\n(** val cbasic_function :\n    bool option -> StmtCGraph.coq_function -> Semantics.coq_function **)\n\nlet cbasic_function ismethod f =\n  { Semantics.fn_return = f.StmtCGraph.fn_return; Semantics.fn_params =\n    f.StmtCGraph.fn_params; Semantics.fn_temps = f.StmtCGraph.fn_temps;\n    Semantics.fn_locals = f.StmtCGraph.fn_locals; Semantics.fn_code =\n    (cbasic_code ismethod f.StmtCGraph.fn_code); Semantics.fn_entrypoint =\n    f.fn_entrypoint }\n\n(** val cbasic_fundef :\n    bool option -> StmtCGraph.coq_function -> Semantics.coq_function optErr **)\n\nlet cbasic_fundef ismethod f =\n  ret (Obj.magic coq_Monad_optErr) (cbasic_function ismethod f)\n\n(** val cbasic_fundefs :\n    StmtCGraph.coq_function PTree.t -> Semantics.coq_function PTree.t optErr **)\n\nlet cbasic_fundefs t0 =\n  transl_tree (cbasic_fundef (Some Coq_false)) t0\n\n(** val cbasic_methoddefs :\n    StmtCGraph.coq_function option IntMap.t -> Semantics.coq_function option\n    IntMap.t optErr **)\n\nlet cbasic_methoddefs methods =\n  transl_map (cbasic_fundef (Some Coq_true)) methods\n\n(** val cbasic_constructor :\n    StmtCGraph.coq_function option -> Semantics.coq_function optErr **)\n\nlet cbasic_constructor = function\n| Some c ->\n  bind (Obj.magic coq_Monad_optErr) (cbasic_fundef None c) (fun f ->\n    ret (Obj.magic coq_Monad_optErr) f)\n| None ->\n  Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val cbasic_genv : StmtCGraph.genv -> Semantics.genv optErr **)\n\nlet cbasic_genv ge =\n  let vars = ge.Genv.genv_vars in\n  let funcs = ge.Genv.genv_funcs in\n  let methods = ge.Genv.genv_methods in\n  let defs = ge.Genv.genv_defs in\n  let fundefs = ge.Genv.genv_fundefs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cbasic_fundefs fundefs)\n    (fun fundefs0 ->\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic cbasic_methoddefs methoddefs) (fun methoddefs0 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (Obj.magic cbasic_constructor constructor) (fun constructor0 ->\n        ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n          Genv.genv_funcs = funcs; Genv.genv_methods = methods;\n          Genv.genv_defs = defs; Genv.genv_fundefs = fundefs0;\n          Genv.genv_methoddefs = methoddefs0; Genv.genv_constructor = (Some\n          constructor0) })))\n"
  },
  {
    "path": "src/backend/extraction/Gen3.mli",
    "content": "open Ascii\nopen Datatypes\nopen Globalenvs\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Semantics\nopen StmtCGraph\nopen StmtClinear\nopen String0\nopen Trees\n\nval cbasic_stm : bool option -> node -> StmtCGraph.statement -> bblock\n\nval cbasic_code : bool option -> StmtCGraph.code -> Semantics.code\n\nval cbasic_function :\n  bool option -> StmtCGraph.coq_function -> Semantics.coq_function\n\nval cbasic_fundef :\n  bool option -> StmtCGraph.coq_function -> Semantics.coq_function optErr\n\nval cbasic_fundefs :\n  StmtCGraph.coq_function PTree.t -> Semantics.coq_function PTree.t optErr\n\nval cbasic_methoddefs :\n  StmtCGraph.coq_function option IntMap.t -> Semantics.coq_function option\n  IntMap.t optErr\n\nval cbasic_constructor :\n  StmtCGraph.coq_function option -> Semantics.coq_function optErr\n\nval cbasic_genv : StmtCGraph.genv -> Semantics.genv optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen4.ml",
    "content": "open AST\nopen Ascii\nopen BinNums\nopen Coqlib\nopen Datatypes\nopen Globalenvs\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Semantics\nopen Specif\nopen StmtClinear\nopen String0\nopen Trees\n\n(** val enumerate_rest : Semantics.code -> node list **)\n\nlet enumerate_rest c =\n  PTree.xkeys c Coq_xH\n\n(** val labels_of_bblock : bblock -> label list **)\n\nlet rec labels_of_bblock = function\n| Coq_nil -> Coq_nil\n| Coq_cons (s, b') ->\n  (match s with\n   | Sjump n -> Coq_cons (n, (labels_of_bblock b'))\n   | Sjumpi (_, n) -> Coq_cons (n, (labels_of_bblock b'))\n   | _ -> labels_of_bblock b')\n\n(** val enumerate'_func : (node list, Semantics.code) sigT -> node list **)\n\nlet rec enumerate'_func x =\n  let todo = projT1 x in\n  let c = projT2 x in\n  let enumerate'0 = fun todo0 c0 -> enumerate'_func (Coq_existT (todo0, c0))\n  in\n  (match todo with\n   | Coq_nil -> enumerate_rest c\n   | Coq_cons (n, ns) ->\n     let filtered_var = PTree.get n c in\n     (match filtered_var with\n      | Some b ->\n        Coq_cons (n,\n          (enumerate'0 (app (labels_of_bblock b) ns) (PTree.remove n c)))\n      | None -> enumerate'0 ns c))\n\n(** val enumerate' : node list -> Semantics.code -> node list **)\n\nlet enumerate' todo c =\n  enumerate'_func (Coq_existT (todo, c))\n\n(** val enumerate : Semantics.coq_function -> node list **)\n\nlet enumerate f =\n  enumerate' (Coq_cons (f.fn_entrypoint, Coq_nil)) f.Semantics.fn_code\n\n(** val starts_with : label -> code -> bool **)\n\nlet starts_with lbl = function\n| Coq_nil -> Coq_false\n| Coq_cons (s, _) ->\n  (match s with\n   | Slabel lbl' -> proj_sumbool (peq lbl lbl')\n   | _ -> Coq_false)\n\n(** val add_branch : label -> code -> code **)\n\nlet add_branch s k =\n  match starts_with s k with\n  | Coq_true -> k\n  | Coq_false -> Coq_cons ((Sjump s), k)\n\n(** val clinear_block : bblock -> code -> code **)\n\nlet rec clinear_block b k =\n  match b with\n  | Coq_nil -> k\n  | Coq_cons (i, b') ->\n    (match i with\n     | Slabel _ -> clinear_block b' k\n     | Sjump n -> add_branch n k\n     | _ -> Coq_cons (i, (clinear_block b' k)))\n\n(** val clinear_node : Semantics.coq_function -> node -> code -> code **)\n\nlet clinear_node f pc k =\n  match PTree.get pc f.Semantics.fn_code with\n  | Some b -> Coq_cons ((Slabel pc), (clinear_block b k))\n  | None -> k\n\n(** val clinear_body : Semantics.coq_function -> node list -> code **)\n\nlet clinear_body f enum =\n  list_fold_right (clinear_node f) enum Coq_nil\n\n(** val clinear_function : Semantics.coq_function -> coq_function optErr **)\n\nlet clinear_function f =\n  let enum = enumerate f in\n  ret (Obj.magic coq_Monad_optErr) { fn_return = f.Semantics.fn_return;\n    fn_params = f.Semantics.fn_params; fn_temps = f.Semantics.fn_temps;\n    fn_locals = f.Semantics.fn_locals; fn_code =\n    (add_branch f.fn_entrypoint (clinear_body f enum)) }\n\n(** val clinear_fundef : Semantics.coq_function -> coq_function optErr **)\n\nlet clinear_fundef =\n  clinear_function\n\n(** val clinear_fundefs :\n    Semantics.coq_function PTree.t -> coq_function PTree.t optErr **)\n\nlet clinear_fundefs t0 =\n  transl_tree clinear_fundef t0\n\n(** val clinear_methoddefs :\n    Semantics.coq_function option IntMap.t -> coq_function option IntMap.t\n    optErr **)\n\nlet clinear_methoddefs methods =\n  transl_map clinear_fundef methods\n\n(** val clinear_constructor :\n    Semantics.coq_function option -> coq_function optErr **)\n\nlet clinear_constructor = function\n| Some c ->\n  bind (Obj.magic coq_Monad_optErr) (clinear_fundef c) (fun f ->\n    ret (Obj.magic coq_Monad_optErr) f)\n| None ->\n  Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n    Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val clinear_genv : Semantics.genv -> genv optErr **)\n\nlet clinear_genv ge =\n  let vars = ge.Genv.genv_vars in\n  let funcs = ge.Genv.genv_funcs in\n  let methods = ge.Genv.genv_methods in\n  let defs = ge.Genv.genv_defs in\n  let fundefs = ge.Genv.genv_fundefs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clinear_fundefs fundefs)\n    (fun fundefs0 ->\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic clinear_methoddefs methoddefs) (fun methoddefs0 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (Obj.magic clinear_constructor constructor) (fun constructor0 ->\n        ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n          Genv.genv_funcs = funcs; Genv.genv_methods = methods;\n          Genv.genv_defs = defs; Genv.genv_fundefs = fundefs0;\n          Genv.genv_methoddefs = methoddefs0; Genv.genv_constructor = (Some\n          constructor0) })))\n"
  },
  {
    "path": "src/backend/extraction/Gen4.mli",
    "content": "open AST\nopen Ascii\nopen BinNums\nopen Coqlib\nopen Datatypes\nopen Globalenvs\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Semantics\nopen Specif\nopen StmtClinear\nopen String0\nopen Trees\n\nval enumerate_rest : Semantics.code -> node list\n\nval labels_of_bblock : bblock -> label list\n\nval enumerate'_func : (node list, Semantics.code) sigT -> node list\n\nval enumerate' : node list -> Semantics.code -> node list\n\nval enumerate : Semantics.coq_function -> node list\n\nval starts_with : label -> code -> bool\n\nval add_branch : label -> code -> code\n\nval clinear_block : bblock -> code -> code\n\nval clinear_node : Semantics.coq_function -> node -> code -> code\n\nval clinear_body : Semantics.coq_function -> node list -> code\n\nval clinear_function : Semantics.coq_function -> coq_function optErr\n\nval clinear_fundef : Semantics.coq_function -> coq_function optErr\n\nval clinear_fundefs :\n  Semantics.coq_function PTree.t -> coq_function PTree.t optErr\n\nval clinear_methoddefs :\n  Semantics.coq_function option IntMap.t -> coq_function option IntMap.t\n  optErr\n\nval clinear_constructor : Semantics.coq_function option -> coq_function optErr\n\nval clinear_genv : Semantics.genv -> genv optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen5.ml",
    "content": "open AST\nopen Ascii\nopen Datatypes\nopen Globalenvs\nopen Integers\nopen Labels\nopen List0\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Options\nopen Semantics0\nopen StmtClinear\nopen String0\nopen Trees\n\n(** val nodes_in_code : code -> label list **)\n\nlet rec nodes_in_code = function\n| Coq_nil -> Coq_nil\n| Coq_cons (s, rest) ->\n  let more_nodes = nodes_in_code rest in\n  (match s with\n   | Slabel lbl -> Coq_cons (lbl, more_nodes)\n   | _ -> more_nodes)\n\n(** val allocate_labels : fd_label -> code -> label_map -> label_map **)\n\nlet allocate_labels fn c base =\n  let nodes = nodes_in_code c in\n  xallocate_labels (map (elt_key fn) nodes)\n    (xallocate_labels (map (call_elt_key fn) nodes) base)\n\n(** val allocate_labels_fundef :\n    fd_label -> coq_function -> label_map -> label_map **)\n\nlet allocate_labels_fundef fn_l f base =\n  allocate_label (key (Coq_inl fn_l)) (allocate_labels fn_l f.fn_code base)\n\n(** val xallocate_labels_fun :\n    (label, coq_function) prod list -> label_map -> label_map **)\n\nlet rec xallocate_labels_fun elts base =\n  match elts with\n  | Coq_nil -> base\n  | Coq_cons (p, rest) ->\n    let Coq_pair (fn, fd) = p in\n    let rest_allocated = xallocate_labels_fun rest base in\n    allocate_labels_fundef (Lfun fn) fd rest_allocated\n\n(** val allocate_labels_fun :\n    coq_function PTree.t -> label_map -> label_map **)\n\nlet allocate_labels_fun defs base =\n  xallocate_labels_fun (PTree.elements defs) base\n\n(** val allocate_labels_methods :\n    Int.int list -> coq_function option IntMap.t -> label_map -> label_map **)\n\nlet rec allocate_labels_methods sigs defs base =\n  match sigs with\n  | Coq_nil -> base\n  | Coq_cons (sig0, rest) ->\n    let rest_allocated = allocate_labels_methods rest defs base in\n    (match IntMap.get sig0 defs with\n     | Some fd ->\n       allocate_label (key (Coq_inl (Lmultiplexer sig0)))\n         (allocate_labels_fundef (Lmethod sig0) fd rest_allocated)\n     | None -> rest_allocated)\n\n(** val allocate_labels_constructor :\n    coq_function option -> label_map -> label_map **)\n\nlet allocate_labels_constructor optc base =\n  match optc with\n  | Some fd -> allocate_labels_fundef Lconstructor fd base\n  | None -> base\n\n(** val allocate_labels_ge : genv -> label_map **)\n\nlet allocate_labels_ge ge =\n  let sigs = ge.Genv.genv_methods in\n  let fundefs = ge.Genv.genv_fundefs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  allocate_label (key (Coq_inl Lbody))\n    (allocate_labels_constructor constructor\n      (allocate_labels_methods sigs methoddefs\n        (allocate_labels_fun fundefs empty_label_map)))\n\n(** val clabeled_stm :\n    fd_label -> label_map -> statement -> statement optErr **)\n\nlet clabeled_stm fn lm s = match s with\n| Scall (rv, dst, args, retlbl) ->\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic label_key lm (Coq_inl (Lfun dst))) (fun dst' ->\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic label_key lm (call_node_within fn retlbl)) (fun retlbl' ->\n      ret (Obj.magic coq_Monad_optErr) (Scall (rv, dst', args, retlbl'))))\n| Slabel lbl ->\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic label_key lm (node_within fn lbl)) (fun l ->\n    ret (Obj.magic coq_Monad_optErr) (Slabel l))\n| Sjump lbl ->\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic label_key lm (node_within fn lbl)) (fun lbl' ->\n    ret (Obj.magic coq_Monad_optErr) (Sjump lbl'))\n| Sjumpi (e, lbl) ->\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic label_key lm (node_within fn lbl)) (fun lbl' ->\n    ret (Obj.magic coq_Monad_optErr) (Sjumpi (e, lbl')))\n| Stransfer (a, v, fail) ->\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic label_key lm (node_within fn fail)) (fun f ->\n    ret (Obj.magic coq_Monad_optErr) (Stransfer (a, v, f)))\n| Scallmethod (a, r, s0, v, g, args, fail) ->\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic label_key lm (node_within fn fail)) (fun f ->\n    ret (Obj.magic coq_Monad_optErr) (Scallmethod (a, r, s0, v, g, args, f)))\n| _ -> ret (Obj.magic coq_Monad_optErr) s\n\n(** val clabeled_code : fd_label -> label_map -> code -> code optErr **)\n\nlet clabeled_code fn lm c =\n  map_error (clabeled_stm fn lm) c\n\n(** val fn_is_method : fd_label -> bool **)\n\nlet fn_is_method = function\n| Lfun _ -> Coq_false\n| _ -> Coq_true\n\n(** val clabeled_function_body : label -> fd_label -> code -> code **)\n\nlet clabeled_function_body l fn c =\n  Coq_cons ((Slabel l), (Coq_cons ((Sfetchargs (fn_is_method fn)), (Coq_cons\n    (Sintro, c)))))\n\n(** val clabeled_function :\n    label_map -> fd_label -> coq_function -> coq_function optErr **)\n\nlet clabeled_function lm fn f =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clabeled_code fn lm f.fn_code)\n    (fun c ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic label_key lm (Coq_inl fn))\n      (fun l ->\n      let body = clabeled_function_body l fn c in\n      ret (Obj.magic coq_Monad_optErr) { fn_return = f.fn_return; fn_params =\n        f.fn_params; fn_temps = f.fn_temps; fn_locals = f.fn_locals;\n        fn_code = body }))\n\n(** val clabeled_fundef :\n    label_map -> fd_label -> coq_function -> coq_function optErr **)\n\nlet clabeled_fundef =\n  clabeled_function\n\n(** val clabeled_fundef_f :\n    label_map -> label -> coq_function -> (label, coq_function) prod optErr **)\n\nlet clabeled_fundef_f lm name fd =\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic clabeled_fundef lm (Lfun name) fd) (fun f ->\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic label_key lm (Coq_inl (Lfun name))) (fun l ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_pair (l, f))))\n\n(** val clabeled_fundefs :\n    label_map -> coq_function PTree.t -> coq_function PTree.t optErr **)\n\nlet clabeled_fundefs lm t0 =\n  transl_tree_keys_move (clabeled_fundef_f lm) t0\n\n(** val xclabeled_methods :\n    label_map -> Int.int list -> coq_function option IntMap.t -> coq_function\n    option IntMap.t optErr **)\n\nlet rec xclabeled_methods lm sigs methods =\n  match sigs with\n  | Coq_nil -> ret (Obj.magic coq_Monad_optErr) (IntMap.init None)\n  | Coq_cons (sig0, rest) ->\n    bind (Obj.magic coq_Monad_optErr) (xclabeled_methods lm rest methods)\n      (fun crest ->\n      bind (Obj.magic coq_Monad_optErr)\n        (fromOption (IntMap.get sig0 (Obj.magic methods)) (String ((Ascii\n          (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)),\n          EmptyString))))))))))))))))))))))))))))))))))))) (fun meth ->\n        bind (Obj.magic coq_Monad_optErr)\n          (Obj.magic clabeled_fundef lm (Lmethod sig0) meth) (fun b ->\n          ret (Obj.magic coq_Monad_optErr) (IntMap.set sig0 (Some b) crest))))\n\n(** val clabeled_methods :\n    label_map -> Int.int list -> coq_function option IntMap.t -> coq_function\n    option IntMap.t optErr **)\n\nlet clabeled_methods =\n  xclabeled_methods\n\n(** val clabeled_constructor :\n    label_map -> coq_function option -> coq_function optErr **)\n\nlet clabeled_constructor lm = function\n| Some c ->\n  bind (Obj.magic coq_Monad_optErr) (clabeled_fundef lm Lconstructor c)\n    (fun f -> ret (Obj.magic coq_Monad_optErr) f)\n| None ->\n  Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), EmptyString))))))))))))))))))))))))))))))))))))))))))\n\n(** val clabeled_genv : label_map -> genv -> genv optErr **)\n\nlet clabeled_genv lm ge =\n  let vars = ge.Genv.genv_vars in\n  let funcs = ge.Genv.genv_funcs in\n  let methods = ge.Genv.genv_methods in\n  let defs = ge.Genv.genv_defs in\n  let fundefs = ge.Genv.genv_fundefs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  (match label_functions fundefs with\n   | Coq_true ->\n     (match label_methods methoddefs with\n      | Coq_true ->\n        bind (Obj.magic coq_Monad_optErr)\n          (Obj.magic clabeled_fundefs lm fundefs) (fun fundefs0 ->\n          bind (Obj.magic coq_Monad_optErr)\n            (Obj.magic clabeled_methods lm methods methoddefs)\n            (fun methoddefs0 ->\n            bind (Obj.magic coq_Monad_optErr)\n              (Obj.magic clabeled_constructor lm constructor)\n              (fun constructor0 ->\n              ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n                Genv.genv_funcs = funcs; Genv.genv_methods = methods;\n                Genv.genv_defs = defs; Genv.genv_fundefs = fundefs0;\n                Genv.genv_methoddefs = methoddefs0; Genv.genv_constructor =\n                (Some constructor0) })))\n      | Coq_false ->\n        Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n   | Coq_false ->\n     Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n       ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)),\n       EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val clabeled_program : genv -> program optErr **)\n\nlet clabeled_program ge =\n  let lm = allocate_labels_ge ge in\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clabeled_genv lm ge)\n    (fun cge ->\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic label_key lm (Coq_inl Lbody)) (fun body ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_pair (cge, body))))\n"
  },
  {
    "path": "src/backend/extraction/Gen5.mli",
    "content": "open AST\nopen Ascii\nopen Datatypes\nopen Globalenvs\nopen Integers\nopen Labels\nopen List0\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Options\nopen Semantics0\nopen StmtClinear\nopen String0\nopen Trees\n\nval nodes_in_code : code -> label list\n\nval allocate_labels : fd_label -> code -> label_map -> label_map\n\nval allocate_labels_fundef :\n  fd_label -> coq_function -> label_map -> label_map\n\nval xallocate_labels_fun :\n  (label, coq_function) prod list -> label_map -> label_map\n\nval allocate_labels_fun : coq_function PTree.t -> label_map -> label_map\n\nval allocate_labels_methods :\n  Int.int list -> coq_function option IntMap.t -> label_map -> label_map\n\nval allocate_labels_constructor :\n  coq_function option -> label_map -> label_map\n\nval allocate_labels_ge : genv -> label_map\n\nval clabeled_stm : fd_label -> label_map -> statement -> statement optErr\n\nval clabeled_code : fd_label -> label_map -> code -> code optErr\n\nval fn_is_method : fd_label -> bool\n\nval clabeled_function_body : label -> fd_label -> code -> code\n\nval clabeled_function :\n  label_map -> fd_label -> coq_function -> coq_function optErr\n\nval clabeled_fundef :\n  label_map -> fd_label -> coq_function -> coq_function optErr\n\nval clabeled_fundef_f :\n  label_map -> label -> coq_function -> (label, coq_function) prod optErr\n\nval clabeled_fundefs :\n  label_map -> coq_function PTree.t -> coq_function PTree.t optErr\n\nval xclabeled_methods :\n  label_map -> Int.int list -> coq_function option IntMap.t -> coq_function\n  option IntMap.t optErr\n\nval clabeled_methods :\n  label_map -> Int.int list -> coq_function option IntMap.t -> coq_function\n  option IntMap.t optErr\n\nval clabeled_constructor :\n  label_map -> coq_function option -> coq_function optErr\n\nval clabeled_genv : label_map -> genv -> genv optErr\n\nval clabeled_program : genv -> program optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen6.ml",
    "content": "open Ascii\nopen BinNums\nopen Cop\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen ExpMiniC\nopen Globalenvs\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen StackEnv\nopen StmtCintptr\nopen StmtClocal\nopen String0\nopen Trees\n\n(** val spE : ExpCintptr.expr **)\n\nlet spE =\n  Emload ((ExpCintptr.Econst_int256 (sp, (Tpointer (Coq_mem, (Tpointer\n    (Coq_mem, Tvoid)))))), (Tpointer (Coq_mem, Tvoid)))\n\n(** val offsetE : coq_function -> ExpCintptr.expr **)\n\nlet offsetE f =\n  ExpCintptr.Econst_int256 ((frame_size f.fn_locals), (Tint (I256, Unsigned)))\n\n(** val pushS : coq_function -> StmtCintptr.statement **)\n\nlet pushS f =\n  StmtCintptr.Smassign ((ExpCintptr.Econst_int256 (sp, (Tpointer (Coq_mem,\n    (Tpointer (Coq_mem, Tvoid)))))), (ExpCintptr.Ebinop (Oadd, spE,\n    (offsetE f), (Tpointer (Coq_mem, Tvoid)))))\n\n(** val popS : coq_function -> StmtCintptr.statement **)\n\nlet popS f =\n  StmtCintptr.Smassign ((ExpCintptr.Econst_int256 (sp, (Tpointer (Coq_mem,\n    (Tpointer (Coq_mem, Tvoid)))))), (ExpCintptr.Ebinop (Osub, spE,\n    (offsetE f), (Tpointer (Coq_mem, Tvoid)))))\n\n(** val cintptr_expr : coq_function -> expr -> ExpCintptr.expr optErr **)\n\nlet rec cintptr_expr f = function\n| Econst_int (_, _) ->\n  Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Econst_int256 (i, t0) ->\n  ret (Obj.magic coq_Monad_optErr) (ExpCintptr.Econst_int256 (i, t0))\n| Evar (id, t0) ->\n  let locals = f.fn_locals in\n  let fl = mkfieldlist locals in\n  (match offset fl id with\n   | Some off ->\n     let foE = ExpCintptr.Econst_int256 ((frame_size locals), (Tint (I256,\n       Unsigned)))\n     in\n     let baseE = ExpCintptr.Ebinop (Osub, spE, foE, (Tpointer (Coq_mem,\n       (Tstruct (Coq_xH, fl)))))\n     in\n     let offE = ExpCintptr.Econst_int256 (off, (Tint (I256, Unsigned))) in\n     ret (Obj.magic coq_Monad_optErr) (ExpCintptr.Ebinop (Oadd, baseE, offE,\n       t0))\n   | None ->\n     Error (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n       Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n       Coq_false)), EmptyString)))))))))))))))))))))))))))))))))))))))))))\n| Eglob (_, _) ->\n  Error (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Etempvar (i, t0) ->\n  ret (Obj.magic coq_Monad_optErr) (ExpCintptr.Etempvar (i, t0))\n| Ederef (e0, t0) ->\n  bind (Obj.magic coq_Monad_optErr) (cintptr_expr f e0) (fun e' ->\n    match ExpCintptr.typeof e' with\n    | Tpointer (p, _) ->\n      (match p with\n       | Coq_mem -> ret (Obj.magic coq_Monad_optErr) (Emload (e', t0))\n       | Coq_stor -> ret (Obj.magic coq_Monad_optErr) (Esload (e', t0))\n       | Coq_call ->\n         Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | _ ->\n      Error (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Eaddr (e0, t0) ->\n  bind (Obj.magic coq_Monad_optErr) (cintptr_expr f e0) (fun e' ->\n    ret (Obj.magic coq_Monad_optErr) (ExpCintptr.Eaddr (e', t0)))\n| Eunop (o, e0, t0) ->\n  (match o with\n   | Osha_1 ->\n     Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n       Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n       ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n       Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n       Coq_false)),\n       EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n   | _ ->\n     bind (Obj.magic coq_Monad_optErr) (cintptr_expr f e0) (fun e' ->\n       ret (Obj.magic coq_Monad_optErr) (ExpCintptr.Eunop (o, e', t0))))\n| Ebinop (o, e1, e2, t0) ->\n  (match o with\n   | Osha_2 ->\n     Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n       Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n       ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n       Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n       Coq_false)),\n       EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n   | _ ->\n     bind (Obj.magic coq_Monad_optErr) (cintptr_expr f e1) (fun e1' ->\n       bind (Obj.magic coq_Monad_optErr) (cintptr_expr f e2) (fun e2' ->\n         ret (Obj.magic coq_Monad_optErr) (ExpCintptr.Ebinop (o, e1', e2',\n           t0)))))\n| Efield (e0, id, t0) ->\n  bind (Obj.magic coq_Monad_optErr) (cintptr_expr f e0) (fun e' ->\n    match ExpCintptr.typeof e' with\n    | Tpointer (p, t1) ->\n      (match p with\n       | Coq_mem ->\n         (match t1 with\n          | Tstruct (_, fl) ->\n            (match offset fl id with\n             | Some off ->\n               let offE = ExpCintptr.Econst_int256 (off, (Tint (I256,\n                 Unsigned)))\n               in\n               ret (Obj.magic coq_Monad_optErr) (ExpCintptr.Ebinop (Oadd, e',\n                 offE, t0))\n             | None ->\n               Error (String ((Ascii (Coq_false, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n                 Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n                 Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n                 Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n                 (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n                 Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n                 (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n                 Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                 Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                 Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n                 (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n                 Coq_true, Coq_true, Coq_true, Coq_false)),\n                 EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n          | _ ->\n            Error (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n              (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n              Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n              Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n              ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n              Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n              Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n              Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n              Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n              ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n              Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n              Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n              Coq_false)),\n              EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n       | _ ->\n         Error (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_true, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | _ ->\n      Error (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Eindex (e1, e2, t0) ->\n  bind (Obj.magic coq_Monad_optErr) (cintptr_expr f e1) (fun e1' ->\n    bind (Obj.magic coq_Monad_optErr) (cintptr_expr f e2) (fun e2' ->\n      match ExpCintptr.typeof e1' with\n      | Tpointer (p, t1) ->\n        (match p with\n         | Coq_mem ->\n           (match t1 with\n            | Tarray (t', _) ->\n              let sizeE = ExpCintptr.Econst_int256 ((sizeof t'), (Tint (I256,\n                Unsigned)))\n              in\n              let offE = ExpCintptr.Ebinop (Omul, e2', sizeE, (Tint (I256,\n                Unsigned)))\n              in\n              ret (Obj.magic coq_Monad_optErr) (ExpCintptr.Ebinop (Oadd, e1',\n                offE, t0))\n            | _ ->\n              Error (String ((Ascii (Coq_false, Coq_true, Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n                Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n                Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n                ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n                ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n                Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n                Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n                (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n                Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n                Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n                Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n                ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n                Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n                Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n                ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n                Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n                Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n                ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n                Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n                Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n                Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n                (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n                Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n                (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n                Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n                Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n                Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n                Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n                EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n         | _ ->\n           Error (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n             Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n             (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n             (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n             (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n             Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n             (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n             Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n             Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n             Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n             (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n             (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n             Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n             Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n             Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n             Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n             Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n             ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n             Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n             Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n             Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n             Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n             EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n      | _ ->\n        Error (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)),\n          EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Ecall0 (b, t0) ->\n  ret (Obj.magic coq_Monad_optErr) (ExpCintptr.Ecall0 (b, t0))\n| Ecall1 (b, e0, t0) ->\n  bind (Obj.magic coq_Monad_optErr) (cintptr_expr f e0) (fun e' ->\n    ret (Obj.magic coq_Monad_optErr) (ExpCintptr.Ecall1 (b, e', t0)))\n\n(** val cintptr_exprs :\n    coq_function -> expr list -> ExpCintptr.expr list optErr **)\n\nlet rec cintptr_exprs f = function\n| Coq_nil -> ret (Obj.magic coq_Monad_optErr) Coq_nil\n| Coq_cons (e, es0) ->\n  bind (Obj.magic coq_Monad_optErr) (cintptr_exprs f es0) (fun es' ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f e) (fun e' ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_cons (e', es'))))\n\n(** val cintptr_expr_opt :\n    coq_function -> expr option -> ExpCintptr.expr option optErr **)\n\nlet cintptr_expr_opt f = function\n| Some e ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f e) (fun e' ->\n    ret (Obj.magic coq_Monad_optErr) (Some e'))\n| None -> ret (Obj.magic coq_Monad_optErr) None\n\n(** val cintptr_stmt :\n    coq_function -> statement -> StmtCintptr.statement optErr **)\n\nlet rec cintptr_stmt f = function\n| Sskip -> ret (Obj.magic coq_Monad_optErr) StmtCintptr.Sskip\n| Smassign (e1, e2) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f e1) (fun e1' ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f e2)\n      (fun e2' ->\n      ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Smassign (e1', e2'))))\n| Ssassign (e1, e2) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f e1) (fun e1' ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f e2)\n      (fun e2' ->\n      ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Ssassign (e1', e2'))))\n| Sset (i, e) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f e) (fun e' ->\n    ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Sset (i, e')))\n| Scall (rv, dest, args) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_exprs f args)\n    (fun args' ->\n    ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Scall (rv, dest, args')))\n| Ssequence (s1, s2) ->\n  bind (Obj.magic coq_Monad_optErr) (cintptr_stmt f s1) (fun s1' ->\n    bind (Obj.magic coq_Monad_optErr) (cintptr_stmt f s2) (fun s2' ->\n      ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Ssequence (s1', s2'))))\n| Sifthenelse (e, s1, s2) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f e) (fun e' ->\n    bind (Obj.magic coq_Monad_optErr) (cintptr_stmt f s1) (fun s1' ->\n      bind (Obj.magic coq_Monad_optErr) (cintptr_stmt f s2) (fun s2' ->\n        ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Sifthenelse (e', s1',\n          s2')))))\n| Sloop s0 ->\n  bind (Obj.magic coq_Monad_optErr) (cintptr_stmt f s0) (fun s' ->\n    ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Sloop s'))\n| Sbreak -> ret (Obj.magic coq_Monad_optErr) StmtCintptr.Sbreak\n| Sreturn idopt ->\n  ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Ssequence ((popS f),\n    (StmtCintptr.Sreturn idopt)))\n| Shash (e1, e2, eopt) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f e1) (fun e1' ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f e2)\n      (fun e2' ->\n      bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr_opt f eopt)\n        (fun eopt0 ->\n        ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Shash (e1', e2', eopt0)))))\n| Stransfer (a, v) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f a) (fun a' ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f v) (fun v' ->\n      ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Stransfer (a', v'))))\n| Scallmethod (a, rvs, sg, v, g, args) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f a) (fun a' ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr f v) (fun v' ->\n      bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_expr_opt f g)\n        (fun g' ->\n        bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_exprs f args)\n          (fun args' ->\n          ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Scallmethod (a', rvs,\n            sg, v', g', args'))))))\n| Slog (topics, args) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_exprs f topics)\n    (fun topics' ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_exprs f args)\n      (fun args' ->\n      ret (Obj.magic coq_Monad_optErr) (StmtCintptr.Slog (topics', args'))))\n| Srevert -> ret (Obj.magic coq_Monad_optErr) StmtCintptr.Srevert\n\n(** val cintptr_function : coq_function -> StmtCintptr.coq_function optErr **)\n\nlet cintptr_function f =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_stmt f f.fn_body)\n    (fun s ->\n    ret (Obj.magic coq_Monad_optErr) { StmtCintptr.fn_return = f.fn_return;\n      StmtCintptr.fn_params = f.fn_params; StmtCintptr.fn_temps = f.fn_temps;\n      StmtCintptr.fn_locals = f.fn_locals; StmtCintptr.fn_body =\n      (StmtCintptr.Ssequence ((pushS f), s)) })\n\n(** val cintptr_fundefs :\n    coq_function PTree.t -> StmtCintptr.coq_function PTree.t optErr **)\n\nlet rec cintptr_fundefs t0 =\n  transl_tree cintptr_function t0\n\n(** val cintptr_methods :\n    coq_function option IntMap.t -> StmtCintptr.coq_function option IntMap.t\n    optErr **)\n\nlet rec cintptr_methods methods =\n  transl_map cintptr_function methods\n\n(** val cintptr_constructor :\n    coq_function option -> StmtCintptr.coq_function optErr **)\n\nlet cintptr_constructor = function\n| Some c ->\n  bind (Obj.magic coq_Monad_optErr) (cintptr_function c) (fun f ->\n    ret (Obj.magic coq_Monad_optErr) f)\n| None ->\n  Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), EmptyString))))))))))))))))))))))))))))))))))))))))))\n\n(** val cintptr_genv : genv -> StmtCintptr.genv optErr **)\n\nlet cintptr_genv ge =\n  let vars = ge.Genv.genv_vars in\n  let funcs = ge.Genv.genv_funcs in\n  let methods = ge.Genv.genv_methods in\n  let defs = ge.Genv.genv_defs in\n  let fundefs = ge.Genv.genv_fundefs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_fundefs fundefs)\n    (fun fundefs0 ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_methods methoddefs)\n      (fun methoddefs0 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (Obj.magic cintptr_constructor constructor) (fun constructor0 ->\n        ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n          Genv.genv_funcs = funcs; Genv.genv_methods = methods;\n          Genv.genv_defs = defs; Genv.genv_fundefs = fundefs0;\n          Genv.genv_methoddefs = methoddefs0; Genv.genv_constructor = (Some\n          constructor0) })))\n"
  },
  {
    "path": "src/backend/extraction/Gen6.mli",
    "content": "open Ascii\nopen BinNums\nopen Cop\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen ExpMiniC\nopen Globalenvs\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen StackEnv\nopen StmtCintptr\nopen StmtClocal\nopen String0\nopen Trees\n\nval spE : ExpCintptr.expr\n\nval offsetE : coq_function -> ExpCintptr.expr\n\nval pushS : coq_function -> StmtCintptr.statement\n\nval popS : coq_function -> StmtCintptr.statement\n\nval cintptr_expr : coq_function -> expr -> ExpCintptr.expr optErr\n\nval cintptr_exprs : coq_function -> expr list -> ExpCintptr.expr list optErr\n\nval cintptr_expr_opt :\n  coq_function -> expr option -> ExpCintptr.expr option optErr\n\nval cintptr_stmt : coq_function -> statement -> StmtCintptr.statement optErr\n\nval cintptr_function : coq_function -> StmtCintptr.coq_function optErr\n\nval cintptr_fundefs :\n  coq_function PTree.t -> StmtCintptr.coq_function PTree.t optErr\n\nval cintptr_methods :\n  coq_function option IntMap.t -> StmtCintptr.coq_function option IntMap.t\n  optErr\n\nval cintptr_constructor :\n  coq_function option -> StmtCintptr.coq_function optErr\n\nval cintptr_genv : genv -> StmtCintptr.genv optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen7.ml",
    "content": "open AST\nopen Ascii\nopen BinInt\nopen BinNums\nopen Cop\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen ExpStacked\nopen FramesLabelsCintptr\nopen Globalenvs\nopen Integers\nopen List0\nopen Maps0\nopen MemoryModel\nopen Monad\nopen Nat0\nopen OptErrMonad\nopen Options\nopen Semantics1\nopen StmtClinear\nopen StmtStacked\nopen String0\nopen TempModelLow\nopen Trees\n\n(** val stacked_expr :\n    nat PTree.t -> ExpCintptr.expr -> nat -> bool -> statement list optErr **)\n\nlet rec stacked_expr temps e s_extra rvalue =\n  match e with\n  | Econst_int (_, _) ->\n    Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n      Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | ExpCintptr.Econst_int256 (i, _) ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Srvalue (Econst_int256 i)),\n      Coq_nil))\n  | ExpCintptr.Etempvar (i, _) ->\n    bind (Obj.magic coq_Monad_optErr)\n      (fromOption (PTree.get i (Obj.magic temps)) (String ((Ascii (Coq_true,\n        Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)),\n        EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n      (fun ind ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Srvalue (Etempvar\n        (add s_extra ind))), Coq_nil)))\n  | ExpCintptr.Esload (e0, _) ->\n    bind (Obj.magic coq_Monad_optErr)\n      (stacked_expr temps e0 s_extra Coq_true) (fun e' ->\n      ret (Obj.magic coq_Monad_optErr)\n        (app e' (Coq_cons ((Srvalue Esload), Coq_nil))))\n  | ExpCintptr.Emload (e0, _) ->\n    bind (Obj.magic coq_Monad_optErr)\n      (stacked_expr temps e0 s_extra Coq_true) (fun e' ->\n      ret (Obj.magic coq_Monad_optErr)\n        (app e' (Coq_cons ((Srvalue Emload), Coq_nil))))\n  | Eaddr (e0, _) ->\n    (match rvalue with\n     | Coq_true ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e0 s_extra Coq_false) (fun e' ->\n         ret (Obj.magic coq_Monad_optErr) e')\n     | Coq_false ->\n       Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | ExpCintptr.Eunop (o, e0, _) ->\n    (match rvalue with\n     | Coq_true ->\n       (match o with\n        | Onotbool ->\n          bind (Obj.magic coq_Monad_optErr)\n            (stacked_expr temps e0 s_extra Coq_true) (fun e' ->\n            ret (Obj.magic coq_Monad_optErr)\n              (app e' (Coq_cons ((Srvalue (Eunop o)), Coq_nil))))\n        | Onotint ->\n          bind (Obj.magic coq_Monad_optErr)\n            (stacked_expr temps e0 s_extra Coq_true) (fun e' ->\n            ret (Obj.magic coq_Monad_optErr)\n              (app e' (Coq_cons ((Srvalue (Eunop o)), Coq_nil))))\n        | Oneg ->\n          bind (Obj.magic coq_Monad_optErr)\n            (stacked_expr temps e0 s_extra Coq_true) (fun e' ->\n            ret (Obj.magic coq_Monad_optErr)\n              (app e' (Coq_cons ((Srvalue (Eunop o)), Coq_nil))))\n        | Osha_1 ->\n          Error (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n     | Coq_false ->\n       (match o with\n        | Osha_1 ->\n          Error (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n        | _ ->\n          Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n            (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n            (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n            (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n            (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_true, Coq_false, Coq_false)),\n            EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | ExpCintptr.Ebinop (o, e1, e2, _) ->\n    (match o with\n     | Oadd ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Osub ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Omul ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Odiv ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Omod ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Oexp ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Oand ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Oor ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Oxor ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Oshl ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Oshr ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Oeq ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | One ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Olt ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Ogt ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Ole ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Oge ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e1 (S s_extra) rvalue) (fun e1' ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps e2 s_extra Coq_true) (fun e2' ->\n           ret (Obj.magic coq_Monad_optErr)\n             (app e2'\n               (app e1' (Coq_cons\n                 ((match rvalue with\n                   | Coq_true -> Srvalue (Ebinop (o, Coq_false))\n                   | Coq_false -> Slvalue (Ebinop (o, Coq_false))), Coq_nil))))))\n     | Osha_2 ->\n       Error (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | ExpCintptr.Ecall0 (b, _) ->\n    (match rvalue with\n     | Coq_true ->\n       ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Srvalue (Ecall0 b)),\n         Coq_nil))\n     | Coq_false ->\n       Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | ExpCintptr.Ecall1 (b, e0, _) ->\n    (match rvalue with\n     | Coq_true ->\n       bind (Obj.magic coq_Monad_optErr)\n         (stacked_expr temps e0 s_extra Coq_true) (fun e' ->\n         ret (Obj.magic coq_Monad_optErr)\n           (app e' (Coq_cons ((Srvalue (Ecall1 b)), Coq_nil))))\n     | Coq_false ->\n       Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val stacked_exprs :\n    nat PTree.t -> ExpCintptr.expr list -> nat -> statement list optErr **)\n\nlet rec stacked_exprs temps es s_extra =\n  match es with\n  | Coq_nil -> ret (Obj.magic coq_Monad_optErr) Coq_nil\n  | Coq_cons (e, rest) ->\n    bind (Obj.magic coq_Monad_optErr)\n      (stacked_expr temps e (add (length rest) s_extra) Coq_true) (fun e' ->\n      bind (Obj.magic coq_Monad_optErr) (stacked_exprs temps rest s_extra)\n        (fun rest' -> ret (Obj.magic coq_Monad_optErr) (app rest' e')))\n\n(** val ident_indices :\n    nat PTree.t -> ident list -> nat -> nat list optErr **)\n\nlet rec ident_indices temps a offset =\n  match a with\n  | Coq_nil -> ret (Obj.magic coq_Monad_optErr) Coq_nil\n  | Coq_cons (i, rest) ->\n    bind (Obj.magic coq_Monad_optErr)\n      (fromOption (PTree.get i (Obj.magic temps)) (String ((Ascii (Coq_true,\n        Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)),\n        EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))\n      (fun t0 ->\n      bind (Obj.magic coq_Monad_optErr) (ident_indices temps rest offset)\n        (fun resti ->\n        ret (Obj.magic coq_Monad_optErr) (Coq_cons\n          ((add (add t0 offset) (length rest)), resti))))\n\n(** val set_indices : nat list -> statement list **)\n\nlet set_indices inds =\n  map (fun x -> Sset x) inds\n\n(** val load_returns : nat -> statement list **)\n\nlet rec load_returns = function\n| O -> Coq_nil\n| S n ->\n  app (Coq_cons ((Srvalue (Econst_int256\n    (Int256.repr (Z.add retpos (retlen n))))), (Coq_cons ((Srvalue Emload),\n    Coq_nil)))) (load_returns n)\n\n(** val optident : nat PTree.t -> ident option -> statement optErr **)\n\nlet optident temps = function\n| Some b ->\n  bind (Obj.magic coq_Monad_optErr)\n    (fromOption (PTree.get b (Obj.magic temps)) (String ((Ascii (Coq_true,\n      Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)),\n      EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))\n    (fun t0 -> ret (Obj.magic coq_Monad_optErr) (Sset t0))\n| None -> ret (Obj.magic coq_Monad_optErr) Spop\n\n(** val return_type : StmtClinear.coq_function -> coq_type **)\n\nlet return_type =\n  fn_return\n\n(** val toreturn : StmtClinear.coq_function -> bool option -> ret_type **)\n\nlet toreturn f = function\n| Some b ->\n  (match b with\n   | Coq_true ->\n     (match return_type f with\n      | Tvoid -> Tvoid_method\n      | Tarray (_, _) -> Terror\n      | Tstruct (_, _) -> Terror\n      | _ -> Tsome_method)\n   | Coq_false ->\n     (match return_type f with\n      | Tvoid -> Tvoid_fun\n      | Tarray (_, _) -> Terror\n      | Tstruct (_, _) -> Terror\n      | _ -> Tsome_fun))\n| None ->\n  (match return_type f with\n   | Tvoid -> Tvoid_constructor\n   | Tarray (_, _) -> Terror\n   | Tstruct (_, _) -> Terror\n   | _ -> Tsome_constructor)\n\n(** val zero_stm : statement **)\n\nlet zero_stm =\n  Srvalue (Econst_int256 Int256.zero)\n\n(** val xzero_stms : nat -> statement list **)\n\nlet rec xzero_stms = function\n| O -> Coq_nil\n| S n -> app (xzero_stms n) (Coq_cons (zero_stm, Coq_nil))\n\n(** val zero_stms : nat -> statement list **)\n\nlet zero_stms c = match c with\n| O -> Coq_cons (Sskip, Coq_nil)\n| S _ -> xzero_stms c\n\n(** val z_stm : coq_Z -> statement **)\n\nlet z_stm z =\n  Srvalue (Econst_int256 (Int256.repr z))\n\n(** val stacked_code :\n    nat PTree.t -> StmtClinear.coq_function -> StmtClinear.code -> code optErr **)\n\nlet rec stacked_code temps f = function\n| Coq_nil -> ret (Obj.magic coq_Monad_optErr) Coq_nil\n| Coq_cons (s, rest) ->\n  bind (Obj.magic coq_Monad_optErr) (stacked_code temps f rest) (fun trest ->\n    match s with\n    | StmtClinear.Ssassign (lv, rv) ->\n      bind (Obj.magic coq_Monad_optErr)\n        (stacked_expr temps lv (S O) Coq_false) (fun lv' ->\n        bind (Obj.magic coq_Monad_optErr) (stacked_expr temps rv O Coq_true)\n          (fun rv' ->\n          ret (Obj.magic coq_Monad_optErr)\n            (app rv' (app lv' (Coq_cons (Ssassign, trest))))))\n    | StmtClinear.Smassign (lv, rv) ->\n      bind (Obj.magic coq_Monad_optErr)\n        (stacked_expr temps lv (S O) Coq_false) (fun lv' ->\n        bind (Obj.magic coq_Monad_optErr) (stacked_expr temps rv O Coq_true)\n          (fun rv' ->\n          ret (Obj.magic coq_Monad_optErr)\n            (app rv' (app lv' (Coq_cons (Smassign, trest))))))\n    | StmtClinear.Sset (i, rv) ->\n      bind (Obj.magic coq_Monad_optErr)\n        (fromOption (PTree.get i (Obj.magic temps)) (String ((Ascii\n          (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n          Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n        (fun t0 ->\n        bind (Obj.magic coq_Monad_optErr) (stacked_expr temps rv O Coq_true)\n          (fun rv' ->\n          ret (Obj.magic coq_Monad_optErr)\n            (app rv' (Coq_cons ((Sset t0), trest)))))\n    | Scall (rv, dest, args, retlbl) ->\n      bind (Obj.magic coq_Monad_optErr) (Obj.magic optident temps rv)\n        (fun t0 ->\n        bind (Obj.magic coq_Monad_optErr) (stacked_exprs temps args (S O))\n          (fun args' ->\n          ret (Obj.magic coq_Monad_optErr)\n            (app (Coq_cons ((Spushlabel (Lreturn retlbl)), Coq_nil))\n              (app args'\n                (app (Coq_cons ((Spushlabel (Lcall dest)), (Coq_cons\n                  (Sjump_call, (Coq_cons ((Slabel retlbl), Coq_nil))))))\n                  (app (Coq_cons (t0, Coq_nil)) trest))))))\n    | Sreturn rv ->\n      (match rv with\n       | Some i ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps (ExpCintptr.Etempvar (i, (return_type f))) O\n             Coq_true) (fun rv' ->\n           ret (Obj.magic coq_Monad_optErr) (app rv' trest))\n       | None ->\n         ret (Obj.magic coq_Monad_optErr) (Coq_cons (Spushvoid, trest)))\n    | StmtClinear.Sdone method0 ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Sdone\n        ((length (all_temps ftype (Obj.magic f))), (toreturn f method0))),\n        trest))\n    | StmtClinear.Slabel lbl ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Slabel lbl), trest))\n    | Sjump lbl ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Spushlabel (Linternal\n        lbl)), (Coq_cons (Sjump_internal, trest))))\n    | StmtClinear.Sjumpi (cond, lbl) ->\n      bind (Obj.magic coq_Monad_optErr) (stacked_expr temps cond O Coq_true)\n        (fun cond' ->\n        ret (Obj.magic coq_Monad_optErr)\n          (app cond' (Coq_cons ((Spushlabel (Linternal lbl)), (Coq_cons\n            (Sjumpi, trest))))))\n    | StmtClinear.Shash (ex1, ex2, exo) ->\n      bind (Obj.magic coq_Monad_optErr) (stacked_expr temps ex1 O Coq_true)\n        (fun ex1' ->\n        bind (Obj.magic coq_Monad_optErr) (stacked_expr temps ex2 O Coq_true)\n          (fun ex2' ->\n          bind (Obj.magic coq_Monad_optErr)\n            (match exo with\n             | Some ex -> stacked_expr temps ex O Coq_true\n             | None -> ret (Obj.magic coq_Monad_optErr) ex2') (fun exo' ->\n            bind (Obj.magic coq_Monad_optErr)\n              (match exo with\n               | Some _ ->\n                 Success (Coq_cons ((Srvalue (Econst_int256\n                   (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                     (Coq_xO Coq_xH)))))))))), Coq_nil))\n               | None ->\n                 Success (Coq_cons ((Srvalue (Econst_int256\n                   (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                     Coq_xH))))))))), Coq_nil))) (fun len ->\n              ret (Obj.magic coq_Monad_optErr)\n                (app ex2'\n                  (app (Coq_cons ((Srvalue Emload), (Coq_cons ((Srvalue\n                    (Econst_int256\n                    (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                      (Coq_xO (Coq_xO (Coq_xO (Coq_xO Coq_xH)))))))))))),\n                    (Coq_cons (Smassign, Coq_nil))))))\n                    (app\n                      (match exo with\n                       | Some _ ->\n                         app exo' (Coq_cons ((Srvalue Emload), (Coq_cons\n                           ((Srvalue (Econst_int256\n                           (Int256.repr\n                             (Z.add (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                               (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                               Coq_xH))))))))) (Zpos (Coq_xO (Coq_xO (Coq_xO\n                               (Coq_xO (Coq_xO Coq_xH)))))))))), (Coq_cons\n                           (Smassign, Coq_nil))))))\n                       | None -> Coq_nil)\n                      (app len\n                        (app (Coq_cons ((Srvalue (Econst_int256\n                          (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                            (Coq_xO (Coq_xO (Coq_xO (Coq_xO Coq_xH)))))))))))),\n                          Coq_nil))\n                          (app (Coq_cons (Shash, Coq_nil))\n                            (app ex1'\n                              (app (Coq_cons (Smassign, Coq_nil)) trest))))))))))))\n    | StmtClinear.Stransfer (a, v, fail) ->\n      bind (Obj.magic coq_Monad_optErr)\n        (stacked_expr temps a (S (S (S (S (S O))))) Coq_true) (fun a' ->\n        bind (Obj.magic coq_Monad_optErr)\n          (stacked_expr temps v (S (S (S (S O)))) Coq_true) (fun v' ->\n          ret (Obj.magic coq_Monad_optErr)\n            (app (Coq_cons (zero_stm, (Coq_cons (zero_stm, (Coq_cons\n              (zero_stm, (Coq_cons (zero_stm, Coq_nil))))))))\n              (app v'\n                (app a'\n                  (app (Coq_cons (zero_stm, (Coq_cons (Stransfer, (Coq_cons\n                    ((Srvalue (Eunop Onotbool)), (Coq_cons ((Spushlabel\n                    (Linternal fail)), (Coq_cons (Sjumpi, Coq_nil))))))))))\n                    trest))))))\n    | StmtClinear.Scallmethod (a, rvs, sg, v, g, args, fail) ->\n      (match g with\n       | Some gas ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps gas (S (S (S (S (S (S O)))))) Coq_true)\n           (fun g' ->\n           bind (Obj.magic coq_Monad_optErr)\n             (stacked_expr temps a (S (S (S (S (S O))))) Coq_true) (fun a' ->\n             bind (Obj.magic coq_Monad_optErr)\n               (stacked_expr temps v (S (S (S (S O)))) Coq_true) (fun v' ->\n               bind (Obj.magic coq_Monad_optErr)\n                 (stacked_exprs temps (rev args) O) (fun args' ->\n                 bind (Obj.magic coq_Monad_optErr)\n                   (Obj.magic ident_indices temps rvs O) (fun rv_inds ->\n                   let retcount = length rvs in\n                   let argcount = length args in\n                   ret (Obj.magic coq_Monad_optErr)\n                     (app args' (Coq_cons ((Scallargs (sg, argcount,\n                       retcount)),\n                       (app (Coq_cons ((z_stm (retlen retcount)), (Coq_cons\n                         ((z_stm retpos), (Coq_cons\n                         ((z_stm (arglen argcount)), (Coq_cons\n                         ((z_stm (argpos retcount)), Coq_nil))))))))\n                         (app v'\n                           (app a'\n                             (app g'\n                               (app (Coq_cons ((Scallmethod Coq_true),\n                                 Coq_nil))\n                                 (app (Coq_cons ((Srvalue (Eunop Onotbool)),\n                                   (Coq_cons ((Spushlabel (Linternal fail)),\n                                   (Coq_cons (Sjumpi, Coq_nil))))))\n                                   (app (load_returns retcount)\n                                     (app (set_indices rv_inds) trest))))))))))))))))\n       | None ->\n         bind (Obj.magic coq_Monad_optErr)\n           (stacked_expr temps a (S (S (S (S (S O))))) Coq_true) (fun a' ->\n           bind (Obj.magic coq_Monad_optErr)\n             (stacked_expr temps v (S (S (S (S O)))) Coq_true) (fun v' ->\n             bind (Obj.magic coq_Monad_optErr)\n               (stacked_exprs temps (rev args) O) (fun args' ->\n               bind (Obj.magic coq_Monad_optErr)\n                 (Obj.magic ident_indices temps rvs O) (fun rv_inds ->\n                 let retcount = length rvs in\n                 let argcount = length args in\n                 ret (Obj.magic coq_Monad_optErr)\n                   (app args' (Coq_cons ((Scallargs (sg, argcount,\n                     retcount)),\n                     (app (Coq_cons ((z_stm (retlen retcount)), (Coq_cons\n                       ((z_stm retpos), (Coq_cons ((z_stm (arglen argcount)),\n                       (Coq_cons ((z_stm (argpos retcount)), Coq_nil))))))))\n                       (app v'\n                         (app a'\n                           (app (Coq_cons ((Scallmethod Coq_false), Coq_nil))\n                             (app (Coq_cons ((Srvalue (Eunop Onotbool)),\n                               (Coq_cons ((Spushlabel (Linternal fail)),\n                               (Coq_cons (Sjumpi, Coq_nil))))))\n                               (app (load_returns retcount)\n                                 (app (set_indices rv_inds) trest)))))))))))))))\n    | StmtClinear.Slog (topics, args) ->\n      bind (Obj.magic coq_Monad_optErr) (stacked_exprs temps topics O)\n        (fun topics' ->\n        bind (Obj.magic coq_Monad_optErr)\n          (stacked_exprs temps args (length topics)) (fun args' ->\n          ret (Obj.magic coq_Monad_optErr)\n            (app topics'\n              (app args' (Coq_cons ((Slog ((length topics), (length args))),\n                trest))))))\n    | StmtClinear.Srevert ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_cons (Srevert, trest))\n    | StmtClinear.Sfetchargs fetch ->\n      ret (Obj.magic coq_Monad_optErr) (Coq_cons\n        ((match fetch with\n          | Coq_true -> Sfetchargs (length (some_args ftype (Obj.magic f)))\n          | Coq_false -> Sskip), trest))\n    | Sintro ->\n      let push_temps = zero_stms (length (some_temps ftype (Obj.magic f))) in\n      ret (Obj.magic coq_Monad_optErr) (app push_temps trest))\n\n(** val allocate_temps : (ident, coq_type) prod list -> nat -> nat PTree.t **)\n\nlet rec allocate_temps ids base =\n  match ids with\n  | Coq_nil -> PTree.empty\n  | Coq_cons (p, rest) ->\n    let Coq_pair (id, _) = p in\n    PTree.set id base (allocate_temps rest (S base))\n\n(** val allocate_all_temps : (ident, coq_type) prod list -> nat PTree.t **)\n\nlet allocate_all_temps ids =\n  allocate_temps ids O\n\n(** val allocate_fn_temps : StmtClinear.coq_function -> nat PTree.t **)\n\nlet allocate_fn_temps f =\n  allocate_all_temps (all_temps ftype (Obj.magic f))\n\n(** val stacked_function :\n    StmtClinear.coq_function -> StmtStacked.coq_function optErr **)\n\nlet stacked_function f =\n  let temps = allocate_fn_temps f in\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic stacked_code temps f f.StmtClinear.fn_code) (fun c ->\n    ret (Obj.magic coq_Monad_optErr) c)\n\n(** val stacked_fundef :\n    StmtClinear.coq_function -> StmtStacked.coq_function optErr **)\n\nlet stacked_fundef =\n  stacked_function\n\n(** val stacked_fundefs :\n    StmtClinear.coq_function PTree.t -> StmtStacked.coq_function PTree.t\n    optErr **)\n\nlet stacked_fundefs t0 =\n  transl_tree stacked_fundef t0\n\n(** val stacked_methods :\n    StmtClinear.coq_function option IntMap.t -> StmtStacked.coq_function\n    option IntMap.t optErr **)\n\nlet stacked_methods methods =\n  transl_map stacked_fundef methods\n\n(** val stacked_constructor :\n    StmtClinear.coq_function option -> StmtStacked.coq_function optErr **)\n\nlet stacked_constructor = function\n| Some c ->\n  bind (Obj.magic coq_Monad_optErr) (stacked_fundef c) (fun f ->\n    ret (Obj.magic coq_Monad_optErr) f)\n| None ->\n  Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), EmptyString))))))))))))))))))))))))))))))))))))))))))\n\n(** val stacked_genv : StmtClinear.genv -> genv optErr **)\n\nlet stacked_genv ge =\n  let vars = ge.Genv.genv_vars in\n  let funcs = ge.Genv.genv_funcs in\n  let methods = ge.Genv.genv_methods in\n  let defs = ge.Genv.genv_defs in\n  let fundefs = ge.Genv.genv_fundefs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic stacked_fundefs fundefs)\n    (fun fundefs0 ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic stacked_methods methoddefs)\n      (fun methoddefs0 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (Obj.magic stacked_constructor constructor) (fun constructor0 ->\n        ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n          Genv.genv_funcs = funcs; Genv.genv_methods = methods;\n          Genv.genv_defs = defs; Genv.genv_fundefs = fundefs0;\n          Genv.genv_methoddefs = methoddefs0; Genv.genv_constructor = (Some\n          constructor0) })))\n\n(** val stacked_program : StmtClinear.program -> program optErr **)\n\nlet stacked_program = function\n| Coq_pair (ge, body) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic stacked_genv ge) (fun cge ->\n    match label_functions cge.Genv.genv_fundefs with\n    | Coq_true ->\n      (match label_methods cge.Genv.genv_methoddefs with\n       | Coq_true -> ret (Obj.magic coq_Monad_optErr) (Coq_pair (cge, body))\n       | Coq_false ->\n         Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n           (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n           Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n           (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n           Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n           (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n           Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n           Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n           ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n           Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n           Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n           ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n           Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n           Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n           Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n           ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n           Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n           Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n           ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n           Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n           Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n           Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n           Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n           EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    | Coq_false ->\n      Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n"
  },
  {
    "path": "src/backend/extraction/Gen7.mli",
    "content": "open AST\nopen Ascii\nopen BinInt\nopen BinNums\nopen Cop\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen ExpStacked\nopen FramesLabelsCintptr\nopen Globalenvs\nopen Integers\nopen List0\nopen Maps0\nopen MemoryModel\nopen Monad\nopen Nat0\nopen OptErrMonad\nopen Options\nopen Semantics1\nopen StmtClinear\nopen StmtStacked\nopen String0\nopen TempModelLow\nopen Trees\n\nval stacked_expr :\n  nat PTree.t -> ExpCintptr.expr -> nat -> bool -> statement list optErr\n\nval stacked_exprs :\n  nat PTree.t -> ExpCintptr.expr list -> nat -> statement list optErr\n\nval ident_indices : nat PTree.t -> ident list -> nat -> nat list optErr\n\nval set_indices : nat list -> statement list\n\nval load_returns : nat -> statement list\n\nval optident : nat PTree.t -> ident option -> statement optErr\n\nval return_type : StmtClinear.coq_function -> coq_type\n\nval toreturn : StmtClinear.coq_function -> bool option -> ret_type\n\nval zero_stm : statement\n\nval xzero_stms : nat -> statement list\n\nval zero_stms : nat -> statement list\n\nval z_stm : coq_Z -> statement\n\nval stacked_code :\n  nat PTree.t -> StmtClinear.coq_function -> StmtClinear.code -> code optErr\n\nval allocate_temps : (ident, coq_type) prod list -> nat -> nat PTree.t\n\nval allocate_all_temps : (ident, coq_type) prod list -> nat PTree.t\n\nval allocate_fn_temps : StmtClinear.coq_function -> nat PTree.t\n\nval stacked_function :\n  StmtClinear.coq_function -> StmtStacked.coq_function optErr\n\nval stacked_fundef :\n  StmtClinear.coq_function -> StmtStacked.coq_function optErr\n\nval stacked_fundefs :\n  StmtClinear.coq_function PTree.t -> StmtStacked.coq_function PTree.t optErr\n\nval stacked_methods :\n  StmtClinear.coq_function option IntMap.t -> StmtStacked.coq_function option\n  IntMap.t optErr\n\nval stacked_constructor :\n  StmtClinear.coq_function option -> StmtStacked.coq_function optErr\n\nval stacked_genv : StmtClinear.genv -> genv optErr\n\nval stacked_program : StmtClinear.program -> program optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen8.ml",
    "content": "open AST\nopen Ascii\nopen BinNums\nopen Datatypes\nopen ExpStacked\nopen Globalenvs\nopen Integers\nopen LowValues\nopen Maps0\nopen MemoryModel\nopen Monad\nopen OptErrMonad\nopen Semantics2\nopen StmtExpressionless\nopen StmtStacked\nopen String0\nopen Trees\n\n(** val expressionless_expr : expr -> StmtExpressionless.statement **)\n\nlet expressionless_expr = function\n| Econst_int256 i -> Spush (Coq_inl (Vint i))\n| Eglob i -> Spush (Coq_inl (Vhash (Vint (Int256.repr (Zpos i)))))\n| Etempvar n -> Sdup n\n| Emload -> Smload\n| Esload -> Ssload\n| Eunop o -> Sunop o\n| Ebinop (o, s) -> Sbinop (o, s)\n| Ecall0 b -> Scall0 b\n| Ecall1 b -> Scall1 b\n\n(** val pops : nat -> StmtExpressionless.statement list **)\n\nlet rec pops = function\n| O -> Coq_nil\n| S m -> Coq_cons (StmtExpressionless.Spop, (pops m))\n\n(** val cleanup : nat -> StmtExpressionless.statement list **)\n\nlet cleanup n = match n with\n| O -> Coq_nil\n| S m -> Coq_cons ((Sswap m), (pops n))\n\n(** val expressionless_rt : ExpStacked.ret_type -> ret_type optErr **)\n\nlet expressionless_rt = function\n| Tvoid_fun -> ret (Obj.magic coq_Monad_optErr) Tfun\n| ExpStacked.Tvoid_method -> ret (Obj.magic coq_Monad_optErr) Tvoid_method\n| Terror ->\n  Error (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Tsome_fun -> ret (Obj.magic coq_Monad_optErr) Tfun\n| ExpStacked.Tsome_method -> ret (Obj.magic coq_Monad_optErr) Tsome_method\n| _ -> ret (Obj.magic coq_Monad_optErr) Tconstructor\n\n(** val fetch_args :\n    function_kind -> nat -> nat -> StmtExpressionless.statement list **)\n\nlet rec fetch_args fk count base =\n  match count with\n  | O -> Coq_nil\n  | S n ->\n    app (fetch_args fk n (S base))\n      (match fk with\n       | Coq_normalFunction ->\n         Coq_cons ((Spush (Coq_inl (Vint (call_data_arg_location base)))),\n           (Coq_cons (Scalldataload, Coq_nil)))\n       | Coq_constructorFunction ->\n         Coq_cons ((Sconstructordataload base), Coq_nil))\n\n(** val extract_lbl : typed_label -> label **)\n\nlet extract_lbl = function\n| Linternal l' -> l'\n| Lcall l' -> l'\n| Lreturn l' -> l'\n\n(** val expressionless_stm :\n    statement -> function_kind -> StmtExpressionless.statement list optErr **)\n\nlet expressionless_stm s kind =\n  match s with\n  | Sskip ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (StmtExpressionless.Sskip,\n      Coq_nil))\n  | Srvalue e ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((expressionless_expr e),\n      Coq_nil))\n  | Slvalue e ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((expressionless_expr e),\n      Coq_nil))\n  | Spushvoid ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Spush (Coq_inl Vunit)),\n      Coq_nil))\n  | Spop ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (StmtExpressionless.Spop,\n      Coq_nil))\n  | Ssassign -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Ssstore, Coq_nil))\n  | Smassign -> ret (Obj.magic coq_Monad_optErr) (Coq_cons (Smstore, Coq_nil))\n  | Sset n ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Sswap n), (Coq_cons\n      (StmtExpressionless.Spop, Coq_nil))))\n  | Sdone (n, rt) ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic expressionless_rt rt)\n      (fun rt' ->\n      ret (Obj.magic coq_Monad_optErr)\n        (app (cleanup n) (Coq_cons ((StmtExpressionless.Sdone rt'), Coq_nil))))\n  | Spushlabel l ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Spush (Coq_inr\n      (extract_lbl l))), Coq_nil))\n  | Slabel l ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((StmtExpressionless.Slabel\n      l), Coq_nil))\n  | Sjump_call ->\n    (match kind with\n     | Coq_normalFunction ->\n       ret (Obj.magic coq_Monad_optErr) (Coq_cons (Sjump, Coq_nil))\n     | Coq_constructorFunction ->\n       Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Sjump_internal ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (Sjump, Coq_nil))\n  | Sjumpi ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (StmtExpressionless.Sjumpi,\n      Coq_nil))\n  | Shash ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (StmtExpressionless.Shash,\n      Coq_nil))\n  | Stransfer ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (StmtExpressionless.Stransfer,\n      Coq_nil))\n  | Scallargs (i, a, r) ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((StmtExpressionless.Scallargs\n      (i, a, r)), Coq_nil))\n  | Scallmethod b ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons\n      ((StmtExpressionless.Scallmethod b), Coq_nil))\n  | Slog (n, m) ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons ((StmtExpressionless.Slog (n,\n      m)), Coq_nil))\n  | Srevert ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (StmtExpressionless.Srevert,\n      Coq_nil))\n  | Sfetchargs n ->\n    ret (Obj.magic coq_Monad_optErr) (Coq_cons (StmtExpressionless.Sskip,\n      (fetch_args kind n O)))\n\n(** val expressionless_code :\n    code -> function_kind -> StmtExpressionless.code optErr **)\n\nlet rec expressionless_code c kind =\n  match c with\n  | Coq_nil -> ret (Obj.magic coq_Monad_optErr) Coq_nil\n  | Coq_cons (s, rest) ->\n    bind (Obj.magic coq_Monad_optErr) (expressionless_stm s kind) (fun s' ->\n      bind (Obj.magic coq_Monad_optErr) (expressionless_code rest kind)\n        (fun rest' -> ret (Obj.magic coq_Monad_optErr) (app s' rest')))\n\n(** val expressionless_function :\n    function_kind -> coq_function -> StmtExpressionless.coq_function optErr **)\n\nlet expressionless_function kind f =\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic expressionless_code (fn_code f) kind) (fun c ->\n    ret (Obj.magic coq_Monad_optErr) c)\n\n(** val expressionless_fundefs :\n    coq_function PTree.t -> StmtExpressionless.coq_function PTree.t optErr **)\n\nlet expressionless_fundefs t0 =\n  transl_tree (expressionless_function Coq_normalFunction) t0\n\n(** val expressionless_methods :\n    coq_function option IntMap.t -> StmtExpressionless.coq_function option\n    IntMap.t optErr **)\n\nlet expressionless_methods methods =\n  transl_map (expressionless_function Coq_normalFunction) methods\n\n(** val expressionless_constructor :\n    coq_function option -> StmtExpressionless.coq_function optErr **)\n\nlet expressionless_constructor = function\n| Some c ->\n  bind (Obj.magic coq_Monad_optErr)\n    (expressionless_function Coq_constructorFunction c) (fun f ->\n    ret (Obj.magic coq_Monad_optErr) f)\n| None ->\n  Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), EmptyString))))))))))))))))))))))))))))))))))))))))))\n\n(** val expressionless_genv : genv -> StmtExpressionless.genv optErr **)\n\nlet expressionless_genv ge =\n  let vars = ge.Genv.genv_vars in\n  let funcs = ge.Genv.genv_funcs in\n  let methods = ge.Genv.genv_methods in\n  let defs = ge.Genv.genv_defs in\n  let fundefs = ge.Genv.genv_fundefs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  bind (Obj.magic coq_Monad_optErr)\n    (Obj.magic expressionless_fundefs fundefs) (fun fundefs0 ->\n    bind (Obj.magic coq_Monad_optErr)\n      (Obj.magic expressionless_methods methoddefs) (fun methoddefs0 ->\n      bind (Obj.magic coq_Monad_optErr)\n        (Obj.magic expressionless_constructor constructor)\n        (fun constructor0 ->\n        ret (Obj.magic coq_Monad_optErr) { Genv.genv_vars = vars;\n          Genv.genv_funcs = funcs; Genv.genv_methods = methods;\n          Genv.genv_defs = defs; Genv.genv_fundefs = fundefs0;\n          Genv.genv_methoddefs = methoddefs0; Genv.genv_constructor = (Some\n          constructor0) })))\n\n(** val expressionless_program :\n    program -> StmtExpressionless.program optErr **)\n\nlet expressionless_program = function\n| Coq_pair (ge, body) ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic expressionless_genv ge)\n    (fun cge ->\n    match label_verify cge with\n    | Coq_true -> ret (Obj.magic coq_Monad_optErr) (Coq_pair (cge, body))\n    | Coq_false ->\n      Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false)),\n        EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n"
  },
  {
    "path": "src/backend/extraction/Gen8.mli",
    "content": "open AST\nopen Ascii\nopen BinNums\nopen Datatypes\nopen ExpStacked\nopen Globalenvs\nopen Integers\nopen LowValues\nopen Maps0\nopen MemoryModel\nopen Monad\nopen OptErrMonad\nopen Semantics2\nopen StmtExpressionless\nopen StmtStacked\nopen String0\nopen Trees\n\nval expressionless_expr : expr -> StmtExpressionless.statement\n\nval pops : nat -> StmtExpressionless.statement list\n\nval cleanup : nat -> StmtExpressionless.statement list\n\nval expressionless_rt : ExpStacked.ret_type -> ret_type optErr\n\nval fetch_args :\n  function_kind -> nat -> nat -> StmtExpressionless.statement list\n\nval extract_lbl : typed_label -> label\n\nval expressionless_stm :\n  statement -> function_kind -> StmtExpressionless.statement list optErr\n\nval expressionless_code :\n  code -> function_kind -> StmtExpressionless.code optErr\n\nval expressionless_function :\n  function_kind -> coq_function -> StmtExpressionless.coq_function optErr\n\nval expressionless_fundefs :\n  coq_function PTree.t -> StmtExpressionless.coq_function PTree.t optErr\n\nval expressionless_methods :\n  coq_function option IntMap.t -> StmtExpressionless.coq_function option\n  IntMap.t optErr\n\nval expressionless_constructor :\n  coq_function option -> StmtExpressionless.coq_function optErr\n\nval expressionless_genv : genv -> StmtExpressionless.genv optErr\n\nval expressionless_program : program -> StmtExpressionless.program optErr\n"
  },
  {
    "path": "src/backend/extraction/Gen9.ml",
    "content": "open AST\nopen Ascii\nopen Cop\nopen Datatypes\nopen Globalenvs\nopen Integers\nopen Language\nopen List0\nopen LowValues\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Options\nopen Semantics3\nopen StackEnv\nopen StmtExpressionless\nopen String0\nopen Zpower\n\n(** val methodical_fundefs : coq_function PTree.t -> code **)\n\nlet methodical_fundefs t0 =\n  flat_map fn_code (map snd (PTree.elements t0))\n\n(** val methodical_opt_function : coq_function option -> code **)\n\nlet methodical_opt_function = function\n| Some f -> fn_code f\n| None -> Coq_nil\n\n(** val methodical_methods : coq_function option IntMap.t -> code **)\n\nlet methodical_methods methods =\n  flat_map methodical_opt_function (map snd (PTree.elements (snd methods)))\n\n(** val label_method_starts_with : coq_function -> label optErr **)\n\nlet label_method_starts_with m =\n  match fn_code m with\n  | Coq_nil ->\n    Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_false, Coq_false)),\n      EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Coq_cons (s, _) ->\n    (match s with\n     | Slabel l -> ret (Obj.magic coq_Monad_optErr) l\n     | _ ->\n       Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n         Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val sg_val : Int.int -> coq_val **)\n\nlet sg_val sg =\n  Vint (Int256.repr (Int.unsigned sg))\n\n(** val methodical_multiplexer_body :\n    Int.int list -> coq_function option IntMap.t -> code optErr **)\n\nlet rec methodical_multiplexer_body methods methoddefs =\n  match methods with\n  | Coq_nil -> ret (Obj.magic coq_Monad_optErr) Coq_nil\n  | Coq_cons (sg, rest) ->\n    bind (Obj.magic coq_Monad_optErr)\n      (methodical_multiplexer_body rest methoddefs) (fun rest' ->\n      bind (Obj.magic coq_Monad_optErr)\n        (fromOption (IntMap.get sg (Obj.magic methoddefs)) (String ((Ascii\n          (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n          Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n          (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n          (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n          Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n          Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n          Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n          ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n          Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n          Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n          Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n          Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n          EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n        (fun m ->\n        bind (Obj.magic coq_Monad_optErr)\n          (Obj.magic label_method_starts_with m) (fun l ->\n          ret (Obj.magic coq_Monad_optErr) (Coq_cons ((Sdup O), (Coq_cons\n            ((Spush (Coq_inl (sg_val sg))), (Coq_cons ((Sbinop (Oeq,\n            Coq_false)), (Coq_cons ((Spush (Coq_inr l)), (Coq_cons (Sjumpi,\n            rest')))))))))))))\n\n(** val methodical_main : program -> code optErr **)\n\nlet methodical_main p =\n  let ge = fst p in\n  let body = snd p in\n  let methods = ge.Genv.genv_methods in\n  let fundefs = ge.Genv.genv_fundefs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  bind (Obj.magic coq_Monad_optErr)\n    (methodical_multiplexer_body methods methoddefs) (fun multiplexer_body ->\n    ret (Obj.magic coq_Monad_optErr)\n      (app (methodical_opt_function constructor) (Coq_cons ((Slabel body),\n        (Coq_cons ((Spush (Coq_inl (Vint sb))), (Coq_cons ((Spush (Coq_inl\n        (Vint sp))), (Coq_cons (Smstore, (Coq_cons ((Spush (Coq_inl (Vint\n        (Int256.repr (two_power_nat sg_shift))))), (Coq_cons ((Spush z0),\n        (Coq_cons (Scalldataload, (Coq_cons ((Sbinop (Odiv, Coq_false)),\n        (app multiplexer_body (Coq_cons (Srevert,\n          (app (methodical_methods methoddefs) (methodical_fundefs fundefs)))))))))))))))))))))))\n\n(** val methodical_genv : program -> Language.genv optErr **)\n\nlet methodical_genv p =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic methodical_main p)\n    (fun main_code ->\n    let ge = fst p in\n    let body = snd p in\n    let vars = ge.Genv.genv_vars in\n    let defs = ge.Genv.genv_defs in\n    (match label_verify main_code with\n     | Coq_true ->\n       Success { genv_vars = vars; genv_defs = defs; genv_main = main_code;\n         genv_main_entrypoint = body }\n     | Coq_false ->\n       Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_true, Coq_false)),\n         EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n"
  },
  {
    "path": "src/backend/extraction/Gen9.mli",
    "content": "open AST\nopen Ascii\nopen Cop\nopen Datatypes\nopen Globalenvs\nopen Integers\nopen Language\nopen List0\nopen LowValues\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Options\nopen Semantics3\nopen StackEnv\nopen StmtExpressionless\nopen String0\nopen Zpower\n\nval methodical_fundefs : coq_function PTree.t -> code\n\nval methodical_opt_function : coq_function option -> code\n\nval methodical_methods : coq_function option IntMap.t -> code\n\nval label_method_starts_with : coq_function -> label optErr\n\nval sg_val : Int.int -> coq_val\n\nval methodical_multiplexer_body :\n  Int.int list -> coq_function option IntMap.t -> code optErr\n\nval methodical_main : program -> code optErr\n\nval methodical_genv : program -> Language.genv optErr\n"
  },
  {
    "path": "src/backend/extraction/GlobalenvCompile.ml",
    "content": "open AST\nopen Ascii\nopen BinInt\nopen BinNums\nopen Compiled\nopen Ctypes\nopen Datatypes\nopen Globalenvs\nopen Integers\nopen Language\nopen Language0\nopen List0\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Options\nopen StmCompile\nopen String0\nopen Structure\nopen Types\n\n(** val allocate_addrs :\n    ident list -> coq_Z -> coq_type PTree.t -> coq_Z PTree.t optErr **)\n\nlet rec allocate_addrs vars next_addr defs =\n  match vars with\n  | Coq_nil -> ret (Obj.magic coq_Monad_optErr) PTree.empty\n  | Coq_cons (id, rest) ->\n    bind (Obj.magic coq_Monad_optErr)\n      (fromOption (PTree.get id (Obj.magic defs)) (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n        Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))\n      (fun ty ->\n      let size = sizeof_words ty in\n      bind (Obj.magic coq_Monad_optErr)\n        (allocate_addrs rest (Z.add next_addr size) defs) (fun allocated ->\n        ret (Obj.magic coq_Monad_optErr) (PTree.set id next_addr allocated)))\n\n(** val allocations : Language.genv -> coq_Z PTree.t optErr **)\n\nlet allocations ge =\n  allocate_addrs ge.genv_vars Z0 ge.genv_defs\n\n(** val genv_compiled : Language.genv -> compiled **)\n\nlet genv_compiled ge =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic allocations ge)\n    (fun allocated ->\n    code_compiled ge.genv_main allocated ge.genv_main_entrypoint)\n\n(** val get_main_entrypoint : Language.genv -> label optErr **)\n\nlet get_main_entrypoint ge =\n  ret (Obj.magic coq_Monad_optErr) ge.genv_main_entrypoint\n\n(** val extract_funcargtype : (ident, coq_type) prod list -> valtype list **)\n\nlet rec extract_funcargtype = function\n| Coq_nil -> Coq_nil\n| Coq_cons (_, xs) -> app (Coq_cons (T_i32, Coq_nil)) (extract_funcargtype xs)\n\n(** val extract_functype : coq_function -> functype **)\n\nlet extract_functype f =\n  let frettype =\n    match f.fn_return with\n    | Tvoid -> Coq_cons (T_i32, Coq_nil)\n    | _ -> Coq_cons (T_i32, Coq_nil)\n  in\n  let fargtype = extract_funcargtype f.fn_params in FT (fargtype, frettype)\n\n(** val wasm_opt_funtype : coq_function option -> functype list **)\n\nlet wasm_opt_funtype = function\n| Some f -> Coq_cons ((extract_functype f), Coq_nil)\n| None -> Coq_nil\n\n(** val wasm_to_func : coq_function -> nat -> func **)\n\nlet wasm_to_func f type_ind =\n  { coq_F_type = type_ind; coq_F_locals = (extract_funcargtype f.fn_temps);\n    coq_F_body = f.fn_body }\n\ntype func_list_n_type = { fl : func list; ti : nat; mtypes : functype list }\n\n(** val fl : func_list_n_type -> func list **)\n\nlet fl x = x.fl\n\n(** val ti : func_list_n_type -> nat **)\n\nlet ti x = x.ti\n\n(** val mtypes : func_list_n_type -> functype list **)\n\nlet mtypes x = x.mtypes\n\n(** val wasm_opt_to_func : coq_function option -> nat -> func_list_n_type **)\n\nlet wasm_opt_to_func f type_ind =\n  match f with\n  | Some fx ->\n    { fl = (Coq_cons ((wasm_to_func fx type_ind), Coq_nil)); ti = (S\n      type_ind); mtypes = (wasm_opt_funtype f) }\n  | None -> { fl = Coq_nil; ti = type_ind; mtypes = Coq_nil }\n\n(** val construct_wasm_opt_func_list :\n    coq_function option list -> nat -> func_list_n_type **)\n\nlet rec construct_wasm_opt_func_list l type_ind =\n  match l with\n  | Coq_nil -> { fl = Coq_nil; ti = type_ind; mtypes = Coq_nil }\n  | Coq_cons (x, xs) ->\n    let tfunc = wasm_opt_to_func x type_ind in\n    let rst = construct_wasm_opt_func_list xs tfunc.ti in\n    { fl = (app tfunc.fl rst.fl); ti = rst.ti; mtypes =\n    (app tfunc.mtypes rst.mtypes) }\n\ntype method_rec = { flnt : func_list_n_type; mabi : Int.int list }\n\n(** val flnt : method_rec -> func_list_n_type **)\n\nlet flnt x = x.flnt\n\n(** val mabi : method_rec -> Int.int list **)\n\nlet mabi x = x.mabi\n\n(** val wasm_multiplexer_body :\n    Int.int list -> coq_function option IntMap.t -> nat -> method_rec **)\n\nlet rec wasm_multiplexer_body methods methoddefs type_ind =\n  match methods with\n  | Coq_nil ->\n    { flnt = { fl = Coq_nil; ti = type_ind; mtypes = Coq_nil }; mabi =\n      Coq_nil }\n  | Coq_cons (sg, rest) ->\n    let m =\n      fromOption (IntMap.get sg methoddefs) (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n        ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n        Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n        Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n        Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n        (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n        Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n        Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n        (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n        Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n        (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n        Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n        Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n        Coq_false)),\n        EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n    in\n    let nm = match m with\n             | Success mm -> Some mm\n             | Error _ -> None in\n    let tfunc = wasm_opt_to_func nm type_ind in\n    let rst = wasm_multiplexer_body rest methoddefs tfunc.ti in\n    { flnt = { fl = (app tfunc.fl rst.flnt.fl); ti = rst.flnt.ti; mtypes =\n    (app tfunc.mtypes rst.flnt.mtypes) }; mabi =\n    (app (Coq_cons (sg, Coq_nil)) rst.mabi) }\n\n(** val module_funcs :\n    genv -> ((func list, Int.int list) prod, functype list) prod **)\n\nlet module_funcs ge =\n  let methods = ge.Genv.genv_methods in\n  let fundefs = ge.Genv.genv_fundefs in\n  let methoddefs = ge.Genv.genv_methoddefs in\n  let constructor = ge.Genv.genv_constructor in\n  let constructor_func = wasm_opt_to_func constructor O in\n  let constructor_type = wasm_opt_funtype constructor in\n  let multiplexer =\n    wasm_multiplexer_body methods methoddefs constructor_func.ti\n  in\n  let func_func =\n    construct_wasm_opt_func_list\n      (map (fun x -> Some x) (map snd (PTree.elements fundefs)))\n      multiplexer.flnt.ti\n  in\n  let fd = app constructor_func.fl (app multiplexer.flnt.fl func_func.fl) in\n  let ft = app constructor_type (app multiplexer.flnt.mtypes func_func.mtypes)\n  in\n  Coq_pair ((Coq_pair (fd, multiplexer.mabi)), ft)\n\n(** val module_mems : mem list **)\n\nlet module_mems =\n  Coq_nil\n\n(** val module_imports : import list **)\n\nlet module_imports =\n  Coq_nil\n\n(** val module_exports : export list **)\n\nlet module_exports =\n  Coq_nil\n\n(** val genv_compiled_wasm :\n    genv -> ((coq_module, bool) prod, Int.int list) prod optErr **)\n\nlet genv_compiled_wasm ge =\n  let Coq_pair (p, functypes) = module_funcs ge in\n  let Coq_pair (funcs, abi) = p in\n  let m = { coq_M_types = functypes; coq_M_funcs = funcs; coq_M_tables =\n    Coq_nil; coq_M_mems = module_mems; coq_M_globals = Coq_nil; coq_M_elem =\n    Coq_nil; coq_M_data = Coq_nil; coq_M_start = None; coq_M_imports =\n    module_imports; coq_M_exports = module_exports }\n  in\n  let has_constructor =\n    match ge.Genv.genv_constructor with\n    | Some _ -> Coq_true\n    | None -> Coq_false\n  in\n  ret (Obj.magic coq_Monad_optErr) (Coq_pair ((Coq_pair (m,\n    has_constructor)), abi))\n"
  },
  {
    "path": "src/backend/extraction/GlobalenvCompile.mli",
    "content": "open AST\nopen Ascii\nopen BinInt\nopen BinNums\nopen Compiled\nopen Ctypes\nopen Datatypes\nopen Globalenvs\nopen Integers\nopen Language\nopen Language0\nopen List0\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen Options\nopen StmCompile\nopen String0\nopen Structure\nopen Types\n\nval allocate_addrs :\n  ident list -> coq_Z -> coq_type PTree.t -> coq_Z PTree.t optErr\n\nval allocations : Language.genv -> coq_Z PTree.t optErr\n\nval genv_compiled : Language.genv -> compiled\n\nval get_main_entrypoint : Language.genv -> label optErr\n\nval extract_funcargtype : (ident, coq_type) prod list -> valtype list\n\nval extract_functype : coq_function -> functype\n\nval wasm_opt_funtype : coq_function option -> functype list\n\nval wasm_to_func : coq_function -> nat -> func\n\ntype func_list_n_type = { fl : func list; ti : nat; mtypes : functype list }\n\nval fl : func_list_n_type -> func list\n\nval ti : func_list_n_type -> nat\n\nval mtypes : func_list_n_type -> functype list\n\nval wasm_opt_to_func : coq_function option -> nat -> func_list_n_type\n\nval construct_wasm_opt_func_list :\n  coq_function option list -> nat -> func_list_n_type\n\ntype method_rec = { flnt : func_list_n_type; mabi : Int.int list }\n\nval flnt : method_rec -> func_list_n_type\n\nval mabi : method_rec -> Int.int list\n\nval wasm_multiplexer_body :\n  Int.int list -> coq_function option IntMap.t -> nat -> method_rec\n\nval module_funcs :\n  genv -> ((func list, Int.int list) prod, functype list) prod\n\nval module_mems : mem list\n\nval module_imports : import list\n\nval module_exports : export list\n\nval genv_compiled_wasm :\n  genv -> ((coq_module, bool) prod, Int.int list) prod optErr\n"
  },
  {
    "path": "src/backend/extraction/Globalenvs.ml",
    "content": "open AST\nopen BinNums\nopen Datatypes\nopen Integers\nopen List0\nopen Maps0\nopen Options\nopen Specif\n\nmodule IntIndexed =\n struct\n  type t = Int.int\n\n  (** val index : Int.int -> positive **)\n\n  let index = function\n  | Z0 -> Coq_xH\n  | Zpos p -> Coq_xO p\n  | Zneg p -> Coq_xI p\n\n  (** val index_inv : positive -> Int.int **)\n\n  let index_inv = function\n  | Coq_xI p' -> Int.repr (Zneg p')\n  | Coq_xO p' -> Int.repr (Zpos p')\n  | Coq_xH -> Int.zero\n\n  (** val eq : Int.int -> Int.int -> sumbool **)\n\n  let eq =\n    Int.eq_dec\n end\n\nmodule IntMap = IMap(IntIndexed)\n\nmodule Genv =\n struct\n  type ('f, 'v) t = { genv_vars : ident list; genv_funcs : ident list;\n                      genv_methods : Int.int list; genv_defs : 'v PTree.t;\n                      genv_fundefs : 'f PTree.t;\n                      genv_methoddefs : 'f option IntMap.t;\n                      genv_constructor : 'f option }\n\n  (** val genv_vars : ('a1, 'a2) t -> ident list **)\n\n  let genv_vars x = x.genv_vars\n\n  (** val genv_funcs : ('a1, 'a2) t -> ident list **)\n\n  let genv_funcs x = x.genv_funcs\n\n  (** val genv_methods : ('a1, 'a2) t -> Int.int list **)\n\n  let genv_methods x = x.genv_methods\n\n  (** val genv_defs : ('a1, 'a2) t -> 'a2 PTree.t **)\n\n  let genv_defs x = x.genv_defs\n\n  (** val genv_fundefs : ('a1, 'a2) t -> 'a1 PTree.t **)\n\n  let genv_fundefs x = x.genv_fundefs\n\n  (** val genv_methoddefs : ('a1, 'a2) t -> 'a1 option IntMap.t **)\n\n  let genv_methoddefs x = x.genv_methoddefs\n\n  (** val genv_constructor : ('a1, 'a2) t -> 'a1 option **)\n\n  let genv_constructor x = x.genv_constructor\n\n  (** val empty_genv : ('a1, 'a2) t **)\n\n  let empty_genv =\n    { genv_vars = Coq_nil; genv_funcs = Coq_nil; genv_methods = Coq_nil;\n      genv_defs = PTree.empty; genv_fundefs = PTree.empty; genv_methoddefs =\n      (IntMap.init None); genv_constructor = None }\n\n  (** val add_genv_funcs :\n      (ident, 'a1) prod list -> ('a1, 'a2) t -> ('a1, 'a2) t **)\n\n  let rec add_genv_funcs funcs ge =\n    match funcs with\n    | Coq_nil -> ge\n    | Coq_cons (p, rest) ->\n      let Coq_pair (id, fundef) = p in\n      let r = add_genv_funcs rest ge in\n      { genv_vars = r.genv_vars; genv_funcs = (Coq_cons (id, r.genv_funcs));\n      genv_methods = r.genv_methods; genv_defs = r.genv_defs; genv_fundefs =\n      (PTree.set id fundef r.genv_fundefs); genv_methoddefs =\n      r.genv_methoddefs; genv_constructor = r.genv_constructor }\n\n  (** val add_genv_vars :\n      (ident, 'a2) prod list -> ('a1, 'a2) t -> ('a1, 'a2) t **)\n\n  let rec add_genv_vars vars ge =\n    match vars with\n    | Coq_nil -> ge\n    | Coq_cons (p, rest) ->\n      let Coq_pair (id, def) = p in\n      let r = add_genv_vars rest ge in\n      { genv_vars = (Coq_cons (id, r.genv_vars)); genv_funcs = r.genv_funcs;\n      genv_methods = r.genv_methods; genv_defs =\n      (PTree.set id def r.genv_defs); genv_fundefs = r.genv_fundefs;\n      genv_methoddefs = r.genv_methoddefs; genv_constructor =\n      r.genv_constructor }\n\n  (** val add_genv_methods :\n      (Int.int, 'a1) prod list -> ('a1, 'a2) t -> ('a1, 'a2) t **)\n\n  let rec add_genv_methods methods ge =\n    match methods with\n    | Coq_nil -> ge\n    | Coq_cons (p, rest) ->\n      let Coq_pair (sig0, fundef) = p in\n      let r = add_genv_methods rest ge in\n      { genv_vars = r.genv_vars; genv_funcs = r.genv_funcs; genv_methods =\n      (Coq_cons (sig0, r.genv_methods)); genv_defs = r.genv_defs;\n      genv_fundefs = r.genv_fundefs; genv_methoddefs =\n      (IntMap.set sig0 (Some fundef) r.genv_methoddefs); genv_constructor =\n      r.genv_constructor }\n\n  (** val add_genv_constructor :\n      'a1 option -> ('a1, 'a2) t -> ('a1, 'a2) t **)\n\n  let add_genv_constructor constructor ge =\n    { genv_vars = ge.genv_vars; genv_funcs = ge.genv_funcs; genv_methods =\n      ge.genv_methods; genv_defs = ge.genv_defs; genv_fundefs =\n      ge.genv_fundefs; genv_methoddefs = ge.genv_methoddefs;\n      genv_constructor = constructor }\n\n  (** val new_genv :\n      (ident, 'a2) prod list -> (ident, 'a1) prod list -> (Int.int, 'a1) prod\n      list -> 'a1 option -> ('a1, 'a2) t **)\n\n  let new_genv vars funcs methods constructor =\n    add_genv_constructor constructor\n      (add_genv_methods methods\n        (add_genv_funcs funcs (add_genv_vars vars empty_genv)))\n\n  (** val all_functions : ('a1, 'a2) t -> 'a1 list **)\n\n  let all_functions ge =\n    app (map snd (PTree.elements ge.genv_fundefs))\n      (flat_map optional_filter\n        (map snd (PTree.elements (snd ge.genv_methoddefs))))\n end\n"
  },
  {
    "path": "src/backend/extraction/Globalenvs.mli",
    "content": "open AST\nopen BinNums\nopen Datatypes\nopen Integers\nopen List0\nopen Maps0\nopen Options\nopen Specif\n\nmodule IntIndexed :\n sig\n  type t = Int.int\n\n  val index : Int.int -> positive\n\n  val index_inv : positive -> Int.int\n\n  val eq : Int.int -> Int.int -> sumbool\n end\n\nmodule IntMap :\n sig\n  type elt = IntIndexed.t\n\n  val elt_eq : IntIndexed.t -> IntIndexed.t -> sumbool\n\n  type 'x t = 'x PMap.t\n\n  val init : 'a1 -> ('a1, 'a1 PTree.t) prod\n\n  val get : IntIndexed.t -> 'a1 t -> 'a1\n\n  val set : IntIndexed.t -> 'a1 -> 'a1 t -> ('a1, 'a1 PTree.t) prod\n\n  val map : ('a1 -> 'a2) -> 'a1 t -> 'a2 t\n\n  val union : 'a1 t -> 'a1 t -> 'a1 t\n end\n\nmodule Genv :\n sig\n  type ('f, 'v) t = { genv_vars : ident list; genv_funcs : ident list;\n                      genv_methods : Int.int list; genv_defs : 'v PTree.t;\n                      genv_fundefs : 'f PTree.t;\n                      genv_methoddefs : 'f option IntMap.t;\n                      genv_constructor : 'f option }\n\n  val genv_vars : ('a1, 'a2) t -> ident list\n\n  val genv_funcs : ('a1, 'a2) t -> ident list\n\n  val genv_methods : ('a1, 'a2) t -> Int.int list\n\n  val genv_defs : ('a1, 'a2) t -> 'a2 PTree.t\n\n  val genv_fundefs : ('a1, 'a2) t -> 'a1 PTree.t\n\n  val genv_methoddefs : ('a1, 'a2) t -> 'a1 option IntMap.t\n\n  val genv_constructor : ('a1, 'a2) t -> 'a1 option\n\n  val empty_genv : ('a1, 'a2) t\n\n  val add_genv_funcs : (ident, 'a1) prod list -> ('a1, 'a2) t -> ('a1, 'a2) t\n\n  val add_genv_vars : (ident, 'a2) prod list -> ('a1, 'a2) t -> ('a1, 'a2) t\n\n  val add_genv_methods :\n    (Int.int, 'a1) prod list -> ('a1, 'a2) t -> ('a1, 'a2) t\n\n  val add_genv_constructor : 'a1 option -> ('a1, 'a2) t -> ('a1, 'a2) t\n\n  val new_genv :\n    (ident, 'a2) prod list -> (ident, 'a1) prod list -> (Int.int, 'a1) prod\n    list -> 'a1 option -> ('a1, 'a2) t\n\n  val all_functions : ('a1, 'a2) t -> 'a1 list\n end\n"
  },
  {
    "path": "src/backend/extraction/Glue.ml",
    "content": "open AST\nopen BinNums\nopen Datatypes\nopen EVM\nopen Gen3\nopen Gen1\nopen Gen6\nopen Gen5\nopen Gen\nopen Gen4\nopen Gen0\nopen Gen2\nopen Gen8\nopen Gen9\nopen Gen7\nopen Gen10\nopen GlobalenvCompile\nopen Integers\nopen Monad\nopen OptErrMonad\nopen StmtCGraph\nopen StmtMiniC\nopen Structure\n\n(** val full_compile_genv_wasm :\n    genv -> ((coq_module, bool) prod, Int.int list) prod optErr **)\n\nlet full_compile_genv_wasm ge =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_genv ge) (fun clike ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic clocal_genv clike)\n      (fun clocal ->\n      bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_genv clocal)\n        (fun cintptr ->\n        bind (Obj.magic coq_Monad_optErr) (Obj.magic wasm_genv cintptr)\n          (fun wasm_prog ->\n          bind (Obj.magic coq_Monad_optErr) (genv_compiled_wasm wasm_prog)\n            (fun program_n_c -> ret (Obj.magic coq_Monad_optErr) program_n_c)))))\n\n(** val optm_genv :\n    genv -> ((positive, StmtCGraph.statement) prod list, positive) prod list\n    optErr **)\n\nlet optm_genv ge =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_genv ge) (fun clike ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic clocal_genv clike)\n      (fun clocal ->\n      bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_genv clocal)\n        (fun cintptr ->\n        bind (Obj.magic coq_Monad_optErr) (Obj.magic cgraph_genv cintptr)\n          cgraph_viz)))\n\n(** val optm_clash :\n    genv -> (positive, positive list) prod list list optErr **)\n\nlet optm_clash ge =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_genv ge) (fun clike ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic clocal_genv clike)\n      (fun clocal ->\n      bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_genv clocal)\n        (fun cintptr ->\n        bind (Obj.magic coq_Monad_optErr) (Obj.magic cgraph_genv cintptr)\n          clash_viz)))\n\n(** val full_compile_genv : genv -> (evm list, label) prod optErr **)\n\nlet full_compile_genv ge =\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic clike_genv ge) (fun clike ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic clocal_genv clike)\n      (fun clocal ->\n      bind (Obj.magic coq_Monad_optErr) (Obj.magic cintptr_genv clocal)\n        (fun cintptr ->\n        bind (Obj.magic coq_Monad_optErr) (Obj.magic cgraph_genv cintptr)\n          (fun cgraph ->\n          bind (Obj.magic coq_Monad_optErr) (Obj.magic copt_genv cgraph)\n            (fun copt ->\n            bind (Obj.magic coq_Monad_optErr) (Obj.magic cbasic_genv copt)\n              (fun cbasic ->\n              bind (Obj.magic coq_Monad_optErr)\n                (Obj.magic clinear_genv cbasic) (fun clinear ->\n                bind (Obj.magic coq_Monad_optErr)\n                  (Obj.magic clabeled_program clinear) (fun clabeled ->\n                  bind (Obj.magic coq_Monad_optErr)\n                    (Obj.magic stacked_program clabeled) (fun stacked ->\n                    bind (Obj.magic coq_Monad_optErr)\n                      (Obj.magic expressionless_program stacked)\n                      (fun expressionless ->\n                      bind (Obj.magic coq_Monad_optErr)\n                        (Obj.magic methodical_genv expressionless)\n                        (fun methodical ->\n                        bind (Obj.magic coq_Monad_optErr)\n                          (Obj.magic genv_compiled methodical)\n                          (fun program ->\n                          bind (Obj.magic coq_Monad_optErr)\n                            (Obj.magic get_main_entrypoint methodical)\n                            (fun main_entrypoint ->\n                            ret (Obj.magic coq_Monad_optErr) (Coq_pair\n                              (program, main_entrypoint)))))))))))))))\n"
  },
  {
    "path": "src/backend/extraction/Glue.mli",
    "content": "open AST\nopen BinNums\nopen Datatypes\nopen EVM\nopen Gen3\nopen Gen1\nopen Gen6\nopen Gen5\nopen Gen\nopen Gen4\nopen Gen0\nopen Gen2\nopen Gen8\nopen Gen9\nopen Gen7\nopen Gen10\nopen GlobalenvCompile\nopen Integers\nopen Monad\nopen OptErrMonad\nopen StmtCGraph\nopen StmtMiniC\nopen Structure\n\nval full_compile_genv_wasm :\n  genv -> ((coq_module, bool) prod, Int.int list) prod optErr\n\nval optm_genv :\n  genv -> ((positive, StmtCGraph.statement) prod list, positive) prod list\n  optErr\n\nval optm_clash : genv -> (positive, positive list) prod list list optErr\n\nval full_compile_genv : genv -> (evm list, label) prod optErr\n"
  },
  {
    "path": "src/backend/extraction/IndexLib.ml",
    "content": "open BinNums\nopen Datatypes\nopen Integers\nopen Nat0\n\n(** val sparse_positive : positive -> positive **)\n\nlet rec sparse_positive = function\n| Coq_xI y -> Coq_xO (Coq_xI (sparse_positive y))\n| Coq_xO y -> Coq_xO (Coq_xO (sparse_positive y))\n| Coq_xH -> Coq_xO Coq_xH\n\n(** val delay_sparse : positive -> positive **)\n\nlet delay_sparse = function\n| Coq_xI r -> Coq_xI (sparse_positive r)\n| Coq_xO r -> Coq_xO (sparse_positive r)\n| Coq_xH -> Coq_xH\n\n(** val pos_measure : positive -> nat **)\n\nlet rec pos_measure = function\n| Coq_xI r -> S (pos_measure r)\n| Coq_xO r -> S (pos_measure r)\n| Coq_xH -> S O\n\n(** val pick_first : positive -> positive -> nat -> positive **)\n\nlet rec pick_first x y = function\n| O -> Coq_xH\n| S n ->\n  (match x with\n   | Coq_xI r -> Coq_xI (pick_first y r n)\n   | Coq_xO r -> Coq_xO (pick_first y r n)\n   | Coq_xH -> Coq_xI (delay_sparse y))\n\n(** val inject_positive : positive -> positive -> positive **)\n\nlet inject_positive x y =\n  pick_first x y (add (pos_measure x) (pos_measure y))\n\n(** val int32_index : Int.int -> positive **)\n\nlet int32_index = function\n| Z0 -> Coq_xH\n| Zpos p -> Coq_xO p\n| Zneg p -> Coq_xI p\n"
  },
  {
    "path": "src/backend/extraction/IndexLib.mli",
    "content": "open BinNums\nopen Datatypes\nopen Integers\nopen Nat0\n\nval sparse_positive : positive -> positive\n\nval delay_sparse : positive -> positive\n\nval pos_measure : positive -> nat\n\nval pick_first : positive -> positive -> nat -> positive\n\nval inject_positive : positive -> positive -> positive\n\nval int32_index : Int.int -> positive\n"
  },
  {
    "path": "src/backend/extraction/Int0.ml",
    "content": "open Datatypes\n\nmodule type Rep =\n sig\n  val bitwidth : nat\n end\n\nmodule Rep32 =\n struct\n  (** val bitwidth : nat **)\n\n  let bitwidth =\n    S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S O)))))))))))))))))))))))))))))))\n end\n\nmodule Rep64 =\n struct\n  (** val bitwidth : nat **)\n\n  let bitwidth =\n    S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n end\n\nmodule type S =\n sig\n  type t\n\n  val bitwidth : nat\n\n  val zero : t\n\n  val one : t\n\n  val from_nat : nat -> t\n\n  val to_nat : t -> nat\n end\n\nmodule Make =\n functor (R:Rep) ->\n struct\n  (** val bitwidth : nat **)\n\n  let bitwidth =\n    R.bitwidth\n\n  type t = nat\n\n  (** val zero : t **)\n\n  let zero =\n    O\n\n  (** val one : t **)\n\n  let one =\n    S O\n\n  (** val from_nat : nat -> t **)\n\n  let from_nat n =\n    n\n\n  (** val to_nat : t -> nat **)\n\n  let to_nat n =\n    n\n end\n\nmodule I32 = Make(Rep32)\n\nmodule I64 = Make(Rep64)\n"
  },
  {
    "path": "src/backend/extraction/Int0.mli",
    "content": "open Datatypes\n\nmodule type Rep =\n sig\n  val bitwidth : nat\n end\n\nmodule Rep32 :\n sig\n  val bitwidth : nat\n end\n\nmodule Rep64 :\n sig\n  val bitwidth : nat\n end\n\nmodule type S =\n sig\n  type t\n\n  val bitwidth : nat\n\n  val zero : t\n\n  val one : t\n\n  val from_nat : nat -> t\n\n  val to_nat : t -> nat\n end\n\nmodule Make :\n functor (R:Rep) ->\n S\n\nmodule I32 :\n sig\n  type t\n\n  val bitwidth : nat\n\n  val zero : t\n\n  val one : t\n\n  val from_nat : nat -> t\n\n  val to_nat : t -> nat\n end\n\nmodule I64 :\n sig\n  type t\n\n  val bitwidth : nat\n\n  val zero : t\n\n  val one : t\n\n  val from_nat : nat -> t\n\n  val to_nat : t -> nat\n end\n"
  },
  {
    "path": "src/backend/extraction/Integers.ml",
    "content": "open BinInt\nopen BinNums\nopen BinPos\nopen Coqlib\nopen Datatypes\nopen List0\nopen Specif\nopen Zpower\n\ntype comparison =\n| Ceq\n| Cne\n| Clt\n| Cle\n| Cgt\n| Cge\n\nmodule type WORDSIZE =\n sig\n  val wordsize : nat\n end\n\nmodule Make =\n functor (WS:WORDSIZE) ->\n struct\n  (** val wordsize : nat **)\n\n  let wordsize =\n    WS.wordsize\n\n  (** val zwordsize : coq_Z **)\n\n  let zwordsize =\n    Z.of_nat wordsize\n\n  (** val modulus : coq_Z **)\n\n  let modulus =\n    two_power_nat wordsize\n\n  (** val half_modulus : coq_Z **)\n\n  let half_modulus =\n    Z.div modulus (Zpos (Coq_xO Coq_xH))\n\n  (** val max_unsigned : coq_Z **)\n\n  let max_unsigned =\n    Z.sub modulus (Zpos Coq_xH)\n\n  (** val max_signed : coq_Z **)\n\n  let max_signed =\n    Z.sub half_modulus (Zpos Coq_xH)\n\n  (** val min_signed : coq_Z **)\n\n  let min_signed =\n    Z.opp half_modulus\n\n  type int = coq_Z\n    (* singleton inductive, whose constructor was mkint *)\n\n  (** val intval : int -> coq_Z **)\n\n  let intval i =\n    i\n\n  (** val coq_P_mod_two_p : positive -> nat -> coq_Z **)\n\n  let rec coq_P_mod_two_p p = function\n  | O -> Z0\n  | S m ->\n    (match p with\n     | Coq_xI q -> Z.succ_double (coq_P_mod_two_p q m)\n     | Coq_xO q -> Z.double (coq_P_mod_two_p q m)\n     | Coq_xH -> Zpos Coq_xH)\n\n  (** val coq_Z_mod_modulus : coq_Z -> coq_Z **)\n\n  let coq_Z_mod_modulus = function\n  | Z0 -> Z0\n  | Zpos p -> coq_P_mod_two_p p wordsize\n  | Zneg p ->\n    let r = coq_P_mod_two_p p wordsize in\n    (match zeq r Z0 with\n     | Coq_left -> Z0\n     | Coq_right -> Z.sub modulus r)\n\n  (** val unsigned : int -> coq_Z **)\n\n  let unsigned =\n    intval\n\n  (** val signed : int -> coq_Z **)\n\n  let signed n =\n    let x = unsigned n in\n    (match zlt x half_modulus with\n     | Coq_left -> x\n     | Coq_right -> Z.sub x modulus)\n\n  (** val repr : coq_Z -> int **)\n\n  let repr =\n    coq_Z_mod_modulus\n\n  (** val zero : int **)\n\n  let zero =\n    repr Z0\n\n  (** val one : int **)\n\n  let one =\n    repr (Zpos Coq_xH)\n\n  (** val mone : int **)\n\n  let mone =\n    repr (Zneg Coq_xH)\n\n  (** val iwordsize : int **)\n\n  let iwordsize =\n    repr zwordsize\n\n  (** val eq_dec : int -> int -> sumbool **)\n\n  let eq_dec =\n    zeq\n\n  (** val eq : int -> int -> bool **)\n\n  let eq x y =\n    match zeq (unsigned x) (unsigned y) with\n    | Coq_left -> Coq_true\n    | Coq_right -> Coq_false\n\n  (** val lt : int -> int -> bool **)\n\n  let lt x y =\n    match zlt (signed x) (signed y) with\n    | Coq_left -> Coq_true\n    | Coq_right -> Coq_false\n\n  (** val ltu : int -> int -> bool **)\n\n  let ltu x y =\n    match zlt (unsigned x) (unsigned y) with\n    | Coq_left -> Coq_true\n    | Coq_right -> Coq_false\n\n  (** val neg : int -> int **)\n\n  let neg x =\n    repr (Z.opp (unsigned x))\n\n  (** val add : int -> int -> int **)\n\n  let add x y =\n    repr (Z.add (unsigned x) (unsigned y))\n\n  (** val sub : int -> int -> int **)\n\n  let sub x y =\n    repr (Z.sub (unsigned x) (unsigned y))\n\n  (** val mul : int -> int -> int **)\n\n  let mul x y =\n    repr (Z.mul (unsigned x) (unsigned y))\n\n  (** val divs : int -> int -> int **)\n\n  let divs x y =\n    repr (Z.quot (signed x) (signed y))\n\n  (** val mods : int -> int -> int **)\n\n  let mods x y =\n    repr (Z.rem (signed x) (signed y))\n\n  (** val divu : int -> int -> int **)\n\n  let divu x y =\n    repr (Z.div (unsigned x) (unsigned y))\n\n  (** val modu : int -> int -> int **)\n\n  let modu x y =\n    repr (Z.modulo (unsigned x) (unsigned y))\n\n  (** val coq_and : int -> int -> int **)\n\n  let coq_and x y =\n    repr (Z.coq_land (unsigned x) (unsigned y))\n\n  (** val coq_or : int -> int -> int **)\n\n  let coq_or x y =\n    repr (Z.coq_lor (unsigned x) (unsigned y))\n\n  (** val xor : int -> int -> int **)\n\n  let xor x y =\n    repr (Z.coq_lxor (unsigned x) (unsigned y))\n\n  (** val not : int -> int **)\n\n  let not x =\n    xor x mone\n\n  (** val shl : int -> int -> int **)\n\n  let shl x y =\n    repr (Z.shiftl (unsigned x) (unsigned y))\n\n  (** val shru : int -> int -> int **)\n\n  let shru x y =\n    repr (Z.shiftr (unsigned x) (unsigned y))\n\n  (** val shr : int -> int -> int **)\n\n  let shr x y =\n    repr (Z.shiftr (signed x) (unsigned y))\n\n  (** val rol : int -> int -> int **)\n\n  let rol x y =\n    let n = Z.modulo (unsigned y) zwordsize in\n    repr\n      (Z.coq_lor (Z.shiftl (unsigned x) n)\n        (Z.shiftr (unsigned x) (Z.sub zwordsize n)))\n\n  (** val ror : int -> int -> int **)\n\n  let ror x y =\n    let n = Z.modulo (unsigned y) zwordsize in\n    repr\n      (Z.coq_lor (Z.shiftr (unsigned x) n)\n        (Z.shiftl (unsigned x) (Z.sub zwordsize n)))\n\n  (** val rolm : int -> int -> int -> int **)\n\n  let rolm x a m =\n    coq_and (rol x a) m\n\n  (** val shrx : int -> int -> int **)\n\n  let shrx x y =\n    divs x (shl one y)\n\n  (** val mulhu : int -> int -> int **)\n\n  let mulhu x y =\n    repr (Z.div (Z.mul (unsigned x) (unsigned y)) modulus)\n\n  (** val mulhs : int -> int -> int **)\n\n  let mulhs x y =\n    repr (Z.div (Z.mul (signed x) (signed y)) modulus)\n\n  (** val negative : int -> int **)\n\n  let negative x =\n    match lt x zero with\n    | Coq_true -> one\n    | Coq_false -> zero\n\n  (** val add_carry : int -> int -> int -> int **)\n\n  let add_carry x y cin =\n    match zlt (Z.add (Z.add (unsigned x) (unsigned y)) (unsigned cin)) modulus with\n    | Coq_left -> zero\n    | Coq_right -> one\n\n  (** val add_overflow : int -> int -> int -> int **)\n\n  let add_overflow x y cin =\n    let s = Z.add (Z.add (signed x) (signed y)) (signed cin) in\n    (match match proj_sumbool (zle min_signed s) with\n           | Coq_true -> proj_sumbool (zle s max_signed)\n           | Coq_false -> Coq_false with\n     | Coq_true -> zero\n     | Coq_false -> one)\n\n  (** val sub_borrow : int -> int -> int -> int **)\n\n  let sub_borrow x y bin =\n    match zlt (Z.sub (Z.sub (unsigned x) (unsigned y)) (unsigned bin)) Z0 with\n    | Coq_left -> one\n    | Coq_right -> zero\n\n  (** val sub_overflow : int -> int -> int -> int **)\n\n  let sub_overflow x y bin =\n    let s = Z.sub (Z.sub (signed x) (signed y)) (signed bin) in\n    (match match proj_sumbool (zle min_signed s) with\n           | Coq_true -> proj_sumbool (zle s max_signed)\n           | Coq_false -> Coq_false with\n     | Coq_true -> zero\n     | Coq_false -> one)\n\n  (** val shr_carry : int -> int -> int **)\n\n  let shr_carry x y =\n    match match lt x zero with\n          | Coq_true -> negb (eq (coq_and x (sub (shl one y) one)) zero)\n          | Coq_false -> Coq_false with\n    | Coq_true -> one\n    | Coq_false -> zero\n\n  (** val coq_Zshiftin : bool -> coq_Z -> coq_Z **)\n\n  let coq_Zshiftin b x =\n    match b with\n    | Coq_true -> Z.succ_double x\n    | Coq_false -> Z.double x\n\n  (** val coq_Zzero_ext : coq_Z -> coq_Z -> coq_Z **)\n\n  let coq_Zzero_ext n x =\n    Z.iter n (fun rec0 x0 -> coq_Zshiftin (Z.odd x0) (rec0 (Z.div2 x0)))\n      (fun _ -> Z0) x\n\n  (** val coq_Zsign_ext : coq_Z -> coq_Z -> coq_Z **)\n\n  let coq_Zsign_ext n x =\n    Z.iter (Z.pred n) (fun rec0 x0 ->\n      coq_Zshiftin (Z.odd x0) (rec0 (Z.div2 x0))) (fun x0 ->\n      match Z.odd x0 with\n      | Coq_true -> Zneg Coq_xH\n      | Coq_false -> Z0) x\n\n  (** val zero_ext : coq_Z -> int -> int **)\n\n  let zero_ext n x =\n    repr (coq_Zzero_ext n (unsigned x))\n\n  (** val sign_ext : coq_Z -> int -> int **)\n\n  let sign_ext n x =\n    repr (coq_Zsign_ext n (unsigned x))\n\n  (** val coq_Z_one_bits : nat -> coq_Z -> coq_Z -> coq_Z list **)\n\n  let rec coq_Z_one_bits n x i =\n    match n with\n    | O -> Coq_nil\n    | S m ->\n      (match Z.odd x with\n       | Coq_true ->\n         Coq_cons (i, (coq_Z_one_bits m (Z.div2 x) (Z.add i (Zpos Coq_xH))))\n       | Coq_false -> coq_Z_one_bits m (Z.div2 x) (Z.add i (Zpos Coq_xH)))\n\n  (** val one_bits : int -> int list **)\n\n  let one_bits x =\n    map repr (coq_Z_one_bits wordsize (unsigned x) Z0)\n\n  (** val is_power2 : int -> int option **)\n\n  let is_power2 x =\n    match coq_Z_one_bits wordsize (unsigned x) Z0 with\n    | Coq_nil -> None\n    | Coq_cons (i, l) ->\n      (match l with\n       | Coq_nil -> Some (repr i)\n       | Coq_cons (_, _) -> None)\n\n  (** val cmp : comparison -> int -> int -> bool **)\n\n  let cmp c x y =\n    match c with\n    | Ceq -> eq x y\n    | Cne -> negb (eq x y)\n    | Clt -> lt x y\n    | Cle -> negb (lt y x)\n    | Cgt -> lt y x\n    | Cge -> negb (lt x y)\n\n  (** val cmpu : comparison -> int -> int -> bool **)\n\n  let cmpu c x y =\n    match c with\n    | Ceq -> eq x y\n    | Cne -> negb (eq x y)\n    | Clt -> ltu x y\n    | Cle -> negb (ltu y x)\n    | Cgt -> ltu y x\n    | Cge -> negb (ltu x y)\n\n  (** val notbool : int -> int **)\n\n  let notbool x =\n    match eq x zero with\n    | Coq_true -> one\n    | Coq_false -> zero\n\n  (** val divmodu2 : int -> int -> int -> (int, int) prod option **)\n\n  let divmodu2 nhi nlo d =\n    match eq_dec d zero with\n    | Coq_left -> None\n    | Coq_right ->\n      let Coq_pair (q, r) =\n        Z.div_eucl (Z.add (Z.mul (unsigned nhi) modulus) (unsigned nlo))\n          (unsigned d)\n      in\n      (match zle q max_unsigned with\n       | Coq_left -> Some (Coq_pair ((repr q), (repr r)))\n       | Coq_right -> None)\n\n  (** val divmods2 : int -> int -> int -> (int, int) prod option **)\n\n  let divmods2 nhi nlo d =\n    match eq_dec d zero with\n    | Coq_left -> None\n    | Coq_right ->\n      let Coq_pair (q, r) =\n        Z.quotrem (Z.add (Z.mul (signed nhi) modulus) (unsigned nlo))\n          (signed d)\n      in\n      (match match proj_sumbool (zle min_signed q) with\n             | Coq_true -> proj_sumbool (zle q max_signed)\n             | Coq_false -> Coq_false with\n       | Coq_true -> Some (Coq_pair ((repr q), (repr r)))\n       | Coq_false -> None)\n\n  (** val testbit : int -> coq_Z -> bool **)\n\n  let testbit x i =\n    Z.testbit (unsigned x) i\n\n  (** val powerserie : coq_Z list -> coq_Z **)\n\n  let rec powerserie = function\n  | Coq_nil -> Z0\n  | Coq_cons (x, xs) -> Z.add (two_p x) (powerserie xs)\n\n  (** val int_of_one_bits : int list -> int **)\n\n  let rec int_of_one_bits = function\n  | Coq_nil -> zero\n  | Coq_cons (a, b) -> add (shl one a) (int_of_one_bits b)\n\n  (** val no_overlap : int -> coq_Z -> int -> coq_Z -> bool **)\n\n  let no_overlap ofs1 sz1 ofs2 sz2 =\n    let x1 = unsigned ofs1 in\n    let x2 = unsigned ofs2 in\n    (match match proj_sumbool (zlt (Z.add x1 sz1) modulus) with\n           | Coq_true -> proj_sumbool (zlt (Z.add x2 sz2) modulus)\n           | Coq_false -> Coq_false with\n     | Coq_true ->\n       (match proj_sumbool (zle (Z.add x1 sz1) x2) with\n        | Coq_true -> Coq_true\n        | Coq_false -> proj_sumbool (zle (Z.add x2 sz2) x1))\n     | Coq_false -> Coq_false)\n\n  (** val coq_Zsize : coq_Z -> coq_Z **)\n\n  let coq_Zsize = function\n  | Zpos p -> Zpos (Pos.size p)\n  | _ -> Z0\n\n  (** val size : int -> coq_Z **)\n\n  let size x =\n    coq_Zsize (unsigned x)\n end\n\nmodule Wordsize_32 =\n struct\n  (** val wordsize : nat **)\n\n  let wordsize =\n    S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S O)))))))))))))))))))))))))))))))\n end\n\nmodule Int = Make(Wordsize_32)\n\nmodule Wordsize_256 =\n struct\n  (** val wordsize : nat **)\n\n  let wordsize =\n    S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n end\n\nmodule Int256 = Make(Wordsize_256)\n"
  },
  {
    "path": "src/backend/extraction/Integers.mli",
    "content": "open BinInt\nopen BinNums\nopen BinPos\nopen Coqlib\nopen Datatypes\nopen List0\nopen Specif\nopen Zpower\n\ntype comparison =\n| Ceq\n| Cne\n| Clt\n| Cle\n| Cgt\n| Cge\n\nmodule type WORDSIZE =\n sig\n  val wordsize : nat\n end\n\nmodule Make :\n functor (WS:WORDSIZE) ->\n sig\n  val wordsize : nat\n\n  val zwordsize : coq_Z\n\n  val modulus : coq_Z\n\n  val half_modulus : coq_Z\n\n  val max_unsigned : coq_Z\n\n  val max_signed : coq_Z\n\n  val min_signed : coq_Z\n\n  type int = coq_Z\n    (* singleton inductive, whose constructor was mkint *)\n\n  val intval : int -> coq_Z\n\n  val coq_P_mod_two_p : positive -> nat -> coq_Z\n\n  val coq_Z_mod_modulus : coq_Z -> coq_Z\n\n  val unsigned : int -> coq_Z\n\n  val signed : int -> coq_Z\n\n  val repr : coq_Z -> int\n\n  val zero : int\n\n  val one : int\n\n  val mone : int\n\n  val iwordsize : int\n\n  val eq_dec : int -> int -> sumbool\n\n  val eq : int -> int -> bool\n\n  val lt : int -> int -> bool\n\n  val ltu : int -> int -> bool\n\n  val neg : int -> int\n\n  val add : int -> int -> int\n\n  val sub : int -> int -> int\n\n  val mul : int -> int -> int\n\n  val divs : int -> int -> int\n\n  val mods : int -> int -> int\n\n  val divu : int -> int -> int\n\n  val modu : int -> int -> int\n\n  val coq_and : int -> int -> int\n\n  val coq_or : int -> int -> int\n\n  val xor : int -> int -> int\n\n  val not : int -> int\n\n  val shl : int -> int -> int\n\n  val shru : int -> int -> int\n\n  val shr : int -> int -> int\n\n  val rol : int -> int -> int\n\n  val ror : int -> int -> int\n\n  val rolm : int -> int -> int -> int\n\n  val shrx : int -> int -> int\n\n  val mulhu : int -> int -> int\n\n  val mulhs : int -> int -> int\n\n  val negative : int -> int\n\n  val add_carry : int -> int -> int -> int\n\n  val add_overflow : int -> int -> int -> int\n\n  val sub_borrow : int -> int -> int -> int\n\n  val sub_overflow : int -> int -> int -> int\n\n  val shr_carry : int -> int -> int\n\n  val coq_Zshiftin : bool -> coq_Z -> coq_Z\n\n  val coq_Zzero_ext : coq_Z -> coq_Z -> coq_Z\n\n  val coq_Zsign_ext : coq_Z -> coq_Z -> coq_Z\n\n  val zero_ext : coq_Z -> int -> int\n\n  val sign_ext : coq_Z -> int -> int\n\n  val coq_Z_one_bits : nat -> coq_Z -> coq_Z -> coq_Z list\n\n  val one_bits : int -> int list\n\n  val is_power2 : int -> int option\n\n  val cmp : comparison -> int -> int -> bool\n\n  val cmpu : comparison -> int -> int -> bool\n\n  val notbool : int -> int\n\n  val divmodu2 : int -> int -> int -> (int, int) prod option\n\n  val divmods2 : int -> int -> int -> (int, int) prod option\n\n  val testbit : int -> coq_Z -> bool\n\n  val powerserie : coq_Z list -> coq_Z\n\n  val int_of_one_bits : int list -> int\n\n  val no_overlap : int -> coq_Z -> int -> coq_Z -> bool\n\n  val coq_Zsize : coq_Z -> coq_Z\n\n  val size : int -> coq_Z\n end\n\nmodule Wordsize_32 :\n sig\n  val wordsize : nat\n end\n\nmodule Int :\n sig\n  val wordsize : nat\n\n  val zwordsize : coq_Z\n\n  val modulus : coq_Z\n\n  val half_modulus : coq_Z\n\n  val max_unsigned : coq_Z\n\n  val max_signed : coq_Z\n\n  val min_signed : coq_Z\n\n  type int = coq_Z\n    (* singleton inductive, whose constructor was mkint *)\n\n  val intval : int -> coq_Z\n\n  val coq_P_mod_two_p : positive -> nat -> coq_Z\n\n  val coq_Z_mod_modulus : coq_Z -> coq_Z\n\n  val unsigned : int -> coq_Z\n\n  val signed : int -> coq_Z\n\n  val repr : coq_Z -> int\n\n  val zero : int\n\n  val one : int\n\n  val mone : int\n\n  val iwordsize : int\n\n  val eq_dec : int -> int -> sumbool\n\n  val eq : int -> int -> bool\n\n  val lt : int -> int -> bool\n\n  val ltu : int -> int -> bool\n\n  val neg : int -> int\n\n  val add : int -> int -> int\n\n  val sub : int -> int -> int\n\n  val mul : int -> int -> int\n\n  val divs : int -> int -> int\n\n  val mods : int -> int -> int\n\n  val divu : int -> int -> int\n\n  val modu : int -> int -> int\n\n  val coq_and : int -> int -> int\n\n  val coq_or : int -> int -> int\n\n  val xor : int -> int -> int\n\n  val not : int -> int\n\n  val shl : int -> int -> int\n\n  val shru : int -> int -> int\n\n  val shr : int -> int -> int\n\n  val rol : int -> int -> int\n\n  val ror : int -> int -> int\n\n  val rolm : int -> int -> int -> int\n\n  val shrx : int -> int -> int\n\n  val mulhu : int -> int -> int\n\n  val mulhs : int -> int -> int\n\n  val negative : int -> int\n\n  val add_carry : int -> int -> int -> int\n\n  val add_overflow : int -> int -> int -> int\n\n  val sub_borrow : int -> int -> int -> int\n\n  val sub_overflow : int -> int -> int -> int\n\n  val shr_carry : int -> int -> int\n\n  val coq_Zshiftin : bool -> coq_Z -> coq_Z\n\n  val coq_Zzero_ext : coq_Z -> coq_Z -> coq_Z\n\n  val coq_Zsign_ext : coq_Z -> coq_Z -> coq_Z\n\n  val zero_ext : coq_Z -> int -> int\n\n  val sign_ext : coq_Z -> int -> int\n\n  val coq_Z_one_bits : nat -> coq_Z -> coq_Z -> coq_Z list\n\n  val one_bits : int -> int list\n\n  val is_power2 : int -> int option\n\n  val cmp : comparison -> int -> int -> bool\n\n  val cmpu : comparison -> int -> int -> bool\n\n  val notbool : int -> int\n\n  val divmodu2 : int -> int -> int -> (int, int) prod option\n\n  val divmods2 : int -> int -> int -> (int, int) prod option\n\n  val testbit : int -> coq_Z -> bool\n\n  val powerserie : coq_Z list -> coq_Z\n\n  val int_of_one_bits : int list -> int\n\n  val no_overlap : int -> coq_Z -> int -> coq_Z -> bool\n\n  val coq_Zsize : coq_Z -> coq_Z\n\n  val size : int -> coq_Z\n end\n\nmodule Wordsize_256 :\n sig\n  val wordsize : nat\n end\n\nmodule Int256 :\n sig\n  val wordsize : nat\n\n  val zwordsize : coq_Z\n\n  val modulus : coq_Z\n\n  val half_modulus : coq_Z\n\n  val max_unsigned : coq_Z\n\n  val max_signed : coq_Z\n\n  val min_signed : coq_Z\n\n  type int = coq_Z\n    (* singleton inductive, whose constructor was mkint *)\n\n  val intval : int -> coq_Z\n\n  val coq_P_mod_two_p : positive -> nat -> coq_Z\n\n  val coq_Z_mod_modulus : coq_Z -> coq_Z\n\n  val unsigned : int -> coq_Z\n\n  val signed : int -> coq_Z\n\n  val repr : coq_Z -> int\n\n  val zero : int\n\n  val one : int\n\n  val mone : int\n\n  val iwordsize : int\n\n  val eq_dec : int -> int -> sumbool\n\n  val eq : int -> int -> bool\n\n  val lt : int -> int -> bool\n\n  val ltu : int -> int -> bool\n\n  val neg : int -> int\n\n  val add : int -> int -> int\n\n  val sub : int -> int -> int\n\n  val mul : int -> int -> int\n\n  val divs : int -> int -> int\n\n  val mods : int -> int -> int\n\n  val divu : int -> int -> int\n\n  val modu : int -> int -> int\n\n  val coq_and : int -> int -> int\n\n  val coq_or : int -> int -> int\n\n  val xor : int -> int -> int\n\n  val not : int -> int\n\n  val shl : int -> int -> int\n\n  val shru : int -> int -> int\n\n  val shr : int -> int -> int\n\n  val rol : int -> int -> int\n\n  val ror : int -> int -> int\n\n  val rolm : int -> int -> int -> int\n\n  val shrx : int -> int -> int\n\n  val mulhu : int -> int -> int\n\n  val mulhs : int -> int -> int\n\n  val negative : int -> int\n\n  val add_carry : int -> int -> int -> int\n\n  val add_overflow : int -> int -> int -> int\n\n  val sub_borrow : int -> int -> int -> int\n\n  val sub_overflow : int -> int -> int -> int\n\n  val shr_carry : int -> int -> int\n\n  val coq_Zshiftin : bool -> coq_Z -> coq_Z\n\n  val coq_Zzero_ext : coq_Z -> coq_Z -> coq_Z\n\n  val coq_Zsign_ext : coq_Z -> coq_Z -> coq_Z\n\n  val zero_ext : coq_Z -> int -> int\n\n  val sign_ext : coq_Z -> int -> int\n\n  val coq_Z_one_bits : nat -> coq_Z -> coq_Z -> coq_Z list\n\n  val one_bits : int -> int list\n\n  val is_power2 : int -> int option\n\n  val cmp : comparison -> int -> int -> bool\n\n  val cmpu : comparison -> int -> int -> bool\n\n  val notbool : int -> int\n\n  val divmodu2 : int -> int -> int -> (int, int) prod option\n\n  val divmods2 : int -> int -> int -> (int, int) prod option\n\n  val testbit : int -> coq_Z -> bool\n\n  val powerserie : coq_Z list -> coq_Z\n\n  val int_of_one_bits : int list -> int\n\n  val no_overlap : int -> coq_Z -> int -> coq_Z -> bool\n\n  val coq_Zsize : coq_Z -> coq_Z\n\n  val size : int -> coq_Z\n end\n"
  },
  {
    "path": "src/backend/extraction/Labels.ml",
    "content": "open AST\nopen Ascii\nopen BinNums\nopen BinPos\nopen Datatypes\nopen IndexLib\nopen Integers\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen OptionMonad\nopen Options\nopen Specif\nopen String0\n\ntype label_map = { lm_map : label PTree.t; lm_max : label }\n\n(** val lm_map : label_map -> label PTree.t **)\n\nlet lm_map x = x.lm_map\n\n(** val lm_max : label_map -> label **)\n\nlet lm_max x = x.lm_max\n\n(** val allocate_label : positive -> label_map -> label_map **)\n\nlet allocate_label n base =\n  let max = base.lm_max in\n  let new_label = Pos.succ max in\n  let m = base.lm_map in\n  { lm_map = (PTree.set n new_label m); lm_max = new_label }\n\n(** val xallocate_labels : label list -> label_map -> label_map **)\n\nlet rec xallocate_labels elts base =\n  match elts with\n  | Coq_nil -> base\n  | Coq_cons (n, rest) ->\n    let allocate_rest = xallocate_labels rest base in\n    allocate_label n allocate_rest\n\n(** val empty_label_map : label_map **)\n\nlet empty_label_map =\n  { lm_map = PTree.empty; lm_max = Coq_xH }\n\ntype fd_label =\n| Lfun of label\n| Lconstructor\n| Lmethod of Int.int\n| Lmultiplexer of Int.int\n| Lbody\n\ntype node_label =\n| Lfun_node of label * label * positive\n| Lconstructor_node of label * positive\n| Lmethod_node of Int.int * label * positive\n\ntype label_type = (fd_label, node_label) sum\n\n(** val node_within' : fd_label -> label -> positive -> label_type **)\n\nlet node_within' lt n p =\n  Coq_inr\n    (match lt with\n     | Lfun f -> Lfun_node (f, n, p)\n     | Lmethod i -> Lmethod_node (i, n, p)\n     | Lmultiplexer i -> Lmethod_node (i, n, p)\n     | _ -> Lconstructor_node (n, p))\n\n(** val node_within : fd_label -> label -> label_type **)\n\nlet node_within lt n =\n  node_within' lt n Coq_xH\n\n(** val call_node_within : fd_label -> label -> label_type **)\n\nlet call_node_within lt n =\n  node_within' lt n (Coq_xO Coq_xH)\n\n(** val key : label_type -> positive **)\n\nlet key = function\n| Coq_inl f0 ->\n  (match f0 with\n   | Lfun f ->\n     inject_positive (inject_positive Coq_xH Coq_xH)\n       (inject_positive Coq_xH f)\n   | Lconstructor ->\n     inject_positive (inject_positive Coq_xH Coq_xH)\n       (inject_positive (Coq_xI Coq_xH) Coq_xH)\n   | Lmethod i ->\n     inject_positive (inject_positive Coq_xH Coq_xH)\n       (inject_positive (Coq_xI (Coq_xO Coq_xH)) (int32_index i))\n   | Lmultiplexer i ->\n     inject_positive (inject_positive Coq_xH Coq_xH)\n       (inject_positive (Coq_xI (Coq_xI Coq_xH)) (int32_index i))\n   | Lbody ->\n     inject_positive (inject_positive Coq_xH Coq_xH)\n       (inject_positive (Coq_xO (Coq_xO (Coq_xO Coq_xH))) Coq_xH))\n| Coq_inr n0 ->\n  (match n0 with\n   | Lfun_node (f, n, p) ->\n     inject_positive (inject_positive n p) (inject_positive (Coq_xO Coq_xH) f)\n   | Lconstructor_node (n, p) ->\n     inject_positive (inject_positive n p)\n       (inject_positive (Coq_xO (Coq_xO Coq_xH)) Coq_xH)\n   | Lmethod_node (i, n, p) ->\n     inject_positive (inject_positive n p)\n       (inject_positive (Coq_xO (Coq_xI Coq_xH)) (int32_index i)))\n\n(** val label_key : label_map -> label_type -> label optErr **)\n\nlet label_key lm lt =\n  fromOption (PTree.get (key lt) lm.lm_map) (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), EmptyString))))))))))))))))))))))))))))))\n\n(** val elt_key : fd_label -> label -> positive **)\n\nlet elt_key fn x =\n  key (node_within fn x)\n\n(** val call_elt_key : fd_label -> label -> positive **)\n\nlet call_elt_key fn x =\n  key (call_node_within fn x)\n\n(** val labels_no_dups : label list -> coq_unit PTree.t option **)\n\nlet rec labels_no_dups = function\n| Coq_nil -> Some PTree.empty\n| Coq_cons (lbl, rest) ->\n  bind (Obj.magic coq_Monad_option) (labels_no_dups rest)\n    (fun rest_no_dups ->\n    match PTree.get lbl rest_no_dups with\n    | Some _ -> None\n    | None -> Some (PTree.set lbl Coq_tt rest_no_dups))\n\n(** val label_norepet_dec : label list -> sumbool **)\n\nlet label_norepet_dec labels =\n  let tree = labels_no_dups labels in\n  (match tree with\n   | Some _ -> Coq_left\n   | None -> Coq_right)\n\n(** val decide_label_norepet : label list -> bool **)\n\nlet decide_label_norepet labels =\n  match label_norepet_dec labels with\n  | Coq_left -> Coq_true\n  | Coq_right -> Coq_false\n"
  },
  {
    "path": "src/backend/extraction/Labels.mli",
    "content": "open AST\nopen Ascii\nopen BinNums\nopen BinPos\nopen Datatypes\nopen IndexLib\nopen Integers\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen OptionMonad\nopen Options\nopen Specif\nopen String0\n\ntype label_map = { lm_map : label PTree.t; lm_max : label }\n\nval lm_map : label_map -> label PTree.t\n\nval lm_max : label_map -> label\n\nval allocate_label : positive -> label_map -> label_map\n\nval xallocate_labels : label list -> label_map -> label_map\n\nval empty_label_map : label_map\n\ntype fd_label =\n| Lfun of label\n| Lconstructor\n| Lmethod of Int.int\n| Lmultiplexer of Int.int\n| Lbody\n\ntype node_label =\n| Lfun_node of label * label * positive\n| Lconstructor_node of label * positive\n| Lmethod_node of Int.int * label * positive\n\ntype label_type = (fd_label, node_label) sum\n\nval node_within' : fd_label -> label -> positive -> label_type\n\nval node_within : fd_label -> label -> label_type\n\nval call_node_within : fd_label -> label -> label_type\n\nval key : label_type -> positive\n\nval label_key : label_map -> label_type -> label optErr\n\nval elt_key : fd_label -> label -> positive\n\nval call_elt_key : fd_label -> label -> positive\n\nval labels_no_dups : label list -> coq_unit PTree.t option\n\nval label_norepet_dec : label list -> sumbool\n\nval decide_label_norepet : label list -> bool\n"
  },
  {
    "path": "src/backend/extraction/Language.ml",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen Maps0\nopen StmtExpressionless\n\ntype genv = { genv_vars : ident list; genv_defs : coq_type PTree.t;\n              genv_main : code; genv_main_entrypoint : label }\n\n(** val genv_vars : genv -> ident list **)\n\nlet genv_vars x = x.genv_vars\n\n(** val genv_defs : genv -> coq_type PTree.t **)\n\nlet genv_defs x = x.genv_defs\n\n(** val genv_main : genv -> code **)\n\nlet genv_main x = x.genv_main\n\n(** val genv_main_entrypoint : genv -> label **)\n\nlet genv_main_entrypoint x = x.genv_main_entrypoint\n"
  },
  {
    "path": "src/backend/extraction/Language.mli",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen Maps0\nopen StmtExpressionless\n\ntype genv = { genv_vars : ident list; genv_defs : coq_type PTree.t;\n              genv_main : code; genv_main_entrypoint : label }\n\nval genv_vars : genv -> ident list\n\nval genv_defs : genv -> coq_type PTree.t\n\nval genv_main : genv -> code\n\nval genv_main_entrypoint : genv -> label\n"
  },
  {
    "path": "src/backend/extraction/Language0.ml",
    "content": "open AST\nopen Ascii\nopen Ctypes\nopen Datatypes\nopen Decimal\nopen Globalenvs\nopen MachineModel\nopen Nat0\nopen OptErrMonad\nopen String0\nopen Structure\nopen Values\n\nlet __ = let rec f _ = Obj.repr f in Obj.repr f\n\ntype instrs = instr list\n\n(** val eei_revert_output_data_length : nat **)\n\nlet eei_revert_output_data_length =\n  O\n\n(** val pre_compiled_data_size : nat **)\n\nlet pre_compiled_data_size =\n  O\n\n(** val default_gas_limit : nat **)\n\nlet default_gas_limit =\n  of_uint (D1 (D0 (D0 (D0 (D0 Nil)))))\n\ntype eei_mem_offset =\n| Coq_addressOffset\n| Coq_dataOffset\n| Coq_valueOffset\n| Coq_resultOffset\n| Coq_pathOffset\n| Coq_topic1Offset\n| Coq_topic2Offset\n| Coq_topic3Offset\n| Coq_topic4Offset\n\ntype eei_wasm =\n| Coq_eei_getAddress\n| Coq_eei_getBalance\n| Coq_eei_getBlockHash\n| Coq_eei_call\n| Coq_eei_callDataCopy\n| Coq_eei_getCallDataSize\n| Coq_eei_callCode\n| Coq_eei_callDelegate\n| Coq_eei_storageStore\n| Coq_eei_storageLoad\n| Coq_eei_getCaller\n| Coq_eei_getCallValue\n| Coq_eei_codeCopy\n| Coq_eei_getCodeSize\n| Coq_eei_getBlockCoinbase\n| Coq_eei_create\n| Coq_eei_getBlockDifficulty\n| Coq_eei_externalCodeCopy\n| Coq_eei_getExternalCodeSize\n| Coq_eei_getGasLeft\n| Coq_eei_getBlockGasLimit\n| Coq_eei_getTxGasPrice\n| Coq_eei_log\n| Coq_eei_getBlockNumber\n| Coq_eei_getTxOrigin\n| Coq_eei_useGas\n| Coq_eei_selfDestruct\n| Coq_eei_getBlockTimestamp\n| Coq_eei_revert\n| Coq_eei_getReturnDataSize\n| Coq_eei_returnDataCopy\n\ntype aux_func =\n| Coq_aux_pow\n| Coq_aux_sha1\n| Coq_aux_sha2\n| Coq_aux_sha3\n| Coq_aux_notint\n\n(** val scratch_global_idx : nat **)\n\nlet scratch_global_idx =\n  O\n\n(** val scratch_global_idx1 : nat **)\n\nlet scratch_global_idx1 =\n  S O\n\n(** val scratch_global_idx2 : nat **)\n\nlet scratch_global_idx2 =\n  S (S O)\n\n(** val system_contract_keccak256 : nat **)\n\nlet system_contract_keccak256 =\n  S (S (S (S (S (S (S (S (S O))))))))\n\n(** val get_idx_eei_mem_offset : eei_mem_offset -> nat **)\n\nlet get_idx_eei_mem_offset o =\n  tail_add pre_compiled_data_size\n    (match o with\n     | Coq_addressOffset -> O\n     | Coq_dataOffset ->\n       S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S\n         O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n     | Coq_valueOffset ->\n       S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S\n         O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n     | Coq_resultOffset ->\n       S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S\n         O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n     | Coq_pathOffset ->\n       S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S\n         O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n     | Coq_topic1Offset ->\n       S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n     | Coq_topic2Offset ->\n       S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n     | Coq_topic3Offset ->\n       S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n     | Coq_topic4Offset ->\n       S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n         O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val get_idx_aux : aux_func -> nat **)\n\nlet get_idx_aux = function\n| Coq_aux_pow ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S\n    O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Coq_aux_sha1 ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S\n    O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Coq_aux_sha2 ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S\n    O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Coq_aux_sha3 ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S\n    O))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Coq_aux_notint ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S\n    O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val get_idx_eei : eei_wasm -> nat **)\n\nlet get_idx_eei = function\n| Coq_eei_getAddress -> O\n| Coq_eei_getBalance -> S O\n| Coq_eei_getBlockHash -> S (S O)\n| Coq_eei_call -> S (S (S O))\n| Coq_eei_callDataCopy -> S (S (S (S O)))\n| Coq_eei_getCallDataSize -> S (S (S (S (S O))))\n| Coq_eei_callCode -> S (S (S (S (S (S O)))))\n| Coq_eei_callDelegate -> S (S (S (S (S (S (S O))))))\n| Coq_eei_storageStore -> S (S (S (S (S (S (S (S O)))))))\n| Coq_eei_storageLoad -> S (S (S (S (S (S (S (S (S O))))))))\n| Coq_eei_getCaller -> S (S (S (S (S (S (S (S (S (S O)))))))))\n| Coq_eei_getCallValue -> S (S (S (S (S (S (S (S (S (S (S O))))))))))\n| Coq_eei_codeCopy -> S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))\n| Coq_eei_getCodeSize -> S (S (S (S (S (S (S (S (S (S (S (S (S O))))))))))))\n| Coq_eei_getBlockCoinbase ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))\n| Coq_eei_create ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O))))))))))))))\n| Coq_eei_getBlockDifficulty ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))))\n| Coq_eei_externalCodeCopy ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O))))))))))))))))\n| Coq_eei_getExternalCodeSize ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))))))\n| Coq_eei_getGasLeft ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O))))))))))))))))))\n| Coq_eei_getBlockGasLimit ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    O)))))))))))))))))))\n| Coq_eei_getTxGasPrice ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    O))))))))))))))))))))\n| Coq_eei_log ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    O)))))))))))))))))))))\n| Coq_eei_getBlockNumber ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    O))))))))))))))))))))))\n| Coq_eei_getTxOrigin ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    O)))))))))))))))))))))))\n| Coq_eei_useGas ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    O))))))))))))))))))))))))\n| Coq_eei_selfDestruct ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S O)))))))))))))))))))))))))\n| Coq_eei_getBlockTimestamp ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S O))))))))))))))))))))))))))\n| Coq_eei_revert ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S O)))))))))))))))))))))))))))\n| Coq_eei_getReturnDataSize ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S O))))))))))))))))))))))))))))\n| Coq_eei_returnDataCopy ->\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S O)))))))))))))))))))))))))))))\n\n(** val set_len : nat -> nat -> instr list **)\n\nlet rec set_len offset len = match len with\n| O -> Coq_nil\n| S x ->\n  Coq_cons ((Global_set scratch_global_idx), (Coq_cons ((Const_nat\n    (add offset (mul (sub len (S O)) (S (S (S (S O))))))), (Coq_cons\n    ((Global_get scratch_global_idx), (Coq_cons ((Memop (Coq_i32\n    IOp32.Store)), (set_len offset x))))))))\n\n(** val set_len_hash : nat -> instr list **)\n\nlet rec set_len_hash len = match len with\n| O -> Coq_nil\n| S x ->\n  Coq_cons ((Global_set scratch_global_idx), (Coq_cons ((Global_get\n    scratch_global_idx2), (Coq_cons ((Const_nat\n    (mul (sub len (S O)) (S (S (S (S O)))))), (Coq_cons ((Binop (Coq_i32\n    IOp32.Add)), (Coq_cons ((Global_get scratch_global_idx), (Coq_cons\n    ((Memop (Coq_i32 IOp32.Store)), (set_len_hash x))))))))))))\n\n(** val store_len : instr list -> nat -> instr list **)\n\nlet store_len dest len =\n  app dest\n    (app (Coq_cons ((Global_set scratch_global_idx2), Coq_nil))\n      (set_len_hash len))\n\n(** val set_eeiOffset : instr list -> eei_mem_offset -> nat -> instr list **)\n\nlet set_eeiOffset e o length =\n  app e (set_len (get_idx_eei_mem_offset o) length)\n\n(** val load_len : nat -> nat -> instr list **)\n\nlet rec load_len offset len = match len with\n| O -> Coq_nil\n| S x ->\n  Coq_cons ((Const_nat (sub offset (mul len (S (S (S (S O))))))), (Coq_cons\n    ((Memop (Coq_i32 IOp32.Load)), (load_len offset x))))\n\n(** val load_len_hash : nat -> instr list **)\n\nlet rec load_len_hash len = match len with\n| O -> Coq_nil\n| S x ->\n  Coq_cons ((Global_get scratch_global_idx2), (Coq_cons ((Const_nat\n    (mul len (S (S (S (S O)))))), (Coq_cons ((Binop (Coq_i32 IOp32.Sub)),\n    (Coq_cons ((Memop (Coq_i32 IOp32.Load)), (load_len_hash x))))))))\n\n(** val load_resultOffset : nat -> instr list **)\n\nlet load_resultOffset length =\n  load_len\n    (add (get_idx_eei_mem_offset Coq_resultOffset)\n      (mul length (S (S (S (S O)))))) length\n\n(** val wasm_builtin0 : builtin0 -> instr list optErr **)\n\nlet wasm_builtin0 = function\n| Baddress ->\n  Success\n    (app (Coq_cons ((Const_nat (get_idx_eei_mem_offset Coq_resultOffset)),\n      (Coq_cons ((Call (get_idx_eei Coq_eei_getAddress)), Coq_nil))))\n      (load_resultOffset (S O)))\n| Borigin ->\n  Success\n    (app (Coq_cons ((Const_nat (get_idx_eei_mem_offset Coq_resultOffset)),\n      (Coq_cons ((Call (get_idx_eei Coq_eei_getTxOrigin)), Coq_nil))))\n      (load_resultOffset (S O)))\n| Bcaller ->\n  Success\n    (app (Coq_cons ((Const_nat (get_idx_eei_mem_offset Coq_resultOffset)),\n      (Coq_cons ((Call (get_idx_eei Coq_eei_getCaller)), Coq_nil))))\n      (load_resultOffset (S O)))\n| Bcallvalue ->\n  Success (Coq_cons ((Const_nat (get_idx_eei_mem_offset Coq_resultOffset)),\n    (Coq_cons ((Call (get_idx_eei Coq_eei_getCallValue)),\n    (load_resultOffset (S O))))))\n| Bcoinbase ->\n  Success\n    (app (Coq_cons ((Const_nat (get_idx_eei_mem_offset Coq_resultOffset)),\n      (Coq_cons ((Call (get_idx_eei Coq_eei_getBlockCoinbase)), Coq_nil))))\n      (load_resultOffset (S O)))\n| Btimestamp ->\n  Success (Coq_cons ((Call (get_idx_eei Coq_eei_getBlockTimestamp)),\n    (Coq_cons ((Cvtop (Coq_i32 IOp32.Wrap_i64)), Coq_nil))))\n| Bnumber ->\n  Success (Coq_cons ((Call (get_idx_eei Coq_eei_getBlockNumber)), (Coq_cons\n    ((Cvtop (Coq_i32 IOp32.Wrap_i64)), Coq_nil))))\n| Bchainid ->\n  Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))\n| Bselfbalance ->\n  Error (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n    Coq_true, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val wasm_builtin1 : builtin1 -> instr list **)\n\nlet wasm_builtin1 = function\n| Bbalance ->\n  app (set_eeiOffset Coq_nil Coq_addressOffset (S O))\n    (app (Coq_cons ((Const_nat (get_idx_eei_mem_offset Coq_addressOffset)),\n      (Coq_cons ((Const_nat (get_idx_eei_mem_offset Coq_resultOffset)),\n      (Coq_cons ((Call (get_idx_eei Coq_eei_getBalance)), Coq_nil))))))\n      (load_resultOffset (S O)))\n| Bblockhash ->\n  app (Coq_cons ((Cvtop (Coq_i32 (IOp32.Extend_i32 Unsigned))), (Coq_cons\n    ((Const_nat (get_idx_eei_mem_offset Coq_resultOffset)), (Coq_cons ((Call\n    (get_idx_eei Coq_eei_getBlockHash)), (Coq_cons ((Testop (Coq_i32 __)),\n    (Coq_cons ((Global_set scratch_global_idx), Coq_nil))))))))))\n    (app (load_resultOffset (S O)) (Coq_cons ((Const_nat O), (Coq_cons\n      ((Global_get scratch_global_idx), (Coq_cons (Select, Coq_nil)))))))\n\n(** val callExternalSha256TwoParam : instr list **)\n\nlet callExternalSha256TwoParam =\n  Coq_cons ((Global_set scratch_global_idx), (Coq_cons ((Global_set\n    scratch_global_idx1), (Coq_cons ((Const_nat\n    (get_idx_eei_mem_offset Coq_addressOffset)), (Coq_cons ((Const_nat\n    system_contract_keccak256), (Coq_cons ((Memop (Coq_i32 IOp32.Store)),\n    (Coq_cons ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_addressOffset) (S (S (S (S O)))))),\n    (Coq_cons ((Const_nat O), (Coq_cons ((Memop (Coq_i32 IOp32.Store)),\n    (Coq_cons ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_addressOffset) (S (S (S (S (S (S (S (S\n      O)))))))))), (Coq_cons ((Const_nat O), (Coq_cons ((Memop (Coq_i32\n    IOp32.Store)), (Coq_cons ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_addressOffset) (S (S (S (S (S (S (S (S\n      (S (S (S (S O)))))))))))))), (Coq_cons ((Const_nat O), (Coq_cons\n    ((Memop (Coq_i32 IOp32.Store)), (Coq_cons ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_addressOffset) (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S O)))))))))))))))))), (Coq_cons ((Const_nat O),\n    (Coq_cons ((Memop (Coq_i32 IOp32.Store)), (Coq_cons ((Const_nat\n    (get_idx_eei_mem_offset Coq_valueOffset)), (Coq_cons ((Const_nat O),\n    (Coq_cons ((Memop (Coq_i32 IOp32.Store)), (Coq_cons ((Const_nat\n    (get_idx_eei_mem_offset Coq_dataOffset)), (Coq_cons ((Global_get\n    scratch_global_idx), (Coq_cons ((Memop (Coq_i32 IOp32.Store)), (Coq_cons\n    ((Const_nat\n    (tail_add (get_idx_eei_mem_offset Coq_dataOffset) (S (S (S (S O)))))),\n    (Coq_cons ((Global_get scratch_global_idx1), (Coq_cons ((Memop (Coq_i32\n    IOp32.Store)), (Coq_cons ((Const_nat default_gas_limit), (Coq_cons\n    ((Cvtop (Coq_i32 (IOp32.Extend_i32 Unsigned))), (Coq_cons ((Const_nat\n    (get_idx_eei_mem_offset Coq_addressOffset)), (Coq_cons ((Const_nat\n    (get_idx_eei_mem_offset Coq_valueOffset)), (Coq_cons ((Const_nat\n    (get_idx_eei_mem_offset Coq_dataOffset)), (Coq_cons ((Const_nat (S (S (S\n    (S (S (S (S (S O))))))))), (Coq_cons ((Call (get_idx_eei Coq_eei_call)),\n    (Coq_cons (Drop, (Coq_cons ((Const_nat\n    (get_idx_eei_mem_offset Coq_resultOffset)), (Coq_cons ((Const_nat O),\n    (Coq_cons ((Call (get_idx_eei Coq_eei_getReturnDataSize)), (Coq_cons\n    ((Call (get_idx_eei Coq_eei_returnDataCopy)), (Coq_cons ((Const_nat\n    (get_idx_eei_mem_offset Coq_resultOffset)), (Coq_cons ((Memop (Coq_i32\n    IOp32.Load)), (Coq_cons ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_resultOffset) (S (S (S (S O)))))),\n    (Coq_cons ((Memop (Coq_i32 IOp32.Load)), (Coq_cons ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_resultOffset) (S (S (S (S (S (S (S (S\n      O)))))))))), (Coq_cons ((Memop (Coq_i32 IOp32.Load)), (Coq_cons\n    ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_resultOffset) (S (S (S (S (S (S (S (S (S\n      (S (S (S O)))))))))))))), (Coq_cons ((Memop (Coq_i32 IOp32.Load)),\n    (Coq_cons ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_resultOffset) (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S O)))))))))))))))))), (Coq_cons ((Memop (Coq_i32\n    IOp32.Load)), (Coq_cons ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_resultOffset) (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))))))))))), (Coq_cons\n    ((Memop (Coq_i32 IOp32.Load)), (Coq_cons ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_resultOffset) (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))))))))))))))),\n    (Coq_cons ((Memop (Coq_i32 IOp32.Load)), (Coq_cons ((Const_nat\n    (add (get_idx_eei_mem_offset Coq_resultOffset) (S (S (S (S (S (S (S (S (S\n      (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n      O)))))))))))))))))))))))))))))), (Coq_cons ((Memop (Coq_i32\n    IOp32.Load)),\n    Coq_nil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val storeLogArgs : nat -> instrs **)\n\nlet rec storeLogArgs argsn = match argsn with\n| O -> Coq_nil\n| S x ->\n  app (Coq_cons ((Global_set scratch_global_idx), (Coq_cons ((Const_nat\n    (sub\n      (tail_add (get_idx_eei_mem_offset Coq_dataOffset)\n        (mul argsn (S (S (S (S O)))))) (S (S (S (S O)))))), (Coq_cons\n    ((Global_get scratch_global_idx), (Coq_cons ((Memop (Coq_i32\n    IOp32.Store)), Coq_nil)))))))) (storeLogArgs x)\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_body : instrs }\n\n(** val fn_return : coq_function -> coq_type **)\n\nlet fn_return x = x.fn_return\n\n(** val fn_params : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_params x = x.fn_params\n\n(** val fn_temps : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_temps x = x.fn_temps\n\n(** val fn_body : coq_function -> instrs **)\n\nlet fn_body x = x.fn_body\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/Language0.mli",
    "content": "open AST\nopen Ascii\nopen Ctypes\nopen Datatypes\nopen Decimal\nopen Globalenvs\nopen MachineModel\nopen Nat0\nopen OptErrMonad\nopen String0\nopen Structure\nopen Values\n\ntype instrs = instr list\n\nval eei_revert_output_data_length : nat\n\nval pre_compiled_data_size : nat\n\nval default_gas_limit : nat\n\ntype eei_mem_offset =\n| Coq_addressOffset\n| Coq_dataOffset\n| Coq_valueOffset\n| Coq_resultOffset\n| Coq_pathOffset\n| Coq_topic1Offset\n| Coq_topic2Offset\n| Coq_topic3Offset\n| Coq_topic4Offset\n\ntype eei_wasm =\n| Coq_eei_getAddress\n| Coq_eei_getBalance\n| Coq_eei_getBlockHash\n| Coq_eei_call\n| Coq_eei_callDataCopy\n| Coq_eei_getCallDataSize\n| Coq_eei_callCode\n| Coq_eei_callDelegate\n| Coq_eei_storageStore\n| Coq_eei_storageLoad\n| Coq_eei_getCaller\n| Coq_eei_getCallValue\n| Coq_eei_codeCopy\n| Coq_eei_getCodeSize\n| Coq_eei_getBlockCoinbase\n| Coq_eei_create\n| Coq_eei_getBlockDifficulty\n| Coq_eei_externalCodeCopy\n| Coq_eei_getExternalCodeSize\n| Coq_eei_getGasLeft\n| Coq_eei_getBlockGasLimit\n| Coq_eei_getTxGasPrice\n| Coq_eei_log\n| Coq_eei_getBlockNumber\n| Coq_eei_getTxOrigin\n| Coq_eei_useGas\n| Coq_eei_selfDestruct\n| Coq_eei_getBlockTimestamp\n| Coq_eei_revert\n| Coq_eei_getReturnDataSize\n| Coq_eei_returnDataCopy\n\ntype aux_func =\n| Coq_aux_pow\n| Coq_aux_sha1\n| Coq_aux_sha2\n| Coq_aux_sha3\n| Coq_aux_notint\n\nval scratch_global_idx : nat\n\nval scratch_global_idx1 : nat\n\nval scratch_global_idx2 : nat\n\nval system_contract_keccak256 : nat\n\nval get_idx_eei_mem_offset : eei_mem_offset -> nat\n\nval get_idx_aux : aux_func -> nat\n\nval get_idx_eei : eei_wasm -> nat\n\nval set_len : nat -> nat -> instr list\n\nval set_len_hash : nat -> instr list\n\nval store_len : instr list -> nat -> instr list\n\nval set_eeiOffset : instr list -> eei_mem_offset -> nat -> instr list\n\nval load_len : nat -> nat -> instr list\n\nval load_len_hash : nat -> instr list\n\nval load_resultOffset : nat -> instr list\n\nval wasm_builtin0 : builtin0 -> instr list optErr\n\nval wasm_builtin1 : builtin1 -> instr list\n\nval callExternalSha256TwoParam : instr list\n\nval storeLogArgs : nat -> instrs\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_body : instrs }\n\nval fn_return : coq_function -> coq_type\n\nval fn_params : coq_function -> (ident, coq_type) prod list\n\nval fn_temps : coq_function -> (ident, coq_type) prod list\n\nval fn_body : coq_function -> instrs\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/LanguageExt.ml",
    "content": "open ExpMiniC\nopen StmtMiniC\nmodule L = Language\nmodule D = Datatypes\nmodule DE = DatatypesExt\nmodule G = Globalenvs\nmodule P = Printing\nopen BinNumsExt\nopen NameTablesExt\nopen Maps0\n\n(* let raise_msg s = Core.raise_s (Core.Sexp.Atom s) *)\nlet _ = Core.raise_s\n\nlet sprintf = Printf.sprintf\nlet show_type = CtypesExt.show_type\n\nlet empty_coq_function = {\n  fn_return = Tvoid;\n  fn_params = D.Coq_nil;\n  fn_temps = D.Coq_nil;\n  fn_locals = D.Coq_nil;\n  fn_body = Sskip\n}\n\nlet verbose = ref false\nlet name_tbls = empty_name_tables\n\nlet show_ident prefix show_f tbl ident =\n  if !verbose then\n    try\n      sprintf \"%s_%s /* %s */\" prefix (show_f ident) (Hashtbl.find tbl ident)\n    with Not_found -> (* remove this when edsger name tables are finished *)\n      sprintf \"%s_%s\" prefix (show_f ident)\n  else\n    sprintf \"%s_%s\" prefix (show_f ident)\n\nlet show_global () = show_ident \"global\" show_pos name_tbls.vars_tbl\nlet show_func () = show_ident \"func\" show_pos name_tbls.funcs_tbl\nlet show_method () = show_ident \"method\" show_coq_int name_tbls.methods_tbl\nlet show_func_temp func_ident =\n  let tbl = try Hashtbl.find name_tbls.funcs_tmps_tbl func_ident\n    with Not_found -> Hashtbl.create 0 in\n  show_ident \"tmp\" show_pos tbl\nlet show_method_temp method_ident =\n  let tbl = try Hashtbl.find name_tbls.methods_tmps_tbl method_ident\n    with Not_found -> Hashtbl.create 0 in\n  show_ident \"tmp\" show_pos tbl\n\nlet caml_prod_list l =\n  List.map DE.caml_prod (DE.caml_list l)\n\nlet structure xs =\n  (\"├── \" ^ (List.hd xs)) :: List.map (fun x -> \"│   \" ^ x) (List.tl xs)\n\nlet indent prefix xs =\n  List.map (fun x -> prefix ^ x) xs\n\n(* put a newline before and after statement effectively *)\nlet pad s =\n  List.rev (\"\" :: List.rev (\"\" :: s))\n\n(* val show_expr : expr -> string *)\nlet rec show_expr show_tmp expr =\n  let show_expr = show_expr show_tmp in\n  let expr' = match expr with\n  | Econst_int (v, t) ->\n    show_coq_int v\n  | Econst_int256 (v, t) ->\n    show_coq_int v\n  | Etempvar (ident, t) ->\n    show_tmp ident\n  | Evar (ident, t) ->\n    show_tmp ident\n  | Eglob (ident, t) -> \n    show_global () ident\n  | Ederef (e, t) ->\n    \"*\" ^ show_expr e\n  | Eunop (op, e, t) ->\n    let s = show_expr e in\n    let symb = CopExt.show_unop_symb op in\n      sprintf \"%s%s\" symb s\n  | Ebinop (op, e1, e2, t) ->\n    let s1 = show_expr e1 in\n    let s2 = show_expr e2 in\n    let symb = (CopExt.show_binop_symb op) in\n      sprintf \"(%s %s %s)\" s1 symb s2\n  | Efield (e, ident, t) ->\n    sprintf \"%s.%s\" (show_expr e) (P.show_field ident)\n  | Eindex (e1, e2, t) ->\n    sprintf \"%s[%s]\" (show_expr e1) (show_expr e2)\n  | Ecall0 (op, t) ->\n    sprintf \"%s\" (BuiltinSemanticsExt.show0 op)\n  | Ecall1 (op, e, t) ->\n    sprintf \"%s(%s)\"\n      (BuiltinSemanticsExt.show1 op)\n      (show_expr e)\n  | Eaddr (_, _) -> \"\"\n  in\n  if !verbose then\n    sprintf \"%s /* %s */\" expr' (show_type (typeof expr))\n  else\n    expr'\n\nlet show_expr_opt show_tmp = function\n  | D.None -> \"\"\n  | D.Some e -> show_expr show_tmp e\n\n(* val show_stmt : stmt -> string list *)\nlet rec show_stmt show_tmp indent stmt =\n  let show_stmt = show_stmt show_tmp in\n  let show_expr = show_expr show_tmp in\n  let s = match stmt with\n  | Sskip ->\n    [  ]\n  | Sassign (e1, e2) ->\n    [ sprintf \"%s = %s;\" (show_expr e1) (show_expr e2) ]\n  | Sset (ident, e) ->\n    [ sprintf \"%s = %s;\" (show_tmp ident) (show_expr e) ]\n  | Scall (ident_option, label, es) -> (match ident_option with\n    | None -> [ sprintf \"%s(%s);\" (show_func () label)\n      (String.concat \", \" (List.map show_expr (DE.caml_list es))) ]\n    | Some i -> [ sprintf \"%s <- %s(%s);\" (show_tmp i) (show_func () label)\n      (String.concat \", \" (List.map show_expr (DE.caml_list es))) ])\n  | Ssequence (s1, s2) ->\n  List.append (show_stmt false s1) (show_stmt false s2)\n  | Sifthenelse (e, s1, s2) ->\n    pad (List.flatten [\n      [ sprintf \"if (%s) {\" (show_expr e) ];\n      show_stmt true s1;\n      [ \"} else {\" ];\n      show_stmt true s2;\n      [ \"}\" ];\n    ])\n  | Sloop s ->\n    pad (List.flatten [\n    (* TODO: add \"true\" and \"false\" keywords *)\n      [ \"while {\" ] ;\n      show_stmt true s;\n      [ \"}\" ];\n    ])\n  | Sbreak ->\n    [ \"break;\" ]\n  | Sreturn ident_option -> (\n    match ident_option with\n      | D.None -> [ ]\n      | D.Some i ->\n        [ sprintf \"return %s;\" (show_tmp i) ])\n  | Stransfer (e1, e2) ->\n    [ sprintf \"transfer(%s, %s);\" (show_expr e1) (show_expr e2) ]\n  | Scallmethod (e1, idents, e2, v, g, es) ->\n      [ sprintf \"callmethod(%s);\" (String.concat \"; \" [\n          (show_expr e1);\n          (String.concat \", \" (List.map show_tmp (DE.caml_list idents)));\n          (show_coq_int e2);\n          (show_expr v);\n          (show_expr_opt show_tmp g);\n          (String.concat \", \" (List.map show_expr (DE.caml_list es)))\n        ])\n      ]\n  | Slog (topics, args) -> let f l = String.concat \", \" (List.map show_expr l) in\n    [ sprintf \"emit(%s; %s);\" (f (DE.caml_list topics)) (f (DE.caml_list args)) ]\n  | Srevert ->\n    [ \"revert;\" ]\n  in\n  if indent then\n    (List.map (( ^ ) P.tab) s)\n  else s\n\nlet show_body show_tmp stmt =\n  String.concat \"\\n\" (show_stmt show_tmp true stmt)\n\nlet show_params show_tmp params =\n  let mapper (ident, t) =\n    sprintf \"%s %s\" (show_type t) (show_tmp ident) in\n  String.concat \", \" (List.map mapper params)\n\nlet sort_id l =\n  (* List.sort (fun (id1, _) (id2, _) -> compare (int_of_pos id1) (int_of_pos id2)) l *)\n  l\n\nlet show_temps show_tmp params =\n  let mapper (ident, t) = sprintf \"%s%s %s;\" P.tab (show_type t) (show_tmp ident) in\n  let l = List.map mapper params in\n  String.concat \"\\n\" l\n\nlet show_locals show_tmp params =\n  let mapper (ident, t) = sprintf \"%smemory %s %s;\" P.tab (show_type t) (show_tmp ident) in\n  let l = List.map mapper params in\n  String.concat \"\\n\" l\n\nlet show_coq_function show_tmp f =\n  P.concat_nonempty\n    [show_temps show_tmp (caml_prod_list f.fn_temps);\n     show_locals show_tmp (caml_prod_list f.fn_locals);\n     show_body show_tmp (f.fn_body)]\n\nlet show_methoddef m id =\n  let ret = (show_type (fn_return m)) in\n  let show_tmp = show_method_temp id in\n  let params = (show_params show_tmp (caml_prod_list m.fn_params)) in\n  sprintf \"%s %s(%s) {\\n%s\\n}\"\n    ret (show_method () id) params (show_coq_function show_tmp m)\n\nlet show_fundef (id, f) =\n  let ret = (show_type (fn_return f)) in\n  let show_tmp = show_func_temp id in\n  let params = (show_params show_tmp (caml_prod_list f.fn_params)) in\n  sprintf \"private %s %s(%s) {\\n%s\\n}\"\n    ret (show_func () id) params (show_coq_function show_tmp f)\n\nlet show_fundefs funcs fundefs =\n  let get_fundef i = match PTree.get i fundefs with\n    | D.None -> raise (Failure \"None function\")\n    | D.Some func -> (i, func) in\n  let l = List.map get_fundef (DE.caml_list funcs) in\n  let l' = List.map show_fundef l in\n  String.concat \"\\n\\n\" l'\n\nlet show_defs vars defs =\n  let get_def i = match PTree.get i defs with\n    | D.None -> raise (Failure \"None definition\")\n    | D.Some def -> (i, def) in\n  let l = List.map get_def (DE.caml_list vars) in\n  let f (ident, t) = sprintf \"%s %s;\" (show_type t) (show_global () ident) in\n  let l' = List.map f l in\n  String.concat \"\\n\" l'\n\nlet show_funcs is =\n  let is = DE.caml_list is in\n  let l = List.map (show_func ()) is in\n  String.concat \"\\n\" l\n\nlet show_constructor c =\n  match c with\n  | D.None    -> \"\"\n  | D.Some c' ->\n    let show_tmp = show_ident \"tmp\" show_pos name_tbls.constructor_tmps_tbl in\n    let params = (show_params show_tmp (caml_prod_list c'.fn_params)) in\n    sprintf \"void constructor(%s) {\\n%s\\n}\" params (show_coq_function show_tmp c')\n\nlet show_genv v nt {\n  G.Genv.genv_vars = vars;\n  G.Genv.genv_funcs = funcs;\n  G.Genv.genv_methods = methods;\n  G.Genv.genv_defs = defs;\n  G.Genv.genv_fundefs = fundefs;\n  G.Genv.genv_methoddefs = methoddefs;\n  G.Genv.genv_constructor = constructor;\n} =\n  if v then verbose := true;\n  copy_name_tables name_tbls nt;\n  let mapper id =\n    match (G.IntMap.get id methoddefs) with\n    | D.None   -> raise (Failure \"method id mapped to None\")\n    | D.Some f -> show_methoddef f id in\n  let method_ids = DE.caml_list methods in\n  let methods_repr = String.concat \"\\n\\n\" (List.map mapper method_ids) in\n  let constructor_repr = show_constructor constructor in\n  let defs_repr = show_defs vars defs in\n  let fundefs_repr = show_fundefs funcs fundefs in\n  P.concat_nonempty\n    [\n      defs_repr;\n      fundefs_repr;\n      constructor_repr;\n      methods_repr;\n    ]\n"
  },
  {
    "path": "src/backend/extraction/LanguageExt.mli",
    "content": "(*\nthis module defines extensions to the generated L module\n *)\n\nval show_genv : bool -> NameTablesExt.name_tables -> StmtMiniC.genv -> string\nval empty_coq_function : StmtMiniC.coq_function\n"
  },
  {
    "path": "src/backend/extraction/List0.ml",
    "content": "open Datatypes\nopen Specif\n\n(** val in_dec : ('a1 -> 'a1 -> sumbool) -> 'a1 -> 'a1 list -> sumbool **)\n\nlet rec in_dec h a = function\n| Coq_nil -> Coq_right\n| Coq_cons (y, l0) ->\n  let s = h y a in\n  (match s with\n   | Coq_left -> Coq_left\n   | Coq_right -> in_dec h a l0)\n\n(** val rev : 'a1 list -> 'a1 list **)\n\nlet rec rev = function\n| Coq_nil -> Coq_nil\n| Coq_cons (x, l') -> app (rev l') (Coq_cons (x, Coq_nil))\n\n(** val rev_append : 'a1 list -> 'a1 list -> 'a1 list **)\n\nlet rec rev_append l l' =\n  match l with\n  | Coq_nil -> l'\n  | Coq_cons (a, l0) -> rev_append l0 (Coq_cons (a, l'))\n\n(** val rev' : 'a1 list -> 'a1 list **)\n\nlet rev' l =\n  rev_append l Coq_nil\n\n(** val map : ('a1 -> 'a2) -> 'a1 list -> 'a2 list **)\n\nlet rec map f = function\n| Coq_nil -> Coq_nil\n| Coq_cons (a, t) -> Coq_cons ((f a), (map f t))\n\n(** val flat_map : ('a1 -> 'a2 list) -> 'a1 list -> 'a2 list **)\n\nlet rec flat_map f = function\n| Coq_nil -> Coq_nil\n| Coq_cons (x, t) -> app (f x) (flat_map f t)\n\n(** val fold_left : ('a1 -> 'a2 -> 'a1) -> 'a2 list -> 'a1 -> 'a1 **)\n\nlet rec fold_left f l a0 =\n  match l with\n  | Coq_nil -> a0\n  | Coq_cons (b, t) -> fold_left f t (f a0 b)\n"
  },
  {
    "path": "src/backend/extraction/List0.mli",
    "content": "open Datatypes\nopen Specif\n\nval in_dec : ('a1 -> 'a1 -> sumbool) -> 'a1 -> 'a1 list -> sumbool\n\nval rev : 'a1 list -> 'a1 list\n\nval rev_append : 'a1 list -> 'a1 list -> 'a1 list\n\nval rev' : 'a1 list -> 'a1 list\n\nval map : ('a1 -> 'a2) -> 'a1 list -> 'a2 list\n\nval flat_map : ('a1 -> 'a2 list) -> 'a1 list -> 'a2 list\n\nval fold_left : ('a1 -> 'a2 -> 'a1) -> 'a2 list -> 'a1 -> 'a1\n"
  },
  {
    "path": "src/backend/extraction/LowValues.ml",
    "content": "open Integers\n\ntype coq_val =\n| Vunit\n| Vint of Int256.int\n| Vhash of coq_val\n| Vhash2 of coq_val * coq_val\n"
  },
  {
    "path": "src/backend/extraction/LowValues.mli",
    "content": "open Integers\n\ntype coq_val =\n| Vunit\n| Vint of Int256.int\n| Vhash of coq_val\n| Vhash2 of coq_val * coq_val\n"
  },
  {
    "path": "src/backend/extraction/MachineModel.ml",
    "content": "\ntype builtin0 =\n| Baddress\n| Borigin\n| Bcaller\n| Bcallvalue\n| Bcoinbase\n| Btimestamp\n| Bnumber\n| Bchainid\n| Bselfbalance\n\ntype builtin1 =\n| Bbalance\n| Bblockhash\n"
  },
  {
    "path": "src/backend/extraction/MachineModel.mli",
    "content": "\ntype builtin0 =\n| Baddress\n| Borigin\n| Bcaller\n| Bcallvalue\n| Bcoinbase\n| Btimestamp\n| Bnumber\n| Bchainid\n| Bselfbalance\n\ntype builtin1 =\n| Bbalance\n| Bblockhash\n"
  },
  {
    "path": "src/backend/extraction/MachineModelExt.ml",
    "content": "open MachineModel\n\nlet show_builtin0 = function\n  | Baddress -> \"address\"\n  | Borigin -> \"origin\"\n  | Bcaller -> \"caller\"\n  | Bcallvalue -> \"callvalue\"\n  | Bcoinbase -> \"coinbase\"\n  | Btimestamp -> \"timestamp\"\n  | Bnumber -> \"number\"\n  | Bchainid -> \"chainid\"\n  | Bselfbalance -> \"selfbalance\"\n\nlet show_builtin1 = function\n  | Bbalance -> \"balance\"\n  | Bblockhash -> \"blockhash\"\n"
  },
  {
    "path": "src/backend/extraction/Maps0.ml",
    "content": "open BinNums\nopen Coqlib\nopen Datatypes\nopen List0\nopen Specif\n\nmodule PTree =\n struct\n  type elt = positive\n\n  type 'a tree =\n  | Leaf\n  | Node of 'a tree * 'a option * 'a tree\n\n  type 'a t = 'a tree\n\n  (** val empty : 'a1 t **)\n\n  let empty =\n    Leaf\n\n  (** val get : positive -> 'a1 t -> 'a1 option **)\n\n  let rec get i = function\n  | Leaf -> None\n  | Node (l, o, r) ->\n    (match i with\n     | Coq_xI ii -> get ii r\n     | Coq_xO ii -> get ii l\n     | Coq_xH -> o)\n\n  (** val set : positive -> 'a1 -> 'a1 t -> 'a1 t **)\n\n  let rec set i v = function\n  | Leaf ->\n    (match i with\n     | Coq_xI ii -> Node (Leaf, None, (set ii v Leaf))\n     | Coq_xO ii -> Node ((set ii v Leaf), None, Leaf)\n     | Coq_xH -> Node (Leaf, (Some v), Leaf))\n  | Node (l, o, r) ->\n    (match i with\n     | Coq_xI ii -> Node (l, o, (set ii v r))\n     | Coq_xO ii -> Node ((set ii v l), o, r)\n     | Coq_xH -> Node (l, (Some v), r))\n\n  (** val remove : positive -> 'a1 t -> 'a1 t **)\n\n  let rec remove i m =\n    match i with\n    | Coq_xI ii ->\n      (match m with\n       | Leaf -> Leaf\n       | Node (l, o, r) ->\n         (match l with\n          | Leaf ->\n            (match o with\n             | Some _ -> Node (l, o, (remove ii r))\n             | None ->\n               (match remove ii r with\n                | Leaf -> Leaf\n                | Node (t0, o0, t1) -> Node (Leaf, None, (Node (t0, o0, t1)))))\n          | Node (_, _, _) -> Node (l, o, (remove ii r))))\n    | Coq_xO ii ->\n      (match m with\n       | Leaf -> Leaf\n       | Node (l, o, r) ->\n         (match o with\n          | Some _ -> Node ((remove ii l), o, r)\n          | None ->\n            (match r with\n             | Leaf ->\n               (match remove ii l with\n                | Leaf -> Leaf\n                | Node (t0, o0, t1) -> Node ((Node (t0, o0, t1)), None, Leaf))\n             | Node (_, _, _) -> Node ((remove ii l), o, r))))\n    | Coq_xH ->\n      (match m with\n       | Leaf -> Leaf\n       | Node (l, _, r) ->\n         (match l with\n          | Leaf ->\n            (match r with\n             | Leaf -> Leaf\n             | Node (_, _, _) -> Node (l, None, r))\n          | Node (_, _, _) -> Node (l, None, r)))\n\n  (** val bempty : 'a1 t -> bool **)\n\n  let rec bempty = function\n  | Leaf -> Coq_true\n  | Node (l, o, r) ->\n    (match o with\n     | Some _ -> Coq_false\n     | None ->\n       (match bempty l with\n        | Coq_true -> bempty r\n        | Coq_false -> Coq_false))\n\n  (** val beq : ('a1 -> 'a1 -> bool) -> 'a1 t -> 'a1 t -> bool **)\n\n  let rec beq beqA m1 m2 =\n    match m1 with\n    | Leaf -> bempty m2\n    | Node (l1, o1, r1) ->\n      (match m2 with\n       | Leaf -> bempty m1\n       | Node (l2, o2, r2) ->\n         (match match match o1 with\n                      | Some y1 ->\n                        (match o2 with\n                         | Some y2 -> beqA y1 y2\n                         | None -> Coq_false)\n                      | None ->\n                        (match o2 with\n                         | Some _ -> Coq_false\n                         | None -> Coq_true) with\n                | Coq_true -> beq beqA l1 l2\n                | Coq_false -> Coq_false with\n          | Coq_true -> beq beqA r1 r2\n          | Coq_false -> Coq_false))\n\n  (** val prev_append : positive -> positive -> positive **)\n\n  let rec prev_append i j =\n    match i with\n    | Coq_xI i' -> prev_append i' (Coq_xI j)\n    | Coq_xO i' -> prev_append i' (Coq_xO j)\n    | Coq_xH -> j\n\n  (** val prev : positive -> positive **)\n\n  let prev i =\n    prev_append i Coq_xH\n\n  (** val xmap : (positive -> 'a1 -> 'a2) -> 'a1 t -> positive -> 'a2 t **)\n\n  let rec xmap f m i =\n    match m with\n    | Leaf -> Leaf\n    | Node (l, o, r) ->\n      Node ((xmap f l (Coq_xO i)),\n        (match o with\n         | Some x -> Some (f (prev i) x)\n         | None -> None), (xmap f r (Coq_xI i)))\n\n  (** val map : (positive -> 'a1 -> 'a2) -> 'a1 t -> 'a2 t **)\n\n  let map f m =\n    xmap f m Coq_xH\n\n  (** val map1 : ('a1 -> 'a2) -> 'a1 t -> 'a2 t **)\n\n  let rec map1 f = function\n  | Leaf -> Leaf\n  | Node (l, o, r) -> Node ((map1 f l), (option_map f o), (map1 f r))\n\n  (** val xelements :\n      'a1 t -> positive -> (positive, 'a1) prod list -> (positive, 'a1) prod\n      list **)\n\n  let rec xelements m i k =\n    match m with\n    | Leaf -> k\n    | Node (l, o, r) ->\n      (match o with\n       | Some x ->\n         xelements l (Coq_xO i) (Coq_cons ((Coq_pair ((prev i), x)),\n           (xelements r (Coq_xI i) k)))\n       | None -> xelements l (Coq_xO i) (xelements r (Coq_xI i) k))\n\n  (** val elements : 'a1 t -> (positive, 'a1) prod list **)\n\n  let elements m =\n    xelements m Coq_xH Coq_nil\n\n  (** val xkeys : 'a1 t -> positive -> positive list **)\n\n  let xkeys m i =\n    List0.map fst (xelements m i Coq_nil)\n\n  (** val xfold :\n      ('a2 -> positive -> 'a1 -> 'a2) -> positive -> 'a1 t -> 'a2 -> 'a2 **)\n\n  let rec xfold f i m v =\n    match m with\n    | Leaf -> v\n    | Node (l, o, r) ->\n      (match o with\n       | Some x ->\n         let v1 = xfold f (Coq_xO i) l v in\n         let v2 = f v1 (prev i) x in xfold f (Coq_xI i) r v2\n       | None -> let v1 = xfold f (Coq_xO i) l v in xfold f (Coq_xI i) r v1)\n\n  (** val fold : ('a2 -> positive -> 'a1 -> 'a2) -> 'a1 t -> 'a2 -> 'a2 **)\n\n  let fold f m v =\n    xfold f Coq_xH m v\n\n  (** val fold1 : ('a2 -> 'a1 -> 'a2) -> 'a1 t -> 'a2 -> 'a2 **)\n\n  let rec fold1 f m v =\n    match m with\n    | Leaf -> v\n    | Node (l, o, r) ->\n      (match o with\n       | Some x -> let v1 = fold1 f l v in let v2 = f v1 x in fold1 f r v2\n       | None -> let v1 = fold1 f l v in fold1 f r v1)\n\n  (** val union : 'a1 t -> 'a1 t -> 'a1 t **)\n\n  let union m1 m2 =\n    fold (fun m k v -> set k v m) m1 m2\n\n  (** val get_default : 'a1 -> elt -> 'a1 t -> 'a1 **)\n\n  let get_default default k m =\n    match get k m with\n    | Some v -> v\n    | None -> default\n end\n\nmodule PMap =\n struct\n  type 'a t = ('a, 'a PTree.t) prod\n\n  (** val init : 'a1 -> ('a1, 'a1 PTree.t) prod **)\n\n  let init x =\n    Coq_pair (x, PTree.empty)\n\n  (** val get : positive -> 'a1 t -> 'a1 **)\n\n  let get i m =\n    match PTree.get i (snd m) with\n    | Some x -> x\n    | None -> fst m\n\n  (** val set : positive -> 'a1 -> 'a1 t -> ('a1, 'a1 PTree.t) prod **)\n\n  let set i x m =\n    Coq_pair ((fst m), (PTree.set i x (snd m)))\n\n  (** val map : ('a1 -> 'a2) -> 'a1 t -> 'a2 t **)\n\n  let map f m =\n    Coq_pair ((f (fst m)), (PTree.map1 f (snd m)))\n end\n\nmodule type INDEXED_TYPE =\n sig\n  type t\n\n  val index : t -> positive\n\n  val index_inv : positive -> t\n\n  val eq : t -> t -> sumbool\n end\n\nmodule IMap =\n functor (X:INDEXED_TYPE) ->\n struct\n  type elt = X.t\n\n  (** val elt_eq : X.t -> X.t -> sumbool **)\n\n  let elt_eq =\n    X.eq\n\n  type 'x t = 'x PMap.t\n\n  (** val init : 'a1 -> ('a1, 'a1 PTree.t) prod **)\n\n  let init =\n    PMap.init\n\n  (** val get : X.t -> 'a1 t -> 'a1 **)\n\n  let get i m =\n    PMap.get (X.index i) m\n\n  (** val set : X.t -> 'a1 -> 'a1 t -> ('a1, 'a1 PTree.t) prod **)\n\n  let set i v m =\n    PMap.set (X.index i) v m\n\n  (** val map : ('a1 -> 'a2) -> 'a1 t -> 'a2 t **)\n\n  let map =\n    PMap.map\n\n  (** val union : 'a1 t -> 'a1 t -> 'a1 t **)\n\n  let union m1 m2 =\n    Coq_pair ((fst m1), (PTree.union (snd m1) (snd m2)))\n end\n"
  },
  {
    "path": "src/backend/extraction/Maps0.mli",
    "content": "open BinNums\nopen Coqlib\nopen Datatypes\nopen List0\nopen Specif\n\nmodule PTree :\n sig\n  type elt = positive\n\n  type 'a tree =\n  | Leaf\n  | Node of 'a tree * 'a option * 'a tree\n\n  type 'a t = 'a tree\n\n  val empty : 'a1 t\n\n  val get : positive -> 'a1 t -> 'a1 option\n\n  val set : positive -> 'a1 -> 'a1 t -> 'a1 t\n\n  val remove : positive -> 'a1 t -> 'a1 t\n\n  val bempty : 'a1 t -> bool\n\n  val beq : ('a1 -> 'a1 -> bool) -> 'a1 t -> 'a1 t -> bool\n\n  val prev_append : positive -> positive -> positive\n\n  val prev : positive -> positive\n\n  val xmap : (positive -> 'a1 -> 'a2) -> 'a1 t -> positive -> 'a2 t\n\n  val map : (positive -> 'a1 -> 'a2) -> 'a1 t -> 'a2 t\n\n  val map1 : ('a1 -> 'a2) -> 'a1 t -> 'a2 t\n\n  val xelements :\n    'a1 t -> positive -> (positive, 'a1) prod list -> (positive, 'a1) prod\n    list\n\n  val elements : 'a1 t -> (positive, 'a1) prod list\n\n  val xkeys : 'a1 t -> positive -> positive list\n\n  val xfold :\n    ('a2 -> positive -> 'a1 -> 'a2) -> positive -> 'a1 t -> 'a2 -> 'a2\n\n  val fold : ('a2 -> positive -> 'a1 -> 'a2) -> 'a1 t -> 'a2 -> 'a2\n\n  val fold1 : ('a2 -> 'a1 -> 'a2) -> 'a1 t -> 'a2 -> 'a2\n\n  val union : 'a1 t -> 'a1 t -> 'a1 t\n\n  val get_default : 'a1 -> elt -> 'a1 t -> 'a1\n end\n\nmodule PMap :\n sig\n  type 'a t = ('a, 'a PTree.t) prod\n\n  val init : 'a1 -> ('a1, 'a1 PTree.t) prod\n\n  val get : positive -> 'a1 t -> 'a1\n\n  val set : positive -> 'a1 -> 'a1 t -> ('a1, 'a1 PTree.t) prod\n\n  val map : ('a1 -> 'a2) -> 'a1 t -> 'a2 t\n end\n\nmodule type INDEXED_TYPE =\n sig\n  type t\n\n  val index : t -> positive\n\n  val index_inv : positive -> t\n\n  val eq : t -> t -> sumbool\n end\n\nmodule IMap :\n functor (X:INDEXED_TYPE) ->\n sig\n  type elt = X.t\n\n  val elt_eq : X.t -> X.t -> sumbool\n\n  type 'x t = 'x PMap.t\n\n  val init : 'a1 -> ('a1, 'a1 PTree.t) prod\n\n  val get : X.t -> 'a1 t -> 'a1\n\n  val set : X.t -> 'a1 -> 'a1 t -> ('a1, 'a1 PTree.t) prod\n\n  val map : ('a1 -> 'a2) -> 'a1 t -> 'a2 t\n\n  val union : 'a1 t -> 'a1 t -> 'a1 t\n end\n"
  },
  {
    "path": "src/backend/extraction/MemoryModel.ml",
    "content": "open BinInt\nopen BinNums\nopen Datatypes\nopen Integers\n\n(** val public_retval_base : coq_Z **)\n\nlet public_retval_base =\n  Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xI Coq_xH))))))\n\n(** val abi_word_size : coq_Z **)\n\nlet abi_word_size =\n  Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO Coq_xH)))))\n\n(** val funsig_aligned : Int.int -> Int256.int **)\n\nlet funsig_aligned funsig =\n  let funsig0 = Int.unsigned funsig in\n  Int256.repr\n    (Z.shiftl funsig0 (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xI\n      (Coq_xI Coq_xH)))))))))\n\n(** val public_funsig_pos : nat -> coq_Z **)\n\nlet public_funsig_pos retval_count =\n  Z.add public_retval_base (Z.mul abi_word_size (Z.of_nat retval_count))\n\n(** val public_arg_pos : nat -> nat -> coq_Z **)\n\nlet public_arg_pos index retval_count =\n  Z.add\n    (Z.add (public_funsig_pos retval_count)\n      (Z.mul (Z.of_nat index) abi_word_size)) (Zpos (Coq_xO (Coq_xO Coq_xH)))\n\n(** val public_arg_size : nat -> coq_Z **)\n\nlet public_arg_size arg_count =\n  Z.add (Z.mul (Z.of_nat arg_count) abi_word_size) (Zpos (Coq_xO (Coq_xO\n    Coq_xH)))\n\n(** val argpos : nat -> coq_Z **)\n\nlet argpos =\n  public_funsig_pos\n\n(** val arglen : nat -> coq_Z **)\n\nlet arglen =\n  public_arg_size\n\n(** val retpos : coq_Z **)\n\nlet retpos =\n  public_retval_base\n\n(** val retlen : nat -> coq_Z **)\n\nlet retlen retval_count =\n  Z.mul abi_word_size (Z.of_nat retval_count)\n\n(** val call_data_arg_location : nat -> Int256.int **)\n\nlet call_data_arg_location argi =\n  Int256.repr\n    (Z.add\n      (Z.mul (Z.of_nat argi) (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n        Coq_xH))))))) (Zpos (Coq_xO (Coq_xO Coq_xH))))\n"
  },
  {
    "path": "src/backend/extraction/MemoryModel.mli",
    "content": "open BinInt\nopen BinNums\nopen Datatypes\nopen Integers\n\nval public_retval_base : coq_Z\n\nval abi_word_size : coq_Z\n\nval funsig_aligned : Int.int -> Int256.int\n\nval public_funsig_pos : nat -> coq_Z\n\nval public_arg_pos : nat -> nat -> coq_Z\n\nval public_arg_size : nat -> coq_Z\n\nval argpos : nat -> coq_Z\n\nval arglen : nat -> coq_Z\n\nval retpos : coq_Z\n\nval retlen : nat -> coq_Z\n\nval call_data_arg_location : nat -> Int256.int\n"
  },
  {
    "path": "src/backend/extraction/Monad.ml",
    "content": "open Datatypes\n\ntype __ = Obj.t\nlet __ = let rec f _ = Obj.repr f in Obj.repr f\n\ntype 'm coq_Monad = { ret : (__ -> __ -> 'm);\n                      bind : (__ -> __ -> 'm -> (__ -> 'm) -> 'm) }\n\n(** val ret : 'a1 coq_Monad -> 'a2 -> 'a1 **)\n\nlet ret monad x =\n  let { ret = ret0; bind = _ } = monad in Obj.magic ret0 __ x\n\n(** val bind : 'a1 coq_Monad -> 'a1 -> ('a2 -> 'a1) -> 'a1 **)\n\nlet bind monad x x0 =\n  let { ret = _; bind = bind0 } = monad in Obj.magic bind0 __ __ x x0\n\n(** val bind2 : 'a1 coq_Monad -> 'a1 -> ('a2 -> 'a3 -> 'a1) -> 'a1 **)\n\nlet bind2 m ma f =\n  bind m ma (fun a -> let Coq_pair (x, y) = a in f x y)\n"
  },
  {
    "path": "src/backend/extraction/Monad.mli",
    "content": "open Datatypes\n\ntype __ = Obj.t\n\ntype 'm coq_Monad = { ret : (__ -> __ -> 'm);\n                      bind : (__ -> __ -> 'm -> (__ -> 'm) -> 'm) }\n\nval ret : 'a1 coq_Monad -> 'a2 -> 'a1\n\nval bind : 'a1 coq_Monad -> 'a1 -> ('a2 -> 'a1) -> 'a1\n\nval bind2 : 'a1 coq_Monad -> 'a1 -> ('a2 -> 'a3 -> 'a1) -> 'a1\n"
  },
  {
    "path": "src/backend/extraction/NameTablesExt.ml",
    "content": "open AST\n\ntype ident_table = (ident, string) Hashtbl.t\n\ntype name_tables = {\n  mutable funcs_tbl            : ident_table;\n  mutable methods_tbl          : (BinNums.coq_Z, string) Hashtbl.t;\n  mutable vars_tbl             : ident_table;\n  mutable funcs_tmps_tbl       : (ident, ident_table) Hashtbl.t;\n  mutable methods_tmps_tbl     : (BinNums.coq_Z, ident_table) Hashtbl.t;\n  mutable constructor_tmps_tbl : ident_table;\n}\n\nlet empty_name_tables = {\n  funcs_tbl            = Hashtbl.create 0;\n  methods_tbl          = Hashtbl.create 0;\n  vars_tbl             = Hashtbl.create 0;\n  funcs_tmps_tbl       = Hashtbl.create 0;\n  methods_tmps_tbl     = Hashtbl.create 0;\n  constructor_tmps_tbl = Hashtbl.create 0;\n}\n\nlet copy_name_tables nt1 nt2 =\n  nt1.funcs_tbl            <- nt2.funcs_tbl;\n  nt1.methods_tbl          <- nt2.methods_tbl;\n  nt1.vars_tbl             <- nt2.vars_tbl;\n  nt1.funcs_tmps_tbl       <- nt2.funcs_tmps_tbl;\n  nt1.methods_tmps_tbl     <- nt2.methods_tmps_tbl;\n  nt1.constructor_tmps_tbl <- nt2.constructor_tmps_tbl;\n"
  },
  {
    "path": "src/backend/extraction/Nat0.ml",
    "content": "open Datatypes\nopen Decimal\n\n(** val add : nat -> nat -> nat **)\n\nlet rec add n m =\n  match n with\n  | O -> m\n  | S p -> S (add p m)\n\n(** val mul : nat -> nat -> nat **)\n\nlet rec mul n m =\n  match n with\n  | O -> O\n  | S p -> add m (mul p m)\n\n(** val sub : nat -> nat -> nat **)\n\nlet rec sub n m =\n  match n with\n  | O -> n\n  | S k -> (match m with\n            | O -> n\n            | S l -> sub k l)\n\n(** val tail_add : nat -> nat -> nat **)\n\nlet rec tail_add n m =\n  match n with\n  | O -> m\n  | S n0 -> tail_add n0 (S m)\n\n(** val tail_addmul : nat -> nat -> nat -> nat **)\n\nlet rec tail_addmul r n m =\n  match n with\n  | O -> r\n  | S n0 -> tail_addmul (tail_add m r) n0 m\n\n(** val tail_mul : nat -> nat -> nat **)\n\nlet tail_mul n m =\n  tail_addmul O n m\n\n(** val of_uint_acc : uint -> nat -> nat **)\n\nlet rec of_uint_acc d acc =\n  match d with\n  | Nil -> acc\n  | D0 d0 ->\n    of_uint_acc d0 (tail_mul (S (S (S (S (S (S (S (S (S (S O)))))))))) acc)\n  | D1 d0 ->\n    of_uint_acc d0 (S\n      (tail_mul (S (S (S (S (S (S (S (S (S (S O)))))))))) acc))\n  | D2 d0 ->\n    of_uint_acc d0 (S (S\n      (tail_mul (S (S (S (S (S (S (S (S (S (S O)))))))))) acc)))\n  | D3 d0 ->\n    of_uint_acc d0 (S (S (S\n      (tail_mul (S (S (S (S (S (S (S (S (S (S O)))))))))) acc))))\n  | D4 d0 ->\n    of_uint_acc d0 (S (S (S (S\n      (tail_mul (S (S (S (S (S (S (S (S (S (S O)))))))))) acc)))))\n  | D5 d0 ->\n    of_uint_acc d0 (S (S (S (S (S\n      (tail_mul (S (S (S (S (S (S (S (S (S (S O)))))))))) acc))))))\n  | D6 d0 ->\n    of_uint_acc d0 (S (S (S (S (S (S\n      (tail_mul (S (S (S (S (S (S (S (S (S (S O)))))))))) acc)))))))\n  | D7 d0 ->\n    of_uint_acc d0 (S (S (S (S (S (S (S\n      (tail_mul (S (S (S (S (S (S (S (S (S (S O)))))))))) acc))))))))\n  | D8 d0 ->\n    of_uint_acc d0 (S (S (S (S (S (S (S (S\n      (tail_mul (S (S (S (S (S (S (S (S (S (S O)))))))))) acc)))))))))\n  | D9 d0 ->\n    of_uint_acc d0 (S (S (S (S (S (S (S (S (S\n      (tail_mul (S (S (S (S (S (S (S (S (S (S O)))))))))) acc))))))))))\n\n(** val of_uint : uint -> nat **)\n\nlet of_uint d =\n  of_uint_acc d O\n"
  },
  {
    "path": "src/backend/extraction/Nat0.mli",
    "content": "open Datatypes\nopen Decimal\n\nval add : nat -> nat -> nat\n\nval mul : nat -> nat -> nat\n\nval sub : nat -> nat -> nat\n\nval tail_add : nat -> nat -> nat\n\nval tail_addmul : nat -> nat -> nat -> nat\n\nval tail_mul : nat -> nat -> nat\n\nval of_uint_acc : uint -> nat -> nat\n\nval of_uint : uint -> nat\n"
  },
  {
    "path": "src/backend/extraction/OptErrMonad.ml",
    "content": "open Monad\nopen String0\n\ntype __ = Obj.t\n\ntype 'a optErr =\n| Success of 'a\n| Error of string\n\n(** val coq_Monad_optErr : __ optErr coq_Monad **)\n\nlet coq_Monad_optErr =\n  { ret = (fun _ v -> Success v); bind = (fun _ _ c1 c2 ->\n    match c1 with\n    | Success v -> c2 v\n    | Error msg -> Error msg) }\n"
  },
  {
    "path": "src/backend/extraction/OptErrMonad.mli",
    "content": "open Monad\nopen String0\n\ntype __ = Obj.t\n\ntype 'a optErr =\n| Success of 'a\n| Error of string\n\nval coq_Monad_optErr : __ optErr coq_Monad\n"
  },
  {
    "path": "src/backend/extraction/OptionMonad.ml",
    "content": "open Datatypes\nopen Monad\n\ntype __ = Obj.t\n\n(** val coq_Monad_option : __ option coq_Monad **)\n\nlet coq_Monad_option =\n  { ret = (Obj.magic (fun _ x -> Some x)); bind = (fun _ _ c1 c2 ->\n    match c1 with\n    | Some v -> c2 v\n    | None -> None) }\n"
  },
  {
    "path": "src/backend/extraction/OptionMonad.mli",
    "content": "open Datatypes\nopen Monad\n\ntype __ = Obj.t\n\nval coq_Monad_option : __ option coq_Monad\n"
  },
  {
    "path": "src/backend/extraction/Options.ml",
    "content": "open Datatypes\nopen OptErrMonad\nopen String0\n\n(** val fromOption : 'a1 option -> string -> 'a1 optErr **)\n\nlet fromOption ov msg =\n  match ov with\n  | Some v -> Success v\n  | None -> Error msg\n\n(** val optional_filter : 'a1 option -> 'a1 list **)\n\nlet optional_filter = function\n| Some a' -> Coq_cons (a', Coq_nil)\n| None -> Coq_nil\n"
  },
  {
    "path": "src/backend/extraction/Options.mli",
    "content": "open Datatypes\nopen OptErrMonad\nopen String0\n\nval fromOption : 'a1 option -> string -> 'a1 optErr\n\nval optional_filter : 'a1 option -> 'a1 list\n"
  },
  {
    "path": "src/backend/extraction/Peano.ml",
    "content": "\ntype __ = Obj.t\n\ntype ge = __\n"
  },
  {
    "path": "src/backend/extraction/Peano.mli",
    "content": "\ntype __ = Obj.t\n\ntype ge = __\n"
  },
  {
    "path": "src/backend/extraction/PeanoNat.ml",
    "content": "open Datatypes\nopen Specif\n\nmodule Nat =\n struct\n  (** val eqb : nat -> nat -> bool **)\n\n  let rec eqb n m =\n    match n with\n    | O -> (match m with\n            | O -> Coq_true\n            | S _ -> Coq_false)\n    | S n' -> (match m with\n               | O -> Coq_false\n               | S m' -> eqb n' m')\n\n  (** val leb : nat -> nat -> bool **)\n\n  let rec leb n m =\n    match n with\n    | O -> Coq_true\n    | S n' -> (match m with\n               | O -> Coq_false\n               | S m' -> leb n' m')\n\n  (** val ltb : nat -> nat -> bool **)\n\n  let ltb n m =\n    leb (S n) m\n\n  (** val max : nat -> nat -> nat **)\n\n  let rec max n m =\n    match n with\n    | O -> m\n    | S n' -> (match m with\n               | O -> n\n               | S m' -> S (max n' m'))\n\n  (** val eq_dec : nat -> nat -> sumbool **)\n\n  let rec eq_dec n m =\n    match n with\n    | O -> (match m with\n            | O -> Coq_left\n            | S _ -> Coq_right)\n    | S n0 -> (match m with\n               | O -> Coq_right\n               | S m0 -> eq_dec n0 m0)\n end\n"
  },
  {
    "path": "src/backend/extraction/PeanoNat.mli",
    "content": "open Datatypes\nopen Specif\n\nmodule Nat :\n sig\n  val eqb : nat -> nat -> bool\n\n  val leb : nat -> nat -> bool\n\n  val ltb : nat -> nat -> bool\n\n  val max : nat -> nat -> nat\n\n  val eq_dec : nat -> nat -> sumbool\n end\n"
  },
  {
    "path": "src/backend/extraction/Printing.ml",
    "content": "(* using four sapces instead of the tab character *)\nlet tab = String.make 4 ' '\n\nlet show_field ident =\n  Printf.sprintf \"field_%s\" (BinNumsExt.show_pos ident)\n\nlet show_struct ident =\n  Printf.sprintf \"struct_%s\" (BinNumsExt.show_pos ident)\n\nlet concat_nonempty l =\n  let f s = s <> \"\" in\n  String.concat \"\\n\\n\" (List.filter f l)\n"
  },
  {
    "path": "src/backend/extraction/Semantics.ml",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen Globalenvs\nopen Maps0\nopen StmtClinear\n\ntype bblock = statement list\n\ntype code = bblock PTree.t\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_code : code; fn_entrypoint : label }\n\n(** val fn_return : coq_function -> coq_type **)\n\nlet fn_return x = x.fn_return\n\n(** val fn_params : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_params x = x.fn_params\n\n(** val fn_temps : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_temps x = x.fn_temps\n\n(** val fn_locals : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_locals x = x.fn_locals\n\n(** val fn_code : coq_function -> code **)\n\nlet fn_code x = x.fn_code\n\n(** val fn_entrypoint : coq_function -> label **)\n\nlet fn_entrypoint x = x.fn_entrypoint\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/Semantics.mli",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen Globalenvs\nopen Maps0\nopen StmtClinear\n\ntype bblock = statement list\n\ntype code = bblock PTree.t\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_code : code; fn_entrypoint : label }\n\nval fn_return : coq_function -> coq_type\n\nval fn_params : coq_function -> (ident, coq_type) prod list\n\nval fn_temps : coq_function -> (ident, coq_type) prod list\n\nval fn_locals : coq_function -> (ident, coq_type) prod list\n\nval fn_code : coq_function -> code\n\nval fn_entrypoint : coq_function -> label\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/Semantics0.ml",
    "content": "open AST\nopen Datatypes\nopen Globalenvs\nopen Labels\nopen List0\nopen Maps0\nopen Specif\nopen StmtClinear\n\n(** val label_code : code -> label list **)\n\nlet rec label_code = function\n| Coq_nil -> Coq_nil\n| Coq_cons (s, rest) ->\n  let lr = label_code rest in\n  (match s with\n   | Slabel l -> Coq_cons (l, lr)\n   | _ -> lr)\n\n(** val label_function : coq_function -> bool **)\n\nlet label_function f =\n  match label_norepet_dec (label_code f.fn_code) with\n  | Coq_left -> Coq_true\n  | Coq_right -> Coq_false\n\n(** val xlabel_functions : coq_function option list -> bool **)\n\nlet rec xlabel_functions = function\n| Coq_nil -> Coq_true\n| Coq_cons (o, rest) ->\n  (match o with\n   | Some f ->\n     (match label_function f with\n      | Coq_true -> xlabel_functions rest\n      | Coq_false -> Coq_false)\n   | None -> xlabel_functions rest)\n\n(** val label_functions : coq_function PTree.t -> bool **)\n\nlet label_functions fns =\n  xlabel_functions (map (fun x -> Some x) (map snd (PTree.elements fns)))\n\n(** val label_methods : coq_function option IntMap.t -> bool **)\n\nlet label_methods fns =\n  xlabel_functions (Coq_cons ((fst fns),\n    (map snd (PTree.elements (snd fns)))))\n"
  },
  {
    "path": "src/backend/extraction/Semantics0.mli",
    "content": "open AST\nopen Datatypes\nopen Globalenvs\nopen Labels\nopen List0\nopen Maps0\nopen Specif\nopen StmtClinear\n\nval label_code : code -> label list\n\nval label_function : coq_function -> bool\n\nval xlabel_functions : coq_function option list -> bool\n\nval label_functions : coq_function PTree.t -> bool\n\nval label_methods : coq_function option IntMap.t -> bool\n"
  },
  {
    "path": "src/backend/extraction/Semantics1.ml",
    "content": "open AST\nopen Datatypes\nopen Globalenvs\nopen Labels\nopen List0\nopen Maps0\nopen Specif\nopen StmtStacked\n\n(** val label_code : code -> label list **)\n\nlet rec label_code = function\n| Coq_nil -> Coq_nil\n| Coq_cons (s, rest) ->\n  let lr = label_code rest in\n  (match s with\n   | Slabel l -> Coq_cons (l, lr)\n   | _ -> lr)\n\n(** val label_function : coq_function -> bool **)\n\nlet label_function f =\n  match label_norepet_dec (label_code (fn_code f)) with\n  | Coq_left -> Coq_true\n  | Coq_right -> Coq_false\n\n(** val xlabel_functions : coq_function option list -> bool **)\n\nlet rec xlabel_functions = function\n| Coq_nil -> Coq_true\n| Coq_cons (o, rest) ->\n  (match o with\n   | Some f ->\n     (match label_function f with\n      | Coq_true -> xlabel_functions rest\n      | Coq_false -> Coq_false)\n   | None -> xlabel_functions rest)\n\n(** val label_functions : coq_function PTree.t -> bool **)\n\nlet label_functions fns =\n  xlabel_functions (map (fun x -> Some x) (map snd (PTree.elements fns)))\n\n(** val label_methods : coq_function option IntMap.t -> bool **)\n\nlet label_methods fns =\n  xlabel_functions (Coq_cons ((fst fns),\n    (map snd (PTree.elements (snd fns)))))\n"
  },
  {
    "path": "src/backend/extraction/Semantics1.mli",
    "content": "open AST\nopen Datatypes\nopen Globalenvs\nopen Labels\nopen List0\nopen Maps0\nopen Specif\nopen StmtStacked\n\nval label_code : code -> label list\n\nval label_function : coq_function -> bool\n\nval xlabel_functions : coq_function option list -> bool\n\nval label_functions : coq_function PTree.t -> bool\n\nval label_methods : coq_function option IntMap.t -> bool\n"
  },
  {
    "path": "src/backend/extraction/Semantics2.ml",
    "content": "open AST\nopen BinNums\nopen Cop\nopen Coqlib\nopen Datatypes\nopen Globalenvs\nopen Integers\nopen Labels\nopen List0\nopen LowValues\nopen MachineModel\nopen Maps0\nopen PeanoNat\nopen Specif\nopen StmtExpressionless\n\n(** val code_labels : code -> label list **)\n\nlet rec code_labels = function\n| Coq_nil -> Coq_nil\n| Coq_cons (s, rest) ->\n  let lr = code_labels rest in\n  (match s with\n   | Slabel l -> Coq_cons (l, lr)\n   | _ -> lr)\n\n(** val function_labels : coq_function -> label list **)\n\nlet function_labels f =\n  code_labels (fn_code f)\n\n(** val genv_list_labels : genv -> label list **)\n\nlet genv_list_labels ge =\n  flat_map function_labels (Genv.all_functions ge)\n\n(** val stm_eq_dec : statement -> statement -> sumbool **)\n\nlet stm_eq_dec stm stm' =\n  match stm with\n  | Spush x ->\n    (match stm' with\n     | Spush s0 ->\n       (match x with\n        | Coq_inl x0 ->\n          (match s0 with\n           | Coq_inl v ->\n             let rec f v0 x1 =\n               match v0 with\n               | Vunit -> (match x1 with\n                           | Vunit -> Coq_left\n                           | _ -> Coq_right)\n               | Vint i ->\n                 (match x1 with\n                  | Vint i0 -> Int256.eq_dec i i0\n                  | _ -> Coq_right)\n               | Vhash v1 ->\n                 (match x1 with\n                  | Vhash v2 -> f v1 v2\n                  | _ -> Coq_right)\n               | Vhash2 (v1, v2) ->\n                 (match x1 with\n                  | Vhash2 (v3, v4) ->\n                    (match f v1 v3 with\n                     | Coq_left -> f v2 v4\n                     | Coq_right -> Coq_right)\n                  | _ -> Coq_right)\n             in f x0 v\n           | Coq_inr _ -> Coq_right)\n        | Coq_inr x0 ->\n          (match s0 with\n           | Coq_inl _ -> Coq_right\n           | Coq_inr l ->\n             let rec f p x1 =\n               match p with\n               | Coq_xI p0 ->\n                 (match x1 with\n                  | Coq_xI p1 -> f p0 p1\n                  | _ -> Coq_right)\n               | Coq_xO p0 ->\n                 (match x1 with\n                  | Coq_xO p1 -> f p0 p1\n                  | _ -> Coq_right)\n               | Coq_xH -> (match x1 with\n                            | Coq_xH -> Coq_left\n                            | _ -> Coq_right)\n             in f x0 l))\n     | _ -> Coq_right)\n  | Sdup x -> (match stm' with\n               | Sdup n0 -> Nat.eq_dec x n0\n               | _ -> Coq_right)\n  | Ssload -> (match stm' with\n               | Ssload -> Coq_left\n               | _ -> Coq_right)\n  | Smload -> (match stm' with\n               | Smload -> Coq_left\n               | _ -> Coq_right)\n  | Sunop x ->\n    (match stm' with\n     | Sunop u0 ->\n       (match x with\n        | Onotbool -> (match u0 with\n                       | Onotbool -> Coq_left\n                       | _ -> Coq_right)\n        | Onotint -> (match u0 with\n                      | Onotint -> Coq_left\n                      | _ -> Coq_right)\n        | Oneg -> (match u0 with\n                   | Oneg -> Coq_left\n                   | _ -> Coq_right)\n        | Osha_1 -> (match u0 with\n                     | Osha_1 -> Coq_left\n                     | _ -> Coq_right))\n     | _ -> Coq_right)\n  | Sbinop (x, x0) ->\n    (match stm' with\n     | Sbinop (b1, b2) ->\n       (match x with\n        | Oadd ->\n          (match b1 with\n           | Oadd ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Osub ->\n          (match b1 with\n           | Osub ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Omul ->\n          (match b1 with\n           | Omul ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Odiv ->\n          (match b1 with\n           | Odiv ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Omod ->\n          (match b1 with\n           | Omod ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Oexp ->\n          (match b1 with\n           | Oexp ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Oand ->\n          (match b1 with\n           | Oand ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Oor ->\n          (match b1 with\n           | Oor ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Oxor ->\n          (match b1 with\n           | Oxor ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Oshl ->\n          (match b1 with\n           | Oshl ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Oshr ->\n          (match b1 with\n           | Oshr ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Oeq ->\n          (match b1 with\n           | Oeq ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | One ->\n          (match b1 with\n           | One ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Olt ->\n          (match b1 with\n           | Olt ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Ogt ->\n          (match b1 with\n           | Ogt ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Ole ->\n          (match b1 with\n           | Ole ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Oge ->\n          (match b1 with\n           | Oge ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right)\n        | Osha_2 ->\n          (match b1 with\n           | Osha_2 ->\n             (match x0 with\n              | Coq_true ->\n                (match b2 with\n                 | Coq_true -> Coq_left\n                 | Coq_false -> Coq_right)\n              | Coq_false ->\n                (match b2 with\n                 | Coq_true -> Coq_right\n                 | Coq_false -> Coq_left))\n           | _ -> Coq_right))\n     | _ -> Coq_right)\n  | Scall0 x ->\n    (match stm' with\n     | Scall0 b0 ->\n       (match x with\n        | Baddress -> (match b0 with\n                       | Baddress -> Coq_left\n                       | _ -> Coq_right)\n        | Borigin -> (match b0 with\n                      | Borigin -> Coq_left\n                      | _ -> Coq_right)\n        | Bcaller -> (match b0 with\n                      | Bcaller -> Coq_left\n                      | _ -> Coq_right)\n        | Bcallvalue ->\n          (match b0 with\n           | Bcallvalue -> Coq_left\n           | _ -> Coq_right)\n        | Bcoinbase -> (match b0 with\n                        | Bcoinbase -> Coq_left\n                        | _ -> Coq_right)\n        | Btimestamp ->\n          (match b0 with\n           | Btimestamp -> Coq_left\n           | _ -> Coq_right)\n        | Bnumber -> (match b0 with\n                      | Bnumber -> Coq_left\n                      | _ -> Coq_right)\n        | Bchainid -> (match b0 with\n                       | Bchainid -> Coq_left\n                       | _ -> Coq_right)\n        | Bselfbalance ->\n          (match b0 with\n           | Bselfbalance -> Coq_left\n           | _ -> Coq_right))\n     | _ -> Coq_right)\n  | Scall1 x ->\n    (match stm' with\n     | Scall1 b0 ->\n       (match x with\n        | Bbalance ->\n          (match b0 with\n           | Bbalance -> Coq_left\n           | Bblockhash -> Coq_right)\n        | Bblockhash ->\n          (match b0 with\n           | Bbalance -> Coq_right\n           | Bblockhash -> Coq_left))\n     | _ -> Coq_right)\n  | Sskip -> (match stm' with\n              | Sskip -> Coq_left\n              | _ -> Coq_right)\n  | Spop -> (match stm' with\n             | Spop -> Coq_left\n             | _ -> Coq_right)\n  | Ssstore -> (match stm' with\n                | Ssstore -> Coq_left\n                | _ -> Coq_right)\n  | Smstore -> (match stm' with\n                | Smstore -> Coq_left\n                | _ -> Coq_right)\n  | Sswap x -> (match stm' with\n                | Sswap n0 -> Nat.eq_dec x n0\n                | _ -> Coq_right)\n  | Sdone x ->\n    (match stm' with\n     | Sdone r0 ->\n       (match x with\n        | Tvoid_method ->\n          (match r0 with\n           | Tvoid_method -> Coq_left\n           | _ -> Coq_right)\n        | Tconstructor ->\n          (match r0 with\n           | Tconstructor -> Coq_left\n           | _ -> Coq_right)\n        | Tfun -> (match r0 with\n                   | Tfun -> Coq_left\n                   | _ -> Coq_right)\n        | Tsome_method ->\n          (match r0 with\n           | Tsome_method -> Coq_left\n           | _ -> Coq_right))\n     | _ -> Coq_right)\n  | Slabel x -> (match stm' with\n                 | Slabel l0 -> peq x l0\n                 | _ -> Coq_right)\n  | Sjump -> (match stm' with\n              | Sjump -> Coq_left\n              | _ -> Coq_right)\n  | Sjumpi -> (match stm' with\n               | Sjumpi -> Coq_left\n               | _ -> Coq_right)\n  | Shash -> (match stm' with\n              | Shash -> Coq_left\n              | _ -> Coq_right)\n  | Stransfer -> (match stm' with\n                  | Stransfer -> Coq_left\n                  | _ -> Coq_right)\n  | Scallargs (x, x0, x1) ->\n    (match stm' with\n     | Scallargs (i0, n1, n2) ->\n       (match Int.eq_dec x i0 with\n        | Coq_left ->\n          (match Nat.eq_dec x0 n1 with\n           | Coq_left -> Nat.eq_dec x1 n2\n           | Coq_right -> Coq_right)\n        | Coq_right -> Coq_right)\n     | _ -> Coq_right)\n  | Scallmethod x ->\n    (match stm' with\n     | Scallmethod b0 ->\n       (match x with\n        | Coq_true ->\n          (match b0 with\n           | Coq_true -> Coq_left\n           | Coq_false -> Coq_right)\n        | Coq_false ->\n          (match b0 with\n           | Coq_true -> Coq_right\n           | Coq_false -> Coq_left))\n     | _ -> Coq_right)\n  | Slog (x, x0) ->\n    (match stm' with\n     | Slog (n1, n2) ->\n       (match Nat.eq_dec x n1 with\n        | Coq_left -> Nat.eq_dec x0 n2\n        | Coq_right -> Coq_right)\n     | _ -> Coq_right)\n  | Srevert -> (match stm' with\n                | Srevert -> Coq_left\n                | _ -> Coq_right)\n  | Scalldataload ->\n    (match stm' with\n     | Scalldataload -> Coq_left\n     | _ -> Coq_right)\n  | Sconstructordataload x ->\n    (match stm' with\n     | Sconstructordataload n0 -> Nat.eq_dec x n0\n     | _ -> Coq_right)\n\n(** val function_starts_with_label : (label, coq_function) prod -> bool **)\n\nlet function_starts_with_label lf =\n  match fn_code (snd lf) with\n  | Coq_nil -> Coq_false\n  | Coq_cons (start, _) ->\n    (match stm_eq_dec start (Slabel (fst lf)) with\n     | Coq_left -> Coq_true\n     | Coq_right -> Coq_false)\n\n(** val all_true : bool list -> bool **)\n\nlet rec all_true = function\n| Coq_nil -> Coq_true\n| Coq_cons (b, rest) ->\n  (match b with\n   | Coq_true -> all_true rest\n   | Coq_false -> Coq_false)\n\n(** val functions_start_with_labels :\n    (label, coq_function) prod list -> bool **)\n\nlet functions_start_with_labels lfs =\n  all_true (map function_starts_with_label lfs)\n\n(** val label_verify : genv -> bool **)\n\nlet label_verify ge =\n  match decide_label_norepet (genv_list_labels ge) with\n  | Coq_true ->\n    functions_start_with_labels (PTree.elements ge.Genv.genv_fundefs)\n  | Coq_false -> Coq_false\n"
  },
  {
    "path": "src/backend/extraction/Semantics2.mli",
    "content": "open AST\nopen BinNums\nopen Cop\nopen Coqlib\nopen Datatypes\nopen Globalenvs\nopen Integers\nopen Labels\nopen List0\nopen LowValues\nopen MachineModel\nopen Maps0\nopen PeanoNat\nopen Specif\nopen StmtExpressionless\n\nval code_labels : code -> label list\n\nval function_labels : coq_function -> label list\n\nval genv_list_labels : genv -> label list\n\nval stm_eq_dec : statement -> statement -> sumbool\n\nval function_starts_with_label : (label, coq_function) prod -> bool\n\nval all_true : bool list -> bool\n\nval functions_start_with_labels : (label, coq_function) prod list -> bool\n\nval label_verify : genv -> bool\n"
  },
  {
    "path": "src/backend/extraction/Semantics3.ml",
    "content": "open AST\nopen Datatypes\nopen Integers\nopen Labels\nopen LowValues\nopen StmtExpressionless\n\n(** val sg_shift : nat **)\n\nlet sg_shift =\n  S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n    (S (S (S (S (S (S (S\n    O)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val z0 : (coq_val, label) sum **)\n\nlet z0 =\n  Coq_inl (Vint Int256.zero)\n\n(** val code_labels : code -> label list **)\n\nlet rec code_labels = function\n| Coq_nil -> Coq_nil\n| Coq_cons (s, rest) ->\n  let lr = code_labels rest in\n  (match s with\n   | Slabel l -> Coq_cons (l, lr)\n   | _ -> lr)\n\n(** val label_verify : code -> bool **)\n\nlet label_verify c =\n  decide_label_norepet (code_labels c)\n"
  },
  {
    "path": "src/backend/extraction/Semantics3.mli",
    "content": "open AST\nopen Datatypes\nopen Integers\nopen Labels\nopen LowValues\nopen StmtExpressionless\n\nval sg_shift : nat\n\nval z0 : (coq_val, label) sum\n\nval code_labels : code -> label list\n\nval label_verify : code -> bool\n"
  },
  {
    "path": "src/backend/extraction/Specif.ml",
    "content": "\ntype 'a coq_sig = 'a\n  (* singleton inductive, whose constructor was exist *)\n\ntype ('a, 'p) sigT =\n| Coq_existT of 'a * 'p\n\n(** val projT1 : ('a1, 'a2) sigT -> 'a1 **)\n\nlet projT1 = function\n| Coq_existT (a, _) -> a\n\n(** val projT2 : ('a1, 'a2) sigT -> 'a2 **)\n\nlet projT2 = function\n| Coq_existT (_, h) -> h\n\ntype sumbool =\n| Coq_left\n| Coq_right\n"
  },
  {
    "path": "src/backend/extraction/Specif.mli",
    "content": "\ntype 'a coq_sig = 'a\n  (* singleton inductive, whose constructor was exist *)\n\ntype ('a, 'p) sigT =\n| Coq_existT of 'a * 'p\n\nval projT1 : ('a1, 'a2) sigT -> 'a1\n\nval projT2 : ('a1, 'a2) sigT -> 'a2\n\ntype sumbool =\n| Coq_left\n| Coq_right\n"
  },
  {
    "path": "src/backend/extraction/StackEnv.ml",
    "content": "open AST\nopen BinInt\nopen BinNums\nopen Ctypes\nopen Datatypes\nopen Integers\n\n(** val sp : Int256.int **)\n\nlet sp =\n  Int256.repr\n    (Z.add (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n      (Coq_xO (Coq_xI (Coq_xO (Coq_xO Coq_xH)))))))))))) (Zpos (Coq_xO\n      (Coq_xO (Coq_xO (Coq_xO (Coq_xO Coq_xH)))))))\n\n(** val sb : Int256.int **)\n\nlet sb =\n  Int256.repr\n    (Z.add (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n      (Coq_xO (Coq_xI (Coq_xO (Coq_xO Coq_xH)))))))))))) (Zpos (Coq_xO\n      (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO Coq_xH))))))))\n\n(** val sizeof : coq_type -> Int256.int **)\n\nlet rec sizeof ty =\n  Int256.repr (sizeof_words ty)\n\n(** val offset : fieldlist -> ident -> Int256.int option **)\n\nlet rec offset fl id =\n  match struct_field fl id with\n  | Some p ->\n    let Coq_pair (off, _) = p in\n    Some\n    (Int256.mul\n      (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO Coq_xH)))))))\n      (Int256.repr (Z.of_nat off)))\n  | None -> None\n\n(** val frame_size : (ident, coq_type) prod list -> Int256.int **)\n\nlet rec frame_size = function\n| Coq_nil -> Int256.repr Z0\n| Coq_cons (p, locs') ->\n  let Coq_pair (_, ty) = p in\n  Int256.add\n    (Int256.mul\n      (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO Coq_xH)))))))\n      (sizeof ty)) (frame_size locs')\n\n(** val mkfieldlist : (ident, coq_type) prod list -> fieldlist **)\n\nlet rec mkfieldlist = function\n| Coq_nil -> Fnil\n| Coq_cons (p, itl') ->\n  let Coq_pair (i, t) = p in Fcons (i, t, (mkfieldlist itl'))\n"
  },
  {
    "path": "src/backend/extraction/StackEnv.mli",
    "content": "open AST\nopen BinInt\nopen BinNums\nopen Ctypes\nopen Datatypes\nopen Integers\n\nval sp : Int256.int\n\nval sb : Int256.int\n\nval sizeof : coq_type -> Int256.int\n\nval offset : fieldlist -> ident -> Int256.int option\n\nval frame_size : (ident, coq_type) prod list -> Int256.int\n\nval mkfieldlist : (ident, coq_type) prod list -> fieldlist\n"
  },
  {
    "path": "src/backend/extraction/StmCompile.ml",
    "content": "open AST\nopen Ascii\nopen BinInt\nopen BinNums\nopen Compiled\nopen Datatypes\nopen EVM\nopen ExprCompile\nopen Integers\nopen List0\nopen LowValues\nopen Maps0\nopen MemoryModel\nopen Monad\nopen Nat0\nopen OptErrMonad\nopen PeanoNat\nopen StmtExpressionless\nopen String0\n\n(** val assign_stack_compiled : nat -> compiled **)\n\nlet assign_stack_compiled required_index =\n  match Nat.leb required_index (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S\n          (S O)))))))))))))))) with\n  | Coq_true -> command_compiled (Coq_evm_swap required_index)\n  | Coq_false ->\n    error_compiled (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n      Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n      Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n      Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n      (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n      Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n      Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n      ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n      Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n      Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n      (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n      Coq_true, Coq_false)),\n      EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val push_public_args : nat -> nat -> nat -> Int.int -> compiled **)\n\nlet rec push_public_args args first_arg_index retval_count funsig =\n  match args with\n  | O ->\n    append_compiled Coq_evm_mstore\n      (append_compiled (Coq_evm_push\n        (Int256.repr (public_funsig_pos retval_count)))\n        (command_compiled (Coq_evm_push (funsig_aligned funsig))))\n  | S n ->\n    let rest_compiled =\n      push_public_args n (add first_arg_index (S O)) retval_count funsig\n    in\n    let arg_pos = Coq_evm_push\n      (Int256.repr (public_arg_pos first_arg_index retval_count))\n    in\n    append_compiled Coq_evm_mstore (append_compiled arg_pos rest_compiled)\n\n(** val code_return : label -> compiled **)\n\nlet code_return code_label =\n  append_compiled Coq_evm_return\n    (append_compiled (Coq_evm_push Int256.zero)\n      (append_compiled Coq_evm_codesize\n        (append_compiled Coq_evm_codecopy\n          (append_compiled (Coq_evm_push Int256.zero)\n            (append_compiled (Coq_evm_push_label code_label)\n              (command_compiled Coq_evm_codesize))))))\n\n(** val cleanup : ret_type -> label -> compiled **)\n\nlet cleanup rv code_label =\n  match rv with\n  | Tvoid_method ->\n    append_compiled Coq_evm_return\n      (append_compiled (Coq_evm_push Int256.zero)\n        (command_compiled (Coq_evm_push Int256.zero)))\n  | Tconstructor -> code_return code_label\n  | Tfun ->\n    append_compiled Coq_evm_jump (command_compiled (Coq_evm_swap (S O)))\n  | Tsome_method ->\n    append_compiled Coq_evm_return\n      (append_compiled (Coq_evm_push Int256.zero)\n        (append_compiled (Coq_evm_push\n          (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n            Coq_xH))))))))\n          (append_compiled Coq_evm_mstore\n            (command_compiled (Coq_evm_push Int256.zero)))))\n\n(** val push_event_args : nat -> compiled **)\n\nlet rec push_event_args = function\n| O -> empty_compiled\n| S n ->\n  append_compiled Coq_evm_mstore\n    (append_compiled (Coq_evm_push\n      (Int256.repr\n        (Z.mul (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO Coq_xH))))))\n          (Z.of_nat n)))) (push_event_args n))\n\n(** val constructor_data_load : nat -> compiled **)\n\nlet constructor_data_load index =\n  ret (Obj.magic coq_Monad_optErr)\n    (rev (Coq_cons ((Coq_evm_push\n      (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO Coq_xH)))))))),\n      (Coq_cons ((Coq_evm_totallength index), (Coq_cons ((Coq_evm_push\n      (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n        (Coq_xO Coq_xH)))))))))), (Coq_cons (Coq_evm_codecopy, (Coq_cons\n      ((Coq_evm_push\n      (Int256.repr (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n        (Coq_xO Coq_xH)))))))))), (Coq_cons (Coq_evm_mload,\n      Coq_nil)))))))))))))\n\n(** val stm_compiled : statement -> coq_Z PTree.t -> label -> compiled **)\n\nlet stm_compiled stm _ code_label =\n  match stm with\n  | Spush s ->\n    (match s with\n     | Coq_inl v ->\n       (match v with\n        | Vunit -> command_compiled (Coq_evm_push Int256.zero)\n        | Vint i -> command_compiled (Coq_evm_push i)\n        | _ ->\n          error_compiled (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n            Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n            Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n            Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n            Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n            Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n            ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n            Coq_true, Coq_true, Coq_false)),\n            EmptyString)))))))))))))))))))))))))))))))))))))))))))))))\n     | Coq_inr l -> command_compiled (Coq_evm_push_label l))\n  | Sdup id -> dup_ident id\n  | Ssload -> command_compiled Coq_evm_sload\n  | Smload -> command_compiled Coq_evm_mload\n  | Sunop op -> unop_compiled op\n  | Sbinop (op, sgn) -> binop_compiled op sgn\n  | Scall0 b -> command_compiled (builtin0_compiled b)\n  | Scall1 b -> command_compiled (builtin1_compiled b)\n  | Sskip -> empty_compiled\n  | Spop -> command_compiled Coq_evm_pop\n  | Ssstore -> command_compiled Coq_evm_sstore\n  | Smstore -> command_compiled Coq_evm_mstore\n  | Sswap lv -> assign_stack_compiled (S lv)\n  | Sdone rv -> cleanup rv code_label\n  | Slabel l -> command_compiled (Coq_evm_label l)\n  | Sjump -> command_compiled Coq_evm_jump\n  | Sjumpi -> command_compiled Coq_evm_jumpi\n  | Shash -> command_compiled Coq_evm_sha3\n  | Stransfer -> command_compiled Coq_evm_call\n  | Scallargs (sg, args, rvcount) -> push_public_args args O rvcount sg\n  | Scallmethod b ->\n    (match b with\n     | Coq_true -> command_compiled Coq_evm_call\n     | Coq_false ->\n       append_compiled Coq_evm_call (command_compiled Coq_evm_gas))\n  | Slog (ntopics, nargs) ->\n    (match Nat.ltb nargs (S (S (S (S (S O))))) with\n     | Coq_true ->\n       append_compiled (Coq_evm_log ntopics)\n         (append_compiled (Coq_evm_push (Int256.repr Z0))\n           (append_compiled (Coq_evm_push\n             (Int256.repr\n               (Z.mul (Zpos (Coq_xO (Coq_xO (Coq_xO (Coq_xO (Coq_xO\n                 Coq_xH)))))) (Z.of_nat nargs)))) (push_event_args nargs)))\n     | Coq_false ->\n       Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n         Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n         (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n         (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_true, Coq_true, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n         Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n         Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n         Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String\n         ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false,\n         Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n         Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n         Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n         Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n         EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n  | Srevert ->\n    append_compiled Coq_evm_revert\n      (append_compiled (Coq_evm_push Int256.zero)\n        (command_compiled (Coq_evm_push Int256.zero)))\n  | Scalldataload -> command_compiled Coq_evm_calldataload\n  | Sconstructordataload i -> constructor_data_load i\n\n(** val code_compiled : code -> coq_Z PTree.t -> label -> compiled **)\n\nlet rec code_compiled c ge code_label =\n  match c with\n  | Coq_nil -> empty_compiled\n  | Coq_cons (stm, rest) ->\n    let sc = stm_compiled stm ge code_label in\n    let rest0 = code_compiled rest ge code_label in\n    concatenate_compiled sc rest0\n"
  },
  {
    "path": "src/backend/extraction/StmCompile.mli",
    "content": "open AST\nopen Ascii\nopen BinInt\nopen BinNums\nopen Compiled\nopen Datatypes\nopen EVM\nopen ExprCompile\nopen Integers\nopen List0\nopen LowValues\nopen Maps0\nopen MemoryModel\nopen Monad\nopen Nat0\nopen OptErrMonad\nopen PeanoNat\nopen StmtExpressionless\nopen String0\n\nval assign_stack_compiled : nat -> compiled\n\nval push_public_args : nat -> nat -> nat -> Int.int -> compiled\n\nval code_return : label -> compiled\n\nval cleanup : ret_type -> label -> compiled\n\nval push_event_args : nat -> compiled\n\nval constructor_data_load : nat -> compiled\n\nval stm_compiled : statement -> coq_Z PTree.t -> label -> compiled\n\nval code_compiled : code -> coq_Z PTree.t -> label -> compiled\n"
  },
  {
    "path": "src/backend/extraction/StmtCGraph.ml",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen Globalenvs\nopen Integers\nopen Maps0\n\ntype node = ident\n\ntype statement =\n| Sskip of node\n| Smassign of expr * expr * node\n| Ssassign of expr * expr * node\n| Sset of ident * expr * node\n| Scall of ident option * label * expr list * node\n| Scond of expr * node * node\n| Sreturn of ident option * node\n| Sdone\n| Shash of expr * expr * expr option * node\n| Stransfer of expr * expr * node * node\n| Scallmethod of expr * ident list * Int.int * expr * expr option * expr list\n   * node * node\n| Slog of expr list * expr list * node\n| Srevert\n\ntype code = statement PTree.t\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_code : code; fn_entrypoint : node; fn_nextnode : \n                      node }\n\n(** val fn_return : coq_function -> coq_type **)\n\nlet fn_return x = x.fn_return\n\n(** val fn_params : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_params x = x.fn_params\n\n(** val fn_temps : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_temps x = x.fn_temps\n\n(** val fn_locals : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_locals x = x.fn_locals\n\n(** val fn_code : coq_function -> code **)\n\nlet fn_code x = x.fn_code\n\n(** val fn_entrypoint : coq_function -> node **)\n\nlet fn_entrypoint x = x.fn_entrypoint\n\n(** val fn_nextnode : coq_function -> node **)\n\nlet fn_nextnode x = x.fn_nextnode\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/StmtCGraph.mli",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen Globalenvs\nopen Integers\nopen Maps0\n\ntype node = ident\n\ntype statement =\n| Sskip of node\n| Smassign of expr * expr * node\n| Ssassign of expr * expr * node\n| Sset of ident * expr * node\n| Scall of ident option * label * expr list * node\n| Scond of expr * node * node\n| Sreturn of ident option * node\n| Sdone\n| Shash of expr * expr * expr option * node\n| Stransfer of expr * expr * node * node\n| Scallmethod of expr * ident list * Int.int * expr * expr option * expr list\n   * node * node\n| Slog of expr list * expr list * node\n| Srevert\n\ntype code = statement PTree.t\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_code : code; fn_entrypoint : node; fn_nextnode : \n                      node }\n\nval fn_return : coq_function -> coq_type\n\nval fn_params : coq_function -> (ident, coq_type) prod list\n\nval fn_temps : coq_function -> (ident, coq_type) prod list\n\nval fn_locals : coq_function -> (ident, coq_type) prod list\n\nval fn_code : coq_function -> code\n\nval fn_entrypoint : coq_function -> node\n\nval fn_nextnode : coq_function -> node\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/StmtCintptr.ml",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen Globalenvs\nopen Integers\n\ntype statement =\n| Sskip\n| Ssassign of expr * expr\n| Smassign of expr * expr\n| Sset of ident * expr\n| Scall of ident option * label * expr list\n| Ssequence of statement * statement\n| Sifthenelse of expr * statement * statement\n| Sloop of statement\n| Sbreak\n| Sreturn of ident option\n| Shash of expr * expr * expr option\n| Stransfer of expr * expr\n| Scallmethod of expr * ident list * Int.int * expr * expr option * expr list\n| Slog of expr list * expr list\n| Srevert\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_body : statement }\n\n(** val fn_return : coq_function -> coq_type **)\n\nlet fn_return x = x.fn_return\n\n(** val fn_params : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_params x = x.fn_params\n\n(** val fn_temps : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_temps x = x.fn_temps\n\n(** val fn_locals : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_locals x = x.fn_locals\n\n(** val fn_body : coq_function -> statement **)\n\nlet fn_body x = x.fn_body\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/StmtCintptr.mli",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen Globalenvs\nopen Integers\n\ntype statement =\n| Sskip\n| Ssassign of expr * expr\n| Smassign of expr * expr\n| Sset of ident * expr\n| Scall of ident option * label * expr list\n| Ssequence of statement * statement\n| Sifthenelse of expr * statement * statement\n| Sloop of statement\n| Sbreak\n| Sreturn of ident option\n| Shash of expr * expr * expr option\n| Stransfer of expr * expr\n| Scallmethod of expr * ident list * Int.int * expr * expr option * expr list\n| Slog of expr list * expr list\n| Srevert\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_body : statement }\n\nval fn_return : coq_function -> coq_type\n\nval fn_params : coq_function -> (ident, coq_type) prod list\n\nval fn_temps : coq_function -> (ident, coq_type) prod list\n\nval fn_locals : coq_function -> (ident, coq_type) prod list\n\nval fn_body : coq_function -> statement\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/StmtClinear.ml",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen Globalenvs\nopen Integers\n\ntype node = ident\n\ntype statement =\n| Ssassign of expr * expr\n| Smassign of expr * expr\n| Sset of ident * expr\n| Scall of ident option * label * expr list * label\n| Sreturn of ident option\n| Sdone of bool option\n| Slabel of label\n| Sjump of label\n| Sjumpi of expr * label\n| Shash of expr * expr * expr option\n| Stransfer of expr * expr * label\n| Scallmethod of expr * ident list * Int.int * expr * expr option * expr list\n   * label\n| Slog of expr list * expr list\n| Srevert\n| Sfetchargs of bool\n| Sintro\n\ntype code = statement list\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list; fn_code : \n                      code }\n\n(** val fn_return : coq_function -> coq_type **)\n\nlet fn_return x = x.fn_return\n\n(** val fn_params : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_params x = x.fn_params\n\n(** val fn_temps : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_temps x = x.fn_temps\n\n(** val fn_locals : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_locals x = x.fn_locals\n\n(** val fn_code : coq_function -> code **)\n\nlet fn_code x = x.fn_code\n\ntype genv = (coq_function, coq_type) Genv.t\n\ntype program = (genv, label) prod\n"
  },
  {
    "path": "src/backend/extraction/StmtClinear.mli",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpCintptr\nopen Globalenvs\nopen Integers\n\ntype node = ident\n\ntype statement =\n| Ssassign of expr * expr\n| Smassign of expr * expr\n| Sset of ident * expr\n| Scall of ident option * label * expr list * label\n| Sreturn of ident option\n| Sdone of bool option\n| Slabel of label\n| Sjump of label\n| Sjumpi of expr * label\n| Shash of expr * expr * expr option\n| Stransfer of expr * expr * label\n| Scallmethod of expr * ident list * Int.int * expr * expr option * expr list\n   * label\n| Slog of expr list * expr list\n| Srevert\n| Sfetchargs of bool\n| Sintro\n\ntype code = statement list\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list; fn_code : \n                      code }\n\nval fn_return : coq_function -> coq_type\n\nval fn_params : coq_function -> (ident, coq_type) prod list\n\nval fn_temps : coq_function -> (ident, coq_type) prod list\n\nval fn_locals : coq_function -> (ident, coq_type) prod list\n\nval fn_code : coq_function -> code\n\ntype genv = (coq_function, coq_type) Genv.t\n\ntype program = (genv, label) prod\n"
  },
  {
    "path": "src/backend/extraction/StmtClocal.ml",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpMiniC\nopen Globalenvs\nopen Integers\n\ntype statement =\n| Sskip\n| Smassign of expr * expr\n| Ssassign of expr * expr\n| Sset of ident * expr\n| Scall of ident option * label * expr list\n| Ssequence of statement * statement\n| Sifthenelse of expr * statement * statement\n| Sloop of statement\n| Sbreak\n| Sreturn of ident option\n| Shash of expr * expr * expr option\n| Stransfer of expr * expr\n| Scallmethod of expr * ident list * Int.int * expr * expr option * expr list\n| Slog of expr list * expr list\n| Srevert\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_body : statement }\n\n(** val fn_return : coq_function -> coq_type **)\n\nlet fn_return x = x.fn_return\n\n(** val fn_params : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_params x = x.fn_params\n\n(** val fn_temps : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_temps x = x.fn_temps\n\n(** val fn_locals : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_locals x = x.fn_locals\n\n(** val fn_body : coq_function -> statement **)\n\nlet fn_body x = x.fn_body\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/StmtClocal.mli",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpMiniC\nopen Globalenvs\nopen Integers\n\ntype statement =\n| Sskip\n| Smassign of expr * expr\n| Ssassign of expr * expr\n| Sset of ident * expr\n| Scall of ident option * label * expr list\n| Ssequence of statement * statement\n| Sifthenelse of expr * statement * statement\n| Sloop of statement\n| Sbreak\n| Sreturn of ident option\n| Shash of expr * expr * expr option\n| Stransfer of expr * expr\n| Scallmethod of expr * ident list * Int.int * expr * expr option * expr list\n| Slog of expr list * expr list\n| Srevert\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_body : statement }\n\nval fn_return : coq_function -> coq_type\n\nval fn_params : coq_function -> (ident, coq_type) prod list\n\nval fn_temps : coq_function -> (ident, coq_type) prod list\n\nval fn_locals : coq_function -> (ident, coq_type) prod list\n\nval fn_body : coq_function -> statement\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/StmtExpressionless.ml",
    "content": "open AST\nopen Cop\nopen Ctypes\nopen Datatypes\nopen Globalenvs\nopen Integers\nopen LowValues\nopen MachineModel\n\ntype function_kind =\n| Coq_normalFunction\n| Coq_constructorFunction\n\ntype ret_type =\n| Tvoid_method\n| Tconstructor\n| Tfun\n| Tsome_method\n\ntype statement =\n| Spush of (coq_val, label) sum\n| Sdup of nat\n| Ssload\n| Smload\n| Sunop of unary_operation\n| Sbinop of binary_operation * bool\n| Scall0 of builtin0\n| Scall1 of builtin1\n| Sskip\n| Spop\n| Ssstore\n| Smstore\n| Sswap of nat\n| Sdone of ret_type\n| Slabel of label\n| Sjump\n| Sjumpi\n| Shash\n| Stransfer\n| Scallargs of Int.int * nat * nat\n| Scallmethod of bool\n| Slog of nat * nat\n| Srevert\n| Scalldataload\n| Sconstructordataload of nat\n\ntype code = statement list\n\ntype coq_function =\n  code\n  (* singleton inductive, whose constructor was mkfunction *)\n\n(** val fn_code : coq_function -> code **)\n\nlet fn_code f =\n  f\n\ntype genv = (coq_function, coq_type) Genv.t\n\ntype program = (genv, label) prod\n"
  },
  {
    "path": "src/backend/extraction/StmtExpressionless.mli",
    "content": "open AST\nopen Cop\nopen Ctypes\nopen Datatypes\nopen Globalenvs\nopen Integers\nopen LowValues\nopen MachineModel\n\ntype function_kind =\n| Coq_normalFunction\n| Coq_constructorFunction\n\ntype ret_type =\n| Tvoid_method\n| Tconstructor\n| Tfun\n| Tsome_method\n\ntype statement =\n| Spush of (coq_val, label) sum\n| Sdup of nat\n| Ssload\n| Smload\n| Sunop of unary_operation\n| Sbinop of binary_operation * bool\n| Scall0 of builtin0\n| Scall1 of builtin1\n| Sskip\n| Spop\n| Ssstore\n| Smstore\n| Sswap of nat\n| Sdone of ret_type\n| Slabel of label\n| Sjump\n| Sjumpi\n| Shash\n| Stransfer\n| Scallargs of Int.int * nat * nat\n| Scallmethod of bool\n| Slog of nat * nat\n| Srevert\n| Scalldataload\n| Sconstructordataload of nat\n\ntype code = statement list\n\ntype coq_function =\n  code\n  (* singleton inductive, whose constructor was mkfunction *)\n\nval fn_code : coq_function -> code\n\ntype genv = (coq_function, coq_type) Genv.t\n\ntype program = (genv, label) prod\n"
  },
  {
    "path": "src/backend/extraction/StmtMiniC.ml",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpMiniC\nopen Globalenvs\nopen Integers\n\ntype statement =\n| Sskip\n| Sassign of expr * expr\n| Sset of ident * expr\n| Scall of ident option * label * expr list\n| Ssequence of statement * statement\n| Sifthenelse of expr * statement * statement\n| Sloop of statement\n| Sbreak\n| Sreturn of ident option\n| Stransfer of expr * expr\n| Scallmethod of expr * ident list * Int.int * expr * expr option * expr list\n| Slog of expr list * expr list\n| Srevert\n\n(** val coq_Sfor :\n    statement -> expr -> statement -> statement -> statement **)\n\nlet coq_Sfor s1 e2 s3 s4 =\n  Ssequence (s1, (Sloop (Sifthenelse (e2, (Ssequence (s3, s4)), Sbreak))))\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_body : statement }\n\n(** val fn_return : coq_function -> coq_type **)\n\nlet fn_return x = x.fn_return\n\n(** val fn_params : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_params x = x.fn_params\n\n(** val fn_temps : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_temps x = x.fn_temps\n\n(** val fn_locals : coq_function -> (ident, coq_type) prod list **)\n\nlet fn_locals x = x.fn_locals\n\n(** val fn_body : coq_function -> statement **)\n\nlet fn_body x = x.fn_body\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/StmtMiniC.mli",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpMiniC\nopen Globalenvs\nopen Integers\n\ntype statement =\n| Sskip\n| Sassign of expr * expr\n| Sset of ident * expr\n| Scall of ident option * label * expr list\n| Ssequence of statement * statement\n| Sifthenelse of expr * statement * statement\n| Sloop of statement\n| Sbreak\n| Sreturn of ident option\n| Stransfer of expr * expr\n| Scallmethod of expr * ident list * Int.int * expr * expr option * expr list\n| Slog of expr list * expr list\n| Srevert\n\nval coq_Sfor : statement -> expr -> statement -> statement -> statement\n\ntype coq_function = { fn_return : coq_type;\n                      fn_params : (ident, coq_type) prod list;\n                      fn_temps : (ident, coq_type) prod list;\n                      fn_locals : (ident, coq_type) prod list;\n                      fn_body : statement }\n\nval fn_return : coq_function -> coq_type\n\nval fn_params : coq_function -> (ident, coq_type) prod list\n\nval fn_temps : coq_function -> (ident, coq_type) prod list\n\nval fn_locals : coq_function -> (ident, coq_type) prod list\n\nval fn_body : coq_function -> statement\n\ntype genv = (coq_function, coq_type) Genv.t\n"
  },
  {
    "path": "src/backend/extraction/StmtStacked.ml",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpStacked\nopen Globalenvs\nopen Integers\n\ntype statement =\n| Sskip\n| Srvalue of expr\n| Slvalue of expr\n| Spushvoid\n| Spop\n| Ssassign\n| Smassign\n| Sset of nat\n| Sdone of nat * ret_type\n| Spushlabel of typed_label\n| Slabel of label\n| Sjump_call\n| Sjump_internal\n| Sjumpi\n| Shash\n| Stransfer\n| Scallargs of Int.int * nat * nat\n| Scallmethod of bool\n| Slog of nat * nat\n| Srevert\n| Sfetchargs of nat\n\ntype code = statement list\n\ntype coq_function =\n  code\n  (* singleton inductive, whose constructor was mkfunction *)\n\n(** val fn_code : coq_function -> code **)\n\nlet fn_code f =\n  f\n\ntype genv = (coq_function, coq_type) Genv.t\n\ntype program = (genv, label) prod\n"
  },
  {
    "path": "src/backend/extraction/StmtStacked.mli",
    "content": "open AST\nopen Ctypes\nopen Datatypes\nopen ExpStacked\nopen Globalenvs\nopen Integers\n\ntype statement =\n| Sskip\n| Srvalue of expr\n| Slvalue of expr\n| Spushvoid\n| Spop\n| Ssassign\n| Smassign\n| Sset of nat\n| Sdone of nat * ret_type\n| Spushlabel of typed_label\n| Slabel of label\n| Sjump_call\n| Sjump_internal\n| Sjumpi\n| Shash\n| Stransfer\n| Scallargs of Int.int * nat * nat\n| Scallmethod of bool\n| Slog of nat * nat\n| Srevert\n| Sfetchargs of nat\n\ntype code = statement list\n\ntype coq_function =\n  code\n  (* singleton inductive, whose constructor was mkfunction *)\n\nval fn_code : coq_function -> code\n\ntype genv = (coq_function, coq_type) Genv.t\n\ntype program = (genv, label) prod\n"
  },
  {
    "path": "src/backend/extraction/String0.ml",
    "content": "open Ascii\n\ntype string =\n| EmptyString\n| String of ascii * string\n\n(** val append : string -> string -> string **)\n\nlet rec append s1 s2 =\n  match s1 with\n  | EmptyString -> s2\n  | String (c, s1') -> String (c, (append s1' s2))\n"
  },
  {
    "path": "src/backend/extraction/String0.mli",
    "content": "open Ascii\n\ntype string =\n| EmptyString\n| String of ascii * string\n\nval append : string -> string -> string\n"
  },
  {
    "path": "src/backend/extraction/Structure.ml",
    "content": "open Datatypes\nopen Integers\nopen Types\nopen Values\n\ntype __ = Obj.t\n\ntype sx =\n| Unsigned\n| Signed\n\nmodule IntOp =\n struct\n  type unop =\n  | Clz\n  | Ctz\n  | Popcnt\n\n  (** val unop_rect : 'a1 -> 'a1 -> 'a1 -> unop -> 'a1 **)\n\n  let unop_rect f f0 f1 = function\n  | Clz -> f\n  | Ctz -> f0\n  | Popcnt -> f1\n\n  (** val unop_rec : 'a1 -> 'a1 -> 'a1 -> unop -> 'a1 **)\n\n  let unop_rec f f0 f1 = function\n  | Clz -> f\n  | Ctz -> f0\n  | Popcnt -> f1\n\n  type binop =\n  | Add\n  | Sub\n  | Mul\n  | Div of sx\n  | Rem of sx\n  | And\n  | Or\n  | Xor\n  | Shl\n  | Shr of sx\n  | Rotl\n  | Rotr\n\n  (** val binop_rect :\n      'a1 -> 'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> 'a1 -> 'a1 ->\n      'a1 -> (sx -> 'a1) -> 'a1 -> 'a1 -> binop -> 'a1 **)\n\n  let binop_rect f f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 = function\n  | Add -> f\n  | Sub -> f0\n  | Mul -> f1\n  | Div x -> f2 x\n  | Rem x -> f3 x\n  | And -> f4\n  | Or -> f5\n  | Xor -> f6\n  | Shl -> f7\n  | Shr x -> f8 x\n  | Rotl -> f9\n  | Rotr -> f10\n\n  (** val binop_rec :\n      'a1 -> 'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> 'a1 -> 'a1 ->\n      'a1 -> (sx -> 'a1) -> 'a1 -> 'a1 -> binop -> 'a1 **)\n\n  let binop_rec f f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 = function\n  | Add -> f\n  | Sub -> f0\n  | Mul -> f1\n  | Div x -> f2 x\n  | Rem x -> f3 x\n  | And -> f4\n  | Or -> f5\n  | Xor -> f6\n  | Shl -> f7\n  | Shr x -> f8 x\n  | Rotl -> f9\n  | Rotr -> f10\n\n  (** val testop_rect : 'a1 -> 'a1 **)\n\n  let testop_rect f =\n    f\n\n  (** val testop_rec : 'a1 -> 'a1 **)\n\n  let testop_rec f =\n    f\n\n  type relop =\n  | Eq\n  | Ne\n  | Lt of sx\n  | Gt of sx\n  | Le of sx\n  | Ge of sx\n\n  (** val relop_rect :\n      'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1)\n      -> relop -> 'a1 **)\n\n  let relop_rect f f0 f1 f2 f3 f4 = function\n  | Eq -> f\n  | Ne -> f0\n  | Lt x -> f1 x\n  | Gt x -> f2 x\n  | Le x -> f3 x\n  | Ge x -> f4 x\n\n  (** val relop_rec :\n      'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1)\n      -> relop -> 'a1 **)\n\n  let relop_rec f f0 f1 f2 f3 f4 = function\n  | Eq -> f\n  | Ne -> f0\n  | Lt x -> f1 x\n  | Gt x -> f2 x\n  | Le x -> f3 x\n  | Ge x -> f4 x\n\n  type cvtop =\n  | Wrap_i64\n  | Extend_i32 of sx\n  | Trunc_f32 of sx\n  | Trunc_f64 of sx\n  | Reinterpret\n\n  (** val cvtop_rect :\n      'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1 **)\n\n  let cvtop_rect f f0 f1 f2 f3 = function\n  | Wrap_i64 -> f\n  | Extend_i32 x -> f0 x\n  | Trunc_f32 x -> f1 x\n  | Trunc_f64 x -> f2 x\n  | Reinterpret -> f3\n\n  (** val cvtop_rec :\n      'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1 **)\n\n  let cvtop_rec f f0 f1 f2 f3 = function\n  | Wrap_i64 -> f\n  | Extend_i32 x -> f0 x\n  | Trunc_f32 x -> f1 x\n  | Trunc_f64 x -> f2 x\n  | Reinterpret -> f3\n\n  type memop =\n  | Store\n  | Load\n\n  (** val memop_rect : 'a1 -> 'a1 -> memop -> 'a1 **)\n\n  let memop_rect f f0 = function\n  | Store -> f\n  | Load -> f0\n\n  (** val memop_rec : 'a1 -> 'a1 -> memop -> 'a1 **)\n\n  let memop_rec f f0 = function\n  | Store -> f\n  | Load -> f0\n end\n\nmodule FloatOp =\n struct\n  type unop =\n  | Abs\n  | Neg\n  | Sqrt\n  | Ceil\n  | Floor\n  | Trunc\n  | Nearest\n\n  (** val unop_rect :\n      'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> unop -> 'a1 **)\n\n  let unop_rect f f0 f1 f2 f3 f4 f5 = function\n  | Abs -> f\n  | Neg -> f0\n  | Sqrt -> f1\n  | Ceil -> f2\n  | Floor -> f3\n  | Trunc -> f4\n  | Nearest -> f5\n\n  (** val unop_rec :\n      'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> unop -> 'a1 **)\n\n  let unop_rec f f0 f1 f2 f3 f4 f5 = function\n  | Abs -> f\n  | Neg -> f0\n  | Sqrt -> f1\n  | Ceil -> f2\n  | Floor -> f3\n  | Trunc -> f4\n  | Nearest -> f5\n\n  type binop =\n  | Add\n  | Sub\n  | Mul\n  | Div\n  | Min\n  | Max\n  | Copysign\n\n  (** val binop_rect :\n      'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> binop -> 'a1 **)\n\n  let binop_rect f f0 f1 f2 f3 f4 f5 = function\n  | Add -> f\n  | Sub -> f0\n  | Mul -> f1\n  | Div -> f2\n  | Min -> f3\n  | Max -> f4\n  | Copysign -> f5\n\n  (** val binop_rec :\n      'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> binop -> 'a1 **)\n\n  let binop_rec f f0 f1 f2 f3 f4 f5 = function\n  | Add -> f\n  | Sub -> f0\n  | Mul -> f1\n  | Div -> f2\n  | Min -> f3\n  | Max -> f4\n  | Copysign -> f5\n\n  (** val testop_rect : __ -> 'a1 **)\n\n  let testop_rect _ =\n    assert false (* absurd case *)\n\n  (** val testop_rec : __ -> 'a1 **)\n\n  let testop_rec _ =\n    assert false (* absurd case *)\n\n  type relop =\n  | Eq\n  | Ne\n  | Lt\n  | Gt\n  | Le\n  | Ge\n\n  (** val relop_rect :\n      'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> relop -> 'a1 **)\n\n  let relop_rect f f0 f1 f2 f3 f4 = function\n  | Eq -> f\n  | Ne -> f0\n  | Lt -> f1\n  | Gt -> f2\n  | Le -> f3\n  | Ge -> f4\n\n  (** val relop_rec :\n      'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> relop -> 'a1 **)\n\n  let relop_rec f f0 f1 f2 f3 f4 = function\n  | Eq -> f\n  | Ne -> f0\n  | Lt -> f1\n  | Gt -> f2\n  | Le -> f3\n  | Ge -> f4\n\n  type cvtop =\n  | Demote_f64\n  | Promote_f32\n  | Convert_i32 of sx\n  | Convert_i64 of sx\n  | Reinterpret\n\n  (** val cvtop_rect :\n      'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1 **)\n\n  let cvtop_rect f f0 f1 f2 f3 = function\n  | Demote_f64 -> f\n  | Promote_f32 -> f0\n  | Convert_i32 x -> f1 x\n  | Convert_i64 x -> f2 x\n  | Reinterpret -> f3\n\n  (** val cvtop_rec :\n      'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1 **)\n\n  let cvtop_rec f f0 f1 f2 f3 = function\n  | Demote_f64 -> f\n  | Promote_f32 -> f0\n  | Convert_i32 x -> f1 x\n  | Convert_i64 x -> f2 x\n  | Reinterpret -> f3\n\n  type memop =\n  | Store\n  | Load\n\n  (** val memop_rect : 'a1 -> 'a1 -> memop -> 'a1 **)\n\n  let memop_rect f f0 = function\n  | Store -> f\n  | Load -> f0\n\n  (** val memop_rec : 'a1 -> 'a1 -> memop -> 'a1 **)\n\n  let memop_rec f f0 = function\n  | Store -> f\n  | Load -> f0\n end\n\nmodule IOp32 = IntOp\n\nmodule IOp64 = IntOp\n\nmodule FOp32 = FloatOp\n\nmodule FOp64 = FloatOp\n\ntype unop = (IOp32.unop, IOp64.unop, FOp32.unop, FOp64.unop) op\n\ntype binop = (IOp32.binop, IOp64.binop, FOp32.binop, FOp64.binop) op\n\ntype testop = (__, __, __, __) op\n\ntype relop = (IOp32.relop, IOp64.relop, FOp32.relop, FOp64.relop) op\n\ntype cvtop = (IOp32.cvtop, IOp64.cvtop, FOp32.cvtop, FOp64.cvtop) op\n\ntype memop = (IOp32.memop, IOp64.memop, FOp32.memop, FOp64.memop) op\n\ntype blocktype =\n| BT_typeidx of nat\n| BT_valtype of valtype option\n\ntype instr =\n| Const of coq_val\n| Const_nat of nat\n| Const_256 of Int256.int\n| Unop of unop\n| Binop of binop\n| Testop of testop\n| Relop of relop\n| Memop of memop\n| Cvtop of cvtop\n| Drop\n| Select\n| Local_get of nat\n| Local_set of nat\n| Local_tee of nat\n| Global_get of nat\n| Global_set of nat\n| Nop\n| Unreachable\n| Block of blocktype * instr list\n| Loop of blocktype * instr list\n| If of blocktype * instr list * instr list\n| Br of nat\n| Br_if of nat\n| Br_table of nat list * nat\n| Return\n| Call of nat\n| Call_indirect of nat\n\ntype expr = instr list\n\ntype func = { coq_F_type : nat; coq_F_locals : valtype list; coq_F_body : expr }\n\ntype table =\n  tabletype\n  (* singleton inductive, whose constructor was Build_table *)\n\ntype mem = memtype\n  (* singleton inductive, whose constructor was Build_mem *)\n\ntype global = { coq_G_type : globaltype; coq_G_init : expr }\n\ntype elem = { coq_EL_table : nat; coq_EL_offset : expr; coq_EL_init : nat list }\n\ntype data = { coq_D_data : nat; coq_D_offset : expr; coq_D_init : byte list }\n\ntype start = nat\n  (* singleton inductive, whose constructor was Build_start *)\n\ntype exportdesc =\n| EXD_func of nat\n| EXD_table of nat\n| EXD_mem of nat\n| EXD_global of nat\n\ntype export = { coq_EX_name : name; coq_EX_desc : exportdesc }\n\ntype importdesc =\n| IMD_func of nat\n| IMD_table of nat\n| IMD_mem of nat\n| IMD_global of nat\n\ntype import = { coq_IM_module : name; coq_IM_name : name;\n                coq_IM_desc : importdesc }\n\ntype coq_module = { coq_M_types : functype list; coq_M_funcs : func list;\n                    coq_M_tables : table list; coq_M_mems : mem list;\n                    coq_M_globals : global list; coq_M_elem : elem list;\n                    coq_M_data : data list; coq_M_start : start option;\n                    coq_M_imports : import list; coq_M_exports : export list }\n"
  },
  {
    "path": "src/backend/extraction/Structure.mli",
    "content": "open Datatypes\nopen Integers\nopen Types\nopen Values\n\ntype __ = Obj.t\n\ntype sx =\n| Unsigned\n| Signed\n\nmodule IntOp :\n sig\n  type unop =\n  | Clz\n  | Ctz\n  | Popcnt\n\n  val unop_rect : 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  val unop_rec : 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  type binop =\n  | Add\n  | Sub\n  | Mul\n  | Div of sx\n  | Rem of sx\n  | And\n  | Or\n  | Xor\n  | Shl\n  | Shr of sx\n  | Rotl\n  | Rotr\n\n  val binop_rect :\n    'a1 -> 'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> 'a1 -> 'a1 ->\n    'a1 -> (sx -> 'a1) -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val binop_rec :\n    'a1 -> 'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> 'a1 -> 'a1 ->\n    'a1 -> (sx -> 'a1) -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val testop_rect : 'a1 -> 'a1\n\n  val testop_rec : 'a1 -> 'a1\n\n  type relop =\n  | Eq\n  | Ne\n  | Lt of sx\n  | Gt of sx\n  | Le of sx\n  | Ge of sx\n\n  val relop_rect :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) ->\n    relop -> 'a1\n\n  val relop_rec :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) ->\n    relop -> 'a1\n\n  type cvtop =\n  | Wrap_i64\n  | Extend_i32 of sx\n  | Trunc_f32 of sx\n  | Trunc_f64 of sx\n  | Reinterpret\n\n  val cvtop_rect :\n    'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  val cvtop_rec :\n    'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  type memop =\n  | Store\n  | Load\n\n  val memop_rect : 'a1 -> 'a1 -> memop -> 'a1\n\n  val memop_rec : 'a1 -> 'a1 -> memop -> 'a1\n end\n\nmodule FloatOp :\n sig\n  type unop =\n  | Abs\n  | Neg\n  | Sqrt\n  | Ceil\n  | Floor\n  | Trunc\n  | Nearest\n\n  val unop_rect : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  val unop_rec : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  type binop =\n  | Add\n  | Sub\n  | Mul\n  | Div\n  | Min\n  | Max\n  | Copysign\n\n  val binop_rect :\n    'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val binop_rec :\n    'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val testop_rect : __ -> 'a1\n\n  val testop_rec : __ -> 'a1\n\n  type relop =\n  | Eq\n  | Ne\n  | Lt\n  | Gt\n  | Le\n  | Ge\n\n  val relop_rect : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> relop -> 'a1\n\n  val relop_rec : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> relop -> 'a1\n\n  type cvtop =\n  | Demote_f64\n  | Promote_f32\n  | Convert_i32 of sx\n  | Convert_i64 of sx\n  | Reinterpret\n\n  val cvtop_rect :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  val cvtop_rec :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  type memop =\n  | Store\n  | Load\n\n  val memop_rect : 'a1 -> 'a1 -> memop -> 'a1\n\n  val memop_rec : 'a1 -> 'a1 -> memop -> 'a1\n end\n\nmodule IOp32 :\n sig\n  type unop = IntOp.unop =\n  | Clz\n  | Ctz\n  | Popcnt\n\n  val unop_rect : 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  val unop_rec : 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  type binop = IntOp.binop =\n  | Add\n  | Sub\n  | Mul\n  | Div of sx\n  | Rem of sx\n  | And\n  | Or\n  | Xor\n  | Shl\n  | Shr of sx\n  | Rotl\n  | Rotr\n\n  val binop_rect :\n    'a1 -> 'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> 'a1 -> 'a1 ->\n    'a1 -> (sx -> 'a1) -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val binop_rec :\n    'a1 -> 'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> 'a1 -> 'a1 ->\n    'a1 -> (sx -> 'a1) -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val testop_rect : 'a1 -> 'a1\n\n  val testop_rec : 'a1 -> 'a1\n\n  type relop = IntOp.relop =\n  | Eq\n  | Ne\n  | Lt of sx\n  | Gt of sx\n  | Le of sx\n  | Ge of sx\n\n  val relop_rect :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) ->\n    relop -> 'a1\n\n  val relop_rec :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) ->\n    relop -> 'a1\n\n  type cvtop = IntOp.cvtop =\n  | Wrap_i64\n  | Extend_i32 of sx\n  | Trunc_f32 of sx\n  | Trunc_f64 of sx\n  | Reinterpret\n\n  val cvtop_rect :\n    'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  val cvtop_rec :\n    'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  type memop = IntOp.memop =\n  | Store\n  | Load\n\n  val memop_rect : 'a1 -> 'a1 -> memop -> 'a1\n\n  val memop_rec : 'a1 -> 'a1 -> memop -> 'a1\n end\n\nmodule IOp64 :\n sig\n  type unop = IntOp.unop =\n  | Clz\n  | Ctz\n  | Popcnt\n\n  val unop_rect : 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  val unop_rec : 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  type binop = IntOp.binop =\n  | Add\n  | Sub\n  | Mul\n  | Div of sx\n  | Rem of sx\n  | And\n  | Or\n  | Xor\n  | Shl\n  | Shr of sx\n  | Rotl\n  | Rotr\n\n  val binop_rect :\n    'a1 -> 'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> 'a1 -> 'a1 ->\n    'a1 -> (sx -> 'a1) -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val binop_rec :\n    'a1 -> 'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> 'a1 -> 'a1 ->\n    'a1 -> (sx -> 'a1) -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val testop_rect : 'a1 -> 'a1\n\n  val testop_rec : 'a1 -> 'a1\n\n  type relop = IntOp.relop =\n  | Eq\n  | Ne\n  | Lt of sx\n  | Gt of sx\n  | Le of sx\n  | Ge of sx\n\n  val relop_rect :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) ->\n    relop -> 'a1\n\n  val relop_rec :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) ->\n    relop -> 'a1\n\n  type cvtop = IntOp.cvtop =\n  | Wrap_i64\n  | Extend_i32 of sx\n  | Trunc_f32 of sx\n  | Trunc_f64 of sx\n  | Reinterpret\n\n  val cvtop_rect :\n    'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  val cvtop_rec :\n    'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  type memop = IntOp.memop =\n  | Store\n  | Load\n\n  val memop_rect : 'a1 -> 'a1 -> memop -> 'a1\n\n  val memop_rec : 'a1 -> 'a1 -> memop -> 'a1\n end\n\nmodule FOp32 :\n sig\n  type unop = FloatOp.unop =\n  | Abs\n  | Neg\n  | Sqrt\n  | Ceil\n  | Floor\n  | Trunc\n  | Nearest\n\n  val unop_rect : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  val unop_rec : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  type binop = FloatOp.binop =\n  | Add\n  | Sub\n  | Mul\n  | Div\n  | Min\n  | Max\n  | Copysign\n\n  val binop_rect :\n    'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val binop_rec :\n    'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val testop_rect : __ -> 'a1\n\n  val testop_rec : __ -> 'a1\n\n  type relop = FloatOp.relop =\n  | Eq\n  | Ne\n  | Lt\n  | Gt\n  | Le\n  | Ge\n\n  val relop_rect : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> relop -> 'a1\n\n  val relop_rec : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> relop -> 'a1\n\n  type cvtop = FloatOp.cvtop =\n  | Demote_f64\n  | Promote_f32\n  | Convert_i32 of sx\n  | Convert_i64 of sx\n  | Reinterpret\n\n  val cvtop_rect :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  val cvtop_rec :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  type memop = FloatOp.memop =\n  | Store\n  | Load\n\n  val memop_rect : 'a1 -> 'a1 -> memop -> 'a1\n\n  val memop_rec : 'a1 -> 'a1 -> memop -> 'a1\n end\n\nmodule FOp64 :\n sig\n  type unop = FloatOp.unop =\n  | Abs\n  | Neg\n  | Sqrt\n  | Ceil\n  | Floor\n  | Trunc\n  | Nearest\n\n  val unop_rect : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  val unop_rec : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> unop -> 'a1\n\n  type binop = FloatOp.binop =\n  | Add\n  | Sub\n  | Mul\n  | Div\n  | Min\n  | Max\n  | Copysign\n\n  val binop_rect :\n    'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val binop_rec :\n    'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> binop -> 'a1\n\n  val testop_rect : __ -> 'a1\n\n  val testop_rec : __ -> 'a1\n\n  type relop = FloatOp.relop =\n  | Eq\n  | Ne\n  | Lt\n  | Gt\n  | Le\n  | Ge\n\n  val relop_rect : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> relop -> 'a1\n\n  val relop_rec : 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> relop -> 'a1\n\n  type cvtop = FloatOp.cvtop =\n  | Demote_f64\n  | Promote_f32\n  | Convert_i32 of sx\n  | Convert_i64 of sx\n  | Reinterpret\n\n  val cvtop_rect :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  val cvtop_rec :\n    'a1 -> 'a1 -> (sx -> 'a1) -> (sx -> 'a1) -> 'a1 -> cvtop -> 'a1\n\n  type memop = FloatOp.memop =\n  | Store\n  | Load\n\n  val memop_rect : 'a1 -> 'a1 -> memop -> 'a1\n\n  val memop_rec : 'a1 -> 'a1 -> memop -> 'a1\n end\n\ntype unop = (IOp32.unop, IOp64.unop, FOp32.unop, FOp64.unop) op\n\ntype binop = (IOp32.binop, IOp64.binop, FOp32.binop, FOp64.binop) op\n\ntype testop = (__, __, __, __) op\n\ntype relop = (IOp32.relop, IOp64.relop, FOp32.relop, FOp64.relop) op\n\ntype cvtop = (IOp32.cvtop, IOp64.cvtop, FOp32.cvtop, FOp64.cvtop) op\n\ntype memop = (IOp32.memop, IOp64.memop, FOp32.memop, FOp64.memop) op\n\ntype blocktype =\n| BT_typeidx of nat\n| BT_valtype of valtype option\n\ntype instr =\n| Const of coq_val\n| Const_nat of nat\n| Const_256 of Int256.int\n| Unop of unop\n| Binop of binop\n| Testop of testop\n| Relop of relop\n| Memop of memop\n| Cvtop of cvtop\n| Drop\n| Select\n| Local_get of nat\n| Local_set of nat\n| Local_tee of nat\n| Global_get of nat\n| Global_set of nat\n| Nop\n| Unreachable\n| Block of blocktype * instr list\n| Loop of blocktype * instr list\n| If of blocktype * instr list * instr list\n| Br of nat\n| Br_if of nat\n| Br_table of nat list * nat\n| Return\n| Call of nat\n| Call_indirect of nat\n\ntype expr = instr list\n\ntype func = { coq_F_type : nat; coq_F_locals : valtype list; coq_F_body : expr }\n\ntype table =\n  tabletype\n  (* singleton inductive, whose constructor was Build_table *)\n\ntype mem = memtype\n  (* singleton inductive, whose constructor was Build_mem *)\n\ntype global = { coq_G_type : globaltype; coq_G_init : expr }\n\ntype elem = { coq_EL_table : nat; coq_EL_offset : expr; coq_EL_init : nat list }\n\ntype data = { coq_D_data : nat; coq_D_offset : expr; coq_D_init : byte list }\n\ntype start = nat\n  (* singleton inductive, whose constructor was Build_start *)\n\ntype exportdesc =\n| EXD_func of nat\n| EXD_table of nat\n| EXD_mem of nat\n| EXD_global of nat\n\ntype export = { coq_EX_name : name; coq_EX_desc : exportdesc }\n\ntype importdesc =\n| IMD_func of nat\n| IMD_table of nat\n| IMD_mem of nat\n| IMD_global of nat\n\ntype import = { coq_IM_module : name; coq_IM_name : name;\n                coq_IM_desc : importdesc }\n\ntype coq_module = { coq_M_types : functype list; coq_M_funcs : func list;\n                    coq_M_tables : table list; coq_M_mems : mem list;\n                    coq_M_globals : global list; coq_M_elem : elem list;\n                    coq_M_data : data list; coq_M_start : start option;\n                    coq_M_imports : import list; coq_M_exports : export list }\n"
  },
  {
    "path": "src/backend/extraction/TempModelLow.ml",
    "content": "open BinNums\nopen Ctypes\nopen Datatypes\nopen List0\nopen Specif\n\ntype __ = Obj.t\n\ntype typed_idents = (positive, coq_type) prod list\n\n(** val my_peq : positive -> positive -> sumbool **)\n\nlet rec my_peq p x0 =\n  match p with\n  | Coq_xI p0 -> (match x0 with\n                  | Coq_xI p1 -> my_peq p0 p1\n                  | _ -> Coq_right)\n  | Coq_xO p0 -> (match x0 with\n                  | Coq_xO p1 -> my_peq p0 p1\n                  | _ -> Coq_right)\n  | Coq_xH -> (match x0 with\n               | Coq_xH -> Coq_left\n               | _ -> Coq_right)\n\n(** val unique_temps_excl : typed_idents -> typed_idents -> typed_idents **)\n\nlet rec unique_temps_excl t excl =\n  match t with\n  | Coq_nil -> Coq_nil\n  | Coq_cons (p, rest) ->\n    let Coq_pair (tmp, ty) = p in\n    let utemps = unique_temps_excl rest excl in\n    (match in_dec my_peq tmp (map fst utemps) with\n     | Coq_left -> utemps\n     | Coq_right ->\n       (match in_dec my_peq tmp (map fst excl) with\n        | Coq_left -> utemps\n        | Coq_right -> Coq_cons ((Coq_pair (tmp, ty)), utemps)))\n\n(** val unique_temps : typed_idents -> typed_idents **)\n\nlet unique_temps t =\n  unique_temps_excl t Coq_nil\n\n(** val unique_all_temps : typed_idents -> typed_idents -> typed_idents **)\n\nlet unique_all_temps t t' =\n  app (unique_temps_excl t t') (unique_temps t')\n\ntype ftemps = { f_temps : (__ -> typed_idents); f_args : (__ -> typed_idents) }\n\ntype f_t = __\n\n(** val f_temps : ftemps -> f_t -> typed_idents **)\n\nlet f_temps x = x.f_temps\n\n(** val f_args : ftemps -> f_t -> typed_idents **)\n\nlet f_args x = x.f_args\n\ntype coq_function = f_t\n\n(** val fn_temps : ftemps -> f_t -> typed_idents **)\n\nlet fn_temps =\n  f_temps\n\n(** val fn_params : ftemps -> f_t -> typed_idents **)\n\nlet fn_params =\n  f_args\n\n(** val temps : ftemps -> coq_function -> typed_idents **)\n\nlet temps =\n  fn_temps\n\n(** val params : ftemps -> coq_function -> typed_idents **)\n\nlet params =\n  fn_params\n\n(** val some_temps : ftemps -> coq_function -> typed_idents **)\n\nlet some_temps ftype f =\n  unique_temps_excl (temps ftype f) (params ftype f)\n\n(** val some_args : ftemps -> coq_function -> typed_idents **)\n\nlet some_args ftype f =\n  unique_temps (params ftype f)\n\n(** val all_temps : ftemps -> coq_function -> typed_idents **)\n\nlet all_temps ftype f =\n  unique_all_temps (temps ftype f) (params ftype f)\n"
  },
  {
    "path": "src/backend/extraction/TempModelLow.mli",
    "content": "open BinNums\nopen Ctypes\nopen Datatypes\nopen List0\nopen Specif\n\ntype __ = Obj.t\n\ntype typed_idents = (positive, coq_type) prod list\n\nval my_peq : positive -> positive -> sumbool\n\nval unique_temps_excl : typed_idents -> typed_idents -> typed_idents\n\nval unique_temps : typed_idents -> typed_idents\n\nval unique_all_temps : typed_idents -> typed_idents -> typed_idents\n\ntype ftemps = { f_temps : (__ -> typed_idents); f_args : (__ -> typed_idents) }\n\ntype f_t = __\n\nval f_temps : ftemps -> f_t -> typed_idents\n\nval f_args : ftemps -> f_t -> typed_idents\n\ntype coq_function = f_t\n\nval fn_temps : ftemps -> f_t -> typed_idents\n\nval fn_params : ftemps -> f_t -> typed_idents\n\nval temps : ftemps -> coq_function -> typed_idents\n\nval params : ftemps -> coq_function -> typed_idents\n\nval some_temps : ftemps -> coq_function -> typed_idents\n\nval some_args : ftemps -> coq_function -> typed_idents\n\nval all_temps : ftemps -> coq_function -> typed_idents\n"
  },
  {
    "path": "src/backend/extraction/Trees.ml",
    "content": "open Ascii\nopen BinNums\nopen Datatypes\nopen Globalenvs\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen String0\n\n(** val map_error : ('a1 -> 'a2 optErr) -> 'a1 list -> 'a2 list optErr **)\n\nlet rec map_error f = function\n| Coq_nil -> Success Coq_nil\n| Coq_cons (a, rest) ->\n  bind (Obj.magic coq_Monad_optErr) (map_error f rest) (fun rest' ->\n    bind (Obj.magic coq_Monad_optErr) (Obj.magic f a) (fun a' -> Success\n      (Coq_cons (a', rest'))))\n\n(** val xtransl_tree :\n    ('a1 -> 'a2 optErr) -> (positive, 'a1) prod list -> 'a2 PTree.t optErr **)\n\nlet rec xtransl_tree f = function\n| Coq_nil -> ret (Obj.magic coq_Monad_optErr) PTree.empty\n| Coq_cons (p, rest) ->\n  let Coq_pair (k, a) = p in\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic f a) (fun b ->\n    bind (Obj.magic coq_Monad_optErr) (xtransl_tree f rest) (fun rest0 ->\n      ret (Obj.magic coq_Monad_optErr) (PTree.set k b rest0)))\n\n(** val transl_tree :\n    ('a1 -> 'a2 optErr) -> 'a1 PTree.t -> 'a2 PTree.t optErr **)\n\nlet transl_tree f t0 =\n  xtransl_tree f (PTree.elements t0)\n\n(** val partial_f : ('a1 -> 'a2 optErr) -> 'a1 option -> 'a2 option optErr **)\n\nlet partial_f f = function\n| Some a' ->\n  bind (Obj.magic coq_Monad_optErr) (Obj.magic f a') (fun b ->\n    ret (Obj.magic coq_Monad_optErr) (Some b))\n| None ->\n  Error (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n    (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false, Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n    (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String\n    ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n    Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n    Coq_false, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n    Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n    (Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_true, Coq_true, Coq_true,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true,\n    Coq_false, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n    Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n    Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n    Coq_true, Coq_true, Coq_true, Coq_false, Coq_true, Coq_false,\n    Coq_false)),\n    EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n\n(** val transl_map :\n    ('a1 -> 'a2 optErr) -> 'a1 option IntMap.t -> 'a2 option IntMap.t optErr **)\n\nlet transl_map f = function\n| Coq_pair (o, t1) ->\n  (match o with\n   | Some _ ->\n     Error (String ((Ascii (Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n       Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_true, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_false, Coq_false, Coq_true,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n       Coq_false, Coq_false)), (String ((Ascii (Coq_false, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_false,\n       Coq_false, Coq_true, Coq_true, Coq_false, Coq_true, Coq_true,\n       Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_true, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_false, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_false,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_true, Coq_false, Coq_false, Coq_false, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_false, Coq_false,\n       Coq_true, Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false,\n       Coq_false, Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_true, Coq_false, Coq_false, Coq_true, Coq_true,\n       Coq_true, Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_true, Coq_false)),\n       (String ((Ascii (Coq_false, Coq_false, Coq_false, Coq_false,\n       Coq_false, Coq_true, Coq_false, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_false,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_true, Coq_true,\n       Coq_true, Coq_false, Coq_true, Coq_true, Coq_false)), (String ((Ascii\n       (Coq_false, Coq_true, Coq_true, Coq_true, Coq_false, Coq_true,\n       Coq_true, Coq_false)), (String ((Ascii (Coq_true, Coq_false, Coq_true,\n       Coq_false, Coq_false, Coq_true, Coq_true, Coq_false)),\n       EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n   | None ->\n     bind (Obj.magic coq_Monad_optErr)\n       (Obj.magic transl_tree (partial_f f) t1) (fun tt ->\n       ret (Obj.magic coq_Monad_optErr) (Coq_pair (None, tt))))\n\n(** val xtransl_tree_keys_move :\n    (positive -> 'a1 -> (positive, 'a2) prod optErr) -> (positive, 'a1) prod\n    list -> 'a2 PTree.t optErr **)\n\nlet rec xtransl_tree_keys_move f = function\n| Coq_nil -> ret (Obj.magic coq_Monad_optErr) PTree.empty\n| Coq_cons (p, rest) ->\n  let Coq_pair (k, a) = p in\n  bind2 (Obj.magic coq_Monad_optErr) (Obj.magic f k a) (fun k' b ->\n    bind (Obj.magic coq_Monad_optErr) (xtransl_tree_keys_move f rest)\n      (fun rest0 -> ret (Obj.magic coq_Monad_optErr) (PTree.set k' b rest0)))\n\n(** val transl_tree_keys_move :\n    (positive -> 'a1 -> (positive, 'a2) prod optErr) -> 'a1 PTree.t -> 'a2\n    PTree.t optErr **)\n\nlet transl_tree_keys_move f t0 =\n  xtransl_tree_keys_move f (PTree.elements t0)\n"
  },
  {
    "path": "src/backend/extraction/Trees.mli",
    "content": "open Ascii\nopen BinNums\nopen Datatypes\nopen Globalenvs\nopen Maps0\nopen Monad\nopen OptErrMonad\nopen String0\n\nval map_error : ('a1 -> 'a2 optErr) -> 'a1 list -> 'a2 list optErr\n\nval xtransl_tree :\n  ('a1 -> 'a2 optErr) -> (positive, 'a1) prod list -> 'a2 PTree.t optErr\n\nval transl_tree : ('a1 -> 'a2 optErr) -> 'a1 PTree.t -> 'a2 PTree.t optErr\n\nval partial_f : ('a1 -> 'a2 optErr) -> 'a1 option -> 'a2 option optErr\n\nval transl_map :\n  ('a1 -> 'a2 optErr) -> 'a1 option IntMap.t -> 'a2 option IntMap.t optErr\n\nval xtransl_tree_keys_move :\n  (positive -> 'a1 -> (positive, 'a2) prod optErr) -> (positive, 'a1) prod\n  list -> 'a2 PTree.t optErr\n\nval transl_tree_keys_move :\n  (positive -> 'a1 -> (positive, 'a2) prod optErr) -> 'a1 PTree.t -> 'a2\n  PTree.t optErr\n"
  },
  {
    "path": "src/backend/extraction/Types.ml",
    "content": "open Datatypes\nopen Int0\n\ntype __ = Obj.t\n\ntype valtype =\n| T_i32\n| T_i64\n| T_f32\n| T_f64\n\ntype functype =\n| FT of valtype list * valtype list\n\ntype limits = { coq_L_min : I32.t; coq_L_max : I32.t option }\n\ntype memtype = limits\n\ntype tabletype = (limits, __) prod\n\ntype mut =\n| GT_const\n| GT_var\n\ntype globaltype = (mut, valtype) prod\n"
  },
  {
    "path": "src/backend/extraction/Types.mli",
    "content": "open Datatypes\nopen Int0\n\ntype __ = Obj.t\n\ntype valtype =\n| T_i32\n| T_i64\n| T_f32\n| T_f64\n\ntype functype =\n| FT of valtype list * valtype list\n\ntype limits = { coq_L_min : I32.t; coq_L_max : I32.t option }\n\ntype memtype = limits\n\ntype tabletype = (limits, __) prod\n\ntype mut =\n| GT_const\n| GT_var\n\ntype globaltype = (mut, valtype) prod\n"
  },
  {
    "path": "src/backend/extraction/Values.ml",
    "content": "open Datatypes\nopen Float\nopen Int0\nopen Types\n\ntype byte = nat\n\ntype char = nat\n\ntype name = char list\n\ntype ('i32, 'i64, 'f32, 'f64) op =\n| Coq_i32 of 'i32\n| Coq_i64 of 'i64\n| Coq_f32 of 'f32\n| Coq_f64 of 'f64\n\ntype coq_val = (I32.t, I64.t, F32.t, F64.t) op\n\n(** val type_of : ('a1, 'a2, 'a3, 'a4) op -> valtype **)\n\nlet type_of = function\n| Coq_i32 _ -> T_i32\n| Coq_i64 _ -> T_i64\n| Coq_f32 _ -> T_f32\n| Coq_f64 _ -> T_f64\n\n(** val value_of_val : coq_val -> nat option **)\n\nlet value_of_val = function\n| Coq_i32 v -> Some (I32.to_nat v)\n| Coq_i64 v -> Some (I64.to_nat v)\n| _ -> None\n"
  },
  {
    "path": "src/backend/extraction/Values.mli",
    "content": "open Datatypes\nopen Float\nopen Int0\nopen Types\n\ntype byte = nat\n\ntype char = nat\n\ntype name = char list\n\ntype ('i32, 'i64, 'f32, 'f64) op =\n| Coq_i32 of 'i32\n| Coq_i64 of 'i64\n| Coq_f32 of 'f32\n| Coq_f64 of 'f64\n\ntype coq_val = (I32.t, I64.t, F32.t, F64.t) op\n\nval type_of : ('a1, 'a2, 'a3, 'a4) op -> valtype\n\nval value_of_val : coq_val -> nat option\n"
  },
  {
    "path": "src/backend/extraction/ZArith_dec.ml",
    "content": "open BinInt\nopen BinNums\nopen Datatypes\nopen Specif\n\n(** val coq_Z_lt_dec : coq_Z -> coq_Z -> sumbool **)\n\nlet coq_Z_lt_dec x y =\n  match Z.compare x y with\n  | Lt -> Coq_left\n  | _ -> Coq_right\n\n(** val coq_Z_le_dec : coq_Z -> coq_Z -> sumbool **)\n\nlet coq_Z_le_dec x y =\n  match Z.compare x y with\n  | Gt -> Coq_right\n  | _ -> Coq_left\n\n(** val coq_Z_le_gt_dec : coq_Z -> coq_Z -> sumbool **)\n\nlet coq_Z_le_gt_dec =\n  coq_Z_le_dec\n"
  },
  {
    "path": "src/backend/extraction/ZArith_dec.mli",
    "content": "open BinInt\nopen BinNums\nopen Datatypes\nopen Specif\n\nval coq_Z_lt_dec : coq_Z -> coq_Z -> sumbool\n\nval coq_Z_le_dec : coq_Z -> coq_Z -> sumbool\n\nval coq_Z_le_gt_dec : coq_Z -> coq_Z -> sumbool\n"
  },
  {
    "path": "src/backend/extraction/Zpower.ml",
    "content": "open BinNums\nopen BinPos\nopen Datatypes\n\n(** val shift_nat : nat -> positive -> positive **)\n\nlet rec shift_nat n z =\n  match n with\n  | O -> z\n  | S n0 -> Coq_xO (shift_nat n0 z)\n\n(** val shift_pos : positive -> positive -> positive **)\n\nlet shift_pos n z =\n  Pos.iter (fun x -> Coq_xO x) z n\n\n(** val two_power_nat : nat -> coq_Z **)\n\nlet two_power_nat n =\n  Zpos (shift_nat n Coq_xH)\n\n(** val two_power_pos : positive -> coq_Z **)\n\nlet two_power_pos x =\n  Zpos (shift_pos x Coq_xH)\n\n(** val two_p : coq_Z -> coq_Z **)\n\nlet two_p = function\n| Z0 -> Zpos Coq_xH\n| Zpos y -> two_power_pos y\n| Zneg _ -> Z0\n"
  },
  {
    "path": "src/backend/extraction/Zpower.mli",
    "content": "open BinNums\nopen BinPos\nopen Datatypes\n\nval shift_nat : nat -> positive -> positive\n\nval shift_pos : positive -> positive -> positive\n\nval two_power_nat : nat -> coq_Z\n\nval two_power_pos : positive -> coq_Z\n\nval two_p : coq_Z -> coq_Z\n"
  },
  {
    "path": "src/backend/extraction/dune",
    "content": "(library\n  (name backend)\n\t(libraries core zarith)\n  (preprocess (action (run %{bin:cppo} -V OCAML:%{ocaml_version} %{input-file})))\n)\n\n"
  },
  {
    "path": "src/backend/phase/MiniC/BigstepSemantics.v",
    "content": "Require Import backend.TempModel.\nRequire Import backend.AST.\nRequire Import cclib.Coqlib.\nRequire Import backend.Values.HighValues.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.Options.\nRequire Import backend.MemoryModel.\nRequire Import backend.MachineModel.\nRequire Import backend.Environments.Globalenvs.\nRequire Import backend.Environments.AllEnvironments.\nRequire Import backend.Environments.ExtEnv.\nRequire Import backend.AbstractData.\nRequire Import backend.Events.\nRequire Import backend.GasModel.\nRequire Import backend.Statements.StmtMiniC.\nRequire Import backend.Expressions.SemanticsMiniC.\nRequire Import backend.phase.MiniC.Semantics.\n\nSection WITH_DATA.\n  Context (D : compatdata).\n                                   \nSection BIGSTEP.\n\nVariable ge: genv.\nVariable me: machine_env (cdata_type D).\n\n(** ** Big-step semantics for terminating statements and functions *)\n\nInductive outcome: Type :=\n| Out_break: outcome                 (* terminated by [break] *)\n| Out_normal: outcome                (* terminated normally *)\n| Out_return: val  -> outcome.       (* terminated by [return] *)\n\nInductive out_normal : outcome -> Prop :=\n| Out_normal_N: out_normal Out_normal.\n\nInductive out_break_or_return : outcome -> outcome -> Prop :=\n| Out_break_or_return_B: out_break_or_return Out_break Out_normal\n| Out_break_or_return_R: forall ov,\n    out_break_or_return (Out_return ov) (Out_return ov).\n\nDefinition outcome_switch (out: outcome) : outcome :=\n  match out with\n  | Out_break => Out_normal\n  | o => o\n  end.  \n\n(* the second log and the nat is the *new* events, and the *additional* gas used. *)\n(* Inductive exec_stmt: int256 -> temp_env -> ext_env -> log -> statement -> int256 -> temp_env -> ext_env -> log -> nat -> outcome -> Prop := *)\n(* | exec_Sskip: forall ctx le m lg, *)\n(*     exec_stmt ctx le m lg Sskip *)\n(*               ctx le m nil 0 Out_normal *)\n(* | exec_Sassign: forall ctx le se lg lv lv_ident rv rv_int, *)\n(*     eval_lvalue ctx me se le lv lv_ident -> *)\n(*     eval_rvalue ctx me se le rv rv_int -> *)\n(*     True *)\n(*     (* exec_stmt ctx le se lg (Sassign lv rv) *) *)\n(*     (*           ctx le (IdentExtMap.set lv_ident rv_int se) nil (gas_assign true lv rv 2) Out_normal *) *)\n(* | exec_Sset: forall id rv rv_int le se prev lg, *)\n(*     PTree.get id le = Some prev -> *)\n(*     eval_rvalue me se le rv rv_int -> *)\n(*     True *)\n(*     (* exec_stmt le se lg (Sset id rv) *) *)\n(*     (*           (PTree.set id rv_int le) se nil (gas_set true rv 2) Out_normal *) *)\n(* | exec_Scall: forall optid lab fd args arg_ints vres le se se' lg lg' g, *)\n(*     eval_rvalues me se le args arg_ints -> *)\n(*     lookup_function ge lab = Some fd -> *)\n(*     eval_funcall se lg fd arg_ints se' lg' g vres -> *)\n(*     exec_stmt le se lg (Scall optid lab args) (optset optid vres le) se' lg' (g + gas_saveretval' 1 + gas_call true args 1) Out_normal *)\n(*  *)\n(*  *)\n(* | exec_Sseq_1: forall le le1 le2 se se1 se2 s1 s2 lg lg1 lg2 g1 g2 out, *)\n(*     exec_stmt le  se  lg s1 le1 se1 lg1 g1 Out_normal-> *)\n(*     exec_stmt le1 se1 (lg1++lg) s2 le2 se2 lg2 g2 out -> *)\n(*     exec_stmt le  se  lg (Ssequence s1 s2) le2 se2 (lg2++lg1) (g1+g2) out *)\n(*  *)\n(* | exec_Sseq_2: forall le le1 se se1 s1 s2 lg lg1 g1 out, *)\n(*     exec_stmt le  se  lg s1 le1 se1 lg1 g1 out -> *)\n(*     out <> Out_normal -> *)\n(*     exec_stmt le  se  lg (Ssequence s1 s2) le1 se1 lg1 g1 out *)\n(*  *)\n(* | exec_Sifthenelse: forall le le1 se se1 cond b s1 s2 lg lg1 g1 out, *)\n(*     eval_rvalue me se le cond (Vint b) ->       *)\n(*     exec_stmt le se lg (if (Int256.eq b Int256.zero) then s2 else s1) *)\n(*               le1 se1 lg1 g1 out -> *)\n(*     exec_stmt le se lg (Sifthenelse cond s1 s2) *)\n(*               le1 se1 lg1 (g1+gas_eval_cond true cond 3) out *)\n(*  *)\n(* | exec_Sreturn_some: forall se le lg a v, *)\n(*     eval_rvalue me se le a v -> *)\n(*     exec_stmt le se lg (Sreturn (Some a)) *)\n(*               le se nil (gas_return true (Some a) 0) (Out_return v) *)\n(*  *)\n(* | exec_Sbreak:   forall se le lg, *)\n(*     exec_stmt le se lg Sbreak *)\n(*               le se nil 0  Out_break *)\n(*  *)\n(* | exec_Sloop_stop: forall le le' se se' lg lg' s g out out', *)\n(*     exec_stmt le se lg s le' se' lg' g out' -> *)\n(*     out_break_or_return out' out -> *)\n(*     exec_stmt le se lg (Sloop s) *)\n(*               le' se' lg' (g+ gas_branches 2) out *)\n(*  *)\n(* | exec_Sloop_loop: forall le le1 le2 se se1 se2 lg lg1 lg2 s g1 g2 out1 out2, *)\n(*     exec_stmt le se lg s le1 se1 lg1 g1  out1 -> *)\n(*     out_normal out1 -> *)\n(*     exec_stmt le1 se1 (lg1++lg) (Sloop s) le2 se2 lg2 g2 out2 -> *)\n(*     exec_stmt le se lg (Sloop s) *)\n(*               le2 se2 (lg2++lg1) (g1 + g2 + gas_branches 2) out2 *)\n(*  *)\n(* | exec_Slog : forall le se topics topics' args args' lg, *)\n(*     eval_rvalues me se le topics topics' -> *)\n(*     eval_rvalues me se le args args' -> *)\n(*     exec_stmt le se lg (Slog topics args) le se (Elog topics' args' :: nil) (gas_log true topics args 2) Out_normal *)\n(*                *)\n(*                  *)\n(*    (* todo: we should also have a case for Stranfer, but right now  *)\n(*       the small-step semantics are not quite right (the relation *)\n(*       should also act on the storage environment), and in any *)\n(*       case we are not emitting it in Edsger yet, so leave it for later. *) *)\n(*                  *)\n(* (** [eval_funcall m1 fd args t m2 res] describes the invocation of *)\n(*   function [fd] with arguments [args].  [res] is the value returned *)\n(*   by the call.  *) *)\n(*  *)\n(* with eval_funcall: ext_env -> log -> function -> list val -> ext_env -> log -> nat -> val -> Prop := *)\n(* | eval_funcall_internal: forall le le' se se' lg lg' f args_int g vres, *)\n(*     function_initial_temps ftype f args_int = Some le -> *)\n(*     exec_stmt le se lg f.(fn_body) le' se' lg' g (Out_return vres) -> *)\n(*     eval_funcall se lg f args_int se' lg' (g + gas_done (length (all_temps ftype f)) 3 + gas_callenter (length (some_temps ftype f)) (length (some_args ftype f)) 1) vres *)\n(*   (*                  *)\n(*   | eval_funcall_external: ... *). *)\n(*  *)\n(*  *)\n(* (* In Clight, there is a distinction between internal and external function *)\n(*    calls, and the DeepSEA C backend generally uses external calls. *)\n(*    But it doesn't make a big difference, because the primitive-proofs make use of *)\n(*    eval_funcall, rather than eval_funcall_internal or eval_funcall_external directly. *) *)\n(*  *)\n(* Scheme exec_stmt_ind2 := Minimality for exec_stmt Sort Prop *)\n(*   with eval_funcall_ind2 := Minimality for eval_funcall Sort Prop. *)\n(* Combined Scheme exec_stmt_funcall_ind from exec_stmt_ind2, eval_funcall_ind2. *)\n\n\nEnd BIGSTEP.\n\n(** Big-step execution of a whole program.  *)\n(*\nSection WHOLE_PROGRAM.\nLocal Existing Instance writable_block_always_ops.\n\nInductive bigstep_program_terminates' (p: program): trace -> int -> Prop :=\n  | bigstep_program_terminates_intro: forall b f m0 m1 t r,\n      let ge := Genv.globalenv p in \n      Genv.init_mem p = Some m0 ->\n      Genv.find_symbol ge p.(prog_main) = Some b ->\n      Genv.find_funct_ptr ge b = Some f ->\n      type_of_fundef f = Tfunction Tnil type_int32s cc_default ->\n      eval_funcall ge  m0 f nil t m1 (Vint r) ->\n      bigstep_program_terminates' p t r.\n\nInductive bigstep_program_diverges' (p: program): traceinf -> Prop :=\n  | bigstep_program_diverges_intro: forall b f m0 t,\n      let ge := Genv.globalenv p in \n      Genv.init_mem p = Some m0 ->\n      Genv.find_symbol ge p.(prog_main) = Some b ->\n      Genv.find_funct_ptr ge b = Some f ->\n      type_of_fundef f = Tfunction Tnil type_int32s cc_default ->\n      evalinf_funcall ge  m0 f nil t ->\n      bigstep_program_diverges' p t.\n\nDefinition bigstep_semantics' (p: program) :=\n  Bigstep_semantics (bigstep_program_terminates' p) (bigstep_program_diverges' p).\n\nDefinition bigstep_semantics1 := bigstep_semantics' function_entry1.\n\nDefinition bigstep_semantics2 := bigstep_semantics' (fun _ => function_entry2).\n\nEnd WHOLE_PROGRAM.\n*)\n\n(** * Implication from big-step semantics to transition semantics *)\n\nSection BIGSTEP_TO_TRANSITIONS.\n\nVariable ge: genv.\nVariable me: machine_env (cdata_type D).\n\nOpen Scope nat_scope.\n  \n(* Inductive outcome_state_match *)\n(*           (le: temp_env) (d: cdata_type D) (se : storage_env) (f: function) (k: cont) (g:nat): *)\n(*   outcome -> state -> Prop := *)\n(*   | osm_normal: forall g', *)\n(*       g = g' ->   *)\n(*       outcome_state_match le d se f k g Out_normal (State f Sskip  k le d se g') *)\n(*   | osm_break: forall g', *)\n(*       g = g' ->  *)\n(*       outcome_state_match le d se f k g Out_break  (State f Sbreak k le d se g') *)\n(* (*  | osm_return_none: forall  g' k', *)\n(*       lg = lg' -> *)\n(*       g = g' ->  *)\n(*       call_cont k' = call_cont k -> *)\n(*       outcome_state_match le m f k  g  *)\n(*         (Out_return None) (State f (Sreturn None) k' le m g')  *) *)\n(*   | osm_return_some: forall a v g' k', *)\n(*       g + (gas_return true (Some a) 0) = g' ->        *)\n(*       call_cont k' = call_cont k -> *)\n(*       eval_rvalue me se le a v -> *)\n(*       outcome_state_match le d se f k g *)\n(*                           (Out_return v) *)\n(*                           (State f (Sreturn (Some a)) k' le d se g'). *)\n(*  *)\nLemma is_call_cont_call_cont:\n  forall k, is_call_cont k -> call_cont k = k.\nProof.\n  destruct k; simpl; intros; contradiction || auto.\nQed.\n\n(*Notation step := (fun ge => Clight.step ge (function_entry ge)).*)\n\nRequire Import Smallstep.\n\n\nLemma gt_plus : forall G g,\n  (G >= g -> exists g0, G = g0 + g )%nat.\nProof.\n  intros.\n  exists (G-g).\n  omega.\nQed.\n\nLtac to_plus :=\n  match goal with\n    [ H : (_ >= _)%nat |- _] => (destruct (gt_plus _ _ H); subst)\n  end.\n\n\nLemma loop_inversion1 : forall f s k le d se g S2,\n  step me ge\n       (State f (Sloop s) k le d se g) S2 ->\n  exists g', \n    star (step me) ge\n         (State f s (Kloop s k) le d se g') S2\n         /\\ g' = g - gas_branches 2\n         /\\ g = g-gas_branches 2+gas_branches 2.\nProof.\n  intros.\n  inversion H.\n  subst.\n  eexists.\n  split.\n  - apply star_refl.\n  - simpl. omega.\nQed.\n\n(* Lemma loop_inversion : forall f s k le se lg g S2 *)\n(*                               f' k' le' se' lg' g' out', *)\n(*     star (step me) ge (State f (Sloop s) k le se lg g) S2 -> *)\n(*     outcome_state_match le' se' f' k' lg' g' out' S2 -> *)\n(*     exists g', *)\n(*       star (step me) ge (State f s (Kloop s k) le se lg g') S2 *)\n(*       /\\ g' = g-gas_branches 2 *)\n(*       /\\ g = g-gas_branches 2+gas_branches 2. *)\n(* Proof. *)\n(*   intros f s k le se lg g S2 *)\n(*          f' k' le' se' lg' g' out' Hstar Hosm. *)\n(*   inv Hstar. *)\n(*   + inv Hosm. *)\n(*   + destruct (loop_inversion1 _ _ _ _ _ _ _ _ H) as [g1 [Hstep' [Heq_g1 Heq_g]]]. *)\n(*     exists g1. *)\n(*     split; auto. *)\n(*     apply star_trans with s2; assumption. *)\n(* Qed. *)\n\n(* Lemma exec_stmt_eval_funcall_steps:  *)\n(*   (forall le m s le' m' g out, *)\n(*    exec_stmt ge me le m s le' m' g out -> *)\n(*    forall f k G, *)\n(*      (G >= g) -> *)\n(*      exists S, *)\n(*        star (step me) ge (State f s k le (snd m) (fst m) G) S *)\n(*        /\\ outcome_state_match le' (snd m') (fst m') f k (G-g) out S) *)\n(* /\\ *)\n(*   (forall m f args m' g res, *)\n(*       eval_funcall ge me m f args m' g res -> *)\n(*    forall k G, *)\n(*      (G >= g) -> *)\n(*      is_call_cont k -> *)\n(*      star (step me) ge (Callstate f args k (snd m) (fst m) G) *)\n(*                        (Returnstate res k (snd m') (fst m') (G - g))). *)\n(* Proof. *)\n(*   apply exec_stmt_funcall_ind; intros. *)\n(*  *)\n(* (* skip *) *)\n(*   -  econstructor; split. apply star_refl. *)\n(*      replace (G-0)%nat with G by omega. *)\n(*      constructor; simpl; auto. *)\n(*  *)\n(* (* assign *) *)\n(*   - intros. *)\n(*     to_plus. *)\n(*     econstructor; split. apply star_one. *)\n(*     econstructor; eauto. *)\n(*     constructor; auto; omega. *)\n(* (* set *) *)\n(*   - intros. *)\n(*     to_plus. *)\n(*     econstructor; split. apply star_one. *)\n(*     econstructor; eauto. constructor; auto; omega. *)\n(*  *)\n(* (* call *) *)\n(*   - intros. *)\n(*     to_plus. *)\n(*     econstructor; split. *)\n(*     eapply star_step. *)\n(*     rewrite !plus_assoc. *)\n(*     econstructor; eauto.  *)\n(*     eapply star_right. *)\n(*     + eapply H2. *)\n(*       * omega. *)\n(*       * exact I. *)\n(*     + replace (x + g + gas_saveretval' 1 - g) with (x + gas_saveretval' 1) by omega. *)\n(*       apply step_returnstate. *)\n(*     + constructor; auto; omega. *)\n(*        *)\n(* (* sequence 1 *) *)\n(*   - to_plus. rewrite !plus_assoc.     *)\n(*     destruct (H0 f (Kseq s2 k) (x+g1+g2)) as [S1 [A1 B1]]. *)\n(*       { omega. } *)\n(*     inv B1. *)\n(*     destruct (H2 f k (x+g2)) as [S2 [A2 B2]]. *)\n(*     { omega. } *)\n(*     econstructor; split. *)\n(*     eapply star_left. econstructor. *)\n(*     eapply star_trans. eexact A1.  *)\n(*     eapply star_left. constructor. *)\n(*     replace (x + g1 + g2 - g1) with (x+g2) by omega. eexact A2. *)\n(*     replace (x + g1 + g2 - (g1 + g2)) with (x + g2 - g2) by omega. *)\n(*     exact B2. *)\n(*  *)\n(* (* sequence 2 *) *)\n(*   - to_plus.  *)\n(*     destruct (H0 f (Kseq s2 k) (x+g1)) as [S1 [A1 B1]]. *)\n(*     { omega. } *)\n(*   set (S2 := *)\n(*     match out with *)\n(*     | Out_break => State f Sbreak k le1 (snd m1) (fst m1) x *)\n(*     | _ => S1 *)\n(*     end). *)\n(*   exists S2; split. *)\n(*   + eapply star_left. econstructor. *)\n(*     eapply star_trans. eexact A1. *)\n(*     unfold S2; inv B1. *)\n(*     congruence. *)\n(*     * apply star_one. *)\n(*       replace (x + g1 - g1) with x by omega. *)\n(*       apply step_break_seq. *)\n(*     * apply star_refl. *)\n(*   + unfold S2; inv B1; congruence || econstructor; eauto; omega. *)\n(*  *)\n(* (* ifthenelse *) *)\n(*   - to_plus. *)\n(*     destruct (H1 f k (x+g1)) as [S1 [A1 B1]]. *)\n(*     { omega. } *)\n(*     exists S1; split. *)\n(*     + eapply star_left. 2: eexact A1. *)\n(*       rewrite plus_assoc. *)\n(*       eapply step_ifthenelse; eauto. *)\n(*     + replace(x + (g1 + gas_eval_cond true cond 3) - (g1 + gas_eval_cond true cond 3)) *)\n(*         with (x + g1 - g1) by omega. *)\n(*       exact B1. *)\n(*  *)\n(*   (* return none *) *)\n(*   (*       *)\n(*   -  econstructor; split. apply star_refl. *)\n(*      apply osm_return_none; simpl; auto; omega. *)\n(*    *) *)\n(*  *)\n(*  *)\n(* (* return some *) *)\n(*   -econstructor; split. apply star_refl. *)\n(*    apply osm_return_some; simpl; auto; omega. *)\n(*  *)\n(*  *)\n(* (* break *) *)\n(*   - econstructor; split. apply star_refl. *)\n(*     apply osm_break; simpl; auto; omega. *)\n(*  *)\n(* (* loop stop *) *)\n(*   - to_plus. rewrite !plus_assoc. *)\n(*     destruct (H0 f (Kloop s k) (x+g)) as [S1 [A1 B1]]. *)\n(*      { omega. } *)\n(*      set (S2 := *)\n(*             match out' with *)\n(*             | Out_break => State f Sskip k le' (snd m') (fst m') (x) *)\n(*             | _ => S1 *)\n(*             end). *)\n(*      exists S2; split. *)\n(*   + eapply star_left. eapply step_loop.  *)\n(*      eapply star_trans. eexact A1. *)\n(*      unfold S2. inversion H1; subst. *)\n(*      inv B1. apply star_one. *)\n(*      replace (x+g-g) with x by omega. *)\n(*      constructor.     *)\n(*      apply star_refl. *)\n(*   + replace (x + g + gas_branches 2 - (g + gas_branches 2)) *)\n(*             with (x + g - g) by omega. *)\n(*     unfold S2. inversion H1; subst. *)\n(*     * constructor; auto; omega. *)\n(*     * inversion B1; apply osm_return_some; simpl in *; auto. *)\n(*        *)\n(* (* loop loop *) *)\n(*   - to_plus. *)\n(*     rewrite !plus_assoc. *)\n(*     destruct (H0 f (Kloop s k) (x+g1+g2)) as [S1 [A1 B1]]. *)\n(*     { omega. } *)\n(*     destruct (H3 f k (x+g2)) as [S2 [A2 B2]]. *)\n(*     { omega. } *)\n(*     exists S2; split. *)\n(*     + eapply star_left. eapply step_loop.  *)\n(*       eapply star_trans. *)\n(*       exact A1. *)\n(*  *)\n(*       eapply loop_inversion in A2; [|eassumption]. *)\n(*       destruct A2 as [g' [A2_steps [A2_eq1 A2_eq2]]].  *)\n(*       inv H1. *)\n(*       inv B1. *)\n(*       eapply star_left. *)\n(*       replace (x + g1 + g2 - g1) with (x + g2) by omega. *)\n(*       rewrite A2_eq2. *)\n(*       apply step_skip_loop. *)\n(*       exact A2_steps. *)\n(*     + replace (x + g1 + g2  + gas_branches 2  - (g1 + g2 + gas_branches 2)) *)\n(*       with (x + g2 - g2) by omega. *)\n(*       inv B2; constructor; auto. *)\n(*  *)\n(*   (* log *) *)\n(*   - to_plus. *)\n(*     eexists. split. *)\n(*  *)\n(*     +eapply star_step. *)\n(*      econstructor. *)\n(*      eauto. *)\n(*      eauto. *)\n(*      econstructor. *)\n(*     + constructor; simpl; auto. *)\n(*       omega. *)\n(*      *)\n(*   (* call internal *) *)\n(*   - to_plus. *)\n(*     rewrite !plus_assoc. *)\n(*     destruct (H1 f k (x + g + gas_done (length (all_temps ftype f)) 3)) as [S1 [A1 B1]]. *)\n(*     { omega. } *)\n(*     eapply star_left. eapply step_internal_function; eauto. *)\n(*     eapply star_right. eexact A1. *)\n(*     inv B1.  *)\n(*     (* Out_return Some *) *)\n(*     + rewrite <- (is_call_cont_call_cont k H3). rewrite <- H6. *)\n(*       replace *)\n(*         (x + g + gas_done (length (all_temps ftype f)) 3 + *)\n(*         gas_callenter (length (some_temps ftype f)) (length (some_args ftype f)) 1 - *)\n(*         (g + gas_done (length (all_temps ftype f)) 3 + *)\n(*          gas_callenter (length (some_temps ftype f)) (length (some_args ftype f)) 1)) *)\n(*         with x by omega. *)\n(*       replace (x + g + gas_done (length (all_temps ftype f)) 3 - g + gas_return true (Some a) 0) *)\n(*       with (x + (gas_done (length (all_temps ftype f)) 3 + gas_return true (Some a) 0)) *)\n(*              by omega. *)\n(*       replace (gas_done (length (all_temps ftype f)) 3 + gas_return true (Some a) 0) *)\n(*       with  (gas_return_done true (Some a) (length (all_temps ftype f)) 3). *)\n(*  *)\n(*       Focus 2. *)\n(*       rewrite <- gas_return_done_split; f_equal; omega. *)\n(*       eapply step_return; eauto. *)\n(*       constructor; assumption. *)\n(*  (* call external *) *)\n(*  (* - apply star_one. apply step_external_function; auto. *) *)\n(* Qed.       *)\n\n\n(* Lemma exec_stmt_steps: *)\n(*   forall le m s le' m' g out, *)\n(*   exec_stmt ge me le m s le' m' g out -> *)\n(*   forall f k G, *)\n(*     (G >= g) -> *)\n(*     exists S, *)\n(*        star (step me) ge (State f s k le (snd m) (fst m) G) S *)\n(*        /\\ outcome_state_match le' (snd m') (fst m') f k  (G-g) out S. *)\n(* Proof. *)\n(*   destruct exec_stmt_eval_funcall_steps; assumption. *)\n(* Qed. *)\n(*  *)\n(* Lemma eval_funcall_steps: *)\n(*   forall m f args m' g res, *)\n(*     eval_funcall ge me m f args m' g res -> *)\n(*     forall k G, *)\n(*       (G >= g) -> *)\n(*       is_call_cont k -> *)\n(*       star (step me) ge (Callstate f args k (snd m) (fst m) G) *)\n(*                         (Returnstate res k (snd m') (fst m') (G-g)). *)\n(* Proof. *)\n(*   destruct exec_stmt_eval_funcall_steps; assumption. *)\n(* Qed. *)\n\nEnd BIGSTEP_TO_TRANSITIONS.\n\nEnd WITH_DATA.\n"
  },
  {
    "path": "src/backend/phase/MiniC/Semantics.v",
    "content": "(* Semantics for MiniC expressions and statements. *)\n\nRequire Import backend.TempModel.\nRequire Import backend.AST.\nRequire Import cclib.Coqlib.\nRequire Import backend.Expressions.ExpMiniC.\nRequire Import backend.Expressions.SemanticsMiniC.\nRequire Import backend.Statements.StmtMiniC.\nRequire Import backend.Values.HighValues.\nRequire Import cclib.Maps.\nRequire Import cclib.Integers.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.Options.\nRequire Import backend.MemoryModel.\nRequire Import backend.AbstractData.\nRequire Import backend.MachineModel.\nRequire Import backend.Environments.Globalenvs.\nRequire Import backend.Environments.AllEnvironments.\nRequire Import backend.Environments.ExtEnv.\nRequire Import backend.GasModel.\nRequire Import backend.SymbolicKeccak.\nRequire Import List. Import ListNotations.\n\nDefinition ftype : ftemps := mkftemps function fn_temps fn_params.\n\nSection WITH_DATA.\n\n\n(* machine environment *)\nContext {adata} {data_ops: CompatDataOps adata}.  \nVariable me: machine_env adata.\n\n(** ** Transition semantics for statements and functions *)\n\n(** Continuations *)\n\n(* from a given backtrace / line number in the program, where does it go from here?\nforms a linked list of continuations, ending at a stop. *)\n\nInductive cont: Type :=\n| Kstop: cont\n| Kseq: statement -> cont -> cont       (**r [Kseq s2 k] = after [s1] in [s1;s2] *)\n| Kloop: statement -> cont -> cont      (**r [Kloop s k] = inside [Sloop s] *)\n| Kcall: option ident ->                  (**r where to store result *)\n         function ->                      (**r calling function *)\n         temp_env ->                      (**r temporary env of calling function *)\n         cont -> cont.\n\n(** Pop continuation until a call or stop.\n    It used in the semantics on return, to pop out of all sequences and loops.\n *)\nFixpoint call_cont (k: cont) : cont :=\n  match k with\n  | Kseq _ k => call_cont k\n  | Kloop _ k => call_cont k\n  | _ => k\n  end.\n\n(* Used in theorem statements. *)\nDefinition is_call_cont (k: cont) : Prop :=\n  match k with\n  | Kstop => True\n  | Kcall _ _ _ _ => True\n  | _ => False\n  end.\n\nLemma call_cont_idempotent: forall k,\n  is_call_cont k -> k = call_cont k.\nProof.\nintros. destruct k; simpl.\nreflexivity.\nsimpl in H. contradiction.\nsimpl in H. contradiction.\nreflexivity.\nQed.\n\nFixpoint call_cont_index (k:cont) : int256 :=\n  match k with\n  | Kstop => Int256.repr 0\n  | Kcall _ _ _ k => Int256.add (call_cont_index k) (Int256.repr 1)\n  | Kseq _ k => call_cont_index k\n  | Kloop _ k => call_cont_index k\n  end.\n\n(** States *)\n\nInductive state: Type :=\n  | State\n      (f: function)\n      (s: statement)\n      (k: cont)\n      (le: temp_env)\n      (ee: ext_env)    (* EVM specific *)\n      (d: adata)\n      (gas: nat) : state   (* EVM specific. This is the amount of gas _remaining_.  *)\n  | Callstate        (* these are used for internal function calls, but currently not for method calls. *)\n      (fd: function)\n      (args: list val)\n      (k: cont)\n      (ee: ext_env)\n      (d: adata)\n      (gas: nat) : state\n  | Initialstate\n      (fd: function)\n      (args: list val)\n      (ee: ext_env)\n      (d: adata)\n      (gas: nat) : state\n  | Returnstate\n      (res: val)\n      (k: cont)\n      (ee: ext_env)\n      (d: adata)\n      (gas: nat) : state.\n\nSection STEP.\n\n  Local Open Scope nat_scope.\n  \n  Variable ge: genv.\n  \n  Definition count_methods := Genv.count_methods function type ge.\n\n  Definition lookup_function (lab: label) : option function :=\n    PTree.get lab (Genv.genv_fundefs function type ge).\n\n  (* This models sucessful runs. In particular, note that there is no rule for revert, so a call for revert is a stuck state. *)\n  Inductive step: state -> state -> Prop :=\n  | step_assign: forall f e1 lv e2 rv k ee le d g ee',\n      eval_lvalue (call_cont_index k) me ee le e1 lv ->\n      eval_rvalue (call_cont_index k) me ee le e2 rv ->\n      (* only assign to locations that are already defined *)\n      write lv rv ee = Some ee' ->\n      step (State f (Sassign e1 e2) k le ee d (g + gas_assign true e1 e2 2))\n           (* See GasModel.v for the definitions of gas costs. *)\n           (State f Sskip k le ee' d g)\n           \n  | step_set: forall f id rv rv_int k le ee prev d g,\n      PTree.get id le = Some prev -> (* Can only Sset an existing temp *)\n      eval_rvalue (call_cont_index k) me ee le rv rv_int ->\n      step (State f (Sset id rv) k le ee d (g + gas_set true rv 2))\n           (State f Sskip k (PTree.set id rv_int le) ee d g)\n\n  | step_call: forall f optid lab fd args arg_ints k le ee d g,\n      eval_rvalues (call_cont_index k) me ee le args arg_ints ->\n      lookup_function lab = Some fd ->\n      (* gas for returning is reserved in step_returnstate *)\n      step (State f (Scall optid lab args) k le ee d (g + gas_call true args 1))\n           (Callstate fd arg_ints (Kcall optid f le k) ee d g)\n\n  | step_seq: forall f s1 s2 k le ee d g,\n      step (State f (Ssequence s1 s2) k le ee d g)\n           (State f s1 (Kseq s2 k) le ee d g)\n  | step_skip_seq: forall f s k le ee d g,\n      step (State f Sskip (Kseq s k) le ee d g)\n           (State f s k le ee d g)\n  | step_break_seq: forall f s k le ee d g,\n      step (State f Sbreak (Kseq s k) le ee d g)\n           (State f Sbreak k le ee d g)\n\n  | step_ifthenelse: forall f cond b s1 s2 k le ee d g,\n      eval_rvalue (call_cont_index k) me ee le cond (Vint b) ->\n      step (State f (Sifthenelse cond s1 s2) k le ee d (g + gas_eval_cond true cond 3))\n           (State f (if (Int256.eq b Int256.zero) then s2 else s1) k le ee d g)\n\n  | step_loop: forall f s k le ee d g,\n      (* enter loop *)\n      step (State f (Sloop s) k le ee d (g + gas_branches 2))\n           (State f s (Kloop s k) le ee d g)\n  | step_break_loop: forall f s k le ee d g,\n      (* break from any part of the loop. doesn't use gas because it doesn't compile to any steps in Cgraph *)\n      step (State f Sbreak (Kloop s k) le ee d g)\n           (State f Sskip k le ee d g)\n  | step_skip_loop: forall f s k le ee d g,\n      (* reach the end of s, go back to restart the loop *)\n      step (State f Sskip (Kloop s k) le ee d (g + gas_branches 2))\n           (State f s (Kloop s k) le ee d g)\n\n  | step_return_var: forall f retvar val k le ee ee' ctx' d g,\n      PTree.get retvar le = Some val ->\n      push_func function fn_locals (call_cont_index k) f ee = Some (ee',ctx') ->\n      step (State f (Sreturn (Some retvar)) k le ee d (g + gas_return_done true (Some retvar) (length (all_temps ftype f)) 3))\n           (* TODO: gas for pushing the retval *)\n           (Returnstate val (call_cont k) ee' d g)\n  | step_return_none: forall f k le ee ee' ctx' d g,\n      push_func function fn_locals (call_cont_index k) f ee = Some (ee',ctx') ->\n      step (State f (Sreturn None) k le ee d (g + gas_return_done true None (length (all_temps ftype f)) 3))\n           (* TODO: gas for pushing the retval *)\n           (Returnstate Vunit (call_cont k) ee' d g)\n\n           \n  | step_internal_function: forall f arg_ints k le ee ee' ctx' d g,\n      function_initial_temps ftype f arg_ints = Some le ->\n      push_func function fn_locals (call_cont_index k) f ee = Some (ee',ctx') ->\n      step (Callstate f arg_ints k ee d (g + gas_callenter (length (some_temps ftype f)) (length (some_args ftype f)) 1))\n           (State f (fn_body f) k le ee d g)\n           \n  | step_returnstate: forall retval id f k le ee d g,\n      step (Returnstate retval (Kcall id f le k) ee d (g + gas_saveretval' 1))\n         (State f Sskip k (optset id retval le) ee d g)\n\n  | step_transfer: forall f a a' v v' le d d' ee k g,\n      eval_rvalue (call_cont_index k) me ee le a (Vint a') ->\n      eval_rvalue (call_cont_index k) me ee le v (Vint v') ->\n      (me_transfer me) a' v' d = (Int256.one, d') ->\n      step (State f (Stransfer a v) k le ee d (g + gas_transfer true a v 2))\n           (State f Sskip k le ee d' g)\n           \n  | step_log: forall f topics topics' args args' le d ee k g,\n      eval_rvalues (call_cont_index k) me ee le topics topics' ->\n      eval_rvalues (call_cont_index k) me ee le args args' ->\n      step (State f (Slog topics args) k le ee d (g + gas_log true topics args 2))\n           (State f Sskip k le ee (me_log me topics' args' d) g)\n           \n  (* This currently only defines what happens if the method succeeds.\n\n     Whether this is a problem depends on what we do in the source\n     language: if we don't provide a way to catch failures, then it\n     makes sense to only model succeeding runs (and in practice\n     Solidity programs may not catch failures.)\n\n     In our compiler, we have a test for a failing method call, and if so we call revert. \n *)\n  | step_callmethod: forall f a a' sg v v' args args' le le' ee ee' d d' k rvs rv_keys g gas,\n      eval_rvalue (call_cont_index k) me ee le a a' ->\n      eval_rvalue (call_cont_index k) me ee le v v' ->\n      eval_rvalues (call_cont_index k) me ee le args args' ->\n      (me_callmethod me) a' sg v' args' d ee d' ee' Int256.one rvs ->\n      listset rv_keys rvs le = Some le' ->\n      step (State f (Scallmethod a rv_keys sg v gas args) k le ee d (g + gas_callmethod true a (length rv_keys) v args 2))\n           (State f Sskip k le' ee d' g).\n\n  Print step.\n  (* Whole-program semantics \n     A simulation proof consists of three parts: the steps match, the initial states match, and the final states match.\n     Here we define the initial and final states. \n   *)\n\n  (* Note that these take more arguments than Clight. *)\n\n  Inductive initial_state (sg: int) (*our method signature, this is provided to us by the Solidity ABI.*)\n                          (args: list val)\n                          (d: adata)\n                          (ee: ext_env)\n                          (g: nat): state -> Prop :=\n  | initial_state_intro: forall f,\n    In sg (Genv.genv_methods function type ge) ->\n    IntMap.get sg (Genv.genv_methoddefs function type ge) = Some f ->\n    initial_state sg args d ee g (Initialstate f args ee d g).\n\n  (* note we may care how much gas is left, if this is called from another contract *)\n  Inductive final_state: state -> val -> adata -> ext_env -> nat -> Prop :=\n  | final_state_intro: forall r ee d g,\n      final_state (Returnstate r Kstop d ee g) r ee d g.\n\nEnd STEP.\n\nEnd WITH_DATA.\n\nArguments step {adata}.\nArguments state {adata}.\nArguments initial_state {adata}.\nArguments final_state {adata}.\n"
  },
  {
    "path": "src/backend.mlpack",
    "content": "backend/extraction/ASM\nbackend/extraction/AST\nbackend/extraction/Ascii\nbackend/extraction/BinInt\nbackend/extraction/BinNat\nbackend/extraction/BinNums\nbackend/extraction/BinNumsExt\nbackend/extraction/BinPos\nbackend/extraction/BinPosDef\nbackend/extraction/BuiltinSemanticsExt\nbackend/extraction/BytecodeExt\nbackend/extraction/Compiled\nbackend/extraction/Cop\nbackend/extraction/CopExt\nbackend/extraction/Coqlib\nbackend/extraction/Ctypes\nbackend/extraction/CtypesExt\nbackend/extraction/Datatypes\nbackend/extraction/DatatypesExt\nbackend/extraction/Decimal\nbackend/extraction/EVM\nbackend/extraction/EVMExt\nbackend/extraction/ExpCintptr\nbackend/extraction/ExpMiniC\nbackend/extraction/ExpStacked\nbackend/extraction/ExprCompile\nbackend/extraction/Float\nbackend/extraction/FramesLabelsCintptr\nbackend/extraction/Gen\nbackend/extraction/Gen0\nbackend/extraction/Gen1\nbackend/extraction/Gen2\nbackend/extraction/Gen3\nbackend/extraction/Gen4\nbackend/extraction/Gen5\nbackend/extraction/Gen6\nbackend/extraction/Gen7\nbackend/extraction/Gen8\nbackend/extraction/Gen9\nbackend/extraction/GlobalenvCompile\nbackend/extraction/Globalenvs\nbackend/extraction/Glue\nbackend/extraction/IndexLib\nbackend/extraction/Int0\nbackend/extraction/Integers\nbackend/extraction/Labels\nbackend/extraction/Language\nbackend/extraction/Language0\nbackend/extraction/LanguageExt\nbackend/extraction/List0\nbackend/extraction/LowValues\nbackend/extraction/MachineModel\nbackend/extraction/MachineModelExt\nbackend/extraction/Maps0\nbackend/extraction/MemoryModel\nbackend/extraction/Monad\nbackend/extraction/NameTablesExt\nbackend/extraction/Nat0\nbackend/extraction/OptErrMonad\nbackend/extraction/OptionMonad\nbackend/extraction/Options\nbackend/extraction/Peano\nbackend/extraction/PeanoNat\nbackend/extraction/Printing\nbackend/extraction/Semantics\nbackend/extraction/Semantics0\nbackend/extraction/Semantics1\nbackend/extraction/Semantics2\nbackend/extraction/Semantics3\nbackend/extraction/Specif\nbackend/extraction/StackEnv\nbackend/extraction/StmCompile\nbackend/extraction/StmtCGraph\nbackend/extraction/StmtCintptr\nbackend/extraction/StmtClinear\nbackend/extraction/StmtClocal\nbackend/extraction/StmtExpressionless\nbackend/extraction/StmtMiniC\nbackend/extraction/StmtStacked\nbackend/extraction/String0\nbackend/extraction/Structure\nbackend/extraction/TempModelLow\nbackend/extraction/Trees\nbackend/extraction/Types\nbackend/extraction/Values\nbackend/extraction/ZArith_dec\nbackend/extraction/Zpower\n"
  },
  {
    "path": "src/cclib/Coqlib.v",
    "content": "(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** This file collects a number of definitions and theorems that are\n    used throughout the development.  It complements the Coq standard\n    library. *)\n\nRequire Export ZArith.\nRequire Export Znumtheory.\nRequire Export List.\nRequire Export Bool.\n\nGlobal Set Asymmetric Patterns.\n\n(** * Useful tactics *)\n\nLtac inv H := inversion H; clear H; subst.\n\nLtac predSpec pred predspec x y :=\n  generalize (predspec x y); case (pred x y); intro.\n\nLtac caseEq name :=\n  generalize (refl_equal name); pattern name at -1 in |- *; case name.\n\nLtac destructEq name :=\n  destruct name eqn:?.\n\nLtac decEq :=\n  match goal with\n  | [ |- _ = _ ] => f_equal\n  | [ |- (?X ?A <> ?X ?B) ] =>\n      cut (A <> B); [intro; congruence | try discriminate]\n  end.\n\nLtac byContradiction :=\n  cut False; [contradiction|idtac].\n\nLtac omegaContradiction :=\n  cut False; [contradiction|omega].\n\nLemma modusponens: forall (P Q: Prop), P -> (P -> Q) -> Q.\nProof. auto. Qed.\n\nLtac exploit x :=\n    refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _ _) _)\n || refine (modusponens _ _ (x _ _ _) _)\n || refine (modusponens _ _ (x _ _) _)\n || refine (modusponens _ _ (x _) _).\n\n(** * Definitions and theorems over the type [positive] *)\n\nDefinition peq: forall (x y: positive), {x = y} + {x <> y} := Pos.eq_dec.\nGlobal Opaque peq.\n\nLemma peq_true:\n  forall (A: Type) (x: positive) (a b: A), (if peq x x then a else b) = a.\nProof.\n  intros. case (peq x x); intros.\n  auto.\n  elim n; auto.\nQed.\n\nLemma peq_false:\n  forall (A: Type) (x y: positive) (a b: A), x <> y -> (if peq x y then a else b) = b.\nProof.\n  intros. case (peq x y); intros.\n  elim H; auto.\n  auto.\nQed.\n\nDefinition Plt: positive -> positive -> Prop := Pos.lt.\n\nLemma Plt_ne:\n  forall (x y: positive), Plt x y -> x <> y.\nProof.\n  unfold Plt; intros. red; intro. subst y. eelim Pos.lt_irrefl; eauto.\nQed.\nHint Resolve Plt_ne: coqlib.\n\nLemma Plt_trans:\n  forall (x y z: positive), Plt x y -> Plt y z -> Plt x z.\nProof (Pos.lt_trans).\n\nLemma Plt_succ:\n  forall (x: positive), Plt x (Psucc x).\nProof.\n  unfold Plt; intros. apply Pos.lt_succ_r. apply Pos.le_refl.\nQed.\nHint Resolve Plt_succ: coqlib.\n\nLemma Plt_trans_succ:\n  forall (x y: positive), Plt x y -> Plt x (Psucc y).\nProof.\n  intros. apply Plt_trans with y. assumption. apply Plt_succ.\nQed.\nHint Resolve Plt_succ: coqlib.\n\nLemma Plt_succ_inv:\n  forall (x y: positive), Plt x (Psucc y) -> Plt x y \\/ x = y.\nProof.\n  unfold Plt; intros. rewrite Pos.lt_succ_r in H.\n  apply Pos.le_lteq; auto.\nQed.\n\nDefinition plt (x y: positive) : {Plt x y} + {~ Plt x y}.\nProof.\n  unfold Plt, Pos.lt; intros. destruct (Pos.compare x y).\n  - right; congruence.\n  - left; auto.\n  - right; congruence.\nDefined.\nGlobal Opaque plt.\n\nDefinition Ple: positive -> positive -> Prop := Pos.le.\n\nLemma Ple_refl: forall (p: positive), Ple p p.\nProof (Pos.le_refl).\n\nLemma Ple_trans: forall (p q r: positive), Ple p q -> Ple q r -> Ple p r.\nProof (Pos.le_trans).\n\nLemma Plt_Ple: forall (p q: positive), Plt p q -> Ple p q.\nProof (Pos.lt_le_incl).\n\nLemma Ple_succ: forall (p: positive), Ple p (Psucc p).\nProof.\n  intros. apply Plt_Ple. apply Plt_succ.\nQed.\n\nLemma Plt_Ple_trans:\n  forall (p q r: positive), Plt p q -> Ple q r -> Plt p r.\nProof (Pos.lt_le_trans).\n\nLemma Plt_strict: forall p, ~ Plt p p.\nProof (Pos.lt_irrefl).\n\nHint Resolve Ple_refl Plt_Ple Ple_succ Plt_strict: coqlib.\n\nLtac xomega := unfold Plt, Ple in *; zify; omega.\nLtac xomegaContradiction := exfalso; xomega.\n\n(** Peano recursion over positive numbers. *)\n\nSection POSITIVE_ITERATION.\n\nLemma Plt_wf: well_founded Plt.\nProof.\n  apply well_founded_lt_compat with nat_of_P.\n  intros. apply nat_of_P_lt_Lt_compare_morphism. exact H.\nQed.\n\nVariable A: Type.\nVariable v1: A.\nVariable f: positive -> A -> A.\n\nLemma Ppred_Plt:\n  forall x, x <> xH -> Plt (Ppred x) x.\nProof.\n  intros. elim (Psucc_pred x); intro. contradiction.\n  set (y := Ppred x) in *. rewrite <- H0. apply Plt_succ.\nQed.\n\nLet iter (x: positive) (P: forall y, Plt y x -> A) : A :=\n  match peq x xH with\n  | left EQ => v1\n  | right NOTEQ => f (Ppred x) (P (Ppred x) (Ppred_Plt x NOTEQ))\n  end.\n\nDefinition positive_rec : positive -> A :=\n  Fix Plt_wf (fun _ => A) iter.\n\nLemma unroll_positive_rec:\n  forall x,\n  positive_rec x = iter x (fun y _ => positive_rec y).\nProof.\n  unfold positive_rec. apply (Fix_eq Plt_wf (fun _ => A) iter).\n  intros. unfold iter. case (peq x 1); intro. auto. decEq. apply H.\nQed.\n\nLemma positive_rec_base:\n  positive_rec 1%positive = v1.\nProof.\n  rewrite unroll_positive_rec. unfold iter. case (peq 1 1); intro.\n  auto. elim n; auto.\nQed.\n\nLemma positive_rec_succ:\n  forall x, positive_rec (Psucc x) = f x (positive_rec x).\nProof.\n  intro. rewrite unroll_positive_rec. unfold iter.\n  case (peq (Psucc x) 1); intro.\n  destruct x; simpl in e; discriminate.\n  rewrite Ppred_succ. auto.\nQed.\n\nLemma positive_Peano_ind:\n  forall (P: positive -> Prop),\n  P xH ->\n  (forall x, P x -> P (Psucc x)) ->\n  forall x, P x.\nProof.\n  intros.\n  apply (well_founded_ind Plt_wf P).\n  intros.\n  case (peq x0 xH); intro.\n  subst x0; auto.\n  elim (Psucc_pred x0); intro. contradiction. rewrite <- H2.\n  apply H0. apply H1. apply Ppred_Plt. auto.\nQed.\n\nEnd POSITIVE_ITERATION.\n\n(** * Definitions and theorems over the type [Z] *)\n\nDefinition zeq: forall (x y: Z), {x = y} + {x <> y} := Z.eq_dec.\n\nLemma zeq_true:\n  forall (A: Type) (x: Z) (a b: A), (if zeq x x then a else b) = a.\nProof.\n  intros. case (zeq x x); intros.\n  auto.\n  elim n; auto.\nQed.\n\nLemma zeq_false:\n  forall (A: Type) (x y: Z) (a b: A), x <> y -> (if zeq x y then a else b) = b.\nProof.\n  intros. case (zeq x y); intros.\n  elim H; auto.\n  auto.\nQed.\n\nOpen Scope Z_scope.\n\nDefinition zlt: forall (x y: Z), {x < y} + {x >= y} := Z_lt_dec.\n\nLemma zlt_true:\n  forall (A: Type) (x y: Z) (a b: A),\n  x < y -> (if zlt x y then a else b) = a.\nProof.\n  intros. case (zlt x y); intros.\n  auto.\n  omegaContradiction.\nQed.\n\nLemma zlt_false:\n  forall (A: Type) (x y: Z) (a b: A),\n  x >= y -> (if zlt x y then a else b) = b.\nProof.\n  intros. case (zlt x y); intros.\n  omegaContradiction.\n  auto.\nQed.\n\nDefinition zle: forall (x y: Z), {x <= y} + {x > y} := Z_le_gt_dec.\n\nLemma zle_true:\n  forall (A: Type) (x y: Z) (a b: A),\n  x <= y -> (if zle x y then a else b) = a.\nProof.\n  intros. case (zle x y); intros.\n  auto.\n  omegaContradiction.\nQed.\n\nLemma zle_false:\n  forall (A: Type) (x y: Z) (a b: A),\n  x > y -> (if zle x y then a else b) = b.\nProof.\n  intros. case (zle x y); intros.\n  omegaContradiction.\n  auto.\nQed.\n\n(** Properties of powers of two. *)\n\nLemma two_power_nat_O : two_power_nat O = 1.\nProof. reflexivity. Qed.\n\nLemma two_power_nat_pos : forall n : nat, two_power_nat n > 0.\nProof.\n  induction n. rewrite two_power_nat_O. omega.\n  rewrite two_power_nat_S. omega.\nQed.\n\nLemma two_power_nat_two_p:\n  forall x, two_power_nat x = two_p (Z_of_nat x).\nProof.\n  induction x. auto.\n  rewrite two_power_nat_S. rewrite inj_S. rewrite two_p_S. omega. omega.\nQed.\n\nLemma two_p_monotone:\n  forall x y, 0 <= x <= y -> two_p x <= two_p y.\nProof.\n  intros.\n  replace (two_p x) with (two_p x * 1) by omega.\n  replace y with (x + (y - x)) by omega.\n  rewrite two_p_is_exp; try omega.\n  apply Zmult_le_compat_l.\n  assert (two_p (y - x) > 0). apply two_p_gt_ZERO. omega. omega.\n  assert (two_p x > 0). apply two_p_gt_ZERO. omega. omega.\nQed.\n\nLemma two_p_monotone_strict:\n  forall x y, 0 <= x < y -> two_p x < two_p y.\nProof.\n  intros. assert (two_p x <= two_p (y - 1)). apply two_p_monotone; omega.\n  assert (two_p (y - 1) > 0). apply two_p_gt_ZERO. omega.\n  replace y with (Zsucc (y - 1)) by omega. rewrite two_p_S. omega. omega.\nQed.\n\nLemma two_p_strict:\n  forall x, x >= 0 -> x < two_p x.\nProof.\n  intros x0 GT. pattern x0. apply natlike_ind.\n  simpl. omega.\n  intros. rewrite two_p_S; auto. generalize (two_p_gt_ZERO x H). omega.\n  omega.\nQed.\n\nLemma two_p_strict_2:\n  forall x, x >= 0 -> 2 * x - 1 < two_p x.\nProof.\n  intros. assert (x = 0 \\/ x - 1 >= 0) by omega. destruct H0.\n  subst. vm_compute. auto.\n  replace (two_p x) with (2 * two_p (x - 1)).\n  generalize (two_p_strict _ H0). omega.\n  rewrite <- two_p_S. decEq. omega. omega.\nQed.\n\n(** Properties of [Zmin] and [Zmax] *)\n\nLemma Zmin_spec:\n  forall x y, Zmin x y = if zlt x y then x else y.\nProof.\n  intros. case (zlt x y); unfold Zlt, Zge; intro z.\n  unfold Zmin. rewrite z. auto.\n  unfold Zmin. caseEq (x ?= y); intro.\n  apply Zcompare_Eq_eq. auto.\n  contradiction.\n  reflexivity.\nQed.\n\nLemma Zmax_spec:\n  forall x y, Zmax x y = if zlt y x then x else y.\nProof.\n  intros. case (zlt y x); unfold Zlt, Zge; intro z.\n  unfold Zmax. rewrite <- (Zcompare_antisym y x).\n  rewrite z. simpl. auto.\n  unfold Zmax. rewrite <- (Zcompare_antisym y x).\n  caseEq (y ?= x); intro; simpl.\n  symmetry. apply Zcompare_Eq_eq. auto.\n  contradiction. reflexivity.\nQed.\n\nLemma Zmax_bound_l:\n  forall x y z, x <= y -> x <= Zmax y z.\nProof.\n  intros. generalize (Zmax1 y z). omega.\nQed.\nLemma Zmax_bound_r:\n  forall x y z, x <= z -> x <= Zmax y z.\nProof.\n  intros. generalize (Zmax2 y z). omega.\nQed.\n\n(** Properties of Euclidean division and modulus. *)\n\nLemma Zdiv_small:\n  forall x y, 0 <= x < y -> x / y = 0.\nProof.\n  intros. assert (y > 0). omega.\n  assert (forall a b,\n    0 <= a < y ->\n    0 <= y * b + a < y ->\n    b = 0).\n  intros.\n  assert (b = 0 \\/ b > 0 \\/ (-b) > 0). omega.\n  elim H3; intro.\n  auto.\n  elim H4; intro.\n  assert (y * b >= y * 1). apply Zmult_ge_compat_l. omega. omega.\n  omegaContradiction.\n  assert (y * (-b) >= y * 1). apply Zmult_ge_compat_l. omega. omega.\n  rewrite <- Zopp_mult_distr_r in H6. omegaContradiction.\n  apply H1 with (x mod y).\n  apply Z_mod_lt. auto.\n  rewrite <- Z_div_mod_eq. auto. auto.\nQed.\n\nLemma Zmod_small:\n  forall x y, 0 <= x < y -> x mod y = x.\nProof.\n  intros. assert (y > 0). omega.\n  generalize (Z_div_mod_eq x y H0).\n  rewrite (Zdiv_small x y H). omega.\nQed.\n\nLemma Zmod_unique:\n  forall x y a b,\n  x = a * y + b -> 0 <= b < y -> x mod y = b.\nProof.\n  intros. subst x. rewrite Zplus_comm.\n  rewrite Z_mod_plus. apply Zmod_small. auto. omega.\nQed.\n\nLemma Zdiv_unique:\n  forall x y a b,\n  x = a * y + b -> 0 <= b < y -> x / y = a.\nProof.\n  intros. subst x. rewrite Zplus_comm.\n  rewrite Z_div_plus. rewrite (Zdiv_small b y H0). omega. omega.\nQed.\n\nLemma Zdiv_Zdiv:\n  forall a b c,\n  b > 0 -> c > 0 -> (a / b) / c = a / (b * c).\nProof.\n  intros.\n  generalize (Z_div_mod_eq a b H). generalize (Z_mod_lt a b H). intros.\n  generalize (Z_div_mod_eq (a/b) c H0). generalize (Z_mod_lt (a/b) c H0). intros.\n  set (q1 := a / b) in *. set (r1 := a mod b) in *.\n  set (q2 := q1 / c) in *. set (r2 := q1 mod c) in *.\n  symmetry. apply Zdiv_unique with (r2 * b + r1).\n  rewrite H2. rewrite H4. ring.\n  split.\n  assert (0 <= r2 * b). apply Zmult_le_0_compat. omega. omega. omega.\n  assert ((r2 + 1) * b <= c * b).\n  apply Zmult_le_compat_r. omega. omega.\n  replace ((r2 + 1) * b) with (r2 * b + b) in H5 by ring.\n  replace (c * b) with (b * c) in H5 by ring.\n  omega.\nQed.\n\nLemma Zmult_le_compat_l_neg :\n  forall n m p:Z, n >= m -> p <= 0 -> p * n <= p * m.\nProof.\n  intros.\n  assert ((-p) * n >= (-p) * m). apply Zmult_ge_compat_l. auto. omega.\n  replace (p * n) with (- ((-p) * n)) by ring.\n  replace (p * m) with (- ((-p) * m)) by ring.\n  omega.\nQed.\n\nLemma Zdiv_interval_1:\n  forall lo hi a b,\n  lo <= 0 -> hi > 0 -> b > 0 ->\n  lo * b <= a < hi * b ->\n  lo <= a/b < hi.\nProof.\n  intros.\n  generalize (Z_div_mod_eq a b H1). generalize (Z_mod_lt a b H1). intros.\n  set (q := a/b) in *. set (r := a mod b) in *.\n  split.\n  assert (lo < (q + 1)).\n  apply Zmult_lt_reg_r with b. omega.\n  apply Zle_lt_trans with a. omega.\n  replace ((q + 1) * b) with (b * q + b) by ring.\n  omega.\n  omega.\n  apply Zmult_lt_reg_r with b. omega.\n  replace (q * b) with (b * q) by ring.\n  omega.\nQed.\n\nLemma Zdiv_interval_2:\n  forall lo hi a b,\n  lo <= a <= hi -> lo <= 0 -> hi >= 0 -> b > 0 ->\n  lo <= a/b <= hi.\nProof.\n  intros.\n  assert (lo <= a / b < hi+1).\n  apply Zdiv_interval_1. omega. omega. auto.\n  assert (lo * b <= lo * 1). apply Zmult_le_compat_l_neg. omega. omega.\n  replace (lo * 1) with lo in H3 by ring.\n  assert ((hi + 1) * 1 <= (hi + 1) * b). apply Zmult_le_compat_l. omega. omega.\n  replace ((hi + 1) * 1) with (hi + 1) in H4 by ring.\n  omega.\n  omega.\nQed.\n\nLemma Zmod_recombine:\n  forall x a b,\n  a > 0 -> b > 0 ->\n  x mod (a * b) = ((x/b) mod a) * b + (x mod b).\nProof.\n  intros.\n  set (xb := x/b).\n  apply Zmod_unique with (xb/a).\n  generalize (Z_div_mod_eq x b H0); fold xb; intro EQ1.\n  generalize (Z_div_mod_eq xb a H); intro EQ2.\n  rewrite EQ2 in EQ1.\n  eapply trans_eq. eexact EQ1. ring.\n  generalize (Z_mod_lt x b H0). intro.\n  generalize (Z_mod_lt xb a H). intro.\n  assert (0 <= xb mod a * b <= a * b - b).\n    split. apply Zmult_le_0_compat; omega.\n    replace (a * b - b) with ((a - 1) * b) by ring.\n    apply Zmult_le_compat; omega.\n  omega.\nQed.\n\n(** Properties of divisibility. *)\n\nLemma Zdivides_trans:\n  forall x y z, (x | y) -> (y | z) -> (x | z).\nProof.\n  intros x y z [a A] [b B]; subst. exists (a*b); ring.\nQed.\n\nDefinition Zdivide_dec:\n  forall (p q: Z), p > 0 -> { (p|q) } + { ~(p|q) }.\nProof.\n  intros. destruct (zeq (Zmod q p) 0).\n  left. exists (q / p).\n  transitivity (p * (q / p) + (q mod p)). apply Z_div_mod_eq; auto.\n  transitivity (p * (q / p)). omega. ring.\n  right; red; intros. elim n. apply Z_div_exact_1; auto.\n  inv H0. rewrite Z_div_mult; auto. ring.\nDefined.\nGlobal Opaque Zdivide_dec.\n\nLemma Zdivide_interval:\n  forall a b c,\n  0 < c -> 0 <= a < b -> (c | a) -> (c | b) -> 0 <= a <= b - c.\nProof.\n  intros. destruct H1 as [x EQ1]. destruct H2 as [y EQ2]. subst. destruct H0.\n  split. omega. exploit Zmult_lt_reg_r; eauto. intros.\n  replace (y * c - c) with ((y - 1) * c) by ring.\n  apply Zmult_le_compat_r; omega.\nQed.\n\n(** Conversion from [Z] to [nat]. *)\n\nDefinition nat_of_Z: Z -> nat := Z.to_nat.\n\nLemma nat_of_Z_of_nat:\n  forall n, nat_of_Z (Z_of_nat n) = n.\nProof.\n  exact Nat2Z.id.\nQed.\n\nLemma nat_of_Z_max:\n  forall z, Z_of_nat (nat_of_Z z) = Zmax z 0.\nProof.\n  intros. unfold Zmax. destruct z; simpl; auto.\n  change (Z.of_nat (Z.to_nat (Zpos p)) = Zpos p).\n  apply Z2Nat.id. compute; intuition congruence.\nQed.\n\nLemma nat_of_Z_eq:\n  forall z, z >= 0 -> Z_of_nat (nat_of_Z z) = z.\nProof.\n  unfold nat_of_Z; intros. apply Z2Nat.id. omega.\nQed.\n\nLemma nat_of_Z_neg:\n  forall n, n <= 0 -> nat_of_Z n = O.\nProof.\n  destruct n; unfold Zle; simpl; auto. congruence.\nQed.\n\nLemma nat_of_Z_plus:\n  forall p q,\n  p >= 0 -> q >= 0 ->\n  nat_of_Z (p + q) = (nat_of_Z p + nat_of_Z q)%nat.\nProof.\n  unfold nat_of_Z; intros. apply Z2Nat.inj_add; omega.\nQed.\n\n\n(** Alignment: [align n amount] returns the smallest multiple of [amount]\n  greater than or equal to [n]. *)\n\nDefinition align (n: Z) (amount: Z) :=\n  ((n + amount - 1) / amount) * amount.\n\nLemma align_le: forall x y, y > 0 -> x <= align x y.\nProof.\n  intros. unfold align.\n  generalize (Z_div_mod_eq (x + y - 1) y H). intro.\n  replace ((x + y - 1) / y * y)\n     with ((x + y - 1) - (x + y - 1) mod y).\n  generalize (Z_mod_lt (x + y - 1) y H). omega.\n  rewrite Zmult_comm. omega.\nQed.\n\nLemma align_divides: forall x y, y > 0 -> (y | align x y).\nProof.\n  intros. unfold align. apply Zdivide_factor_l.\nQed.\n\n(** * Definitions and theorems on the data types [option], [sum] and [list] *)\n\nSet Implicit Arguments.\n\n(** Comparing option types. *)\n\nDefinition option_eq (A: Type) (eqA: forall (x y: A), {x=y} + {x<>y}):\n  forall (x y: option A), {x=y} + {x<>y}.\nProof. decide equality. Defined.\nGlobal Opaque option_eq.\n\n(** Lifting a relation to an option type. *)\n\nInductive option_rel (A B: Type) (R: A -> B -> Prop) : option A -> option B -> Prop :=\n  | option_rel_none: option_rel R None None\n  | option_rel_some: forall x y, R x y -> option_rel R (Some x) (Some y).\n\n(** Mapping a function over an option type. *)\n\nDefinition option_map (A B: Type) (f: A -> B) (x: option A) : option B :=\n  match x with\n  | None => None\n  | Some y => Some (f y)\n  end.\n\n(** Mapping a function over a sum type. *)\n\nDefinition sum_left_map (A B C: Type) (f: A -> B) (x: A + C) : B + C :=\n  match x with\n  | inl y => inl C (f y)\n  | inr z => inr B z\n  end.\n\n(** Properties of [List.nth] (n-th element of a list). *)\n\nHint Resolve in_eq in_cons: coqlib.\n\nLemma nth_error_in:\n  forall (A: Type) (n: nat) (l: list A) (x: A),\n  List.nth_error l n = Some x -> In x l.\nProof.\n  induction n; simpl.\n   destruct l; intros.\n    discriminate.\n    injection H; intro; subst a. apply in_eq.\n   destruct l; intros.\n    discriminate.\n    apply in_cons. auto.\nQed.\nHint Resolve nth_error_in: coqlib.\n\nLemma nth_error_nil:\n  forall (A: Type) (idx: nat), nth_error (@nil A) idx = None.\nProof.\n  induction idx; simpl; intros; reflexivity.\nQed.\nHint Resolve nth_error_nil: coqlib.\n\n(** Compute the length of a list, with result in [Z]. *)\n\nFixpoint list_length_z_aux (A: Type) (l: list A) (acc: Z) {struct l}: Z :=\n  match l with\n  | nil => acc\n  | hd :: tl => list_length_z_aux tl (Zsucc acc)\n  end.\n\nRemark list_length_z_aux_shift:\n  forall (A: Type) (l: list A) n m,\n  list_length_z_aux l n = list_length_z_aux l m + (n - m).\nProof.\n  induction l; intros; simpl.\n  omega.\n  replace (n - m) with (Zsucc n - Zsucc m) by omega. auto.\nQed.\n\nDefinition list_length_z (A: Type) (l: list A) : Z :=\n  list_length_z_aux l 0.\n\nLemma list_length_z_cons:\n  forall (A: Type) (hd: A) (tl: list A),\n  list_length_z (hd :: tl) = list_length_z tl + 1.\nProof.\n  intros. unfold list_length_z. simpl.\n  rewrite (list_length_z_aux_shift tl 1 0). omega.\nQed.\n\nLemma list_length_z_pos:\n  forall (A: Type) (l: list A),\n  list_length_z l >= 0.\nProof.\n  induction l; simpl. unfold list_length_z; simpl. omega.\n  rewrite list_length_z_cons. omega.\nQed.\n\nLemma list_length_z_map:\n  forall (A B: Type) (f: A -> B) (l: list A),\n  list_length_z (map f l) = list_length_z l.\nProof.\n  induction l. reflexivity. simpl. repeat rewrite list_length_z_cons. congruence.\nQed.\n\n(** Extract the n-th element of a list, as [List.nth_error] does,\n    but the index [n] is of type [Z]. *)\n\nFixpoint list_nth_z (A: Type) (l: list A) (n: Z) {struct l}: option A :=\n  match l with\n  | nil => None\n  | hd :: tl => if zeq n 0 then Some hd else list_nth_z tl (Zpred n)\n  end.\n\nLemma list_nth_z_in:\n  forall (A: Type) (l: list A) n x,\n  list_nth_z l n = Some x -> In x l.\nProof.\n  induction l; simpl; intros.\n  congruence.\n  destruct (zeq n 0). left; congruence. right; eauto.\nQed.\n\nLemma list_nth_z_map:\n  forall (A B: Type) (f: A -> B) (l: list A) n,\n  list_nth_z (List.map f l) n = option_map f (list_nth_z l n).\nProof.\n  induction l; simpl; intros.\n  auto.\n  destruct (zeq n 0). auto. eauto.\nQed.\n\nLemma list_nth_z_range:\n  forall (A: Type) (l: list A) n x,\n  list_nth_z l n = Some x -> 0 <= n < list_length_z l.\nProof.\n  induction l; simpl; intros.\n  discriminate.\n  rewrite list_length_z_cons. destruct (zeq n 0).\n  generalize (list_length_z_pos l); omega.\n  exploit IHl; eauto. omega.\nQed.\n\n(** Properties of [List.incl] (list inclusion). *)\n\nLemma incl_cons_inv:\n  forall (A: Type) (a: A) (b c: list A),\n  incl (a :: b) c -> incl b c.\nProof.\n  unfold incl; intros. apply H. apply in_cons. auto.\nQed.\nHint Resolve incl_cons_inv: coqlib.\n\nLemma incl_app_inv_l:\n  forall (A: Type) (l1 l2 m: list A),\n  incl (l1 ++ l2) m -> incl l1 m.\nProof.\n  unfold incl; intros. apply H. apply in_or_app. left; assumption.\nQed.\n\nLemma incl_app_inv_r:\n  forall (A: Type) (l1 l2 m: list A),\n  incl (l1 ++ l2) m -> incl l2 m.\nProof.\n  unfold incl; intros. apply H. apply in_or_app. right; assumption.\nQed.\n\nHint Resolve  incl_tl incl_refl incl_app_inv_l incl_app_inv_r: coqlib.\n\nLemma incl_same_head:\n  forall (A: Type) (x: A) (l1 l2: list A),\n  incl l1 l2 -> incl (x::l1) (x::l2).\nProof.\n  intros; red; simpl; intros. intuition.\nQed.\n\n(** Properties of [List.map] (mapping a function over a list). *)\n\nLemma list_map_exten:\n  forall (A B: Type) (f f': A -> B) (l: list A),\n  (forall x, In x l -> f x = f' x) ->\n  List.map f' l = List.map f l.\nProof.\n  induction l; simpl; intros.\n  reflexivity.\n  rewrite <- H. rewrite IHl. reflexivity.\n  intros. apply H. tauto.\n  tauto.\nQed.\n\nLemma list_map_compose:\n  forall (A B C: Type) (f: A -> B) (g: B -> C) (l: list A),\n  List.map g (List.map f l) = List.map (fun x => g(f x)) l.\nProof.\n  induction l; simpl. reflexivity. rewrite IHl; reflexivity.\nQed.\n\nLemma list_map_identity:\n  forall (A: Type) (l: list A),\n  List.map (fun (x:A) => x) l = l.\nProof.\n  induction l; simpl; congruence.\nQed.\n\nLemma list_map_nth:\n  forall (A B: Type) (f: A -> B) (l: list A) (n: nat),\n  nth_error (List.map f l) n = option_map f (nth_error l n).\nProof.\n  induction l; simpl; intros.\n  repeat rewrite nth_error_nil. reflexivity.\n  destruct n; simpl. reflexivity. auto.\nQed.\n\nLemma list_length_map:\n  forall (A B: Type) (f: A -> B) (l: list A),\n  List.length (List.map f l) = List.length l.\nProof.\n  induction l; simpl; congruence.\nQed.\n\nLemma list_in_map_inv:\n  forall (A B: Type) (f: A -> B) (l: list A) (y: B),\n  In y (List.map f l) -> exists x:A, y = f x /\\ In x l.\nProof.\n  induction l; simpl; intros.\n  contradiction.\n  elim H; intro.\n  exists a; intuition auto.\n  generalize (IHl y H0). intros [x [EQ IN]].\n  exists x; tauto.\nQed.\n\nLemma list_append_map:\n  forall (A B: Type) (f: A -> B) (l1 l2: list A),\n  List.map f (l1 ++ l2) = List.map f l1 ++ List.map f l2.\nProof.\n  induction l1; simpl; intros.\n  auto. rewrite IHl1. auto.\nQed.\n\nLemma list_append_map_inv:\n  forall (A B: Type) (f: A -> B) (m1 m2: list B) (l: list A),\n  List.map f l = m1 ++ m2 ->\n  exists l1, exists l2, List.map f l1 = m1 /\\ List.map f l2 = m2 /\\ l = l1 ++ l2.\nProof.\n  induction m1; simpl; intros.\n  exists (@nil A); exists l; auto.\n  destruct l; simpl in H; inv H.\n  exploit IHm1; eauto. intros [l1 [l2 [P [Q R]]]]. subst l.\n  exists (a0 :: l1); exists l2; intuition. simpl; congruence.\nQed.\n\n(** Folding a function over a list *)\n\nSection LIST_FOLD.\n\nVariables A B: Type.\nVariable f: A -> B -> B.\n\n(** This is exactly [List.fold_left] from Coq's standard library,\n  with [f] taking arguments in a different order. *)\n\nFixpoint list_fold_left (accu: B) (l: list A) : B :=\n  match l with nil => accu | x :: l' => list_fold_left (f x accu) l' end.\n\n(** This is exactly [List.fold_right] from Coq's standard library,\n  except that it runs in constant stack space. *)\n\nDefinition list_fold_right (l: list A) (base: B) : B :=\n  list_fold_left base (List.rev' l).\n\nRemark list_fold_left_app:\n  forall l1 l2 accu,\n  list_fold_left accu (l1 ++ l2) = list_fold_left (list_fold_left accu l1) l2.\nProof.\n  induction l1; simpl; intros.\n  auto.\n  rewrite IHl1. auto.\nQed.\n\nLemma list_fold_right_eq:\n  forall l base,\n  list_fold_right l base =\n  match l with nil => base | x :: l' => f x (list_fold_right l' base) end.\nProof.\n  unfold list_fold_right; intros.\n  destruct l.\n  auto.\n  unfold rev'. rewrite <- ! rev_alt. simpl.\n  rewrite list_fold_left_app. simpl. auto.\nQed.\n\nLemma list_fold_right_spec:\n  forall l base, list_fold_right l base = List.fold_right f base l.\nProof.\n  induction l; simpl; intros; rewrite list_fold_right_eq; congruence.\nQed.\n\nEnd LIST_FOLD.\n\n(** Properties of list membership. *)\n\nLemma in_cns:\n  forall (A: Type) (x y: A) (l: list A), In x (y :: l) <-> y = x \\/ In x l.\nProof.\n  intros. simpl. tauto.\nQed.\n\nLemma in_app:\n  forall (A: Type) (x: A) (l1 l2: list A), In x (l1 ++ l2) <-> In x l1 \\/ In x l2.\nProof.\n  intros. split; intro. apply in_app_or. auto. apply in_or_app. auto.\nQed.\n\nLemma list_in_insert:\n  forall (A: Type) (x: A) (l1 l2: list A) (y: A),\n  In x (l1 ++ l2) -> In x (l1 ++ y :: l2).\nProof.\n  intros. apply in_or_app; simpl. elim (in_app_or _ _ _ H); intro; auto.\nQed.\n\n(** [list_disjoint l1 l2] holds iff [l1] and [l2] have no elements\n  in common. *)\n\nDefinition list_disjoint (A: Type) (l1 l2: list A) : Prop :=\n  forall (x y: A), In x l1 -> In y l2 -> x <> y.\n\nLemma list_disjoint_cons_l:\n  forall (A: Type) (a: A) (l1 l2: list A),\n  list_disjoint l1 l2 -> ~In a l2 -> list_disjoint (a :: l1) l2.\nProof.\n  unfold list_disjoint; simpl; intros. destruct H1. congruence. apply H; auto.\nQed.\n\nLemma list_disjoint_cons_r:\n  forall (A: Type) (a: A) (l1 l2: list A),\n  list_disjoint l1 l2 -> ~In a l1 -> list_disjoint l1 (a :: l2).\nProof.\n  unfold list_disjoint; simpl; intros. destruct H2. congruence. apply H; auto.\nQed.\n\nLemma list_disjoint_cons_left:\n  forall (A: Type) (a: A) (l1 l2: list A),\n  list_disjoint (a :: l1) l2 -> list_disjoint l1 l2.\nProof.\n  unfold list_disjoint; simpl; intros. apply H; tauto.\nQed.\n\nLemma list_disjoint_cons_right:\n  forall (A: Type) (a: A) (l1 l2: list A),\n  list_disjoint l1 (a :: l2) -> list_disjoint l1 l2.\nProof.\n  unfold list_disjoint; simpl; intros. apply H; tauto.\nQed.\n\nLemma list_disjoint_notin:\n  forall (A: Type) (l1 l2: list A) (a: A),\n  list_disjoint l1 l2 -> In a l1 -> ~(In a l2).\nProof.\n  unfold list_disjoint; intros; red; intros.\n  apply H with a a; auto.\nQed.\n\nLemma list_disjoint_sym:\n  forall (A: Type) (l1 l2: list A),\n  list_disjoint l1 l2 -> list_disjoint l2 l1.\nProof.\n  unfold list_disjoint; intros.\n  apply sym_not_equal. apply H; auto.\nQed.\n\nLemma list_disjoint_dec:\n  forall (A: Type) (eqA_dec: forall (x y: A), {x=y} + {x<>y}) (l1 l2: list A),\n  {list_disjoint l1 l2} + {~list_disjoint l1 l2}.\nProof.\n  induction l1; intros.\n  left; red; intros. elim H.\n  case (In_dec eqA_dec a l2); intro.\n  right; red; intro. apply (H a a); auto with coqlib.\n  case (IHl1 l2); intro.\n  left; red; intros. elim H; intro.\n    red; intro; subst a y. contradiction.\n    apply l; auto.\n  right; red; intros. elim n0. eapply list_disjoint_cons_left; eauto.\nDefined.\n\n(** [list_equiv l1 l2] holds iff the lists [l1] and [l2] contain the same elements. *)\n\nDefinition list_equiv (A : Type) (l1 l2: list A) : Prop :=\n  forall x, In x l1 <-> In x l2.\n\n(** [list_norepet l] holds iff the list [l] contains no repetitions,\n  i.e. no element occurs twice. *)\n\nInductive list_norepet (A: Type) : list A -> Prop :=\n  | list_norepet_nil:\n      list_norepet nil\n  | list_norepet_cons:\n      forall hd tl,\n      ~(In hd tl) -> list_norepet tl -> list_norepet (hd :: tl).\n\nLemma list_norepet_dec:\n  forall (A: Type) (eqA_dec: forall (x y: A), {x=y} + {x<>y}) (l: list A),\n  {list_norepet l} + {~list_norepet l}.\nProof.\n  induction l.\n  left; constructor.\n  destruct IHl.\n  case (In_dec eqA_dec a l); intro.\n  right. red; intro. inversion H. contradiction.\n  left. constructor; auto.\n  right. red; intro. inversion H. contradiction.\nDefined.\n\nLemma list_map_norepet:\n  forall (A B: Type) (f: A -> B) (l: list A),\n  list_norepet l ->\n  (forall x y, In x l -> In y l -> x <> y -> f x <> f y) ->\n  list_norepet (List.map f l).\nProof.\n  induction 1; simpl; intros.\n  constructor.\n  constructor.\n  red; intro. generalize (list_in_map_inv f _ _ H2).\n  intros [x [EQ IN]]. generalize EQ. change (f hd <> f x).\n  apply H1. tauto. tauto.\n  red; intro; subst x. contradiction.\n  apply IHlist_norepet. intros. apply H1. tauto. tauto. auto.\nQed.\n\nRemark list_norepet_append_commut:\n  forall (A: Type) (a b: list A),\n  list_norepet (a ++ b) -> list_norepet (b ++ a).\nProof.\n  intro A.\n  assert (forall (x: A) (b: list A) (a: list A),\n           list_norepet (a ++ b) -> ~(In x a) -> ~(In x b) ->\n           list_norepet (a ++ x :: b)).\n    induction a; simpl; intros.\n    constructor; auto.\n    inversion H. constructor. red; intro.\n    elim (in_app_or _ _ _ H6); intro.\n    elim H4. apply in_or_app. tauto.\n    elim H7; intro. subst a. elim H0. left. auto.\n    elim H4. apply in_or_app. tauto.\n    auto.\n  induction a; simpl; intros.\n  rewrite <- app_nil_end. auto.\n  inversion H0. apply H. auto.\n  red; intro; elim H3. apply in_or_app. tauto.\n  red; intro; elim H3. apply in_or_app. tauto.\nQed.\n\nLemma list_norepet_app:\n  forall (A: Type) (l1 l2: list A),\n  list_norepet (l1 ++ l2) <->\n  list_norepet l1 /\\ list_norepet l2 /\\ list_disjoint l1 l2.\nProof.\n  induction l1; simpl; intros; split; intros.\n  intuition. constructor. red;simpl;auto.\n  tauto.\n  inversion H; subst. rewrite IHl1 in H3. rewrite in_app in H2.\n  intuition.\n  constructor; auto. red; intros. elim H2; intro. congruence. auto.\n  destruct H as [B [C D]]. inversion B; subst.\n  constructor. rewrite in_app. intuition. elim (D a a); auto. apply in_eq.\n  rewrite IHl1. intuition. red; intros. apply D; auto. apply in_cons; auto.\nQed.\n\nLemma list_norepet_append:\n  forall (A: Type) (l1 l2: list A),\n  list_norepet l1 -> list_norepet l2 -> list_disjoint l1 l2 ->\n  list_norepet (l1 ++ l2).\nProof.\n  generalize list_norepet_app; firstorder.\nQed.\n\nLemma list_norepet_append_right:\n  forall (A: Type) (l1 l2: list A),\n  list_norepet (l1 ++ l2) -> list_norepet l2.\nProof.\n  generalize list_norepet_app; firstorder.\nQed.\n\nLemma list_norepet_append_left:\n  forall (A: Type) (l1 l2: list A),\n  list_norepet (l1 ++ l2) -> list_norepet l1.\nProof.\n  generalize list_norepet_app; firstorder.\nQed.\n\n(** [is_tail l1 l2] holds iff [l2] is of the form [l ++ l1] for some [l]. *)\n\nInductive is_tail (A: Type): list A -> list A -> Prop :=\n  | is_tail_refl:\n      forall c, is_tail c c\n  | is_tail_cons:\n      forall i c1 c2, is_tail c1 c2 -> is_tail c1 (i :: c2).\n\nLemma is_tail_in:\n  forall (A: Type) (i: A) c1 c2, is_tail (i :: c1) c2 -> In i c2.\nProof.\n  induction c2; simpl; intros.\n  inversion H.\n  inversion H. tauto. right; auto.\nQed.\n\nLemma is_tail_cons_left:\n  forall (A: Type) (i: A) c1 c2, is_tail (i :: c1) c2 -> is_tail c1 c2.\nProof.\n  induction c2; intros; inversion H.\n  constructor. constructor. constructor. auto.\nQed.\n\nHint Resolve is_tail_refl is_tail_cons is_tail_in is_tail_cons_left: coqlib.\n\nLemma is_tail_incl:\n  forall (A: Type) (l1 l2: list A), is_tail l1 l2 -> incl l1 l2.\nProof.\n  induction 1; eauto with coqlib.\nQed.\n\nLemma is_tail_trans:\n  forall (A: Type) (l1 l2: list A),\n  is_tail l1 l2 -> forall (l3: list A), is_tail l2 l3 -> is_tail l1 l3.\nProof.\n  induction 1; intros. auto. apply IHis_tail. eapply is_tail_cons_left; eauto.\nQed.\n\n(** [list_forall2 P [x1 ... xN] [y1 ... yM]] holds iff [N = M] and\n  [P xi yi] holds for all [i]. *)\n\nSection FORALL2.\n\nVariable A: Type.\nVariable B: Type.\nVariable P: A -> B -> Prop.\n\nInductive list_forall2: list A -> list B -> Prop :=\n  | list_forall2_nil:\n      list_forall2 nil nil\n  | list_forall2_cons:\n      forall a1 al b1 bl,\n      P a1 b1 ->\n      list_forall2 al bl ->\n      list_forall2 (a1 :: al) (b1 :: bl).\n\nLemma list_forall2_app:\n  forall a2 b2 a1 b1,\n  list_forall2 a1 b1 -> list_forall2 a2 b2 ->\n  list_forall2 (a1 ++ a2) (b1 ++ b2).\nProof.\n  induction 1; intros; simpl. auto. constructor; auto.\nQed.\n\nLemma list_forall2_length:\n  forall l1 l2,\n  list_forall2 l1 l2 -> length l1 = length l2.\nProof.\n  induction 1; simpl; congruence.\nQed.\n\nLemma list_forall2_in_left:\n  forall x1 l1 l2,\n  list_forall2 l1 l2 -> In x1 l1 -> exists x2, In x2 l2 /\\ P x1 x2.\nProof.\n  induction 1; simpl; intros. contradiction. destruct H1.\n  subst; exists b1; auto.\n  exploit IHlist_forall2; eauto. intros (x2 & U & V); exists x2; auto.\nQed.\n\nLemma list_forall2_in_right:\n  forall x2 l1 l2,\n  list_forall2 l1 l2 -> In x2 l2 -> exists x1, In x1 l1 /\\ P x1 x2.\nProof.\n  induction 1; simpl; intros. contradiction. destruct H1.\n  subst; exists a1; auto.\n  exploit IHlist_forall2; eauto. intros (x1 & U & V); exists x1; auto.\nQed.\n\nEnd FORALL2.\n\nLemma list_forall2_imply:\n  forall (A B: Type) (P1: A -> B -> Prop) (l1: list A) (l2: list B),\n  list_forall2 P1 l1 l2 ->\n  forall (P2: A -> B -> Prop),\n  (forall v1 v2, In v1 l1 -> In v2 l2 -> P1 v1 v2 -> P2 v1 v2) ->\n  list_forall2 P2 l1 l2.\nProof.\n  induction 1; intros.\n  constructor.\n  constructor. auto with coqlib. apply IHlist_forall2; auto.\n  intros. auto with coqlib.\nQed.\n\n(** Dropping the first N elements of a list. *)\n\nFixpoint list_drop (A: Type) (n: nat) (x: list A) {struct n} : list A :=\n  match n with\n  | O => x\n  | S n' => match x with nil => nil | hd :: tl => list_drop n' tl end\n  end.\n\nLemma list_drop_incl:\n  forall (A: Type) (x: A) n (l: list A), In x (list_drop n l) -> In x l.\nProof.\n  induction n; simpl; intros. auto.\n  destruct l; auto with coqlib.\nQed.\n\nLemma list_drop_norepet:\n  forall (A: Type) n (l: list A), list_norepet l -> list_norepet (list_drop n l).\nProof.\n  induction n; simpl; intros. auto.\n  inv H. constructor. auto.\nQed.\n\nLemma list_map_drop:\n  forall (A B: Type) (f: A -> B) n (l: list A),\n  list_drop n (map f l) = map f (list_drop n l).\nProof.\n  induction n; simpl; intros. auto.\n  destruct l; simpl; auto.\nQed.\n\n(** A list of [n] elements, all equal to [x]. *)\n\nFixpoint list_repeat {A: Type} (n: nat) (x: A) {struct n} :=\n  match n with\n  | O => nil\n  | S m => x :: list_repeat m x\n  end.\n\nLemma length_list_repeat:\n  forall (A: Type) n (x: A), length (list_repeat n x) = n.\nProof.\n  induction n; simpl; intros. auto. decEq; auto.\nQed.\n\nLemma in_list_repeat:\n  forall (A: Type) n (x: A) y, In y (list_repeat n x) -> y = x.\nProof.\n  induction n; simpl; intros. elim H. destruct H; auto.\nQed.\n\n(** * Definitions and theorems over boolean types *)\n\nDefinition proj_sumbool {P Q: Prop} (a: {P} + {Q}) : bool :=\n  if a then true else false.\n\nCoercion proj_sumbool: sumbool >-> bool.\n\nLemma proj_sumbool_true:\n  forall (P Q: Prop) (a: {P}+{Q}), proj_sumbool a = true -> P.\nProof.\n  intros P Q a. destruct a; simpl. auto. congruence.\nQed.\n\nLemma proj_sumbool_is_true:\n  forall (P: Prop) (a: {P}+{~P}), P -> proj_sumbool a = true.\nProof.\n  intros. unfold proj_sumbool. destruct a. auto. contradiction.\nQed.\n\nLtac InvBooleans :=\n  match goal with\n  | [ H: _ && _ = true |- _ ] =>\n      destruct (andb_prop _ _ H); clear H; InvBooleans\n  | [ H: _ || _ = false |- _ ] =>\n      destruct (orb_false_elim _ _ H); clear H; InvBooleans\n  | [ H: proj_sumbool ?x = true |- _ ] =>\n      generalize (proj_sumbool_true _ H); clear H; intro; InvBooleans\n  | _ => idtac\n  end.\n\nSection DECIDABLE_EQUALITY.\n\nVariable A: Type.\nVariable dec_eq: forall (x y: A), {x=y} + {x<>y}.\nVariable B: Type.\n\nLemma dec_eq_true:\n  forall (x: A) (ifso ifnot: B),\n  (if dec_eq x x then ifso else ifnot) = ifso.\nProof.\n  intros. destruct (dec_eq x x). auto. congruence.\nQed.\n\nLemma dec_eq_false:\n  forall (x y: A) (ifso ifnot: B),\n  x <> y -> (if dec_eq x y then ifso else ifnot) = ifnot.\nProof.\n  intros. destruct (dec_eq x y). congruence. auto.\nQed.\n\nLemma dec_eq_sym:\n  forall (x y: A) (ifso ifnot: B),\n  (if dec_eq x y then ifso else ifnot) =\n  (if dec_eq y x then ifso else ifnot).\nProof.\n  intros. destruct (dec_eq x y).\n  subst y. rewrite dec_eq_true. auto.\n  rewrite dec_eq_false; auto.\nQed.\n\nEnd DECIDABLE_EQUALITY.\n\nSection DECIDABLE_PREDICATE.\n\nVariable P: Prop.\nVariable dec: {P} + {~P}.\nVariable A: Type.\n\nLemma pred_dec_true:\n  forall (a b: A), P -> (if dec then a else b) = a.\nProof.\n  intros. destruct dec. auto. contradiction.\nQed.\n\nLemma pred_dec_false:\n  forall (a b: A), ~P -> (if dec then a else b) = b.\nProof.\n  intros. destruct dec. contradiction. auto.\nQed.\n\nEnd DECIDABLE_PREDICATE.\n\n(** * Well-founded orderings *)\n\nRequire Import Relations.\n\n(** A non-dependent version of lexicographic ordering. *)\n\nSection LEX_ORDER.\n\nVariable A: Type.\nVariable B: Type.\nVariable ordA: A -> A -> Prop.\nVariable ordB: B -> B -> Prop.\n\nInductive lex_ord: A*B -> A*B -> Prop :=\n  | lex_ord_left: forall a1 b1 a2 b2,\n      ordA a1 a2 -> lex_ord (a1,b1) (a2,b2)\n  | lex_ord_right: forall a b1 b2,\n      ordB b1 b2 -> lex_ord (a,b1) (a,b2).\n\nLemma wf_lex_ord:\n  well_founded ordA -> well_founded ordB -> well_founded lex_ord.\nProof.\n  intros Awf Bwf.\n  assert (forall a, Acc ordA a -> forall b, Acc ordB b -> Acc lex_ord (a, b)).\n    induction 1. induction 1. constructor; intros. inv H3.\n    apply H0. auto. apply Bwf.\n    apply H2; auto.\n  red; intros. destruct a as [a b]. apply H; auto.\nQed.\n\nLemma transitive_lex_ord:\n  transitive _ ordA -> transitive _ ordB -> transitive _ lex_ord.\nProof.\n  intros trA trB; red; intros.\n  inv H; inv H0.\n  left; eapply trA; eauto.\n  left; auto.\n  left; auto.\n  right; eapply trB; eauto.\nQed.\n\nEnd LEX_ORDER.\n\n(** * Nonempty lists *)\n\nInductive nlist (A: Type) : Type :=\n  | nbase: A -> nlist A\n  | ncons: A -> nlist A -> nlist A.\n\nDefinition nfirst {A: Type} (l: nlist A) :=\n  match l with nbase a => a | ncons a l' => a end.\n\nFixpoint nlast {A: Type} (l: nlist A) :=\n  match l with nbase a => a | ncons a l' => nlast l' end.\n\nFixpoint nIn {A: Type} (x: A) (l: nlist A) : Prop :=\n  match l with\n  | nbase a => a = x\n  | ncons a l => a = x \\/ nIn x l\n  end.\n\nInductive nlist_forall2 {A B: Type} (R: A -> B -> Prop) : nlist A -> nlist B -> Prop :=\n  | nbase_forall2: forall a b, R a b -> nlist_forall2 R (nbase a) (nbase b)\n  | ncons_forall2: forall a l b m, R a b -> nlist_forall2 R l m -> nlist_forall2 R (ncons a l) (ncons b m).\n\nLemma nlist_forall2_imply:\n  forall (A B: Type) (P1: A -> B -> Prop) (l1: nlist A) (l2: nlist B),\n  nlist_forall2 P1 l1 l2 ->\n  forall (P2: A -> B -> Prop),\n  (forall v1 v2, nIn v1 l1 -> nIn v2 l2 -> P1 v1 v2 -> P2 v1 v2) ->\n  nlist_forall2 P2 l1 l2.\nProof.\n  induction 1; simpl; intros; constructor; auto.\nQed.\n"
  },
  {
    "path": "src/cclib/Errors.v",
    "content": "(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** Error reporting and the error monad. *)\n\nRequire Import String.\nRequire Import Coqlib.\n\nClose Scope string_scope.\n\nSet Implicit Arguments.\n\n(** * Representation of error messages. *)\n\n(** Compile-time errors produce an error message, represented in Coq\n  as a list of either substrings or positive numbers encoding\n  a source-level identifier (see module AST). *)\n\nInductive errcode: Type :=\n  | MSG: string -> errcode\n  | CTX: positive -> errcode    (* a top-level identifier *)\n  | POS: positive -> errcode.   (* a positive integer, e.g. a PC *)\n\nDefinition errmsg: Type := list errcode.\n\nDefinition msg (s: string) : errmsg := MSG s :: nil.\n\n(** * The error monad *)\n\n(** Compilation functions that can fail have return type [res A].\n  The return value is either [OK res] to indicate success,\n  or [Error msg] to indicate failure. *)\n\nInductive res (A: Type) : Type :=\n| OK: A -> res A\n| Error: errmsg -> res A.\n\nArguments Error [A].\n\n(** To automate the propagation of errors, we use a monadic style\n  with the following [bind] operation. *)\n\nDefinition bind (A B: Type) (f: res A) (g: A -> res B) : res B :=\n  match f with\n  | OK x => g x\n  | Error msg => Error msg\n  end.\n\nDefinition bind2 (A B C: Type) (f: res (A * B)) (g: A -> B -> res C) : res C :=\n  match f with\n  | OK (x, y) => g x y\n  | Error msg => Error msg\n  end.\n\n(** The [do] notation, inspired by Haskell's, keeps the code readable. *)\n\nNotation \"'do' X <- A ; B\" := (bind A (fun X => B))\n (at level 200, X ident, A at level 100, B at level 200)\n : error_monad_scope.\n\nNotation \"'do' ( X , Y ) <- A ; B\" := (bind2 A (fun X Y => B))\n (at level 200, X ident, Y ident, A at level 100, B at level 200)\n : error_monad_scope.\n\nRemark bind_inversion:\n  forall (A B: Type) (f: res A) (g: A -> res B) (y: B),\n  bind f g = OK y ->\n  exists x, f = OK x /\\ g x = OK y.\nProof.\n  intros until y. destruct f; simpl; intros.\n  exists a; auto.\n  discriminate.\nQed.\n\nRemark bind2_inversion:\n  forall (A B C: Type) (f: res (A*B)) (g: A -> B -> res C) (z: C),\n  bind2 f g = OK z ->\n  exists x, exists y, f = OK (x, y) /\\ g x y = OK z.\nProof.\n  intros until z. destruct f; simpl.\n  destruct p; simpl; intros. exists a; exists b; auto.\n  intros; discriminate.\nQed.\n\n(** Assertions *)\n\nDefinition assertion_failed {A: Type} : res A := Error(msg \"Assertion failed\").\n\nNotation \"'assertion' A ; B\" := (if A then B else assertion_failed)\n  (at level 200, A at level 100, B at level 200)\n  : error_monad_scope.\n\n(** This is the familiar monadic map iterator. *)\n\nLocal Open Scope error_monad_scope.\n\nFixpoint mmap (A B: Type) (f: A -> res B) (l: list A) {struct l} : res (list B) :=\n  match l with\n  | nil => OK nil\n  | hd :: tl => do hd' <- f hd; do tl' <- mmap f tl; OK (hd' :: tl')\n  end.\n\nRemark mmap_inversion:\n  forall (A B: Type) (f: A -> res B) (l: list A) (l': list B),\n  mmap f l = OK l' ->\n  list_forall2 (fun x y => f x = OK y) l l'.\nProof.\n  induction l; simpl; intros.\n  inversion_clear H. constructor.\n  destruct (bind_inversion _ _ H) as [hd' [P Q]].\n  destruct (bind_inversion _ _ Q) as [tl' [R S]].\n  inversion_clear S.\n  constructor. auto. auto. \nQed.\n\n(** * Reasoning over monadic computations *)\n\n(** The [monadInv H] tactic below simplifies hypotheses of the form\n<<\n        H: (do x <- a; b) = OK res\n>>\n    By definition of the bind operation, both computations [a] and\n    [b] must succeed for their composition to succeed.  The tactic\n    therefore generates the following hypotheses:\n\n         x: ...\n        H1: a = OK x\n        H2: b x = OK res\n*)\n\nLtac monadInv1 H :=\n  match type of H with\n  | (OK _ = OK _) =>\n      inversion H; clear H; try subst\n  | (Error _ = OK _) =>\n      discriminate\n  | (bind ?F ?G = OK ?X) =>\n      let x := fresh \"x\" in (\n      let EQ1 := fresh \"EQ\" in (\n      let EQ2 := fresh \"EQ\" in (\n      destruct (bind_inversion F G H) as [x [EQ1 EQ2]];\n      clear H;\n      try (monadInv1 EQ2))))\n  | (bind2 ?F ?G = OK ?X) =>\n      let x1 := fresh \"x\" in (\n      let x2 := fresh \"x\" in (\n      let EQ1 := fresh \"EQ\" in (\n      let EQ2 := fresh \"EQ\" in (\n      destruct (bind2_inversion F G H) as [x1 [x2 [EQ1 EQ2]]];\n      clear H;\n      try (monadInv1 EQ2)))))\n  | (match ?X with left _ => _ | right _ => assertion_failed end = OK _) =>\n      destruct X; [try (monadInv1 H) | discriminate]\n  | (match (negb ?X) with true => _ | false => assertion_failed end = OK _) =>\n      destruct X as [] eqn:?; [discriminate | try (monadInv1 H)]\n  | (match ?X with true => _ | false => assertion_failed end = OK _) =>\n      destruct X as [] eqn:?; [try (monadInv1 H) | discriminate]\n  | (mmap ?F ?L = OK ?M) =>\n      generalize (mmap_inversion F L H); intro\n  end.\n\nLtac monadInv H :=\n  monadInv1 H ||\n  match type of H with\n  | (?F _ _ _ _ _ _ _ _ = OK _) => \n      ((progress simpl in H) || unfold F in H); monadInv1 H\n  | (?F _ _ _ _ _ _ _ = OK _) => \n      ((progress simpl in H) || unfold F in H); monadInv1 H\n  | (?F _ _ _ _ _ _ = OK _) => \n      ((progress simpl in H) || unfold F in H); monadInv1 H\n  | (?F _ _ _ _ _ = OK _) => \n      ((progress simpl in H) || unfold F in H); monadInv1 H\n  | (?F _ _ _ _ = OK _) => \n      ((progress simpl in H) || unfold F in H); monadInv1 H\n  | (?F _ _ _ = OK _) => \n      ((progress simpl in H) || unfold F in H); monadInv1 H\n  | (?F _ _ = OK _) => \n      ((progress simpl in H) || unfold F in H); monadInv1 H\n  | (?F _ = OK _) => \n      ((progress simpl in H) || unfold F in H); monadInv1 H\n  end.\n"
  },
  {
    "path": "src/cclib/Integers.v",
    "content": "(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** Formalizations of machine integers modulo $2^N$ #2<sup>N</sup>#. *)\n\nRequire Import Eqdep_dec Zquot Zwf.\nRequire Import cclib.Coqlib.\n\n(** * Comparisons *)\n\nInductive comparison : Type :=\n  | Ceq : comparison               (**r same *)\n  | Cne : comparison               (**r different *)\n  | Clt : comparison               (**r less than *)\n  | Cle : comparison               (**r less than or equal *)\n  | Cgt : comparison               (**r greater than *)\n  | Cge : comparison.              (**r greater than or equal *)\n\nDefinition negate_comparison (c: comparison): comparison :=\n  match c with\n  | Ceq => Cne\n  | Cne => Ceq\n  | Clt => Cge\n  | Cle => Cgt\n  | Cgt => Cle\n  | Cge => Clt\n  end.\n\nDefinition swap_comparison (c: comparison): comparison :=\n  match c with\n  | Ceq => Ceq\n  | Cne => Cne\n  | Clt => Cgt\n  | Cle => Cge\n  | Cgt => Clt\n  | Cge => Cle\n  end.\n\n(** * Parameterization by the word size, in bits. *)\n\nModule Type WORDSIZE.\n  Parameter wordsize: nat.\n  Axiom wordsize_not_zero: wordsize <> 0%nat.\nEnd WORDSIZE.\n\n(* To avoid useless definitions of inductors in extracted code. *)\nLocal Unset Elimination Schemes.\nLocal Unset Case Analysis Schemes.\n\nModule Make(WS: WORDSIZE).\n\nDefinition wordsize: nat := WS.wordsize.\nDefinition zwordsize: Z := Z_of_nat wordsize.\nDefinition modulus : Z := two_power_nat wordsize.\nDefinition half_modulus : Z := modulus / 2.\nDefinition max_unsigned : Z := modulus - 1.\nDefinition max_signed : Z := half_modulus - 1.\nDefinition min_signed : Z := - half_modulus.\n\nRemark wordsize_pos: zwordsize > 0.\nProof.\n  unfold zwordsize, wordsize. generalize WS.wordsize_not_zero. omega.\nQed.\n\nRemark modulus_power: modulus = two_p zwordsize.\nProof.\n  unfold modulus. apply two_power_nat_two_p.\nQed.\n\nRemark modulus_pos: modulus > 0.\nProof.\n  rewrite modulus_power. apply two_p_gt_ZERO. generalize wordsize_pos; omega.\nQed.\n\n(** * Representation of machine integers *)\n\n(** A machine integer (type [int]) is represented as a Coq arbitrary-precision\n  integer (type [Z]) plus a proof that it is in the range 0 (included) to\n  [modulus] (excluded). *)\n\nRecord int: Type := mkint { intval: Z; intrange: -1 < intval < modulus }.\n\n(** Fast normalization modulo [2^wordsize] *)\n\nFixpoint P_mod_two_p (p: positive) (n: nat) {struct n} : Z :=\n  match n with\n  | O => 0\n  | S m =>\n      match p with\n      | xH => 1\n      | xO q => Z.double (P_mod_two_p q m)\n      | xI q => Z.succ_double (P_mod_two_p q m)\n      end\n  end.\n\nDefinition Z_mod_modulus (x: Z) : Z :=\n  match x with\n  | Z0 => 0\n  | Zpos p => P_mod_two_p p wordsize\n  | Zneg p => let r := P_mod_two_p p wordsize in if zeq r 0 then 0 else modulus - r\n  end.\n\nLemma P_mod_two_p_range:\n  forall n p, 0 <= P_mod_two_p p n < two_power_nat n.\nProof.\n  induction n; simpl; intros.\n  - rewrite two_power_nat_O. omega.\n  - rewrite two_power_nat_S. destruct p.\n    + generalize (IHn p). rewrite Z.succ_double_spec. omega.\n    + generalize (IHn p). rewrite Z.double_spec. omega.\n    + generalize (two_power_nat_pos n). omega.\nQed.\n\nLemma P_mod_two_p_eq:\n  forall n p, P_mod_two_p p n = (Zpos p) mod (two_power_nat n).\nProof.\n  assert (forall n p, exists y, Zpos p = y * two_power_nat n + P_mod_two_p p n).\n  {\n    induction n; simpl; intros.\n    - rewrite two_power_nat_O. exists (Zpos p). ring.\n    - rewrite two_power_nat_S. destruct p.\n      + destruct (IHn p) as [y EQ]. exists y.\n        change (Zpos p~1) with (2 * Zpos p + 1). rewrite EQ.\n        rewrite Z.succ_double_spec. ring.\n      + destruct (IHn p) as [y EQ]. exists y.\n        change (Zpos p~0) with (2 * Zpos p). rewrite EQ.\n        rewrite (Z.double_spec (P_mod_two_p p n)). ring.\n      + exists 0; omega.\n  }\n  intros.\n  destruct (H n p) as [y EQ].\n  symmetry. apply Zmod_unique with y. auto. apply P_mod_two_p_range.\nQed.\n\nLemma Z_mod_modulus_range:\n  forall x, 0 <= Z_mod_modulus x < modulus.\nProof.\n  intros; unfold Z_mod_modulus.\n  destruct x.\n  - generalize modulus_pos; omega.\n  - apply P_mod_two_p_range.\n  - set (r := P_mod_two_p p wordsize).\n    assert (0 <= r < modulus) by apply P_mod_two_p_range.\n    destruct (zeq r 0).\n    + generalize modulus_pos; omega.\n    + omega.\nQed.\n\nLemma Z_mod_modulus_range':\n  forall x, -1 < Z_mod_modulus x < modulus.\nProof.\n  intros. generalize (Z_mod_modulus_range x); omega.\nQed.\n\nLemma Z_mod_modulus_eq:\n  forall x, Z_mod_modulus x = x mod modulus.\nProof.\n  intros. unfold Z_mod_modulus. destruct x.\n  - rewrite Zmod_0_l. auto.\n  - apply P_mod_two_p_eq.\n  - generalize (P_mod_two_p_range wordsize p) (P_mod_two_p_eq wordsize p).\n    fold modulus. intros A B.\n    exploit (Z_div_mod_eq (Zpos p) modulus). apply modulus_pos. intros C.\n    set (q := Zpos p / modulus) in *.\n    set (r := P_mod_two_p p wordsize) in *.\n    rewrite <- B in C.\n    change (Z.neg p) with (- (Z.pos p)). destruct (zeq r 0).\n    + symmetry. apply Zmod_unique with (-q). rewrite C; rewrite e. ring.\n      generalize modulus_pos; omega.\n    + symmetry. apply Zmod_unique with (-q - 1). rewrite C. ring.\n      omega.\nQed.\n\n(** The [unsigned] and [signed] functions return the Coq integer corresponding\n  to the given machine integer, interpreted as unsigned or signed\n  respectively. *)\n\nDefinition unsigned (n: int) : Z := intval n.\n\nDefinition signed (n: int) : Z :=\n  let x := unsigned n in\n  if zlt x half_modulus then x else x - modulus.\n\n(** Conversely, [repr] takes a Coq integer and returns the corresponding\n  machine integer.  The argument is treated modulo [modulus]. *)\n\nDefinition repr (x: Z) : int :=\n  mkint (Z_mod_modulus x) (Z_mod_modulus_range' x).\n\nDefinition zero := repr 0.\nDefinition one  := repr 1.\nDefinition mone := repr (-1).\nDefinition iwordsize := repr zwordsize.\n\nLemma mkint_eq:\n  forall x y Px Py, x = y -> mkint x Px = mkint y Py.\nProof.\n  intros. subst y.\n  assert (forall (n m: Z) (P1 P2: n < m), P1 = P2).\n  {\n    unfold Zlt; intros.\n    apply eq_proofs_unicity.\n    intros c1 c2. destruct c1; destruct c2; (left; reflexivity) || (right; congruence).\n  }\n  destruct Px as [Px1 Px2]. destruct Py as [Py1 Py2].\n  rewrite (H _ _ Px1 Py1).\n  rewrite (H _ _ Px2 Py2).\n  reflexivity.\nQed.\n\nLemma eq_dec: forall (x y: int), {x = y} + {x <> y}.\nProof.\n  intros. destruct x; destruct y. destruct (zeq intval0 intval1).\n  left. apply mkint_eq. auto.\n  right. red; intro. injection H. exact n.\nDefined.\n\n(* Repr is injective for integers which are already in bound. *)\n\nLemma repr_injective : forall x y,\n    (-1 < x < modulus) ->\n    (-1 < y < modulus) ->\n    repr x = repr y ->\n    x = y.\nProof.\n  intros x y xbound ybound H.\n  assert (intval (repr x) = intval (repr y)) as H1.\n  rewrite H; reflexivity.\n  clear H.\n  unfold repr in H1; simpl in H1.\n  repeat rewrite Z_mod_modulus_eq in H1.\n  repeat rewrite Zmod_small in H1 by omega.\n  congruence.\nQed.\n\n(** * Arithmetic and logical operations over machine integers *)\n\nDefinition eq (x y: int) : bool :=\n  if zeq (unsigned x) (unsigned y) then true else false.\nDefinition lt (x y: int) : bool :=\n  if zlt (signed x) (signed y) then true else false.\nDefinition ltu (x y: int) : bool :=\n  if zlt (unsigned x) (unsigned y) then true else false.\n\nDefinition neg (x: int) : int := repr (- unsigned x).\n\nDefinition add (x y: int) : int :=\n  repr (unsigned x + unsigned y).\nDefinition sub (x y: int) : int :=\n  repr (unsigned x - unsigned y).\nDefinition mul (x y: int) : int :=\n  repr (unsigned x * unsigned y).\n\nDefinition divs (x y: int) : int :=\n  repr (Z.quot (signed x) (signed y)).\nDefinition mods (x y: int) : int :=\n  repr (Z.rem (signed x) (signed y)).\n\nDefinition divu (x y: int) : int :=\n  repr (unsigned x / unsigned y).\nDefinition modu (x y: int) : int :=\n  repr ((unsigned x) mod (unsigned y)).\n\n(** Bitwise boolean operations. *)\n\nDefinition and (x y: int): int := repr (Z.land (unsigned x) (unsigned y)).\nDefinition or (x y: int): int := repr (Z.lor (unsigned x) (unsigned y)).\nDefinition xor (x y: int) : int := repr (Z.lxor (unsigned x) (unsigned y)).\n\nDefinition not (x: int) : int := xor x mone.\n\n(** Shifts and rotates. *)\n\nDefinition shl (x y: int): int := repr (Z.shiftl (unsigned x) (unsigned y)).\nDefinition shru (x y: int): int := repr (Z.shiftr (unsigned x) (unsigned y)).\nDefinition shr (x y: int): int := repr (Z.shiftr (signed x) (unsigned y)).\n\nDefinition rol (x y: int) : int :=\n  let n := (unsigned y) mod zwordsize in\n  repr (Z.lor (Z.shiftl (unsigned x) n) (Z.shiftr (unsigned x) (zwordsize - n))).\nDefinition ror (x y: int) : int :=\n  let n := (unsigned y) mod zwordsize in\n  repr (Z.lor (Z.shiftr (unsigned x) n) (Z.shiftl (unsigned x) (zwordsize - n))).\n\nDefinition rolm (x a m: int): int := and (rol x a) m.\n\n(** Viewed as signed divisions by powers of two, [shrx] rounds towards\n  zero, while [shr] rounds towards minus infinity. *)\n\nDefinition shrx (x y: int): int :=\n  divs x (shl one y).\n\n(** High half of full multiply. *)\n\nDefinition mulhu (x y: int): int := repr ((unsigned x * unsigned y) / modulus).\nDefinition mulhs (x y: int): int := repr ((signed x * signed y) / modulus).\n\n(** Condition flags *)\n\nDefinition negative (x: int): int :=\n  if lt x zero then one else zero.\n\nDefinition add_carry (x y cin: int): int :=\n  if zlt (unsigned x + unsigned y + unsigned cin) modulus then zero else one.\n\nDefinition add_overflow (x y cin: int): int :=\n  let s := signed x + signed y + signed cin in\n  if zle min_signed s && zle s max_signed then zero else one.\n\nDefinition sub_borrow (x y bin: int): int :=\n  if zlt (unsigned x - unsigned y - unsigned bin) 0 then one else zero.\n\nDefinition sub_overflow (x y bin: int): int :=\n  let s := signed x - signed y - signed bin in\n  if zle min_signed s && zle s max_signed then zero else one.\n\n(** [shr_carry x y] is 1 if [x] is negative and at least one 1 bit is shifted away. *)\n\nDefinition shr_carry (x y: int) : int :=\n  if lt x zero && negb (eq (and x (sub (shl one y) one)) zero)\n  then one else zero.\n\n(** Zero and sign extensions *)\n\nDefinition Zshiftin (b: bool) (x: Z) : Z :=\n  if b then Z.succ_double x else Z.double x.\n\n(** In pseudo-code:\n<<\n    Fixpoint Zzero_ext (n: Z) (x: Z) : Z :=\n      if zle n 0 then\n        0\n      else\n        Zshiftin (Z.odd x) (Zzero_ext (Z.pred n) (Z.div2 x)).\n    Fixpoint Zsign_ext (n: Z) (x: Z) : Z :=\n      if zle n 1 then\n        if Z.odd x then -1 else 0\n      else\n        Zshiftin (Z.odd x) (Zzero_ext (Z.pred n) (Z.div2 x)).\n>>\n  We encode this [nat]-like recursion using the [Z.iter] iteration\n  function, in order to make the [Zzero_ext] and [Zsign_ext]\n  functions efficiently executable within Coq.\n*)\n\nDefinition Zzero_ext (n: Z) (x: Z) : Z :=\n  Z.iter n\n    (fun rec x => Zshiftin (Z.odd x) (rec (Z.div2 x)))\n    (fun x => 0)\n    x.\n\nDefinition Zsign_ext (n: Z) (x: Z) : Z :=\n  Z.iter (Z.pred n)\n    (fun rec x => Zshiftin (Z.odd x) (rec (Z.div2 x)))\n    (fun x => if Z.odd x then -1 else 0)\n    x.\n\nDefinition zero_ext (n: Z) (x: int) : int := repr (Zzero_ext n (unsigned x)).\n\nDefinition sign_ext (n: Z) (x: int) : int := repr (Zsign_ext n (unsigned x)).\n\n(** Decomposition of a number as a sum of powers of two. *)\n\nFixpoint Z_one_bits (n: nat) (x: Z) (i: Z) {struct n}: list Z :=\n  match n with\n  | O => nil\n  | S m =>\n      if Z.odd x\n      then i :: Z_one_bits m (Z.div2 x) (i+1)\n      else Z_one_bits m (Z.div2 x) (i+1)\n  end.\n\nDefinition one_bits (x: int) : list int :=\n  List.map repr (Z_one_bits wordsize (unsigned x) 0).\n\n(** Recognition of powers of two. *)\n\nDefinition is_power2 (x: int) : option int :=\n  match Z_one_bits wordsize (unsigned x) 0 with\n  | i :: nil => Some (repr i)\n  | _ => None\n  end.\n\n(** Comparisons. *)\n\nDefinition cmp (c: comparison) (x y: int) : bool :=\n  match c with\n  | Ceq => eq x y\n  | Cne => negb (eq x y)\n  | Clt => lt x y\n  | Cle => negb (lt y x)\n  | Cgt => lt y x\n  | Cge => negb (lt x y)\n  end.\n\nDefinition cmpu (c: comparison) (x y: int) : bool :=\n  match c with\n  | Ceq => eq x y\n  | Cne => negb (eq x y)\n  | Clt => ltu x y\n  | Cle => negb (ltu y x)\n  | Cgt => ltu y x\n  | Cge => negb (ltu x y)\n  end.\n\nDefinition is_false (x: int) : Prop := x = zero.\nDefinition is_true  (x: int) : Prop := x <> zero.\nDefinition notbool  (x: int) : int  := if eq x zero then one else zero.\n\n(** x86-style extended division and modulus *)\n\nDefinition divmodu2 (nhi nlo: int) (d: int) : option (int * int) :=\n  if eq_dec d zero then None else\n   (let (q, r) := Z.div_eucl (unsigned nhi * modulus + unsigned nlo) (unsigned d) in\n    if zle q max_unsigned then Some(repr q, repr r) else None).\n\nDefinition divmods2 (nhi nlo: int) (d: int) : option (int * int) :=\n  if eq_dec d zero then None else\n   (let (q, r) := Z.quotrem (signed nhi * modulus + unsigned nlo) (signed d) in\n    if zle min_signed q && zle q max_signed then Some(repr q, repr r) else None).\n\n(** * Properties of integers and integer arithmetic *)\n\n(** ** Properties of [modulus], [max_unsigned], etc. *)\n\nRemark half_modulus_power:\n  half_modulus = two_p (zwordsize - 1).\nProof.\n  unfold half_modulus. rewrite modulus_power.\n  set (ws1 := zwordsize - 1).\n  replace (zwordsize) with (Zsucc ws1).\n  rewrite two_p_S. rewrite Zmult_comm. apply Z_div_mult. omega.\n  unfold ws1. generalize wordsize_pos; omega.\n  unfold ws1. omega.\nQed.\n\nRemark half_modulus_modulus: modulus = 2 * half_modulus.\nProof.\n  rewrite half_modulus_power. rewrite modulus_power.\n  rewrite <- two_p_S. apply f_equal. omega.\n  generalize wordsize_pos; omega.\nQed.\n\n(** Relative positions, from greatest to smallest:\n<<\n      max_unsigned\n      max_signed\n      2*wordsize-1\n      wordsize\n      0\n      min_signed\n>>\n*)\n\nRemark half_modulus_pos: half_modulus > 0.\nProof.\n  rewrite half_modulus_power. apply two_p_gt_ZERO. generalize wordsize_pos; omega.\nQed.\n\nRemark min_signed_neg: min_signed < 0.\nProof.\n  unfold min_signed. generalize half_modulus_pos. omega.\nQed.\n\nRemark max_signed_pos: max_signed >= 0.\nProof.\n  unfold max_signed. generalize half_modulus_pos. omega.\nQed.\n\nRemark wordsize_max_unsigned: zwordsize <= max_unsigned.\nProof.\n  assert (zwordsize < modulus).\n    rewrite modulus_power. apply two_p_strict.\n    generalize wordsize_pos. omega.\n  unfold max_unsigned. omega.\nQed.\n\nRemark two_wordsize_max_unsigned: 2 * zwordsize - 1 <= max_unsigned.\nProof.\n  assert (2 * zwordsize - 1 < modulus).\n    rewrite modulus_power. apply two_p_strict_2. generalize wordsize_pos; omega.\n  unfold max_unsigned; omega.\nQed.\n\nRemark max_signed_unsigned: max_signed < max_unsigned.\nProof.\n  unfold max_signed, max_unsigned. rewrite half_modulus_modulus.\n  generalize half_modulus_pos. omega.\nQed.\n\nLemma unsigned_repr_eq:\n  forall x, unsigned (repr x) = Zmod x modulus.\nProof.\n  intros. simpl. apply Z_mod_modulus_eq.\nQed.\n\nLemma signed_repr_eq:\n  forall x, signed (repr x) = if zlt (Zmod x modulus) half_modulus then Zmod x modulus else Zmod x modulus - modulus.\nProof.\n  intros. unfold signed. rewrite unsigned_repr_eq. auto.\nQed.\n\n(** ** Modulo arithmetic *)\n\n(** We define and state properties of equality and arithmetic modulo a\n  positive integer. *)\n\nSection EQ_MODULO.\n\nVariable modul: Z.\nHypothesis modul_pos: modul > 0.\n\nDefinition eqmod (x y: Z) : Prop := exists k, x = k * modul + y.\n\nLemma eqmod_refl: forall x, eqmod x x.\nProof.\n  intros; red. exists 0. omega.\nQed.\n\nLemma eqmod_refl2: forall x y, x = y -> eqmod x y.\nProof.\n  intros. subst y. apply eqmod_refl.\nQed.\n\nLemma eqmod_sym: forall x y, eqmod x y -> eqmod y x.\nProof.\n  intros x y [k EQ]; red. exists (-k). subst x. ring.\nQed.\n\nLemma eqmod_trans: forall x y z, eqmod x y -> eqmod y z -> eqmod x z.\nProof.\n  intros x y z [k1 EQ1] [k2 EQ2]; red.\n  exists (k1 + k2). subst x; subst y. ring.\nQed.\n\nLemma eqmod_small_eq:\n  forall x y, eqmod x y -> 0 <= x < modul -> 0 <= y < modul -> x = y.\nProof.\n  intros x y [k EQ] I1 I2.\n  generalize (Zdiv_unique _ _ _ _ EQ I2). intro.\n  rewrite (Zdiv_small x modul I1) in H. subst k. omega.\nQed.\n\nLemma eqmod_mod_eq:\n  forall x y, eqmod x y -> x mod modul = y mod modul.\nProof.\n  intros x y [k EQ]. subst x.\n  rewrite Zplus_comm. apply Z_mod_plus. auto.\nQed.\n\nLemma eqmod_mod:\n  forall x, eqmod x (x mod modul).\nProof.\n  intros; red. exists (x / modul).\n  rewrite Zmult_comm. apply Z_div_mod_eq. auto.\nQed.\n\nLemma eqmod_add:\n  forall a b c d, eqmod a b -> eqmod c d -> eqmod (a + c) (b + d).\nProof.\n  intros a b c d [k1 EQ1] [k2 EQ2]; red.\n  subst a; subst c. exists (k1 + k2). ring.\nQed.\n\nLemma eqmod_neg:\n  forall x y, eqmod x y -> eqmod (-x) (-y).\nProof.\n  intros x y [k EQ]; red. exists (-k). rewrite EQ. ring.\nQed.\n\nLemma eqmod_sub:\n  forall a b c d, eqmod a b -> eqmod c d -> eqmod (a - c) (b - d).\nProof.\n  intros a b c d [k1 EQ1] [k2 EQ2]; red.\n  subst a; subst c. exists (k1 - k2). ring.\nQed.\n\nLemma eqmod_mult:\n  forall a b c d, eqmod a c -> eqmod b d -> eqmod (a * b) (c * d).\nProof.\n  intros a b c d [k1 EQ1] [k2 EQ2]; red.\n  subst a; subst b.\n  exists (k1 * k2 * modul + c * k2 + k1 * d).\n  ring.\nQed.\n\nEnd EQ_MODULO.\n\nLemma eqmod_divides:\n  forall n m x y, eqmod n x y -> Zdivide m n -> eqmod m x y.\nProof.\n  intros. destruct H as [k1 EQ1]. destruct H0 as [k2 EQ2].\n  exists (k1*k2). rewrite <- Zmult_assoc. rewrite <- EQ2. auto.\nQed.\n\n(** We then specialize these definitions to equality modulo\n  $2^{wordsize}$ #2<sup>wordsize</sup>#. *)\n\nHint Resolve modulus_pos: ints.\n\nDefinition eqm := eqmod modulus.\n\nLemma eqm_refl: forall x, eqm x x.\nProof (eqmod_refl modulus).\nHint Resolve eqm_refl: ints.\n\nLemma eqm_refl2:\n  forall x y, x = y -> eqm x y.\nProof (eqmod_refl2 modulus).\nHint Resolve eqm_refl2: ints.\n\nLemma eqm_sym: forall x y, eqm x y -> eqm y x.\nProof (eqmod_sym modulus).\nHint Resolve eqm_sym: ints.\n\nLemma eqm_trans: forall x y z, eqm x y -> eqm y z -> eqm x z.\nProof (eqmod_trans modulus).\nHint Resolve eqm_trans: ints.\n\nLemma eqm_small_eq:\n  forall x y, eqm x y -> 0 <= x < modulus -> 0 <= y < modulus -> x = y.\nProof (eqmod_small_eq modulus).\nHint Resolve eqm_small_eq: ints.\n\nLemma eqm_add:\n  forall a b c d, eqm a b -> eqm c d -> eqm (a + c) (b + d).\nProof (eqmod_add modulus).\nHint Resolve eqm_add: ints.\n\nLemma eqm_neg:\n  forall x y, eqm x y -> eqm (-x) (-y).\nProof (eqmod_neg modulus).\nHint Resolve eqm_neg: ints.\n\nLemma eqm_sub:\n  forall a b c d, eqm a b -> eqm c d -> eqm (a - c) (b - d).\nProof (eqmod_sub modulus).\nHint Resolve eqm_sub: ints.\n\nLemma eqm_mult:\n  forall a b c d, eqm a c -> eqm b d -> eqm (a * b) (c * d).\nProof (eqmod_mult modulus).\nHint Resolve eqm_mult: ints.\n\n(** ** Properties of the coercions between [Z] and [int] *)\n\nLemma eqm_samerepr: forall x y, eqm x y -> repr x = repr y.\nProof.\n  intros. unfold repr. apply mkint_eq.\n  rewrite !Z_mod_modulus_eq. apply eqmod_mod_eq. auto with ints. exact H.\nQed.\n\nLemma eqm_unsigned_repr:\n  forall z, eqm z (unsigned (repr z)).\nProof.\n  unfold eqm; intros. rewrite unsigned_repr_eq. apply eqmod_mod. auto with ints.\nQed.\nHint Resolve eqm_unsigned_repr: ints.\n\nLemma eqm_unsigned_repr_l:\n  forall a b, eqm a b -> eqm (unsigned (repr a)) b.\nProof.\n  intros. apply eqm_trans with a.\n  apply eqm_sym. apply eqm_unsigned_repr. auto.\nQed.\nHint Resolve eqm_unsigned_repr_l: ints.\n\nLemma eqm_unsigned_repr_r:\n  forall a b, eqm a b -> eqm a (unsigned (repr b)).\nProof.\n  intros. apply eqm_trans with b. auto.\n  apply eqm_unsigned_repr.\nQed.\nHint Resolve eqm_unsigned_repr_r: ints.\n\nLemma eqm_signed_unsigned:\n  forall x, eqm (signed x) (unsigned x).\nProof.\n  intros; red. unfold signed. set (y := unsigned x).\n  case (zlt y half_modulus); intro.\n  apply eqmod_refl. red; exists (-1); ring.\nQed.\n\nTheorem unsigned_range:\n  forall i, 0 <= unsigned i < modulus.\nProof.\n  destruct i. simpl. omega.\nQed.\nHint Resolve unsigned_range: ints.\n\nTheorem unsigned_range_2:\n  forall i, 0 <= unsigned i <= max_unsigned.\nProof.\n  intro; unfold max_unsigned.\n  generalize (unsigned_range i). omega.\nQed.\nHint Resolve unsigned_range_2: ints.\n\nTheorem signed_range:\n  forall i, min_signed <= signed i <= max_signed.\nProof.\n  intros. unfold signed.\n  generalize (unsigned_range i). set (n := unsigned i). intros.\n  case (zlt n half_modulus); intro.\n  unfold max_signed. generalize min_signed_neg. omega.\n  unfold min_signed, max_signed.\n  rewrite half_modulus_modulus in *. omega.\nQed.\n\nTheorem repr_unsigned:\n  forall i, repr (unsigned i) = i.\nProof.\n  destruct i; simpl. unfold repr. apply mkint_eq.\n  rewrite Z_mod_modulus_eq. apply Zmod_small; omega.\nQed.\nHint Resolve repr_unsigned: ints.\n\nLemma repr_signed:\n  forall i, repr (signed i) = i.\nProof.\n  intros. transitivity (repr (unsigned i)).\n  apply eqm_samerepr. apply eqm_signed_unsigned. auto with ints.\nQed.\nHint Resolve repr_signed: ints.\n\nOpaque repr.\n\nLemma eqm_repr_eq: forall x y, eqm x (unsigned y) -> repr x = y.\nProof.\n  intros. rewrite <- (repr_unsigned y). apply eqm_samerepr; auto.\nQed.\n\nTheorem unsigned_repr:\n  forall z, 0 <= z <= max_unsigned -> unsigned (repr z) = z.\nProof.\n  intros. rewrite unsigned_repr_eq.\n  apply Zmod_small. unfold max_unsigned in H. omega.\nQed.\nHint Resolve unsigned_repr: ints.\n\nTheorem signed_repr:\n  forall z, min_signed <= z <= max_signed -> signed (repr z) = z.\nProof.\n  intros. unfold signed. destruct (zle 0 z).\n  replace (unsigned (repr z)) with z.\n  rewrite zlt_true. auto. unfold max_signed in H. omega.\n  symmetry. apply unsigned_repr. generalize max_signed_unsigned. omega.\n  pose (z' := z + modulus).\n  replace (repr z) with (repr z').\n  replace (unsigned (repr z')) with z'.\n  rewrite zlt_false. unfold z'. omega.\n  unfold z'. unfold min_signed in H.\n  rewrite half_modulus_modulus. omega.\n  symmetry. apply unsigned_repr.\n  unfold z', max_unsigned. unfold min_signed, max_signed in H.\n  rewrite half_modulus_modulus. omega.\n  apply eqm_samerepr. unfold z'; red. exists 1. omega.\nQed.\n\nTheorem signed_eq_unsigned:\n  forall x, unsigned x <= max_signed -> signed x = unsigned x.\nProof.\n  intros. unfold signed. destruct (zlt (unsigned x) half_modulus).\n  auto. unfold max_signed in H. omegaContradiction.\nQed.\n\nTheorem signed_positive:\n  forall x, signed x >= 0 <-> unsigned x <= max_signed.\nProof.\n  intros. unfold signed, max_signed.\n  generalize (unsigned_range x) half_modulus_modulus half_modulus_pos; intros.\n  destruct (zlt (unsigned x) half_modulus); omega.\nQed.\n\n(** ** Properties of zero, one, minus one *)\n\nTheorem unsigned_zero: unsigned zero = 0.\nProof.\n  unfold zero; rewrite unsigned_repr_eq. apply Zmod_0_l.\nQed.\n\nTheorem unsigned_one: unsigned one = 1.\nProof.\n  unfold one; rewrite unsigned_repr_eq. apply Zmod_small. split. omega.\n  unfold modulus. replace wordsize with (S(pred wordsize)).\n  rewrite two_power_nat_S. generalize (two_power_nat_pos (pred wordsize)).\n  omega.\n  generalize wordsize_pos. unfold zwordsize. omega.\nQed.\n\nTheorem unsigned_mone: unsigned mone = modulus - 1.\nProof.\n  unfold mone; rewrite unsigned_repr_eq.\n  replace (-1) with ((modulus - 1) + (-1) * modulus).\n  rewrite Z_mod_plus_full. apply Zmod_small.\n  generalize modulus_pos. omega. omega.\nQed.\n\nTheorem signed_zero: signed zero = 0.\nProof.\n  unfold signed. rewrite unsigned_zero. apply zlt_true. generalize half_modulus_pos; omega.\nQed.\n\nTheorem signed_one: zwordsize > 1 -> signed one = 1.\nProof.\n  intros. unfold signed. rewrite unsigned_one. apply zlt_true.\n  change 1 with (two_p 0). rewrite half_modulus_power. apply two_p_monotone_strict. omega.\nQed.\n\nTheorem signed_mone: signed mone = -1.\nProof.\n  unfold signed. rewrite unsigned_mone.\n  rewrite zlt_false. omega.\n  rewrite half_modulus_modulus. generalize half_modulus_pos. omega.\nQed.\n\nTheorem one_not_zero: one <> zero.\nProof.\n  assert (unsigned one <> unsigned zero).\n  rewrite unsigned_one; rewrite unsigned_zero; congruence.\n  congruence.\nQed.\n\nTheorem unsigned_repr_wordsize:\n  unsigned iwordsize = zwordsize.\nProof.\n  unfold iwordsize; rewrite unsigned_repr_eq. apply Zmod_small.\n  generalize wordsize_pos wordsize_max_unsigned; unfold max_unsigned; omega.\nQed.\n\n(** ** Properties of equality *)\n\nTheorem eq_sym:\n  forall x y, eq x y = eq y x.\nProof.\n  intros; unfold eq. case (zeq (unsigned x) (unsigned y)); intro.\n  rewrite e. rewrite zeq_true. auto.\n  rewrite zeq_false. auto. auto.\nQed.\n\nTheorem eq_spec: forall (x y: int), if eq x y then x = y else x <> y.\nProof.\n  intros; unfold eq. case (eq_dec x y); intro.\n  subst y. rewrite zeq_true. auto.\n  rewrite zeq_false. auto.\n  destruct x; destruct y.\n  simpl. red; intro. elim n. apply mkint_eq. auto.\nQed.\n\nTheorem eq_true: forall x, eq x x = true.\nProof.\n  intros. generalize (eq_spec x x); case (eq x x); intros; congruence.\nQed.\n\nTheorem eq_false: forall x y, x <> y -> eq x y = false.\nProof.\n  intros. generalize (eq_spec x y); case (eq x y); intros; congruence.\nQed.\n\nTheorem eq_signed:\n  forall x y, eq x y = if zeq (signed x) (signed y) then true else false.\nProof.\n  intros. predSpec eq eq_spec x y.\n  subst x. rewrite zeq_true; auto.\n  destruct (zeq (signed x) (signed y)); auto.\n  elim H. rewrite <- (repr_signed x). rewrite <- (repr_signed y). congruence.\nQed.\n\n(** ** Properties of addition *)\n\nTheorem add_unsigned: forall x y, add x y = repr (unsigned x + unsigned y).\nProof. intros; reflexivity.\nQed.\n\nTheorem add_signed: forall x y, add x y = repr (signed x + signed y).\nProof.\n  intros. rewrite add_unsigned. apply eqm_samerepr.\n  apply eqm_add; apply eqm_sym; apply eqm_signed_unsigned.\nQed.\n\nTheorem add_commut: forall x y, add x y = add y x.\nProof. intros; unfold add. decEq. omega. Qed.\n\nTheorem add_zero: forall x, add x zero = x.\nProof.\n  intros. unfold add. rewrite unsigned_zero.\n  rewrite Zplus_0_r. apply repr_unsigned.\nQed.\n\nTheorem add_zero_l: forall x, add zero x = x.\nProof.\n  intros. rewrite add_commut. apply add_zero.\nQed.\n\nTheorem add_assoc: forall x y z, add (add x y) z = add x (add y z).\nProof.\n  intros; unfold add.\n  set (x' := unsigned x).\n  set (y' := unsigned y).\n  set (z' := unsigned z).\n  apply eqm_samerepr.\n  apply eqm_trans with ((x' + y') + z').\n  auto with ints.\n  rewrite <- Zplus_assoc. auto with ints.\nQed.\n\nTheorem add_permut: forall x y z, add x (add y z) = add y (add x z).\nProof.\n  intros. rewrite (add_commut y z). rewrite <- add_assoc. apply add_commut.\nQed.\n\nTheorem add_neg_zero: forall x, add x (neg x) = zero.\nProof.\n  intros; unfold add, neg, zero. apply eqm_samerepr.\n  replace 0 with (unsigned x + (- (unsigned x))).\n  auto with ints. omega.\nQed.\n\nTheorem unsigned_add_carry:\n  forall x y,\n  unsigned (add x y) = unsigned x + unsigned y - unsigned (add_carry x y zero) * modulus.\nProof.\n  intros.\n  unfold add, add_carry. rewrite unsigned_zero. rewrite Zplus_0_r.\n  rewrite unsigned_repr_eq.\n  generalize (unsigned_range x) (unsigned_range y). intros.\n  destruct (zlt (unsigned x + unsigned y) modulus).\n  rewrite unsigned_zero. apply Zmod_unique with 0. omega. omega.\n  rewrite unsigned_one. apply Zmod_unique with 1. omega. omega.\nQed.\n\nCorollary unsigned_add_either:\n  forall x y,\n  unsigned (add x y) = unsigned x + unsigned y\n  \\/ unsigned (add x y) = unsigned x + unsigned y - modulus.\nProof.\n  intros. rewrite unsigned_add_carry. unfold add_carry.\n  rewrite unsigned_zero. rewrite Zplus_0_r.\n  destruct (zlt (unsigned x + unsigned y) modulus).\n  rewrite unsigned_zero. left; omega.\n  rewrite unsigned_one. right; omega.\nQed.\n\n(** ** Properties of negation *)\n\nTheorem neg_repr: forall z, neg (repr z) = repr (-z).\nProof.\n  intros; unfold neg. apply eqm_samerepr. auto with ints.\nQed.\n\nTheorem neg_zero: neg zero = zero.\nProof.\n  unfold neg. rewrite unsigned_zero. auto.\nQed.\n\nTheorem neg_involutive: forall x, neg (neg x) = x.\nProof.\n  intros; unfold neg.\n  apply eqm_repr_eq. eapply eqm_trans. apply eqm_neg.\n  apply eqm_unsigned_repr_l. apply eqm_refl. apply eqm_refl2. omega.\nQed.\n\nTheorem neg_add_distr: forall x y, neg(add x y) = add (neg x) (neg y).\nProof.\n  intros; unfold neg, add. apply eqm_samerepr.\n  apply eqm_trans with (- (unsigned x + unsigned y)).\n  auto with ints.\n  replace (- (unsigned x + unsigned y))\n     with ((- unsigned x) + (- unsigned y)).\n  auto with ints. omega.\nQed.\n\n(** ** Properties of subtraction *)\n\nTheorem sub_zero_l: forall x, sub x zero = x.\nProof.\n  intros; unfold sub. rewrite unsigned_zero.\n  replace (unsigned x - 0) with (unsigned x) by omega. apply repr_unsigned.\nQed.\n\nTheorem sub_zero_r: forall x, sub zero x = neg x.\nProof.\n  intros; unfold sub, neg. rewrite unsigned_zero. auto.\nQed.\n\nTheorem sub_add_opp: forall x y, sub x y = add x (neg y).\nProof.\n  intros; unfold sub, add, neg. apply eqm_samerepr.\n  apply eqm_add; auto with ints.\nQed.\n\nTheorem sub_idem: forall x, sub x x = zero.\nProof.\n  intros; unfold sub. unfold zero. decEq. omega.\nQed.\n\nTheorem sub_add_l: forall x y z, sub (add x y) z = add (sub x z) y.\nProof.\n  intros. repeat rewrite sub_add_opp.\n  repeat rewrite add_assoc. decEq. apply add_commut.\nQed.\n\nTheorem sub_add_r: forall x y z, sub x (add y z) = add (sub x z) (neg y).\nProof.\n  intros. repeat rewrite sub_add_opp.\n  rewrite neg_add_distr. rewrite add_permut. apply add_commut.\nQed.\n\nTheorem sub_shifted:\n  forall x y z,\n  sub (add x z) (add y z) = sub x y.\nProof.\n  intros. rewrite sub_add_opp. rewrite neg_add_distr.\n  rewrite add_assoc.\n  rewrite (add_commut (neg y) (neg z)).\n  rewrite <- (add_assoc z). rewrite add_neg_zero.\n  rewrite (add_commut zero). rewrite add_zero.\n  symmetry. apply sub_add_opp.\nQed.\n\nTheorem sub_signed:\n  forall x y, sub x y = repr (signed x - signed y).\nProof.\n  intros. unfold sub. apply eqm_samerepr.\n  apply eqm_sub; apply eqm_sym; apply eqm_signed_unsigned.\nQed.\n\nTheorem unsigned_sub_borrow:\n  forall x y,\n  unsigned (sub x y) = unsigned x - unsigned y + unsigned (sub_borrow x y zero) * modulus.\nProof.\n  intros.\n  unfold sub, sub_borrow. rewrite unsigned_zero. rewrite Zminus_0_r.\n  rewrite unsigned_repr_eq.\n  generalize (unsigned_range x) (unsigned_range y). intros.\n  destruct (zlt (unsigned x - unsigned y) 0).\n  rewrite unsigned_one. apply Zmod_unique with (-1). omega. omega.\n  rewrite unsigned_zero. apply Zmod_unique with 0. omega. omega.\nQed.\n\n(** ** Properties of multiplication *)\n\nTheorem mul_commut: forall x y, mul x y = mul y x.\nProof.\n  intros; unfold mul. decEq. ring.\nQed.\n\nTheorem mul_zero: forall x, mul x zero = zero.\nProof.\n  intros; unfold mul. rewrite unsigned_zero.\n  unfold zero. decEq. ring.\nQed.\n\nTheorem mul_one: forall x, mul x one = x.\nProof.\n  intros; unfold mul. rewrite unsigned_one.\n  transitivity (repr (unsigned x)). decEq. ring.\n  apply repr_unsigned.\nQed.\n\nTheorem mul_mone: forall x, mul x mone = neg x.\nProof.\n  intros; unfold mul, neg. rewrite unsigned_mone.\n  apply eqm_samerepr.\n  replace (-unsigned x) with (0 - unsigned x) by omega.\n  replace (unsigned x * (modulus - 1)) with (unsigned x * modulus - unsigned x) by ring.\n  apply eqm_sub. exists (unsigned x). omega. apply eqm_refl.\nQed.\n\nTheorem mul_assoc: forall x y z, mul (mul x y) z = mul x (mul y z).\nProof.\n  intros; unfold mul.\n  set (x' := unsigned x).\n  set (y' := unsigned y).\n  set (z' := unsigned z).\n  apply eqm_samerepr. apply eqm_trans with ((x' * y') * z').\n  auto with ints.\n  rewrite <- Zmult_assoc. auto with ints.\nQed.\n\nTheorem mul_add_distr_l:\n  forall x y z, mul (add x y) z = add (mul x z) (mul y z).\nProof.\n  intros; unfold mul, add.\n  apply eqm_samerepr.\n  set (x' := unsigned x).\n  set (y' := unsigned y).\n  set (z' := unsigned z).\n  apply eqm_trans with ((x' + y') * z').\n  auto with ints.\n  replace ((x' + y') * z') with (x' * z' + y' * z').\n  auto with ints.\n  ring.\nQed.\n\nTheorem mul_add_distr_r:\n  forall x y z, mul x (add y z) = add (mul x y) (mul x z).\nProof.\n  intros. rewrite mul_commut. rewrite mul_add_distr_l.\n  decEq; apply mul_commut.\nQed.\n\nTheorem neg_mul_distr_l:\n  forall x y, neg(mul x y) = mul (neg x) y.\nProof.\n  intros. unfold mul, neg.\n  set (x' := unsigned x).  set (y' := unsigned y).\n  apply eqm_samerepr. apply eqm_trans with (- (x' * y')).\n  auto with ints.\n  replace (- (x' * y')) with ((-x') * y') by ring.\n  auto with ints.\nQed.\n\nTheorem neg_mul_distr_r:\n   forall x y, neg(mul x y) = mul x (neg y).\nProof.\n  intros. rewrite (mul_commut x y). rewrite (mul_commut x (neg y)).\n  apply neg_mul_distr_l.\nQed.\n\nTheorem mul_signed:\n  forall x y, mul x y = repr (signed x * signed y).\nProof.\n  intros; unfold mul. apply eqm_samerepr.\n  apply eqm_mult; apply eqm_sym; apply eqm_signed_unsigned.\nQed.\n\n(** ** Properties of division and modulus *)\n\nLemma modu_divu_Euclid:\n  forall x y, y <> zero -> x = add (mul (divu x y) y) (modu x y).\nProof.\n  intros. unfold add, mul, divu, modu.\n  transitivity (repr (unsigned x)). auto with ints.\n  apply eqm_samerepr.\n  set (x' := unsigned x). set (y' := unsigned y).\n  apply eqm_trans with ((x' / y') * y' + x' mod y').\n  apply eqm_refl2. rewrite Zmult_comm. apply Z_div_mod_eq.\n  generalize (unsigned_range y); intro.\n  assert (unsigned y <> 0). red; intro.\n  elim H. rewrite <- (repr_unsigned y). unfold zero. congruence.\n  unfold y'. omega.\n  auto with ints.\nQed.\n\nTheorem modu_divu:\n  forall x y, y <> zero -> modu x y = sub x (mul (divu x y) y).\nProof.\n  intros.\n  assert (forall a b c, a = add b c -> c = sub a b).\n  intros. subst a. rewrite sub_add_l. rewrite sub_idem.\n  rewrite add_commut. rewrite add_zero. auto.\n  apply H0. apply modu_divu_Euclid. auto.\nQed.\n\nLemma mods_divs_Euclid:\n  forall x y, x = add (mul (divs x y) y) (mods x y).\nProof.\n  intros. unfold add, mul, divs, mods.\n  transitivity (repr (signed x)). auto with ints.\n  apply eqm_samerepr.\n  set (x' := signed x). set (y' := signed y).\n  apply eqm_trans with ((Z.quot x' y') * y' + Z.rem x' y').\n  apply eqm_refl2. rewrite Zmult_comm. apply Z.quot_rem'.\n  apply eqm_add; auto with ints.\n  apply eqm_unsigned_repr_r. apply eqm_mult; auto with ints.\n  unfold y'. apply eqm_signed_unsigned.\nQed.\n\nTheorem mods_divs:\n  forall x y, mods x y = sub x (mul (divs x y) y).\nProof.\n  intros.\n  assert (forall a b c, a = add b c -> c = sub a b).\n  intros. subst a. rewrite sub_add_l. rewrite sub_idem.\n  rewrite add_commut. rewrite add_zero. auto.\n  apply H. apply mods_divs_Euclid.\nQed.\n\nTheorem divu_one:\n  forall x, divu x one = x.\nProof.\n  unfold divu; intros. rewrite unsigned_one. rewrite Zdiv_1_r. apply repr_unsigned.\nQed.\n\nTheorem modu_one:\n  forall x, modu x one = zero.\nProof.\n  intros. rewrite modu_divu. rewrite divu_one. rewrite mul_one. apply sub_idem.\n  apply one_not_zero.\nQed.\n\nTheorem divs_mone:\n  forall x, divs x mone = neg x.\nProof.\n  unfold divs, neg; intros.\n  rewrite signed_mone.\n  replace (Z.quot (signed x) (-1)) with (- (signed x)).\n  apply eqm_samerepr. apply eqm_neg. apply eqm_signed_unsigned.\n  set (x' := signed x).\n  set (one := 1).\n  change (-1) with (- one). rewrite Zquot_opp_r.\n  assert (Z.quot x' one = x').\n  symmetry. apply Zquot_unique_full with 0. red.\n  change (Z.abs one) with 1.\n  destruct (zle 0 x'). left. omega. right. omega.\n  unfold one; ring.\n  congruence.\nQed.\n\nTheorem mods_mone:\n  forall x, mods x mone = zero.\nProof.\n  intros. rewrite mods_divs. rewrite divs_mone.\n  rewrite <- neg_mul_distr_l. rewrite mul_mone. rewrite neg_involutive. apply sub_idem.\nQed.\n\nTheorem divmodu2_divu_modu:\n  forall n d,\n  d <> zero -> divmodu2 zero n d = Some (divu n d, modu n d).\nProof.\n  unfold divmodu2, divu, modu; intros.\n  rewrite dec_eq_false by auto.\n  set (N := unsigned zero * modulus + unsigned n).\n  assert (E1: unsigned n = N) by (unfold N; rewrite unsigned_zero; ring). rewrite ! E1.\n  set (D := unsigned d).\n  set (Q := N / D); set (R := N mod D).\n  assert (E2: Z.div_eucl N D = (Q, R)).\n  { unfold Q, R, Z.div, Z.modulo. destruct (Z.div_eucl N D); auto. }\n  rewrite E2. rewrite zle_true. auto.\n  assert (unsigned d <> 0).\n  { red; intros. elim H. rewrite <- (repr_unsigned d). rewrite H0; auto. }\n  assert (0 < D).\n  { unfold D. generalize (unsigned_range d); intros. omega. }\n  assert (0 <= Q <= max_unsigned).\n  { unfold Q. apply Zdiv_interval_2.\n    rewrite <- E1; apply unsigned_range_2.\n    omega. unfold max_unsigned; generalize modulus_pos; omega. omega. }\n  omega.\nQed.\n\nLemma unsigned_signed:\n  forall n, unsigned n = if lt n zero then signed n + modulus else signed n.\nProof.\n  intros. unfold lt. rewrite signed_zero. unfold signed.\n  generalize (unsigned_range n). rewrite half_modulus_modulus. intros.\n  destruct (zlt (unsigned n) half_modulus).\n- rewrite zlt_false by omega. auto.\n- rewrite zlt_true by omega. ring.\nQed.\n\nTheorem divmods2_divs_mods:\n  forall n d,\n  d <> zero -> n <> repr min_signed \\/ d <> mone ->\n  divmods2 (if lt n zero then mone else zero) n d = Some (divs n d, mods n d).\nProof.\n  unfold divmods2, divs, mods; intros.\n  rewrite dec_eq_false by auto.\n  set (N := signed (if lt n zero then mone else zero) * modulus + unsigned n).\n  set (D := signed d).\n  assert (D <> 0).\n  { unfold D; red; intros. elim H. rewrite <- (repr_signed d). rewrite H1; auto. }\n  assert (N = signed n).\n  { unfold N. rewrite unsigned_signed. destruct (lt n zero).\n    rewrite signed_mone. ring.\n    rewrite signed_zero. ring. }\n  set (Q := Z.quot N D); set (R := Z.rem N D).\n  assert (E2: Z.quotrem N D = (Q, R)).\n  { unfold Q, R, Z.quot, Z.rem. destruct (Z.quotrem N D); auto. }\n  rewrite E2.\n  assert (min_signed <= N <= max_signed) by (rewrite H2; apply signed_range).\n  assert (min_signed <= Q <= max_signed).\n  { unfold Q. destruct (zeq D 1); [ | destruct (zeq D (-1))].\n  - (* D = 1 *)\n    rewrite e. rewrite Z.quot_1_r; auto.\n  - (* D = -1 *)\n    rewrite e. change (-1) with (Z.opp 1). rewrite Z.quot_opp_r by omega.\n    rewrite Z.quot_1_r.\n    assert (N <> min_signed).\n    { red; intros; destruct H0.\n    + elim H0. rewrite <- (repr_signed n). rewrite <- H2. rewrite H4. auto.\n    + elim H0. rewrite <- (repr_signed d). unfold D in e; rewrite e; auto. }\n    unfold min_signed, max_signed in *. omega.\n  - (* |D| > 1 *)\n    assert (Z.abs (Z.quot N D) < half_modulus).\n    { rewrite <- Z.quot_abs by omega. apply Zquot_lt_upper_bound.\n      xomega. xomega.\n      apply Zle_lt_trans with (half_modulus * 1).\n      rewrite Z.mul_1_r. unfold min_signed, max_signed in H3; xomega.\n      apply Zmult_lt_compat_l. generalize half_modulus_pos; omega. xomega. }\n    rewrite Z.abs_lt in H4.\n    unfold min_signed, max_signed; omega.\n  }\n  unfold proj_sumbool; rewrite ! zle_true by omega; simpl.\n  unfold Q, R; rewrite H2; auto.\nQed.\n\n(** ** Bit-level properties *)\n\n(** ** Properties of bit-level operations over [Z] *)\n\nRemark Ztestbit_0: forall n, Z.testbit 0 n = false.\nProof Z.testbit_0_l.\n\nRemark Ztestbit_1: forall n, Z.testbit 1 n = zeq n 0.\nProof.\n  intros. destruct n; simpl; auto.\nQed.\n\nRemark Ztestbit_m1: forall n, 0 <= n -> Z.testbit (-1) n = true.\nProof.\n  intros. destruct n; simpl; auto.\nQed.\n\nRemark Zshiftin_spec:\n  forall b x, Zshiftin b x = 2 * x + (if b then 1 else 0).\nProof.\n  unfold Zshiftin; intros. destruct b.\n  - rewrite Z.succ_double_spec. omega.\n  - rewrite Z.double_spec. omega.\nQed.\n\nRemark Zshiftin_inj:\n  forall b1 x1 b2 x2,\n  Zshiftin b1 x1 = Zshiftin b2 x2 -> b1 = b2 /\\ x1 = x2.\nProof.\n  intros. rewrite !Zshiftin_spec in H.\n  destruct b1; destruct b2.\n  split; [auto|omega].\n  omegaContradiction.\n  omegaContradiction.\n  split; [auto|omega].\nQed.\n\nRemark Zdecomp:\n  forall x, x = Zshiftin (Z.odd x) (Z.div2 x).\nProof.\n  intros. destruct x; simpl.\n  - auto.\n  - destruct p; auto.\n  - destruct p; auto. simpl. rewrite Pos.pred_double_succ. auto.\nQed.\n\nRemark Ztestbit_shiftin:\n  forall b x n,\n  0 <= n ->\n  Z.testbit (Zshiftin b x) n = if zeq n 0 then b else Z.testbit x (Z.pred n).\nProof.\n  intros. rewrite Zshiftin_spec. destruct (zeq n 0).\n  - subst n. destruct b.\n    + apply Z.testbit_odd_0.\n    + rewrite Zplus_0_r. apply Z.testbit_even_0.\n  - assert (0 <= Z.pred n) by omega.\n    set (n' := Z.pred n) in *.\n    replace n with (Z.succ n') by (unfold n'; omega).\n    destruct b.\n    + apply Z.testbit_odd_succ; auto.\n    + rewrite Zplus_0_r. apply Z.testbit_even_succ; auto.\nQed.\n\nRemark Ztestbit_shiftin_base:\n  forall b x, Z.testbit (Zshiftin b x) 0 = b.\nProof.\n  intros. rewrite Ztestbit_shiftin. apply zeq_true. omega.\nQed.\n\nRemark Ztestbit_shiftin_succ:\n  forall b x n, 0 <= n -> Z.testbit (Zshiftin b x) (Z.succ n) = Z.testbit x n.\nProof.\n  intros. rewrite Ztestbit_shiftin. rewrite zeq_false. rewrite Z.pred_succ. auto.\n  omega. omega.\nQed.\n\nRemark Ztestbit_eq:\n  forall n x, 0 <= n ->\n  Z.testbit x n = if zeq n 0 then Z.odd x else Z.testbit (Z.div2 x) (Z.pred n).\nProof.\n  intros. rewrite (Zdecomp x) at 1. apply Ztestbit_shiftin; auto.\nQed.\n\nRemark Ztestbit_base:\n  forall x, Z.testbit x 0 = Z.odd x.\nProof.\n  intros. rewrite Ztestbit_eq. apply zeq_true. omega.\nQed.\n\nRemark Ztestbit_succ:\n  forall n x, 0 <= n -> Z.testbit x (Z.succ n) = Z.testbit (Z.div2 x) n.\nProof.\n  intros. rewrite Ztestbit_eq. rewrite zeq_false. rewrite Z.pred_succ. auto.\n  omega. omega.\nQed.\n\nLemma eqmod_same_bits:\n  forall n x y,\n  (forall i, 0 <= i < Z.of_nat n -> Z.testbit x i = Z.testbit y i) ->\n  eqmod (two_power_nat n) x y.\nProof.\n  induction n; intros.\n  - change (two_power_nat 0) with 1. exists (x-y); ring.\n  - rewrite two_power_nat_S.\n    assert (eqmod (two_power_nat n) (Z.div2 x) (Z.div2 y)).\n      apply IHn. intros. rewrite <- !Ztestbit_succ. apply H. rewrite inj_S; omega.\n      omega. omega.\n  destruct H0 as [k EQ].\n  exists k. rewrite (Zdecomp x). rewrite (Zdecomp y).\n  replace (Z.odd y) with (Z.odd x).\n  rewrite EQ. rewrite !Zshiftin_spec. ring.\n  exploit (H 0). rewrite inj_S; omega.\n  rewrite !Ztestbit_base. auto.\nQed.\n\nLemma eqm_same_bits:\n  forall x y,\n  (forall i, 0 <= i < zwordsize -> Z.testbit x i = Z.testbit y i) ->\n  eqm x y.\nProof (eqmod_same_bits wordsize).\n\nLemma same_bits_eqmod:\n  forall n x y i,\n  eqmod (two_power_nat n) x y -> 0 <= i < Z.of_nat n ->\n  Z.testbit x i = Z.testbit y i.\nProof.\n  induction n; intros.\n  - simpl in H0. omegaContradiction.\n  - rewrite inj_S in H0. rewrite two_power_nat_S in H.\n    rewrite !(Ztestbit_eq i); intuition.\n    destruct H as [k EQ].\n    assert (EQ': Zshiftin (Z.odd x) (Z.div2 x) =\n                 Zshiftin (Z.odd y) (k * two_power_nat n + Z.div2 y)).\n    {\n      rewrite (Zdecomp x) in EQ. rewrite (Zdecomp y) in EQ.\n      rewrite EQ. rewrite !Zshiftin_spec. ring.\n    }\n    exploit Zshiftin_inj; eauto. intros [A B].\n    destruct (zeq i 0).\n    + auto.\n    + apply IHn. exists k; auto. omega.\nQed.\n\nLemma same_bits_eqm:\n  forall x y i,\n  eqm x y ->\n  0 <= i < zwordsize ->\n  Z.testbit x i = Z.testbit y i.\nProof (same_bits_eqmod wordsize).\n\nRemark two_power_nat_infinity:\n  forall x, 0 <= x -> exists n, x < two_power_nat n.\nProof.\n  intros x0 POS0; pattern x0; apply natlike_ind; auto.\n  exists O. compute; auto.\n  intros. destruct H0 as [n LT]. exists (S n). rewrite two_power_nat_S.\n  generalize (two_power_nat_pos n). omega.\nQed.\n\nLemma equal_same_bits:\n  forall x y,\n  (forall i, 0 <= i -> Z.testbit x i = Z.testbit y i) ->\n  x = y.\nProof.\n  intros.\n  set (z := if zlt x y then y - x else x - y).\n  assert (0 <= z).\n    unfold z; destruct (zlt x y); omega.\n  exploit (two_power_nat_infinity z); auto. intros [n LT].\n  assert (eqmod (two_power_nat n) x y).\n    apply eqmod_same_bits. intros. apply H. tauto.\n  assert (eqmod (two_power_nat n) z 0).\n    unfold z. destruct (zlt x y).\n    replace 0 with (y - y) by omega. apply eqmod_sub. apply eqmod_refl. auto.\n    replace 0 with (x - x) by omega. apply eqmod_sub. apply eqmod_refl. apply eqmod_sym; auto.\n  assert (z = 0).\n    apply eqmod_small_eq with (two_power_nat n). auto. omega. generalize (two_power_nat_pos n); omega.\n  unfold z in H3. destruct (zlt x y); omega.\nQed.\n\nLemma Z_one_complement:\n  forall i, 0 <= i ->\n  forall x, Z.testbit (-x-1) i = negb (Z.testbit x i).\nProof.\n  intros i0 POS0. pattern i0. apply Zlt_0_ind; auto.\n  intros i IND POS x.\n  rewrite (Zdecomp x). set (y := Z.div2 x).\n  replace (- Zshiftin (Z.odd x) y - 1)\n     with (Zshiftin (negb (Z.odd x)) (- y - 1)).\n  rewrite !Ztestbit_shiftin; auto.\n  destruct (zeq i 0). auto. apply IND. omega.\n  rewrite !Zshiftin_spec. destruct (Z.odd x); simpl negb; ring.\nQed.\n\nLemma Ztestbit_above:\n  forall n x i,\n  0 <= x < two_power_nat n ->\n  i >= Z.of_nat n ->\n  Z.testbit x i = false.\nProof.\n  induction n; intros.\n  - change (two_power_nat 0) with 1 in H.\n    replace x with 0 by omega.\n    apply Z.testbit_0_l.\n  - rewrite inj_S in H0. rewrite Ztestbit_eq. rewrite zeq_false.\n    apply IHn. rewrite two_power_nat_S in H. rewrite (Zdecomp x) in H.\n    rewrite Zshiftin_spec in H. destruct (Z.odd x); omega.\n    omega. omega. omega.\nQed.\n\nLemma Ztestbit_above_neg:\n  forall n x i,\n  -two_power_nat n <= x < 0 ->\n  i >= Z.of_nat n ->\n  Z.testbit x i = true.\nProof.\n  intros. set (y := -x-1).\n  assert (Z.testbit y i = false).\n    apply Ztestbit_above with n.\n    unfold y; omega. auto.\n  unfold y in H1. rewrite Z_one_complement in H1.\n  change true with (negb false). rewrite <- H1. rewrite negb_involutive; auto.\n  omega.\nQed.\n\nLemma Zsign_bit:\n  forall n x,\n  0 <= x < two_power_nat (S n) ->\n  Z.testbit x (Z_of_nat n) = if zlt x (two_power_nat n) then false else true.\nProof.\n  induction n; intros.\n  - change (two_power_nat 1) with 2 in H.\n    assert (x = 0 \\/ x = 1) by omega.\n    destruct H0; subst x; reflexivity.\n  - rewrite inj_S. rewrite Ztestbit_eq. rewrite zeq_false. rewrite Z.pred_succ.\n    rewrite IHn. rewrite two_power_nat_S.\n    destruct (zlt (Z.div2 x) (two_power_nat n)); rewrite (Zdecomp x); rewrite Zshiftin_spec.\n    rewrite zlt_true. auto. destruct (Z.odd x); omega.\n    rewrite zlt_false. auto. destruct (Z.odd x); omega.\n    rewrite (Zdecomp x) in H; rewrite Zshiftin_spec in H.\n    rewrite two_power_nat_S in H. destruct (Z.odd x); omega.\n    omega. omega.\nQed.\n\nLemma Zshiftin_ind:\n  forall (P: Z -> Prop),\n  P 0 ->\n  (forall b x, 0 <= x -> P x -> P (Zshiftin b x)) ->\n  forall x, 0 <= x -> P x.\nProof.\n  intros. destruct x.\n  - auto.\n  - induction p.\n    + change (P (Zshiftin true (Z.pos p))). auto.\n    + change (P (Zshiftin false (Z.pos p))). auto.\n    + change (P (Zshiftin true 0)). apply H0. omega. auto.\n  - compute in H1. intuition congruence.\nQed.\n\nLemma Zshiftin_pos_ind:\n  forall (P: Z -> Prop),\n  P 1 ->\n  (forall b x, 0 < x -> P x -> P (Zshiftin b x)) ->\n  forall x, 0 < x -> P x.\nProof.\n  intros. destruct x; simpl in H1; try discriminate.\n  induction p.\n    + change (P (Zshiftin true (Z.pos p))). auto.\n    + change (P (Zshiftin false (Z.pos p))). auto.\n    + auto.\nQed.\n\nLemma Ztestbit_le:\n  forall x y,\n  0 <= y ->\n  (forall i, 0 <= i -> Z.testbit x i = true -> Z.testbit y i = true) ->\n  x <= y.\nProof.\n  intros x y0 POS0; revert x; pattern y0; apply Zshiftin_ind; auto; intros.\n  - replace x with 0. omega. apply equal_same_bits; intros.\n    rewrite Ztestbit_0. destruct (Z.testbit x i) as [] eqn:E; auto.\n    exploit H; eauto. rewrite Ztestbit_0. auto.\n  - assert (Z.div2 x0 <= x).\n    { apply H0. intros. exploit (H1 (Zsucc i)).\n        omega. rewrite Ztestbit_succ; auto. rewrite Ztestbit_shiftin_succ; auto.\n    }\n    rewrite (Zdecomp x0). rewrite !Zshiftin_spec.\n    destruct (Z.odd x0) as [] eqn:E1; destruct b as [] eqn:E2; try omega.\n    exploit (H1 0). omega. rewrite Ztestbit_base; auto.\n    rewrite Ztestbit_shiftin_base. congruence.\nQed.\n\n(** ** Bit-level reasoning over type [int] *)\n\nDefinition testbit (x: int) (i: Z) : bool := Z.testbit (unsigned x) i.\n\nLemma testbit_repr:\n  forall x i,\n  0 <= i < zwordsize ->\n  testbit (repr x) i = Z.testbit x i.\nProof.\n  intros. unfold testbit. apply same_bits_eqm; auto with ints.\nQed.\n\nLemma same_bits_eq:\n  forall x y,\n  (forall i, 0 <= i < zwordsize -> testbit x i = testbit y i) ->\n  x = y.\nProof.\n  intros. rewrite <- (repr_unsigned x). rewrite <- (repr_unsigned y).\n  apply eqm_samerepr. apply eqm_same_bits. auto.\nQed.\n\nLemma bits_above:\n  forall x i, i >= zwordsize -> testbit x i = false.\nProof.\n  intros. apply Ztestbit_above with wordsize; auto. apply unsigned_range.\nQed.\n\nLemma bits_zero:\n  forall i, testbit zero i = false.\nProof.\n  intros. unfold testbit. rewrite unsigned_zero. apply Ztestbit_0.\nQed.\n\nRemark bits_one: forall n, testbit one n = zeq n 0.\nProof.\n  unfold testbit; intros. rewrite unsigned_one. apply Ztestbit_1.\nQed.\n\nLemma bits_mone:\n  forall i, 0 <= i < zwordsize -> testbit mone i = true.\nProof.\n  intros. unfold mone. rewrite testbit_repr; auto. apply Ztestbit_m1. omega.\nQed.\n\nHint Rewrite bits_zero bits_mone : ints.\n\nLtac bit_solve :=\n  intros; apply same_bits_eq; intros; autorewrite with ints; auto with bool.\n\nLemma sign_bit_of_unsigned:\n  forall x, testbit x (zwordsize - 1) = if zlt (unsigned x) half_modulus then false else true.\nProof.\n  intros. unfold testbit.\n  set (ws1 := pred wordsize).\n  assert (zwordsize - 1 = Z_of_nat ws1).\n    unfold zwordsize, ws1, wordsize.\n    destruct WS.wordsize as [] eqn:E.\n    elim WS.wordsize_not_zero; auto.\n    rewrite inj_S. simpl. omega.\n  assert (half_modulus = two_power_nat ws1).\n    rewrite two_power_nat_two_p. rewrite <- H. apply half_modulus_power.\n  rewrite H; rewrite H0.\n  apply Zsign_bit. rewrite two_power_nat_S. rewrite <- H0.\n  rewrite <- half_modulus_modulus. apply unsigned_range.\nQed.\n\nLemma bits_signed:\n  forall x i, 0 <= i ->\n  Z.testbit (signed x) i = testbit x (if zlt i zwordsize then i else zwordsize - 1).\nProof.\n  intros.\n  destruct (zlt i zwordsize).\n  - apply same_bits_eqm. apply eqm_signed_unsigned. omega.\n  - unfold signed. rewrite sign_bit_of_unsigned. destruct (zlt (unsigned x) half_modulus).\n    + apply Ztestbit_above with wordsize. apply unsigned_range. auto.\n    + apply Ztestbit_above_neg with wordsize.\n      fold modulus. generalize (unsigned_range x). omega. auto.\nQed.\n\nLemma bits_le:\n  forall x y,\n  (forall i, 0 <= i < zwordsize -> testbit x i = true -> testbit y i = true) ->\n  unsigned x <= unsigned y.\nProof.\n  intros. apply Ztestbit_le. generalize (unsigned_range y); omega.\n  intros. fold (testbit y i). destruct (zlt i zwordsize).\n  apply H. omega. auto.\n  fold (testbit x i) in H1. rewrite bits_above in H1; auto. congruence.\nQed.\n\n(** ** Properties of bitwise and, or, xor *)\n\nLemma bits_and:\n  forall x y i, 0 <= i < zwordsize ->\n  testbit (and x y) i = testbit x i && testbit y i.\nProof.\n  intros. unfold and. rewrite testbit_repr; auto. rewrite Z.land_spec; intuition.\nQed.\n\nLemma bits_or:\n  forall x y i, 0 <= i < zwordsize ->\n  testbit (or x y) i = testbit x i || testbit y i.\nProof.\n  intros. unfold or. rewrite testbit_repr; auto. rewrite Z.lor_spec; intuition.\nQed.\n\nLemma bits_xor:\n  forall x y i, 0 <= i < zwordsize ->\n  testbit (xor x y) i = xorb (testbit x i) (testbit y i).\nProof.\n  intros. unfold xor. rewrite testbit_repr; auto. rewrite Z.lxor_spec; intuition.\nQed.\n\nLemma bits_not:\n  forall x i, 0 <= i < zwordsize ->\n  testbit (not x) i = negb (testbit x i).\nProof.\n  intros. unfold not. rewrite bits_xor; auto. rewrite bits_mone; auto.\nQed.\n\nHint Rewrite bits_and bits_or bits_xor bits_not: ints.\n\nTheorem and_commut: forall x y, and x y = and y x.\nProof.\n  bit_solve.\nQed.\n\nTheorem and_assoc: forall x y z, and (and x y) z = and x (and y z).\nProof.\n  bit_solve.\nQed.\n\nTheorem and_zero: forall x, and x zero = zero.\nProof.\n  bit_solve. apply andb_b_false.\nQed.\n\nCorollary and_zero_l: forall x, and zero x = zero.\nProof.\n  intros. rewrite and_commut. apply and_zero.\nQed.\n\nTheorem and_mone: forall x, and x mone = x.\nProof.\n  bit_solve. apply andb_b_true.\nQed.\n\nCorollary and_mone_l: forall x, and mone x = x.\nProof.\n  intros. rewrite and_commut. apply and_mone.\nQed.\n\nTheorem and_idem: forall x, and x x = x.\nProof.\n  bit_solve. destruct (testbit x i); auto.\nQed.\n\nTheorem or_commut: forall x y, or x y = or y x.\nProof.\n  bit_solve.\nQed.\n\nTheorem or_assoc: forall x y z, or (or x y) z = or x (or y z).\nProof.\n  bit_solve.\nQed.\n\nTheorem or_zero: forall x, or x zero = x.\nProof.\n  bit_solve.\nQed.\n\nCorollary or_zero_l: forall x, or zero x = x.\nProof.\n  intros. rewrite or_commut. apply or_zero.\nQed.\n\nTheorem or_mone: forall x, or x mone = mone.\nProof.\n  bit_solve.\nQed.\n\nTheorem or_idem: forall x, or x x = x.\nProof.\n  bit_solve. destruct (testbit x i); auto.\nQed.\n\nTheorem and_or_distrib:\n  forall x y z,\n  and x (or y z) = or (and x y) (and x z).\nProof.\n  bit_solve. apply demorgan1.\nQed.\n\nCorollary and_or_distrib_l:\n  forall x y z,\n  and (or x y) z = or (and x z) (and y z).\nProof.\n  intros. rewrite (and_commut (or x y)). rewrite and_or_distrib. f_equal; apply and_commut.\nQed.\n\nTheorem or_and_distrib:\n  forall x y z,\n  or x (and y z) = and (or x y) (or x z).\nProof.\n  bit_solve. apply orb_andb_distrib_r.\nQed.\n\nCorollary or_and_distrib_l:\n  forall x y z,\n  or (and x y) z = and (or x z) (or y z).\nProof.\n  intros. rewrite (or_commut (and x y)). rewrite or_and_distrib. f_equal; apply or_commut.\nQed.\n\nTheorem and_or_absorb: forall x y, and x (or x y) = x.\nProof.\n  bit_solve.\n  assert (forall a b, a && (a || b) = a) by destr_bool.\n  auto.\nQed.\n\nTheorem or_and_absorb: forall x y, or x (and x y) = x.\nProof.\n  bit_solve.\n  assert (forall a b, a || (a && b) = a) by destr_bool.\n  auto.\nQed.\n\nTheorem xor_commut: forall x y, xor x y = xor y x.\nProof.\n  bit_solve. apply xorb_comm.\nQed.\n\nTheorem xor_assoc: forall x y z, xor (xor x y) z = xor x (xor y z).\nProof.\n  bit_solve. apply xorb_assoc.\nQed.\n\nTheorem xor_zero: forall x, xor x zero = x.\nProof.\n  bit_solve. apply xorb_false.\nQed.\n\nCorollary xor_zero_l: forall x, xor zero x = x.\nProof.\n  intros. rewrite xor_commut. apply xor_zero.\nQed.\n\nTheorem xor_idem: forall x, xor x x = zero.\nProof.\n  bit_solve. apply xorb_nilpotent.\nQed.\n\nTheorem xor_zero_one: xor zero one = one.\nProof. rewrite xor_commut. apply xor_zero. Qed.\n\nTheorem xor_one_one: xor one one = zero.\nProof. apply xor_idem. Qed.\n\nTheorem xor_zero_equal: forall x y, xor x y = zero -> x = y.\nProof.\n  intros. apply same_bits_eq; intros.\n  assert (xorb (testbit x i) (testbit y i) = false).\n    rewrite <- bits_xor; auto. rewrite H. apply bits_zero.\n  destruct (testbit x i); destruct (testbit y i); reflexivity || discriminate.\nQed.\n\nTheorem xor_is_zero: forall x y, eq (xor x y) zero = eq x y.\nProof.\n  intros. predSpec eq eq_spec (xor x y) zero.\n- apply xor_zero_equal in H. subst y. rewrite eq_true; auto.\n- predSpec eq eq_spec x y.\n+ elim H; subst y; apply xor_idem.\n+ auto.\nQed.\n\nTheorem and_xor_distrib:\n  forall x y z,\n  and x (xor y z) = xor (and x y) (and x z).\nProof.\n  bit_solve.\n  assert (forall a b c, a && (xorb b c) = xorb (a && b) (a && c)) by destr_bool.\n  auto.\nQed.\n\nTheorem and_le:\n  forall x y, unsigned (and x y) <= unsigned x.\nProof.\n  intros. apply bits_le; intros.\n  rewrite bits_and in H0; auto. rewrite andb_true_iff in H0. tauto.\nQed.\n\nTheorem or_le:\n  forall x y, unsigned x <= unsigned (or x y).\nProof.\n  intros. apply bits_le; intros.\n  rewrite bits_or; auto. rewrite H0; auto.\nQed.\n\n(** Properties of bitwise complement.*)\n\nTheorem not_involutive:\n  forall (x: int), not (not x) = x.\nProof.\n  intros. unfold not. rewrite xor_assoc. rewrite xor_idem. apply xor_zero.\nQed.\n\nTheorem not_zero:\n  not zero = mone.\nProof.\n  unfold not. rewrite xor_commut. apply xor_zero.\nQed.\n\nTheorem not_mone:\n  not mone = zero.\nProof.\n  rewrite <- (not_involutive zero). symmetry. decEq. apply not_zero.\nQed.\n\nTheorem not_or_and_not:\n  forall x y, not (or x y) = and (not x) (not y).\nProof.\n  bit_solve. apply negb_orb.\nQed.\n\nTheorem not_and_or_not:\n  forall x y, not (and x y) = or (not x) (not y).\nProof.\n  bit_solve. apply negb_andb.\nQed.\n\nTheorem and_not_self:\n  forall x, and x (not x) = zero.\nProof.\n  bit_solve.\nQed.\n\nTheorem or_not_self:\n  forall x, or x (not x) = mone.\nProof.\n  bit_solve.\nQed.\n\nTheorem xor_not_self:\n  forall x, xor x (not x) = mone.\nProof.\n  bit_solve. destruct (testbit x i); auto.\nQed.\n\nLemma unsigned_not:\n  forall x, unsigned (not x) = max_unsigned - unsigned x.\nProof.\n  intros. transitivity (unsigned (repr(-unsigned x - 1))).\n  f_equal. bit_solve. rewrite testbit_repr; auto. symmetry. apply Z_one_complement. omega.\n  rewrite unsigned_repr_eq. apply Zmod_unique with (-1).\n  unfold max_unsigned. omega.\n  generalize (unsigned_range x). unfold max_unsigned. omega.\nQed.\n\nTheorem not_neg:\n  forall x, not x = add (neg x) mone.\nProof.\n  bit_solve.\n  rewrite <- (repr_unsigned x) at 1. unfold add.\n  rewrite !testbit_repr; auto.\n  transitivity (Z.testbit (-unsigned x - 1) i).\n  symmetry. apply Z_one_complement. omega.\n  apply same_bits_eqm; auto.\n  replace (-unsigned x - 1) with (-unsigned x + (-1)) by omega.\n  apply eqm_add.\n  unfold neg. apply eqm_unsigned_repr.\n  rewrite unsigned_mone. exists (-1). ring.\nQed.\n\nTheorem neg_not:\n  forall x, neg x = add (not x) one.\nProof.\n  intros. rewrite not_neg. rewrite add_assoc.\n  replace (add mone one) with zero. rewrite add_zero. auto.\n  apply eqm_samerepr. rewrite unsigned_mone. rewrite unsigned_one.\n  exists (-1). ring.\nQed.\n\nTheorem sub_add_not:\n  forall x y, sub x y = add (add x (not y)) one.\nProof.\n  intros. rewrite sub_add_opp. rewrite neg_not.\n  rewrite ! add_assoc. auto.\nQed.\n\nTheorem sub_add_not_3:\n  forall x y b,\n  b = zero \\/ b = one ->\n  sub (sub x y) b = add (add x (not y)) (xor b one).\nProof.\n  intros. rewrite ! sub_add_not. rewrite ! add_assoc. f_equal. f_equal.\n  rewrite <- neg_not. rewrite <- sub_add_opp. destruct H; subst b.\n  rewrite xor_zero_l. rewrite sub_zero_l. auto.\n  rewrite xor_idem. rewrite sub_idem. auto.\nQed.\n\nTheorem sub_borrow_add_carry:\n  forall x y b,\n  b = zero \\/ b = one ->\n  sub_borrow x y b = xor (add_carry x (not y) (xor b one)) one.\nProof.\n  intros. unfold sub_borrow, add_carry. rewrite unsigned_not.\n  replace (unsigned (xor b one)) with (1 - unsigned b).\n  destruct (zlt (unsigned x - unsigned y - unsigned b)).\n  rewrite zlt_true. rewrite xor_zero_l; auto.\n  unfold max_unsigned; omega.\n  rewrite zlt_false. rewrite xor_idem; auto.\n  unfold max_unsigned; omega.\n  destruct H; subst b.\n  rewrite xor_zero_l. rewrite unsigned_one, unsigned_zero; auto.\n  rewrite xor_idem. rewrite unsigned_one, unsigned_zero; auto.\nQed.\n\n(** Connections between [add] and bitwise logical operations. *)\n\nLemma Z_add_is_or:\n  forall i, 0 <= i ->\n  forall x y,\n  (forall j, 0 <= j <= i -> Z.testbit x j && Z.testbit y j = false) ->\n  Z.testbit (x + y) i = Z.testbit x i || Z.testbit y i.\nProof.\n  intros i0 POS0. pattern i0. apply Zlt_0_ind; auto.\n  intros i IND POS x y EXCL.\n  rewrite (Zdecomp x) in *. rewrite (Zdecomp y) in *.\n  transitivity (Z.testbit (Zshiftin (Z.odd x || Z.odd y) (Z.div2 x + Z.div2 y)) i).\n  - f_equal. rewrite !Zshiftin_spec.\n    exploit (EXCL 0). omega. rewrite !Ztestbit_shiftin_base. intros.\nOpaque Z.mul.\n    destruct (Z.odd x); destruct (Z.odd y); simpl in *; discriminate || ring.\n  - rewrite !Ztestbit_shiftin; auto.\n    destruct (zeq i 0).\n    + auto.\n    + apply IND. omega. intros.\n      exploit (EXCL (Z.succ j)). omega.\n      rewrite !Ztestbit_shiftin_succ. auto.\n      omega. omega.\nQed.\n\nTheorem add_is_or:\n  forall x y,\n  and x y = zero ->\n  add x y = or x y.\nProof.\n  bit_solve. unfold add. rewrite testbit_repr; auto.\n  apply Z_add_is_or. omega.\n  intros.\n  assert (testbit (and x y) j = testbit zero j) by congruence.\n  autorewrite with ints in H2. assumption. omega.\nQed.\n\nTheorem xor_is_or:\n  forall x y, and x y = zero -> xor x y = or x y.\nProof.\n  bit_solve.\n  assert (testbit (and x y) i = testbit zero i) by congruence.\n  autorewrite with ints in H1; auto.\n  destruct (testbit x i); destruct (testbit y i); simpl in *; congruence.\nQed.\n\nTheorem add_is_xor:\n  forall x y,\n  and x y = zero ->\n  add x y = xor x y.\nProof.\n  intros. rewrite xor_is_or; auto. apply add_is_or; auto.\nQed.\n\nTheorem add_and:\n  forall x y z,\n  and y z = zero ->\n  add (and x y) (and x z) = and x (or y z).\nProof.\n  intros. rewrite add_is_or.\n  rewrite and_or_distrib; auto.\n  rewrite (and_commut x y).\n  rewrite and_assoc.\n  repeat rewrite <- (and_assoc x).\n  rewrite (and_commut (and x x)).\n  rewrite <- and_assoc.\n  rewrite H. rewrite and_commut. apply and_zero.\nQed.\n\n(** ** Properties of shifts *)\n\nLemma bits_shl:\n  forall x y i,\n  0 <= i < zwordsize ->\n  testbit (shl x y) i =\n  if zlt i (unsigned y) then false else testbit x (i - unsigned y).\nProof.\n  intros. unfold shl. rewrite testbit_repr; auto.\n  destruct (zlt i (unsigned y)).\n  apply Z.shiftl_spec_low. auto.\n  apply Z.shiftl_spec_high. omega. omega.\nQed.\n\nLemma bits_shru:\n  forall x y i,\n  0 <= i < zwordsize ->\n  testbit (shru x y) i =\n  if zlt (i + unsigned y) zwordsize then testbit x (i + unsigned y) else false.\nProof.\n  intros. unfold shru. rewrite testbit_repr; auto.\n  rewrite Z.shiftr_spec. fold (testbit x (i + unsigned y)).\n  destruct (zlt (i + unsigned y) zwordsize).\n  auto.\n  apply bits_above; auto.\n  omega.\nQed.\n\nLemma bits_shr:\n  forall x y i,\n  0 <= i < zwordsize ->\n  testbit (shr x y) i =\n  testbit x (if zlt (i + unsigned y) zwordsize then i + unsigned y else zwordsize - 1).\nProof.\n  intros. unfold shr. rewrite testbit_repr; auto.\n  rewrite Z.shiftr_spec. apply bits_signed.\n  generalize (unsigned_range y); omega.\n  omega.\nQed.\n\nHint Rewrite bits_shl bits_shru bits_shr: ints.\n\nTheorem shl_zero: forall x, shl x zero = x.\nProof.\n  bit_solve. rewrite unsigned_zero. rewrite zlt_false. f_equal; omega. omega.\nQed.\n\nLemma bitwise_binop_shl:\n  forall f f' x y n,\n  (forall x y i, 0 <= i < zwordsize -> testbit (f x y) i = f' (testbit x i) (testbit y i)) ->\n  f' false false = false ->\n  f (shl x n) (shl y n) = shl (f x y) n.\nProof.\n  intros. apply same_bits_eq; intros.\n  rewrite H; auto. rewrite !bits_shl; auto.\n  destruct (zlt i (unsigned n)); auto.\n  rewrite H; auto. generalize (unsigned_range n); omega.\nQed.\n\nTheorem and_shl:\n  forall x y n,\n  and (shl x n) (shl y n) = shl (and x y) n.\nProof.\n  intros. apply bitwise_binop_shl with andb. exact bits_and. auto.\nQed.\n\nTheorem or_shl:\n  forall x y n,\n  or (shl x n) (shl y n) = shl (or x y) n.\nProof.\n  intros. apply bitwise_binop_shl with orb. exact bits_or. auto.\nQed.\n\nTheorem xor_shl:\n  forall x y n,\n  xor (shl x n) (shl y n) = shl (xor x y) n.\nProof.\n  intros. apply bitwise_binop_shl with xorb. exact bits_xor. auto.\nQed.\n\nLemma ltu_inv:\n  forall x y, ltu x y = true -> 0 <= unsigned x < unsigned y.\nProof.\n  unfold ltu; intros. destruct (zlt (unsigned x) (unsigned y)).\n  split; auto. generalize (unsigned_range x); omega.\n  discriminate.\nQed.\n\nLemma ltu_iwordsize_inv:\n  forall x, ltu x iwordsize = true -> 0 <= unsigned x < zwordsize.\nProof.\n  intros. generalize (ltu_inv _ _ H). rewrite unsigned_repr_wordsize. auto.\nQed.\n\nTheorem shl_shl:\n  forall x y z,\n  ltu y iwordsize = true ->\n  ltu z iwordsize = true ->\n  ltu (add y z) iwordsize = true ->\n  shl (shl x y) z = shl x (add y z).\nProof.\n  intros.\n  generalize (ltu_iwordsize_inv _ H) (ltu_iwordsize_inv _ H0); intros.\n  assert (unsigned (add y z) = unsigned y + unsigned z).\n    unfold add. apply unsigned_repr.\n    generalize two_wordsize_max_unsigned; omega.\n  apply same_bits_eq; intros.\n  rewrite bits_shl; auto.\n  destruct (zlt i (unsigned z)).\n  - rewrite bits_shl; auto. rewrite zlt_true. auto. omega.\n  - rewrite bits_shl. destruct (zlt (i - unsigned z) (unsigned y)).\n    + rewrite bits_shl; auto. rewrite zlt_true. auto. omega.\n    + rewrite bits_shl; auto. rewrite zlt_false. f_equal. omega. omega.\n    + omega.\nQed.\n\nTheorem sub_ltu:\n  forall x y,\n    ltu x y = true ->\n    0 <= unsigned y - unsigned x <= unsigned y.\nProof.\n  intros.\n  generalize (ltu_inv x y H). intros .\n  split. omega. omega.\nQed.\n\nTheorem shru_zero: forall x, shru x zero = x.\nProof.\n  bit_solve. rewrite unsigned_zero. rewrite zlt_true. f_equal; omega. omega.\nQed.\n\nLemma bitwise_binop_shru:\n  forall f f' x y n,\n  (forall x y i, 0 <= i < zwordsize -> testbit (f x y) i = f' (testbit x i) (testbit y i)) ->\n  f' false false = false ->\n  f (shru x n) (shru y n) = shru (f x y) n.\nProof.\n  intros. apply same_bits_eq; intros.\n  rewrite H; auto. rewrite !bits_shru; auto.\n  destruct (zlt (i + unsigned n) zwordsize); auto.\n  rewrite H; auto. generalize (unsigned_range n); omega.\nQed.\n\nTheorem and_shru:\n  forall x y n,\n  and (shru x n) (shru y n) = shru (and x y) n.\nProof.\n  intros. apply bitwise_binop_shru with andb; auto. exact bits_and.\nQed.\n\nTheorem or_shru:\n  forall x y n,\n  or (shru x n) (shru y n) = shru (or x y) n.\nProof.\n  intros. apply bitwise_binop_shru with orb; auto. exact bits_or.\nQed.\n\nTheorem xor_shru:\n  forall x y n,\n  xor (shru x n) (shru y n) = shru (xor x y) n.\nProof.\n  intros. apply bitwise_binop_shru with xorb; auto. exact bits_xor.\nQed.\n\nTheorem shru_shru:\n  forall x y z,\n  ltu y iwordsize = true ->\n  ltu z iwordsize = true ->\n  ltu (add y z) iwordsize = true ->\n  shru (shru x y) z = shru x (add y z).\nProof.\n  intros.\n  generalize (ltu_iwordsize_inv _ H) (ltu_iwordsize_inv _ H0); intros.\n  assert (unsigned (add y z) = unsigned y + unsigned z).\n    unfold add. apply unsigned_repr.\n    generalize two_wordsize_max_unsigned; omega.\n  apply same_bits_eq; intros.\n  rewrite bits_shru; auto.\n  destruct (zlt (i + unsigned z) zwordsize).\n  - rewrite bits_shru. destruct (zlt (i + unsigned z + unsigned y) zwordsize).\n    + rewrite bits_shru; auto. rewrite zlt_true. f_equal. omega. omega.\n    + rewrite bits_shru; auto. rewrite zlt_false. auto. omega.\n    + omega.\n  - rewrite bits_shru; auto. rewrite zlt_false. auto. omega.\nQed.\n\nTheorem shr_zero: forall x, shr x zero = x.\nProof.\n  bit_solve. rewrite unsigned_zero. rewrite zlt_true. f_equal; omega. omega.\nQed.\n\nLemma bitwise_binop_shr:\n  forall f f' x y n,\n  (forall x y i, 0 <= i < zwordsize -> testbit (f x y) i = f' (testbit x i) (testbit y i)) ->\n  f (shr x n) (shr y n) = shr (f x y) n.\nProof.\n  intros. apply same_bits_eq; intros.\n  rewrite H; auto. rewrite !bits_shr; auto.\n  rewrite H; auto.\n  destruct (zlt (i + unsigned n) zwordsize).\n  generalize (unsigned_range n); omega.\n  omega.\nQed.\n\nTheorem and_shr:\n  forall x y n,\n  and (shr x n) (shr y n) = shr (and x y) n.\nProof.\n  intros. apply bitwise_binop_shr with andb. exact bits_and.\nQed.\n\nTheorem or_shr:\n  forall x y n,\n  or (shr x n) (shr y n) = shr (or x y) n.\nProof.\n  intros. apply bitwise_binop_shr with orb. exact bits_or.\nQed.\n\nTheorem xor_shr:\n  forall x y n,\n  xor (shr x n) (shr y n) = shr (xor x y) n.\nProof.\n  intros. apply bitwise_binop_shr with xorb. exact bits_xor.\nQed.\n\nTheorem shr_shr:\n  forall x y z,\n  ltu y iwordsize = true ->\n  ltu z iwordsize = true ->\n  ltu (add y z) iwordsize = true ->\n  shr (shr x y) z = shr x (add y z).\nProof.\n  intros.\n  generalize (ltu_iwordsize_inv _ H) (ltu_iwordsize_inv _ H0); intros.\n  assert (unsigned (add y z) = unsigned y + unsigned z).\n    unfold add. apply unsigned_repr.\n    generalize two_wordsize_max_unsigned; omega.\n  apply same_bits_eq; intros.\n  rewrite !bits_shr; auto. f_equal.\n  destruct (zlt (i + unsigned z) zwordsize).\n  rewrite H4. replace (i + (unsigned y + unsigned z)) with (i + unsigned z + unsigned y) by omega. auto.\n  rewrite (zlt_false _ (i + unsigned (add y z))).\n  destruct (zlt (zwordsize - 1 + unsigned y) zwordsize); omega.\n  omega.\n  destruct (zlt (i + unsigned z) zwordsize); omega.\nQed.\n\nTheorem and_shr_shru:\n  forall x y z,\n  and (shr x z) (shru y z) = shru (and x y) z.\nProof.\n  intros. apply same_bits_eq; intros.\n  rewrite bits_and; auto. rewrite bits_shr; auto. rewrite !bits_shru; auto.\n  destruct (zlt (i + unsigned z) zwordsize).\n  - rewrite bits_and; auto. generalize (unsigned_range z); omega.\n  - apply andb_false_r.\nQed.\n\nTheorem shr_and_shru_and:\n  forall x y z,\n  shru (shl z y) y = z ->\n  and (shr x y) z = and (shru x y) z.\nProof.\n  intros.\n  rewrite <- H.\n  rewrite and_shru. rewrite and_shr_shru. auto.\nQed.\n\nTheorem shru_lt_zero:\n  forall x,\n  shru x (repr (zwordsize - 1)) = if lt x zero then one else zero.\nProof.\n  intros. apply same_bits_eq; intros.\n  rewrite bits_shru; auto.\n  rewrite unsigned_repr.\n  destruct (zeq i 0).\n  subst i. rewrite Zplus_0_l. rewrite zlt_true.\n  rewrite sign_bit_of_unsigned.\n  unfold lt. rewrite signed_zero. unfold signed.\n  destruct (zlt (unsigned x) half_modulus).\n  rewrite zlt_false. auto. generalize (unsigned_range x); omega.\n  rewrite zlt_true. unfold one; rewrite testbit_repr; auto.\n  generalize (unsigned_range x); omega.\n  omega.\n  rewrite zlt_false.\n  unfold testbit. rewrite Ztestbit_eq. rewrite zeq_false.\n  destruct (lt x zero).\n  rewrite unsigned_one. simpl Z.div2. rewrite Z.testbit_0_l; auto.\n  rewrite unsigned_zero. simpl Z.div2. rewrite Z.testbit_0_l; auto.\n  auto. omega. omega.\n  generalize wordsize_max_unsigned; omega.\nQed.\n\nTheorem shr_lt_zero:\n  forall x,\n  shr x (repr (zwordsize - 1)) = if lt x zero then mone else zero.\nProof.\n  intros. apply same_bits_eq; intros.\n  rewrite bits_shr; auto.\n  rewrite unsigned_repr.\n  transitivity (testbit x (zwordsize - 1)).\n  f_equal. destruct (zlt (i + (zwordsize - 1)) zwordsize); omega.\n  rewrite sign_bit_of_unsigned.\n  unfold lt. rewrite signed_zero. unfold signed.\n  destruct (zlt (unsigned x) half_modulus).\n  rewrite zlt_false. rewrite bits_zero; auto. generalize (unsigned_range x); omega.\n  rewrite zlt_true. rewrite bits_mone; auto. generalize (unsigned_range x); omega.\n  generalize wordsize_max_unsigned; omega.\nQed.\n\n(** ** Properties of rotations *)\n\nLemma bits_rol:\n  forall x y i,\n  0 <= i < zwordsize ->\n  testbit (rol x y) i = testbit x ((i - unsigned y) mod zwordsize).\nProof.\n  intros. unfold rol.\n  exploit (Z_div_mod_eq (unsigned y) zwordsize). apply wordsize_pos.\n  set (j := unsigned y mod zwordsize). set (k := unsigned y / zwordsize).\n  intros EQ.\n  exploit (Z_mod_lt (unsigned y) zwordsize). apply wordsize_pos.\n  fold j. intros RANGE.\n  rewrite testbit_repr; auto.\n  rewrite Z.lor_spec. rewrite Z.shiftr_spec. 2: omega.\n  destruct (zlt i j).\n  - rewrite Z.shiftl_spec_low; auto. simpl.\n    unfold testbit. f_equal.\n    symmetry. apply Zmod_unique with (-k - 1).\n    rewrite EQ. ring.\n    omega.\n  - rewrite Z.shiftl_spec_high.\n    fold (testbit x (i + (zwordsize - j))).\n    rewrite bits_above. rewrite orb_false_r.\n    fold (testbit x (i - j)).\n    f_equal. symmetry. apply Zmod_unique with (-k).\n    rewrite EQ. ring.\n    omega. omega. omega. omega.\nQed.\n\nLemma bits_ror:\n  forall x y i,\n  0 <= i < zwordsize ->\n  testbit (ror x y) i = testbit x ((i + unsigned y) mod zwordsize).\nProof.\n  intros. unfold ror.\n  exploit (Z_div_mod_eq (unsigned y) zwordsize). apply wordsize_pos.\n  set (j := unsigned y mod zwordsize). set (k := unsigned y / zwordsize).\n  intros EQ.\n  exploit (Z_mod_lt (unsigned y) zwordsize). apply wordsize_pos.\n  fold j. intros RANGE.\n  rewrite testbit_repr; auto.\n  rewrite Z.lor_spec. rewrite Z.shiftr_spec. 2: omega.\n  destruct (zlt (i + j) zwordsize).\n  - rewrite Z.shiftl_spec_low; auto. rewrite orb_false_r.\n    unfold testbit. f_equal.\n    symmetry. apply Zmod_unique with k.\n    rewrite EQ. ring.\n    omega. omega.\n  - rewrite Z.shiftl_spec_high.\n    fold (testbit x (i + j)).\n    rewrite bits_above. simpl.\n    unfold testbit. f_equal.\n    symmetry. apply Zmod_unique with (k + 1).\n    rewrite EQ. ring.\n    omega. omega. omega. omega.\nQed.\n\nHint Rewrite bits_rol bits_ror: ints.\n\nTheorem shl_rolm:\n  forall x n,\n  ltu n iwordsize = true ->\n  shl x n = rolm x n (shl mone n).\nProof.\n  intros. generalize (ltu_inv _ _ H). rewrite unsigned_repr_wordsize; intros.\n  unfold rolm. apply same_bits_eq; intros.\n  rewrite bits_and; auto. rewrite !bits_shl; auto. rewrite bits_rol; auto.\n  destruct (zlt i (unsigned n)).\n  - rewrite andb_false_r; auto.\n  - generalize (unsigned_range n); intros.\n    rewrite bits_mone. rewrite andb_true_r. f_equal.\n    symmetry. apply Zmod_small. omega.\n    omega.\nQed.\n\nTheorem shru_rolm:\n  forall x n,\n  ltu n iwordsize = true ->\n  shru x n = rolm x (sub iwordsize n) (shru mone n).\nProof.\n  intros. generalize (ltu_inv _ _ H). rewrite unsigned_repr_wordsize; intros.\n  unfold rolm. apply same_bits_eq; intros.\n  rewrite bits_and; auto. rewrite !bits_shru; auto. rewrite bits_rol; auto.\n  destruct (zlt (i + unsigned n) zwordsize).\n  - generalize (unsigned_range n); intros.\n    rewrite bits_mone. rewrite andb_true_r. f_equal.\n    unfold sub. rewrite unsigned_repr. rewrite unsigned_repr_wordsize.\n    symmetry. apply Zmod_unique with (-1). ring. omega.\n    rewrite unsigned_repr_wordsize. generalize wordsize_max_unsigned. omega.\n    omega.\n  - rewrite andb_false_r; auto.\nQed.\n\nTheorem rol_zero:\n  forall x,\n  rol x zero = x.\nProof.\n  bit_solve. f_equal. rewrite unsigned_zero. rewrite Zminus_0_r.\n  apply Zmod_small; auto.\nQed.\n\nLemma bitwise_binop_rol:\n  forall f f' x y n,\n  (forall x y i, 0 <= i < zwordsize -> testbit (f x y) i = f' (testbit x i) (testbit y i)) ->\n  rol (f x y) n = f (rol x n) (rol y n).\nProof.\n  intros. apply same_bits_eq; intros.\n  rewrite H; auto. rewrite !bits_rol; auto. rewrite H; auto.\n  apply Z_mod_lt. apply wordsize_pos.\nQed.\n\nTheorem rol_and:\n  forall x y n,\n  rol (and x y) n = and (rol x n) (rol y n).\nProof.\n  intros. apply bitwise_binop_rol with andb. exact bits_and.\nQed.\n\nTheorem rol_or:\n  forall x y n,\n  rol (or x y) n = or (rol x n) (rol y n).\nProof.\n  intros. apply bitwise_binop_rol with orb. exact bits_or.\nQed.\n\nTheorem rol_xor:\n  forall x y n,\n  rol (xor x y) n = xor (rol x n) (rol y n).\nProof.\n  intros. apply bitwise_binop_rol with xorb. exact bits_xor.\nQed.\n\nTheorem rol_rol:\n  forall x n m,\n  Zdivide zwordsize modulus ->\n  rol (rol x n) m = rol x (modu (add n m) iwordsize).\nProof.\n  bit_solve. f_equal. apply eqmod_mod_eq. apply wordsize_pos.\n  set (M := unsigned m); set (N := unsigned n).\n  apply eqmod_trans with (i - M - N).\n  apply eqmod_sub.\n  apply eqmod_sym. apply eqmod_mod. apply wordsize_pos.\n  apply eqmod_refl.\n  replace (i - M - N) with (i - (M + N)) by omega.\n  apply eqmod_sub.\n  apply eqmod_refl.\n  apply eqmod_trans with (Zmod (unsigned n + unsigned m) zwordsize).\n  replace (M + N) with (N + M) by omega. apply eqmod_mod. apply wordsize_pos.\n  unfold modu, add. fold M; fold N. rewrite unsigned_repr_wordsize.\n  assert (forall a, eqmod zwordsize a (unsigned (repr a))).\n    intros. eapply eqmod_divides. apply eqm_unsigned_repr. assumption.\n  eapply eqmod_trans. 2: apply H1.\n  apply eqmod_refl2. apply eqmod_mod_eq. apply wordsize_pos. auto.\n  apply Z_mod_lt. apply wordsize_pos.\nQed.\n\nTheorem rolm_zero:\n  forall x m,\n  rolm x zero m = and x m.\nProof.\n  intros. unfold rolm. rewrite rol_zero. auto.\nQed.\n\nTheorem rolm_rolm:\n  forall x n1 m1 n2 m2,\n  Zdivide zwordsize modulus ->\n  rolm (rolm x n1 m1) n2 m2 =\n    rolm x (modu (add n1 n2) iwordsize)\n           (and (rol m1 n2) m2).\nProof.\n  intros.\n  unfold rolm. rewrite rol_and. rewrite and_assoc.\n  rewrite rol_rol. reflexivity. auto.\nQed.\n\nTheorem or_rolm:\n  forall x n m1 m2,\n  or (rolm x n m1) (rolm x n m2) = rolm x n (or m1 m2).\nProof.\n  intros; unfold rolm. symmetry. apply and_or_distrib.\nQed.\n\nTheorem ror_rol:\n  forall x y,\n  ltu y iwordsize = true ->\n  ror x y = rol x (sub iwordsize y).\nProof.\n  intros.\n  generalize (ltu_iwordsize_inv _ H); intros.\n  apply same_bits_eq; intros.\n  rewrite bits_ror; auto. rewrite bits_rol; auto. f_equal.\n  unfold sub. rewrite unsigned_repr. rewrite unsigned_repr_wordsize.\n  apply eqmod_mod_eq. apply wordsize_pos. exists 1. ring.\n  rewrite unsigned_repr_wordsize.\n  generalize wordsize_pos; generalize wordsize_max_unsigned; omega.\nQed.\n\nTheorem ror_rol_neg:\n  forall x y, (zwordsize | modulus) -> ror x y = rol x (neg y).\nProof.\n  intros. apply same_bits_eq; intros.\n  rewrite bits_ror by auto. rewrite bits_rol by auto.\n  f_equal. apply eqmod_mod_eq. omega.\n  apply eqmod_trans with (i - (- unsigned y)).\n  apply eqmod_refl2; omega.\n  apply eqmod_sub. apply eqmod_refl.\n  apply eqmod_divides with modulus.\n  apply eqm_unsigned_repr. auto.\nQed.\n\nTheorem or_ror:\n  forall x y z,\n  ltu y iwordsize = true ->\n  ltu z iwordsize = true ->\n  add y z = iwordsize ->\n  ror x z = or (shl x y) (shru x z).\nProof.\n  intros.\n  generalize (ltu_iwordsize_inv _ H) (ltu_iwordsize_inv _ H0); intros.\n  unfold ror, or, shl, shru. apply same_bits_eq; intros.\n  rewrite !testbit_repr; auto.\n  rewrite !Z.lor_spec. rewrite orb_comm. f_equal; apply same_bits_eqm; auto.\n  - apply eqm_unsigned_repr_r. apply eqm_refl2. f_equal.\n    rewrite Zmod_small; auto.\n    assert (unsigned (add y z) = zwordsize).\n      rewrite H1. apply unsigned_repr_wordsize.\n    unfold add in H5. rewrite unsigned_repr in H5.\n    omega.\n    generalize two_wordsize_max_unsigned; omega.\n  - apply eqm_unsigned_repr_r. apply eqm_refl2. f_equal.\n    apply Zmod_small; auto.\nQed.\n\n(** ** Properties of [Z_one_bits] and [is_power2]. *)\n\nFixpoint powerserie (l: list Z): Z :=\n  match l with\n  | nil => 0\n  | x :: xs => two_p x + powerserie xs\n  end.\n\nLemma Z_one_bits_powerserie:\n  forall x, 0 <= x < modulus -> x = powerserie (Z_one_bits wordsize x 0).\nProof.\n  assert (forall n x i,\n    0 <= i ->\n    0 <= x < two_power_nat n ->\n    x * two_p i = powerserie (Z_one_bits n x i)).\n  {\n  induction n; intros.\n  simpl. rewrite two_power_nat_O in H0.\n  assert (x = 0) by omega. subst x. omega.\n  rewrite two_power_nat_S in H0. simpl Z_one_bits.\n  rewrite (Zdecomp x) in H0. rewrite Zshiftin_spec in H0.\n  assert (EQ: Z.div2 x * two_p (i + 1) = powerserie (Z_one_bits n (Z.div2 x) (i + 1))).\n    apply IHn. omega.\n    destruct (Z.odd x); omega.\n  rewrite two_p_is_exp in EQ. change (two_p 1) with 2 in EQ.\n  rewrite (Zdecomp x) at 1. rewrite Zshiftin_spec.\n  destruct (Z.odd x); simpl powerserie; rewrite <- EQ; ring.\n  omega. omega.\n  }\n  intros. rewrite <- H. change (two_p 0) with 1. omega.\n  omega. exact H0.\nQed.\n\nLemma Z_one_bits_range:\n  forall x i, In i (Z_one_bits wordsize x 0) -> 0 <= i < zwordsize.\nProof.\n  assert (forall n x i j,\n    In j (Z_one_bits n x i) -> i <= j < i + Z_of_nat n).\n  {\n  induction n; simpl In.\n  tauto.\n  intros x i j. rewrite inj_S.\n  assert (In j (Z_one_bits n (Z.div2 x) (i + 1)) -> i <= j < i + Z.succ (Z.of_nat n)).\n    intros. exploit IHn; eauto. omega.\n  destruct (Z.odd x); simpl.\n  intros [A|B]. subst j. omega. auto.\n  auto.\n  }\n  intros. generalize (H wordsize x 0 i H0). fold zwordsize; omega.\nQed.\n\nLemma is_power2_rng:\n  forall n logn,\n  is_power2 n = Some logn ->\n  0 <= unsigned logn < zwordsize.\nProof.\n  intros n logn. unfold is_power2.\n  generalize (Z_one_bits_range (unsigned n)).\n  destruct (Z_one_bits wordsize (unsigned n) 0).\n  intros; discriminate.\n  destruct l.\n  intros. injection H0; intro; subst logn; clear H0.\n  assert (0 <= z < zwordsize).\n  apply H. auto with coqlib.\n  rewrite unsigned_repr. auto. generalize wordsize_max_unsigned; omega.\n  intros; discriminate.\nQed.\n\nTheorem is_power2_range:\n  forall n logn,\n  is_power2 n = Some logn -> ltu logn iwordsize = true.\nProof.\n  intros. unfold ltu. rewrite unsigned_repr_wordsize.\n  apply zlt_true. generalize (is_power2_rng _ _ H). tauto.\nQed.\n\nLemma is_power2_correct:\n  forall n logn,\n  is_power2 n = Some logn ->\n  unsigned n = two_p (unsigned logn).\nProof.\n  intros n logn. unfold is_power2.\n  generalize (Z_one_bits_powerserie (unsigned n) (unsigned_range n)).\n  generalize (Z_one_bits_range (unsigned n)).\n  destruct (Z_one_bits wordsize (unsigned n) 0).\n  intros; discriminate.\n  destruct l.\n  intros. simpl in H0. injection H1; intros; subst logn; clear H1.\n  rewrite unsigned_repr. replace (two_p z) with (two_p z + 0).\n  auto. omega. elim (H z); intros.\n  generalize wordsize_max_unsigned; omega.\n  auto with coqlib.\n  intros; discriminate.\nQed.\n\nRemark two_p_range:\n  forall n,\n  0 <= n < zwordsize ->\n  0 <= two_p n <= max_unsigned.\nProof.\n  intros. split.\n  assert (two_p n > 0). apply two_p_gt_ZERO. omega. omega.\n  generalize (two_p_monotone_strict _ _ H).\n  unfold zwordsize; rewrite <- two_power_nat_two_p.\n  unfold max_unsigned, modulus. omega.\nQed.\n\nRemark Z_one_bits_zero:\n  forall n i, Z_one_bits n 0 i = nil.\nProof.\n  induction n; intros; simpl; auto.\nQed.\n\nRemark Z_one_bits_two_p:\n  forall n x i,\n  0 <= x < Z_of_nat n ->\n  Z_one_bits n (two_p x) i = (i + x) :: nil.\nProof.\n  induction n; intros; simpl. simpl in H. omegaContradiction.\n  rewrite inj_S in H.\n  assert (x = 0 \\/ 0 < x) by omega. destruct H0.\n  subst x; simpl. decEq. omega. apply Z_one_bits_zero.\n  assert (Z.odd (two_p x) = false /\\ Z.div2 (two_p x) = two_p (x-1)).\n    apply Zshiftin_inj. rewrite <- Zdecomp. rewrite !Zshiftin_spec.\n    rewrite <- two_p_S. rewrite Zplus_0_r. f_equal; omega. omega.\n  destruct H1 as [A B]; rewrite A; rewrite B.\n  rewrite IHn. f_equal; omega. omega.\nQed.\n\nLemma is_power2_two_p:\n  forall n, 0 <= n < zwordsize ->\n  is_power2 (repr (two_p n)) = Some (repr n).\nProof.\n  intros. unfold is_power2. rewrite unsigned_repr.\n  rewrite Z_one_bits_two_p. auto. auto.\n  apply two_p_range. auto.\nQed.\n\n(** ** Relation between bitwise operations and multiplications / divisions by powers of 2 *)\n\n(** Left shifts and multiplications by powers of 2. *)\n\nLemma Zshiftl_mul_two_p:\n  forall x n, 0 <= n -> Z.shiftl x n = x * two_p n.\nProof.\n  intros. destruct n; simpl.\n  - omega.\n  - pattern p. apply Pos.peano_ind.\n    + change (two_power_pos 1) with 2. simpl. ring.\n    + intros. rewrite Pos.iter_succ. rewrite H0.\n      rewrite Pplus_one_succ_l. rewrite two_power_pos_is_exp.\n      change (two_power_pos 1) with 2. ring.\n  - compute in H. congruence.\nQed.\n\nLemma shl_mul_two_p:\n  forall x y,\n  shl x y = mul x (repr (two_p (unsigned y))).\nProof.\n  intros. unfold shl, mul. apply eqm_samerepr.\n  rewrite Zshiftl_mul_two_p. auto with ints.\n  generalize (unsigned_range y); omega.\nQed.\n\nTheorem shl_mul:\n  forall x y,\n  shl x y = mul x (shl one y).\nProof.\n  intros.\n  assert (shl one y = repr (two_p (unsigned y))).\n  {\n    rewrite shl_mul_two_p. rewrite mul_commut. rewrite mul_one. auto.\n  }\n  rewrite H. apply shl_mul_two_p.\nQed.\n\nTheorem mul_pow2:\n  forall x n logn,\n  is_power2 n = Some logn ->\n  mul x n = shl x logn.\nProof.\n  intros. generalize (is_power2_correct n logn H); intro.\n  rewrite shl_mul_two_p. rewrite <- H0. rewrite repr_unsigned.\n  auto.\nQed.\n\nTheorem shifted_or_is_add:\n  forall x y n,\n  0 <= n < zwordsize ->\n  unsigned y < two_p n ->\n  or (shl x (repr n)) y = repr(unsigned x * two_p n + unsigned y).\nProof.\n  intros. rewrite <- add_is_or.\n  - unfold add. apply eqm_samerepr. apply eqm_add; auto with ints.\n    rewrite shl_mul_two_p. unfold mul. apply eqm_unsigned_repr_l.\n    apply eqm_mult; auto with ints. apply eqm_unsigned_repr_l.\n    apply eqm_refl2. rewrite unsigned_repr. auto.\n    generalize wordsize_max_unsigned; omega.\n  - bit_solve.\n    rewrite unsigned_repr.\n    destruct (zlt i n).\n    + auto.\n    + replace (testbit y i) with false. apply andb_false_r.\n      symmetry. unfold testbit.\n      assert (EQ: Z.of_nat (Z.to_nat n) = n) by (apply Z2Nat.id; omega).\n      apply Ztestbit_above with (Z.to_nat n).\n      rewrite <- EQ in H0. rewrite <- two_power_nat_two_p in H0.\n      generalize (unsigned_range y); omega.\n      rewrite EQ; auto.\n    + generalize wordsize_max_unsigned; omega.\nQed.\n\n(** Unsigned right shifts and unsigned divisions by powers of 2. *)\n\nLemma Zshiftr_div_two_p:\n  forall x n, 0 <= n -> Z.shiftr x n = x / two_p n.\nProof.\n  intros. destruct n; unfold Z.shiftr; simpl.\n  - rewrite Zdiv_1_r. auto.\n  - pattern p. apply Pos.peano_ind.\n    + change (two_power_pos 1) with 2. simpl. apply Zdiv2_div.\n    + intros. rewrite Pos.iter_succ. rewrite H0.\n      rewrite Pplus_one_succ_l. rewrite two_power_pos_is_exp.\n      change (two_power_pos 1) with 2.\n      rewrite Zdiv2_div. rewrite Zmult_comm. apply Zdiv_Zdiv.\n      rewrite two_power_pos_nat. apply two_power_nat_pos. omega.\n  - compute in H. congruence.\nQed.\n\nLemma shru_div_two_p:\n  forall x y,\n  shru x y = repr (unsigned x / two_p (unsigned y)).\nProof.\n  intros. unfold shru.\n  rewrite Zshiftr_div_two_p. auto.\n  generalize (unsigned_range y); omega.\nQed.\n\nTheorem divu_pow2:\n  forall x n logn,\n  is_power2 n = Some logn ->\n  divu x n = shru x logn.\nProof.\n  intros. generalize (is_power2_correct n logn H). intro.\n  symmetry. unfold divu. rewrite H0. apply shru_div_two_p.\nQed.\n\n(** Signed right shifts and signed divisions by powers of 2. *)\n\nLemma shr_div_two_p:\n  forall x y,\n  shr x y = repr (signed x / two_p (unsigned y)).\nProof.\n  intros. unfold shr.\n  rewrite Zshiftr_div_two_p. auto.\n  generalize (unsigned_range y); omega.\nQed.\n\nTheorem divs_pow2:\n  forall x n logn,\n  is_power2 n = Some logn ->\n  divs x n = shrx x logn.\nProof.\n  intros. generalize (is_power2_correct _ _ H); intro.\n  unfold shrx. rewrite shl_mul_two_p.\n  rewrite mul_commut. rewrite mul_one.\n  rewrite <- H0. rewrite repr_unsigned. auto.\nQed.\n\n(** Unsigned modulus over [2^n] is masking with [2^n-1]. *)\n\nLemma Ztestbit_mod_two_p:\n  forall n x i,\n  0 <= n -> 0 <= i ->\n  Z.testbit (x mod (two_p n)) i = if zlt i n then Z.testbit x i else false.\nProof.\n  intros n0 x i N0POS. revert x i; pattern n0; apply natlike_ind; auto.\n  - intros. change (two_p 0) with 1. rewrite Zmod_1_r. rewrite Z.testbit_0_l.\n    rewrite zlt_false; auto. omega.\n  - intros. rewrite two_p_S; auto.\n    replace (x0 mod (2 * two_p x))\n       with (Zshiftin (Z.odd x0) (Z.div2 x0 mod two_p x)).\n    rewrite Ztestbit_shiftin; auto. rewrite (Ztestbit_eq i x0); auto. destruct (zeq i 0).\n    + rewrite zlt_true; auto. omega.\n    + rewrite H0. destruct (zlt (Z.pred i) x).\n      * rewrite zlt_true; auto. omega.\n      * rewrite zlt_false; auto. omega.\n      * omega.\n    + rewrite (Zdecomp x0) at 3. set (x1 := Z.div2 x0). symmetry.\n      apply Zmod_unique with (x1 / two_p x).\n      rewrite !Zshiftin_spec. rewrite Zplus_assoc. f_equal.\n      transitivity (2 * (two_p x * (x1 / two_p x) + x1 mod two_p x)).\n      f_equal. apply Z_div_mod_eq. apply two_p_gt_ZERO; auto.\n      ring.\n      rewrite Zshiftin_spec. exploit (Z_mod_lt x1 (two_p x)). apply two_p_gt_ZERO; auto.\n      destruct (Z.odd x0); omega.\nQed.\n\nCorollary Ztestbit_two_p_m1:\n  forall n i, 0 <= n -> 0 <= i ->\n  Z.testbit (two_p n - 1) i = if zlt i n then true else false.\nProof.\n  intros. replace (two_p n - 1) with ((-1) mod (two_p n)).\n  rewrite Ztestbit_mod_two_p; auto. destruct (zlt i n); auto. apply Ztestbit_m1; auto.\n  apply Zmod_unique with (-1). ring.\n  exploit (two_p_gt_ZERO n). auto. omega.\nQed.\n\nTheorem modu_and:\n  forall x n logn,\n  is_power2 n = Some logn ->\n  modu x n = and x (sub n one).\nProof.\n  intros. generalize (is_power2_correct _ _ H); intro.\n  generalize (is_power2_rng _ _ H); intro.\n  apply same_bits_eq; intros.\n  rewrite bits_and; auto.\n  unfold sub. rewrite testbit_repr; auto.\n  rewrite H0. rewrite unsigned_one.\n  unfold modu. rewrite testbit_repr; auto. rewrite H0.\n  rewrite Ztestbit_mod_two_p. rewrite Ztestbit_two_p_m1.\n  destruct (zlt i (unsigned logn)).\n  rewrite andb_true_r; auto.\n  rewrite andb_false_r; auto.\n  tauto. tauto. tauto. tauto.\nQed.\n\n(** ** Properties of [shrx] (signed division by a power of 2) *)\n\nLemma Zquot_Zdiv:\n  forall x y,\n  y > 0 ->\n  Z.quot x y = if zlt x 0 then (x + y - 1) / y else x / y.\nProof.\n  intros. destruct (zlt x 0).\n  - symmetry. apply Zquot_unique_full with ((x + y - 1) mod y - (y - 1)).\n     + red. right; split. omega.\n       exploit (Z_mod_lt (x + y - 1) y); auto.\n       rewrite Z.abs_eq. omega. omega.\n     + transitivity ((y * ((x + y - 1) / y) + (x + y - 1) mod y) - (y-1)).\n       rewrite <- Z_div_mod_eq. ring. auto. ring.\n  - apply Zquot_Zdiv_pos; omega.\nQed.\n\nTheorem shrx_zero:\n  forall x, zwordsize > 1 -> shrx x zero = x.\nProof.\n  intros. unfold shrx. rewrite shl_zero. unfold divs. rewrite signed_one by auto.\n  rewrite Z.quot_1_r. apply repr_signed.\nQed.\n\nTheorem shrx_shr:\n  forall x y,\n  ltu y (repr (zwordsize - 1)) = true ->\n  shrx x y = shr (if lt x zero then add x (sub (shl one y) one) else x) y.\nProof.\n  intros.\n  set (uy := unsigned y).\n  assert (0 <= uy < zwordsize - 1).\n    generalize (ltu_inv _ _ H). rewrite unsigned_repr. auto.\n    generalize wordsize_pos wordsize_max_unsigned; omega.\n  rewrite shr_div_two_p. unfold shrx. unfold divs.\n  assert (shl one y = repr (two_p uy)).\n    transitivity (mul one (repr (two_p uy))).\n    symmetry. apply mul_pow2. replace y with (repr uy).\n    apply is_power2_two_p. omega. apply repr_unsigned.\n    rewrite mul_commut. apply mul_one.\n  assert (two_p uy > 0). apply two_p_gt_ZERO. omega.\n  assert (two_p uy < half_modulus).\n    rewrite half_modulus_power.\n    apply two_p_monotone_strict. auto.\n  assert (two_p uy < modulus).\n    rewrite modulus_power. apply two_p_monotone_strict. omega.\n  assert (unsigned (shl one y) = two_p uy).\n    rewrite H1. apply unsigned_repr. unfold max_unsigned. omega.\n  assert (signed (shl one y) = two_p uy).\n    rewrite H1. apply signed_repr.\n    unfold max_signed. generalize min_signed_neg. omega.\n  rewrite H6.\n  rewrite Zquot_Zdiv; auto.\n  unfold lt. rewrite signed_zero.\n  destruct (zlt (signed x) 0); auto.\n  rewrite add_signed.\n  assert (signed (sub (shl one y) one) = two_p uy - 1).\n    unfold sub. rewrite H5. rewrite unsigned_one.\n    apply signed_repr.\n    generalize min_signed_neg. unfold max_signed. omega.\n  rewrite H7. rewrite signed_repr. f_equal. f_equal. omega.\n  generalize (signed_range x). intros.\n  assert (two_p uy - 1 <= max_signed). unfold max_signed. omega. omega.\nQed.\n\nTheorem shrx_shr_2:\n  forall x y,\n  ltu y (repr (zwordsize - 1)) = true ->\n  shrx x y = shr (add x (shru (shr x (repr (zwordsize - 1))) (sub iwordsize y))) y.\nProof.\n  intros.\n  rewrite shrx_shr by auto. f_equal.\n  rewrite shr_lt_zero. destruct (lt x zero).\n- set (uy := unsigned y).\n  generalize (unsigned_range y); fold uy; intros.\n  assert (0 <= uy < zwordsize - 1).\n    generalize (ltu_inv _ _ H). rewrite unsigned_repr. auto.\n    generalize wordsize_pos wordsize_max_unsigned; omega.\n  assert (two_p uy < modulus).\n    rewrite modulus_power. apply two_p_monotone_strict. omega.\n  f_equal. rewrite shl_mul_two_p. fold uy. rewrite mul_commut. rewrite mul_one.\n  unfold sub. rewrite unsigned_one. rewrite unsigned_repr.\n  rewrite unsigned_repr_wordsize. fold uy.\n  apply same_bits_eq; intros. rewrite bits_shru by auto.\n  rewrite testbit_repr by auto. rewrite Ztestbit_two_p_m1 by omega.\n  rewrite unsigned_repr by (generalize wordsize_max_unsigned; omega).\n  destruct (zlt i uy).\n  rewrite zlt_true by omega. rewrite bits_mone by omega. auto.\n  rewrite zlt_false by omega. auto.\n  assert (two_p uy > 0) by (apply two_p_gt_ZERO; omega). unfold max_unsigned; omega.\n- replace (shru zero (sub iwordsize y)) with zero.\n  rewrite add_zero; auto.\n  bit_solve. destruct (zlt (i + unsigned (sub iwordsize y)) zwordsize); auto.\nQed.\n\nLemma Zdiv_shift:\n  forall x y, y > 0 ->\n  (x + (y - 1)) / y = x / y + if zeq (Zmod x y) 0 then 0 else 1.\nProof.\n  intros. generalize (Z_div_mod_eq x y H). generalize (Z_mod_lt x y H).\n  set (q := x / y). set (r := x mod y). intros.\n  destruct (zeq r 0).\n  apply Zdiv_unique with (y - 1). rewrite H1. rewrite e. ring. omega.\n  apply Zdiv_unique with (r - 1). rewrite H1. ring. omega.\nQed.\n\nTheorem shrx_carry:\n  forall x y,\n  ltu y (repr (zwordsize - 1)) = true ->\n  shrx x y = add (shr x y) (shr_carry x y).\nProof.\n  intros. rewrite shrx_shr; auto. unfold shr_carry.\n  unfold lt. set (sx := signed x). rewrite signed_zero.\n  destruct (zlt sx 0); simpl.\n  2: rewrite add_zero; auto.\n  set (uy := unsigned y).\n  assert (0 <= uy < zwordsize - 1).\n    generalize (ltu_inv _ _ H). rewrite unsigned_repr. auto.\n    generalize wordsize_pos wordsize_max_unsigned; omega.\n  assert (shl one y = repr (two_p uy)).\n    rewrite shl_mul_two_p. rewrite mul_commut. apply mul_one.\n  assert (and x (sub (shl one y) one) = modu x (repr (two_p uy))).\n    symmetry. rewrite H1. apply modu_and with (logn := y).\n    rewrite is_power2_two_p. unfold uy. rewrite repr_unsigned. auto.\n    omega.\n  rewrite H2. rewrite H1.\n  repeat rewrite shr_div_two_p. fold sx. fold uy.\n  assert (two_p uy > 0). apply two_p_gt_ZERO. omega.\n  assert (two_p uy < modulus).\n    rewrite modulus_power. apply two_p_monotone_strict. omega.\n  assert (two_p uy < half_modulus).\n    rewrite half_modulus_power.\n    apply two_p_monotone_strict. auto.\n  assert (two_p uy < modulus).\n    rewrite modulus_power. apply two_p_monotone_strict. omega.\n  assert (sub (repr (two_p uy)) one = repr (two_p uy - 1)).\n    unfold sub. apply eqm_samerepr. apply eqm_sub. apply eqm_sym; apply eqm_unsigned_repr.\n    rewrite unsigned_one. apply eqm_refl.\n  rewrite H7. rewrite add_signed. fold sx.\n  rewrite (signed_repr (two_p uy - 1)). rewrite signed_repr.\n  unfold modu. rewrite unsigned_repr.\n  unfold eq. rewrite unsigned_zero. rewrite unsigned_repr.\n  assert (unsigned x mod two_p uy = sx mod two_p uy).\n    apply eqmod_mod_eq; auto. apply eqmod_divides with modulus.\n    fold eqm. unfold sx. apply eqm_sym. apply eqm_signed_unsigned.\n    unfold modulus. rewrite two_power_nat_two_p.\n    exists (two_p (zwordsize - uy)). rewrite <- two_p_is_exp.\n    f_equal. fold zwordsize; omega. omega. omega.\n  rewrite H8. rewrite Zdiv_shift; auto.\n  unfold add. apply eqm_samerepr. apply eqm_add.\n  apply eqm_unsigned_repr.\n  destruct (zeq (sx mod two_p uy) 0); simpl.\n  rewrite unsigned_zero. apply eqm_refl.\n  rewrite unsigned_one. apply eqm_refl.\n  generalize (Z_mod_lt (unsigned x) (two_p uy) H3). unfold max_unsigned. omega.\n  unfold max_unsigned; omega.\n  generalize (signed_range x). fold sx. intros. split. omega. unfold max_signed. omega.\n  generalize min_signed_neg. unfold max_signed. omega.\nQed.\n\n(** Connections between [shr] and [shru]. *)\n\nLemma shr_shru_positive:\n  forall x y,\n  signed x >= 0 ->\n  shr x y = shru x y.\nProof.\n  intros.\n  rewrite shr_div_two_p. rewrite shru_div_two_p.\n  rewrite signed_eq_unsigned. auto. apply signed_positive. auto.\nQed.\n\nLemma and_positive:\n  forall x y, signed y >= 0 -> signed (and x y) >= 0.\nProof.\n  intros.\n  assert (unsigned y < half_modulus). rewrite signed_positive in H. unfold max_signed in H; omega.\n  generalize (sign_bit_of_unsigned y). rewrite zlt_true; auto. intros A.\n  generalize (sign_bit_of_unsigned (and x y)). rewrite bits_and. rewrite A.\n  rewrite andb_false_r. unfold signed.\n  destruct (zlt (unsigned (and x y)) half_modulus).\n  intros. generalize (unsigned_range (and x y)); omega.\n  congruence.\n  generalize wordsize_pos; omega.\nQed.\n\nTheorem shr_and_is_shru_and:\n  forall x y z,\n  lt y zero = false -> shr (and x y) z = shru (and x y) z.\nProof.\n  intros. apply shr_shru_positive. apply and_positive.\n  unfold lt in H. rewrite signed_zero in H. destruct (zlt (signed y) 0). congruence. auto.\nQed.\n\n(** ** Properties of integer zero extension and sign extension. *)\n\nLemma Ziter_base:\n  forall (A: Type) n (f: A -> A) x, n <= 0 -> Z.iter n f x = x.\nProof.\n  intros. unfold Z.iter. destruct n; auto. compute in H. elim H; auto.\nQed.\n\nLemma Ziter_succ:\n  forall (A: Type) n (f: A -> A) x,\n  0 <= n -> Z.iter (Z.succ n) f x = f (Z.iter n f x).\nProof.\n  intros. destruct n; simpl.\n  - auto.\n  - rewrite Pos.add_1_r. apply Pos.iter_succ.\n  - compute in H. elim H; auto.\nQed.\n\nLemma Znatlike_ind:\n  forall (P: Z -> Prop),\n  (forall n, n <= 0 -> P n) ->\n  (forall n, 0 <= n -> P n -> P (Z.succ n)) ->\n  forall n, P n.\nProof.\n  intros. destruct (zle 0 n).\n  apply natlike_ind; auto. apply H; omega.\n  apply H. omega.\nQed.\n\nLemma Zzero_ext_spec:\n  forall n x i, 0 <= i ->\n  Z.testbit (Zzero_ext n x) i = if zlt i n then Z.testbit x i else false.\nProof.\n  unfold Zzero_ext. induction n using Znatlike_ind.\n  - intros. rewrite Ziter_base; auto.\n    rewrite zlt_false. rewrite Ztestbit_0; auto. omega.\n  - intros. rewrite Ziter_succ; auto.\n    rewrite Ztestbit_shiftin; auto.\n    rewrite (Ztestbit_eq i x); auto.\n    destruct (zeq i 0).\n    + subst i. rewrite zlt_true; auto. omega.\n    + rewrite IHn. destruct (zlt (Z.pred i) n).\n      rewrite zlt_true; auto. omega.\n      rewrite zlt_false; auto. omega.\n      omega.\nQed.\n\nLemma bits_zero_ext:\n  forall n x i, 0 <= i ->\n  testbit (zero_ext n x) i = if zlt i n then testbit x i else false.\nProof.\n  intros. unfold zero_ext. destruct (zlt i zwordsize).\n  rewrite testbit_repr; auto. rewrite Zzero_ext_spec. auto. auto.\n  rewrite !bits_above; auto. destruct (zlt i n); auto.\nQed.\n\nLemma Zsign_ext_spec:\n  forall n x i, 0 <= i -> 0 < n ->\n  Z.testbit (Zsign_ext n x) i = Z.testbit x (if zlt i n then i else n - 1).\nProof.\n  intros n0 x i I0 N0.\n  revert x i I0. pattern n0. apply Zlt_lower_bound_ind with (z := 1).\n  - unfold Zsign_ext. intros.\n    destruct (zeq x 1).\n    + subst x; simpl.\n      replace (if zlt i 1 then i else 0) with 0.\n      rewrite Ztestbit_base.\n      destruct (Z.odd x0).\n      apply Ztestbit_m1; auto.\n      apply Ztestbit_0.\n      destruct (zlt i 1); omega.\n    + set (x1 := Z.pred x). replace x1 with (Z.succ (Z.pred x1)).\n      rewrite Ziter_succ. rewrite Ztestbit_shiftin.\n      destruct (zeq i 0).\n      * subst i. rewrite zlt_true. rewrite Ztestbit_base; auto. omega.\n      * rewrite H. unfold x1. destruct (zlt (Z.pred i) (Z.pred x)).\n        rewrite zlt_true. rewrite (Ztestbit_eq i x0); auto. rewrite zeq_false; auto. omega.\n        rewrite zlt_false. rewrite (Ztestbit_eq (x - 1) x0). rewrite zeq_false; auto.\n        omega. omega. omega. unfold x1; omega. omega.\n      * omega.\n      * unfold x1; omega.\n      * omega.\n  - omega.\nQed.\n\nLemma bits_sign_ext:\n  forall n x i, 0 <= i < zwordsize -> 0 < n ->\n  testbit (sign_ext n x) i = testbit x (if zlt i n then i else n - 1).\nProof.\n  intros. unfold sign_ext.\n  rewrite testbit_repr; auto. rewrite Zsign_ext_spec. destruct (zlt i n); auto.\n  omega. auto.\nQed.\n\nHint Rewrite bits_zero_ext bits_sign_ext: ints.\n\nTheorem zero_ext_above:\n  forall n x, n >= zwordsize -> zero_ext n x = x.\nProof.\n  intros. apply same_bits_eq; intros.\n  rewrite bits_zero_ext. apply zlt_true. omega. omega.\nQed.\n\nTheorem sign_ext_above:\n  forall n x, n >= zwordsize -> sign_ext n x = x.\nProof.\n  intros. apply same_bits_eq; intros.\n  unfold sign_ext; rewrite testbit_repr; auto.\n  rewrite Zsign_ext_spec. rewrite zlt_true. auto. omega. omega. omega.\nQed.\n\nTheorem zero_ext_and:\n  forall n x, 0 <= n -> zero_ext n x = and x (repr (two_p n - 1)).\nProof.\n  bit_solve. rewrite testbit_repr; auto. rewrite Ztestbit_two_p_m1; intuition.\n  destruct (zlt i n).\n  rewrite andb_true_r; auto.\n  rewrite andb_false_r; auto.\n  tauto.\nQed.\n\nTheorem zero_ext_mod:\n  forall n x, 0 <= n < zwordsize ->\n  unsigned (zero_ext n x) = Zmod (unsigned x) (two_p n).\nProof.\n  intros. apply equal_same_bits. intros.\n  rewrite Ztestbit_mod_two_p; auto.\n  fold (testbit (zero_ext n x) i).\n  destruct (zlt i zwordsize).\n  rewrite bits_zero_ext; auto.\n  rewrite bits_above. rewrite zlt_false; auto. omega. omega.\n  omega.\nQed.\n\nTheorem zero_ext_widen:\n  forall x n n', 0 <= n <= n' ->\n  zero_ext n' (zero_ext n x) = zero_ext n x.\nProof.\n  bit_solve. destruct (zlt i n).\n  apply zlt_true. omega.\n  destruct (zlt i n'); auto.\n  tauto. tauto.\nQed.\n\nTheorem sign_ext_widen:\n  forall x n n', 0 < n  <= n' ->\n  sign_ext n' (sign_ext n x) = sign_ext n x.\nProof.\n  intros. destruct (zlt n' zwordsize).\n  bit_solve. destruct (zlt i n').\n  auto.\n  rewrite (zlt_false _ i n).\n  destruct (zlt (n' - 1) n); f_equal; omega.\n  omega. omega.\n  destruct (zlt i n'); omega.\n  omega. omega.\n  apply sign_ext_above; auto.\nQed.\n\nTheorem sign_zero_ext_widen:\n  forall x n n', 0 <= n < n' ->\n  sign_ext n' (zero_ext n x) = zero_ext n x.\nProof.\n  intros. destruct (zlt n' zwordsize).\n  bit_solve.\n  destruct (zlt i n').\n  auto.\n  rewrite !zlt_false. auto. omega. omega. omega.\n  destruct (zlt i n'); omega.\n  omega.\n  apply sign_ext_above; auto.\nQed.\n\nTheorem zero_ext_narrow:\n  forall x n n', 0 <= n <= n' ->\n  zero_ext n (zero_ext n' x) = zero_ext n x.\nProof.\n  bit_solve. destruct (zlt i n).\n  apply zlt_true. omega.\n  auto.\n  omega. omega. omega.\nQed.\n\nTheorem sign_ext_narrow:\n  forall x n n', 0 < n <= n' ->\n  sign_ext n (sign_ext n' x) = sign_ext n x.\nProof.\n  intros. destruct (zlt n zwordsize).\n  bit_solve. destruct (zlt i n); f_equal; apply zlt_true; omega.\n  omega.\n  destruct (zlt i n); omega.\n  omega. omega.\n  rewrite (sign_ext_above n'). auto. omega.\nQed.\n\nTheorem zero_sign_ext_narrow:\n  forall x n n', 0 < n <= n' ->\n  zero_ext n (sign_ext n' x) = zero_ext n x.\nProof.\n  intros. destruct (zlt n' zwordsize).\n  bit_solve.\n  destruct (zlt i n); auto.\n  rewrite zlt_true; auto. omega.\n  omega. omega. omega.\n  rewrite sign_ext_above; auto.\nQed.\n\nTheorem zero_ext_idem:\n  forall n x, 0 <= n -> zero_ext n (zero_ext n x) = zero_ext n x.\nProof.\n  intros. apply zero_ext_widen. omega.\nQed.\n\nTheorem sign_ext_idem:\n  forall n x, 0 < n -> sign_ext n (sign_ext n x) = sign_ext n x.\nProof.\n  intros. apply sign_ext_widen. omega.\nQed.\n\nTheorem sign_ext_zero_ext:\n  forall n x, 0 < n -> sign_ext n (zero_ext n x) = sign_ext n x.\nProof.\n  intros. destruct (zlt n zwordsize).\n  bit_solve.\n  destruct (zlt i n).\n  rewrite zlt_true; auto.\n  rewrite zlt_true; auto. omega.\n  destruct (zlt i n); omega.\n  rewrite zero_ext_above; auto.\nQed.\n\nTheorem zero_ext_sign_ext:\n  forall n x, 0 < n -> zero_ext n (sign_ext n x) = zero_ext n x.\nProof.\n  intros. apply zero_sign_ext_narrow. omega.\nQed.\n\nTheorem sign_ext_equal_if_zero_equal:\n  forall n x y, 0 < n ->\n  zero_ext n x = zero_ext n y ->\n  sign_ext n x = sign_ext n y.\nProof.\n  intros. rewrite <- (sign_ext_zero_ext n x H).\n  rewrite <- (sign_ext_zero_ext n y H). congruence.\nQed.\n\nTheorem zero_ext_shru_shl:\n  forall n x,\n  0 < n < zwordsize ->\n  let y := repr (zwordsize - n) in\n  zero_ext n x = shru (shl x y) y.\nProof.\n  intros.\n  assert (unsigned y = zwordsize - n).\n    unfold y. apply unsigned_repr. generalize wordsize_max_unsigned. omega.\n  apply same_bits_eq; intros.\n  rewrite bits_zero_ext.\n  rewrite bits_shru; auto.\n  destruct (zlt i n).\n  rewrite zlt_true. rewrite bits_shl. rewrite zlt_false. f_equal. omega.\n  omega. omega. omega.\n  rewrite zlt_false. auto. omega.\n  omega.\nQed.\n\nTheorem sign_ext_shr_shl:\n  forall n x,\n  0 < n < zwordsize ->\n  let y := repr (zwordsize - n) in\n  sign_ext n x = shr (shl x y) y.\nProof.\n  intros.\n  assert (unsigned y = zwordsize - n).\n    unfold y. apply unsigned_repr. generalize wordsize_max_unsigned. omega.\n  apply same_bits_eq; intros.\n  rewrite bits_sign_ext.\n  rewrite bits_shr; auto.\n  destruct (zlt i n).\n  rewrite zlt_true. rewrite bits_shl. rewrite zlt_false. f_equal. omega.\n  omega. omega. omega.\n  rewrite zlt_false. rewrite bits_shl. rewrite zlt_false. f_equal. omega.\n  omega. omega. omega. omega. omega.\nQed.\n\n(** [zero_ext n x] is the unique integer congruent to [x] modulo [2^n]\n    in the range [0...2^n-1]. *)\n\nLemma zero_ext_range:\n  forall n x, 0 <= n < zwordsize -> 0 <= unsigned (zero_ext n x) < two_p n.\nProof.\n  intros. rewrite zero_ext_mod; auto. apply Z_mod_lt. apply two_p_gt_ZERO. omega.\nQed.\n\nLemma eqmod_zero_ext:\n  forall n x, 0 <= n < zwordsize -> eqmod (two_p n) (unsigned (zero_ext n x)) (unsigned x).\nProof.\n  intros. rewrite zero_ext_mod; auto. apply eqmod_sym. apply eqmod_mod.\n  apply two_p_gt_ZERO. omega.\nQed.\n\n(** [sign_ext n x] is the unique integer congruent to [x] modulo [2^n]\n    in the range [-2^(n-1)...2^(n-1) - 1]. *)\n\nLemma sign_ext_range:\n  forall n x, 0 < n < zwordsize -> -two_p (n-1) <= signed (sign_ext n x) < two_p (n-1).\nProof.\n  intros. rewrite sign_ext_shr_shl; auto.\n  set (X := shl x (repr (zwordsize - n))).\n  assert (two_p (n - 1) > 0) by (apply two_p_gt_ZERO; omega).\n  assert (unsigned (repr (zwordsize - n)) = zwordsize - n).\n    apply unsigned_repr.\n    split. omega. generalize wordsize_max_unsigned; omega.\n  rewrite shr_div_two_p.\n  rewrite signed_repr.\n  rewrite H1.\n  apply Zdiv_interval_1.\n  omega. omega. apply two_p_gt_ZERO; omega.\n  replace (- two_p (n - 1) * two_p (zwordsize - n))\n     with (- (two_p (n - 1) * two_p (zwordsize - n))) by ring.\n  rewrite <- two_p_is_exp.\n  replace (n - 1 + (zwordsize - n)) with (zwordsize - 1) by omega.\n  rewrite <- half_modulus_power.\n  generalize (signed_range X). unfold min_signed, max_signed. omega.\n  omega. omega.\n  apply Zdiv_interval_2. apply signed_range.\n  generalize min_signed_neg; omega.\n  generalize max_signed_pos; omega.\n  rewrite H1. apply two_p_gt_ZERO. omega.\nQed.\n\nLemma eqmod_sign_ext':\n  forall n x, 0 < n < zwordsize ->\n  eqmod (two_p n) (unsigned (sign_ext n x)) (unsigned x).\nProof.\n  intros.\n  set (N := Z.to_nat n).\n  assert (Z.of_nat N = n) by (apply Z2Nat.id; omega).\n  rewrite <- H0. rewrite <- two_power_nat_two_p.\n  apply eqmod_same_bits; intros.\n  rewrite H0 in H1. rewrite H0.\n  fold (testbit (sign_ext n x) i). rewrite bits_sign_ext.\n  rewrite zlt_true. auto. omega. omega. omega.\nQed.\n\nLemma eqmod_sign_ext:\n  forall n x, 0 < n < zwordsize ->\n  eqmod (two_p n) (signed (sign_ext n x)) (unsigned x).\nProof.\n  intros. apply eqmod_trans with (unsigned (sign_ext n x)).\n  apply eqmod_divides with modulus. apply eqm_signed_unsigned.\n  exists (two_p (zwordsize - n)).\n  unfold modulus. rewrite two_power_nat_two_p. fold zwordsize.\n  rewrite <- two_p_is_exp. f_equal. omega. omega. omega.\n  apply eqmod_sign_ext'; auto.\nQed.\n\n(** ** Properties of [one_bits] (decomposition in sum of powers of two) *)\n\nTheorem one_bits_range:\n  forall x i, In i (one_bits x) -> ltu i iwordsize = true.\nProof.\n  assert (A: forall p, 0 <= p < zwordsize -> ltu (repr p) iwordsize = true).\n    intros. unfold ltu, iwordsize. apply zlt_true.\n    repeat rewrite unsigned_repr. tauto.\n    generalize wordsize_max_unsigned; omega.\n    generalize wordsize_max_unsigned; omega.\n  unfold one_bits. intros.\n  destruct (list_in_map_inv _ _ _ H) as [i0 [EQ IN]].\n  subst i. apply A. apply Z_one_bits_range with (unsigned x); auto.\nQed.\n\nFixpoint int_of_one_bits (l: list int) : int :=\n  match l with\n  | nil => zero\n  | a :: b => add (shl one a) (int_of_one_bits b)\n  end.\n\nTheorem one_bits_decomp:\n  forall x, x = int_of_one_bits (one_bits x).\nProof.\n  intros.\n  transitivity (repr (powerserie (Z_one_bits wordsize (unsigned x) 0))).\n  transitivity (repr (unsigned x)).\n  auto with ints. decEq. apply Z_one_bits_powerserie.\n  auto with ints.\n  unfold one_bits.\n  generalize (Z_one_bits_range (unsigned x)).\n  generalize (Z_one_bits wordsize (unsigned x) 0).\n  induction l.\n  intros; reflexivity.\n  intros; simpl. rewrite <- IHl. unfold add. apply eqm_samerepr.\n  apply eqm_add. rewrite shl_mul_two_p. rewrite mul_commut.\n  rewrite mul_one. apply eqm_unsigned_repr_r.\n  rewrite unsigned_repr. auto with ints.\n  generalize (H a (in_eq _ _)). generalize wordsize_max_unsigned. omega.\n  auto with ints.\n  intros; apply H; auto with coqlib.\nQed.\n\n(** ** Properties of comparisons *)\n\nTheorem negate_cmp:\n  forall c x y, cmp (negate_comparison c) x y = negb (cmp c x y).\nProof.\n  intros. destruct c; simpl; try rewrite negb_elim; auto.\nQed.\n\nTheorem negate_cmpu:\n  forall c x y, cmpu (negate_comparison c) x y = negb (cmpu c x y).\nProof.\n  intros. destruct c; simpl; try rewrite negb_elim; auto.\nQed.\n\nTheorem swap_cmp:\n  forall c x y, cmp (swap_comparison c) x y = cmp c y x.\nProof.\n  intros. destruct c; simpl; auto. apply eq_sym. decEq. apply eq_sym.\nQed.\n\nTheorem swap_cmpu:\n  forall c x y, cmpu (swap_comparison c) x y = cmpu c y x.\nProof.\n  intros. destruct c; simpl; auto. apply eq_sym. decEq. apply eq_sym.\nQed.\n\nLemma translate_eq:\n  forall x y d,\n  eq (add x d) (add y d) = eq x y.\nProof.\n  intros. unfold eq. case (zeq (unsigned x) (unsigned y)); intro.\n  unfold add. rewrite e. apply zeq_true.\n  apply zeq_false. unfold add. red; intro. apply n.\n  apply eqm_small_eq; auto with ints.\n  replace (unsigned x) with ((unsigned x + unsigned d) - unsigned d).\n  replace (unsigned y) with ((unsigned y + unsigned d) - unsigned d).\n  apply eqm_sub. apply eqm_trans with (unsigned (repr (unsigned x + unsigned d))).\n  eauto with ints. apply eqm_trans with (unsigned (repr (unsigned y + unsigned d))).\n  eauto with ints. eauto with ints. eauto with ints.\n  omega. omega.\nQed.\n\nLemma translate_ltu:\n  forall x y d,\n  0 <= unsigned x + unsigned d <= max_unsigned ->\n  0 <= unsigned y + unsigned d <= max_unsigned ->\n  ltu (add x d) (add y d) = ltu x y.\nProof.\n  intros. unfold add. unfold ltu.\n  repeat rewrite unsigned_repr; auto. case (zlt (unsigned x) (unsigned y)); intro.\n  apply zlt_true. omega.\n  apply zlt_false. omega.\nQed.\n\nTheorem translate_cmpu:\n  forall c x y d,\n  0 <= unsigned x + unsigned d <= max_unsigned ->\n  0 <= unsigned y + unsigned d <= max_unsigned ->\n  cmpu c (add x d) (add y d) = cmpu c x y.\nProof.\n  intros. unfold cmpu.\n  rewrite translate_eq. repeat rewrite translate_ltu; auto.\nQed.\n\nLemma translate_lt:\n  forall x y d,\n  min_signed <= signed x + signed d <= max_signed ->\n  min_signed <= signed y + signed d <= max_signed ->\n  lt (add x d) (add y d) = lt x y.\nProof.\n  intros. repeat rewrite add_signed. unfold lt.\n  repeat rewrite signed_repr; auto. case (zlt (signed x) (signed y)); intro.\n  apply zlt_true. omega.\n  apply zlt_false. omega.\nQed.\n\nTheorem translate_cmp:\n  forall c x y d,\n  min_signed <= signed x + signed d <= max_signed ->\n  min_signed <= signed y + signed d <= max_signed ->\n  cmp c (add x d) (add y d) = cmp c x y.\nProof.\n  intros. unfold cmp.\n  rewrite translate_eq. repeat rewrite translate_lt; auto.\nQed.\n\nTheorem notbool_isfalse_istrue:\n  forall x, is_false x -> is_true (notbool x).\nProof.\n  unfold is_false, is_true, notbool; intros; subst x.\n  rewrite eq_true. apply one_not_zero.\nQed.\n\nTheorem notbool_istrue_isfalse:\n  forall x, is_true x -> is_false (notbool x).\nProof.\n  unfold is_false, is_true, notbool; intros.\n  generalize (eq_spec x zero). case (eq x zero); intro.\n  contradiction. auto.\nQed.\n\nTheorem ltu_range_test:\n  forall x y,\n  ltu x y = true -> unsigned y <= max_signed ->\n  0 <= signed x < unsigned y.\nProof.\n  intros.\n  unfold ltu in H. destruct (zlt (unsigned x) (unsigned y)); try discriminate.\n  rewrite signed_eq_unsigned.\n  generalize (unsigned_range x). omega. omega.\nQed.\n\nTheorem lt_sub_overflow:\n  forall x y,\n  xor (sub_overflow x y zero) (negative (sub x y)) = if lt x y then one else zero.\nProof.\n  intros. unfold negative, sub_overflow, lt. rewrite sub_signed.\n  rewrite signed_zero. rewrite Zminus_0_r.\n  generalize (signed_range x) (signed_range y).\n  set (X := signed x); set (Y := signed y). intros RX RY.\n  unfold min_signed, max_signed in *.\n  generalize half_modulus_pos half_modulus_modulus; intros HM MM.\n  destruct (zle 0 (X - Y)).\n- unfold proj_sumbool at 1; rewrite zle_true at 1 by omega. simpl.\n  rewrite (zlt_false _ X) by omega.\n  destruct (zlt (X - Y) half_modulus).\n  + unfold proj_sumbool; rewrite zle_true by omega.\n    rewrite signed_repr. rewrite zlt_false by omega. apply xor_idem.\n    unfold min_signed, max_signed; omega.\n  + unfold proj_sumbool; rewrite zle_false by omega.\n    replace (signed (repr (X - Y))) with (X - Y - modulus).\n    rewrite zlt_true by omega. apply xor_idem.\n    rewrite signed_repr_eq. replace ((X - Y) mod modulus) with (X - Y).\n    rewrite zlt_false; auto.\n    symmetry. apply Zmod_unique with 0; omega.\n- unfold proj_sumbool at 2. rewrite zle_true at 1 by omega. rewrite andb_true_r.\n  rewrite (zlt_true _ X) by omega.\n  destruct (zlt (X - Y) (-half_modulus)).\n  + unfold proj_sumbool; rewrite zle_false by omega.\n    replace (signed (repr (X - Y))) with (X - Y + modulus).\n    rewrite zlt_false by omega. apply xor_zero.\n    rewrite signed_repr_eq. replace ((X - Y) mod modulus) with (X - Y + modulus).\n    rewrite zlt_true by omega; auto.\n    symmetry. apply Zmod_unique with (-1); omega.\n  + unfold proj_sumbool; rewrite zle_true by omega.\n    rewrite signed_repr. rewrite zlt_true by omega. apply xor_zero_l.\n    unfold min_signed, max_signed; omega.\nQed.\n\nLemma signed_eq:\n  forall x y, eq x y = zeq (signed x) (signed y).\nProof.\n  intros. unfold eq. unfold proj_sumbool.\n  destruct (zeq (unsigned x) (unsigned y));\n  destruct (zeq (signed x) (signed y)); auto.\n  elim n. unfold signed. rewrite e; auto.\n  elim n. apply eqm_small_eq; auto with ints.\n  eapply eqm_trans. apply eqm_sym. apply eqm_signed_unsigned.\n  rewrite e. apply eqm_signed_unsigned.\nQed.\n\nLemma not_lt:\n  forall x y, negb (lt y x) = (lt x y || eq x y).\nProof.\n  intros. unfold lt. rewrite signed_eq. unfold proj_sumbool.\n  destruct (zlt (signed y) (signed x)).\n  rewrite zlt_false. rewrite zeq_false. auto. omega. omega.\n  destruct (zeq (signed x) (signed y)).\n  rewrite zlt_false. auto. omega.\n  rewrite zlt_true. auto. omega.\nQed.\n\nLemma lt_not:\n  forall x y, lt y x = negb (lt x y) && negb (eq x y).\nProof.\n  intros. rewrite <- negb_orb. rewrite <- not_lt. rewrite negb_involutive. auto.\nQed.\n\nLemma not_ltu:\n  forall x y, negb (ltu y x) = (ltu x y || eq x y).\nProof.\n  intros. unfold ltu, eq.\n  destruct (zlt (unsigned y) (unsigned x)).\n  rewrite zlt_false. rewrite zeq_false. auto. omega. omega.\n  destruct (zeq (unsigned x) (unsigned y)).\n  rewrite zlt_false. auto. omega.\n  rewrite zlt_true. auto. omega.\nQed.\n\nLemma ltu_not:\n  forall x y, ltu y x = negb (ltu x y) && negb (eq x y).\nProof.\n  intros. rewrite <- negb_orb. rewrite <- not_ltu. rewrite negb_involutive. auto.\nQed.\n\n\n(** Non-overlapping test *)\n\nDefinition no_overlap (ofs1: int) (sz1: Z) (ofs2: int) (sz2: Z) : bool :=\n  let x1 := unsigned ofs1 in let x2 := unsigned ofs2 in\n     zlt (x1 + sz1) modulus && zlt (x2 + sz2) modulus\n  && (zle (x1 + sz1) x2 || zle (x2 + sz2) x1).\n\nLemma no_overlap_sound:\n  forall ofs1 sz1 ofs2 sz2 base,\n  sz1 > 0 -> sz2 > 0 -> no_overlap ofs1 sz1 ofs2 sz2 = true ->\n  unsigned (add base ofs1) + sz1 <= unsigned (add base ofs2)\n  \\/ unsigned (add base ofs2) + sz2 <= unsigned (add base ofs1).\nProof.\n  intros.\n  destruct (andb_prop _ _ H1). clear H1.\n  destruct (andb_prop _ _ H2). clear H2.\n  apply proj_sumbool_true in H1.\n  apply proj_sumbool_true in H4.\n  assert (unsigned ofs1 + sz1 <= unsigned ofs2 \\/ unsigned ofs2 + sz2 <= unsigned ofs1).\n  destruct (orb_prop _ _ H3). left. eapply proj_sumbool_true; eauto. right. eapply proj_sumbool_true; eauto.\n  clear H3.\n  generalize (unsigned_range ofs1) (unsigned_range ofs2). intros P Q.\n  generalize (unsigned_add_either base ofs1) (unsigned_add_either base ofs2).\n  intros [C|C] [D|D]; omega.\nQed.\n\n(** Size of integers, in bits. *)\n\nDefinition Zsize (x: Z) : Z :=\n  match x with\n  | Zpos p => Zpos (Pos.size p)\n  | _ => 0\n  end.\n\nDefinition size (x: int) : Z := Zsize (unsigned x).\n\nRemark Zsize_pos: forall x, 0 <= Zsize x.\nProof.\n  destruct x; simpl. omega. compute; intuition congruence. omega.\nQed.\n\nRemark Zsize_pos': forall x, 0 < x -> 0 < Zsize x.\nProof.\n  destruct x; simpl; intros; try discriminate. compute; auto.\nQed.\n\nLemma Zsize_shiftin:\n  forall b x, 0 < x -> Zsize (Zshiftin b x) = Zsucc (Zsize x).\nProof.\n  intros. destruct x; compute in H; try discriminate.\n  destruct b.\n  change (Zshiftin true (Zpos p)) with (Zpos (p~1)).\n  simpl. f_equal. rewrite Pos.add_1_r; auto.\n  change (Zshiftin false (Zpos p)) with (Zpos (p~0)).\n  simpl. f_equal. rewrite Pos.add_1_r; auto.\nQed.\n\nLemma Ztestbit_size_1:\n  forall x, 0 < x -> Z.testbit x (Zpred (Zsize x)) = true.\nProof.\n  intros x0 POS0; pattern x0; apply Zshiftin_pos_ind; auto.\n  intros. rewrite Zsize_shiftin; auto.\n  replace (Z.pred (Z.succ (Zsize x))) with (Z.succ (Z.pred (Zsize x))) by omega.\n  rewrite Ztestbit_shiftin_succ. auto. generalize (Zsize_pos' x H); omega.\nQed.\n\nLemma Ztestbit_size_2:\n  forall x, 0 <= x -> forall i, i >= Zsize x -> Z.testbit x i = false.\nProof.\n  intros x0 POS0. destruct (zeq x0 0).\n  - subst x0; intros. apply Ztestbit_0.\n  - pattern x0; apply Zshiftin_pos_ind.\n    + simpl. intros. change 1 with (Zshiftin true 0). rewrite Ztestbit_shiftin.\n      rewrite zeq_false. apply Ztestbit_0. omega. omega.\n    + intros. rewrite Zsize_shiftin in H1; auto.\n      generalize (Zsize_pos' _ H); intros.\n      rewrite Ztestbit_shiftin. rewrite zeq_false. apply H0. omega.\n      omega. omega.\n    + omega.\nQed.\n\nLemma Zsize_interval_1:\n  forall x, 0 <= x -> 0 <= x < two_p (Zsize x).\nProof.\n  intros.\n  assert (x = x mod (two_p (Zsize x))).\n    apply equal_same_bits; intros.\n    rewrite Ztestbit_mod_two_p; auto.\n    destruct (zlt i (Zsize x)). auto. apply Ztestbit_size_2; auto.\n    apply Zsize_pos; auto.\n  rewrite H0 at 1. rewrite H0 at 3. apply Z_mod_lt. apply two_p_gt_ZERO. apply Zsize_pos; auto.\nQed.\n\nLemma Zsize_interval_2:\n  forall x n, 0 <= n -> 0 <= x < two_p n -> n >= Zsize x.\nProof.\n  intros. set (N := Z.to_nat n).\n  assert (Z.of_nat N = n) by (apply Z2Nat.id; auto).\n  rewrite <- H1 in H0. rewrite <- two_power_nat_two_p in H0.\n  destruct (zeq x 0).\n  subst x; simpl; omega.\n  destruct (zlt n (Zsize x)); auto.\n  exploit (Ztestbit_above N x (Zpred (Zsize x))). auto. omega.\n  rewrite Ztestbit_size_1. congruence. omega.\nQed.\n\nLemma Zsize_monotone:\n  forall x y, 0 <= x <= y -> Zsize x <= Zsize y.\nProof.\n  intros. apply Zge_le. apply Zsize_interval_2. apply Zsize_pos.\n  exploit (Zsize_interval_1 y). omega.\n  omega.\nQed.\n\nTheorem size_zero: size zero = 0.\nProof.\n  unfold size; rewrite unsigned_zero; auto.\nQed.\n\nTheorem bits_size_1:\n  forall x, x = zero \\/ testbit x (Zpred (size x)) = true.\nProof.\n  intros. destruct (zeq (unsigned x) 0).\n  left. rewrite <- (repr_unsigned x). rewrite e; auto.\n  right. apply Ztestbit_size_1. generalize (unsigned_range x); omega.\nQed.\n\nTheorem bits_size_2:\n  forall x i, size x <= i -> testbit x i = false.\nProof.\n  intros. apply Ztestbit_size_2. generalize (unsigned_range x); omega.\n  fold (size x); omega.\nQed.\n\nTheorem size_range:\n  forall x, 0 <= size x <= zwordsize.\nProof.\n  intros; split. apply Zsize_pos.\n  destruct (bits_size_1 x).\n  subst x; unfold size; rewrite unsigned_zero; simpl. generalize wordsize_pos; omega.\n  destruct (zle (size x) zwordsize); auto.\n  rewrite bits_above in H. congruence. omega.\nQed.\n\nTheorem bits_size_3:\n  forall x n,\n  0 <= n ->\n  (forall i, n <= i < zwordsize -> testbit x i = false) ->\n  size x <= n.\nProof.\n  intros. destruct (zle (size x) n). auto.\n  destruct (bits_size_1 x).\n  subst x. unfold size; rewrite unsigned_zero; assumption.\n  rewrite (H0 (Z.pred (size x))) in H1. congruence.\n  generalize (size_range x); omega.\nQed.\n\nTheorem bits_size_4:\n  forall x n,\n  0 <= n ->\n  testbit x (Zpred n) = true ->\n  (forall i, n <= i < zwordsize -> testbit x i = false) ->\n  size x = n.\nProof.\n  intros.\n  assert (size x <= n).\n    apply bits_size_3; auto.\n  destruct (zlt (size x) n).\n  rewrite bits_size_2 in H0. congruence. omega.\n  omega.\nQed.\n\nTheorem size_interval_1:\n  forall x, 0 <= unsigned x < two_p (size x).\nProof.\n  intros; apply Zsize_interval_1. generalize (unsigned_range x); omega.\nQed.\n\nTheorem size_interval_2:\n  forall x n, 0 <= n -> 0 <= unsigned x < two_p n -> n >= size x.\nProof.\n  intros. apply Zsize_interval_2; auto.\nQed.\n\nTheorem size_and:\n  forall a b, size (and a b) <= Z.min (size a) (size b).\nProof.\n  intros.\n  assert (0 <= Z.min (size a) (size b)).\n    generalize (size_range a) (size_range b). zify; omega.\n  apply bits_size_3. auto. intros.\n  rewrite bits_and. zify. subst z z0. destruct H1.\n  rewrite (bits_size_2 a). auto. omega.\n  rewrite (bits_size_2 b). apply andb_false_r. omega.\n  omega.\nQed.\n\nCorollary and_interval:\n  forall a b, 0 <= unsigned (and a b) < two_p (Z.min (size a) (size b)).\nProof.\n  intros.\n  generalize (size_interval_1 (and a b)); intros.\n  assert (two_p (size (and a b)) <= two_p (Z.min (size a) (size b))).\n  apply two_p_monotone. split. generalize (size_range (and a b)); omega.\n  apply size_and.\n  omega.\nQed.\n\nTheorem size_or:\n  forall a b, size (or a b) = Z.max (size a) (size b).\nProof.\n  intros. generalize (size_range a) (size_range b); intros.\n  destruct (bits_size_1 a).\n  subst a. rewrite size_zero. rewrite or_zero_l. zify; omega.\n  destruct (bits_size_1 b).\n  subst b. rewrite size_zero. rewrite or_zero. zify; omega.\n  zify. destruct H3 as [[P Q] | [P Q]]; subst.\n  apply bits_size_4. tauto. rewrite bits_or. rewrite H2. apply orb_true_r.\n  omega.\n  intros. rewrite bits_or. rewrite !bits_size_2. auto. omega. omega. omega.\n  apply bits_size_4. tauto. rewrite bits_or. rewrite H1. apply orb_true_l.\n  destruct (zeq (size a) 0). unfold testbit in H1. rewrite Z.testbit_neg_r in H1.\n  congruence. omega. omega.\n  intros. rewrite bits_or. rewrite !bits_size_2. auto. omega. omega. omega.\nQed.\n\nCorollary or_interval:\n  forall a b, 0 <= unsigned (or a b) < two_p (Z.max (size a) (size b)).\nProof.\n  intros. rewrite <- size_or. apply size_interval_1.\nQed.\n\nTheorem size_xor:\n  forall a b, size (xor a b) <= Z.max (size a) (size b).\nProof.\n  intros.\n  assert (0 <= Z.max (size a) (size b)).\n    generalize (size_range a) (size_range b). zify; omega.\n  apply bits_size_3. auto. intros.\n  rewrite bits_xor. rewrite !bits_size_2. auto.\n  zify; omega.\n  zify; omega.\n  omega.\nQed.\n\nCorollary xor_interval:\n  forall a b, 0 <= unsigned (xor a b) < two_p (Z.max (size a) (size b)).\nProof.\n  intros.\n  generalize (size_interval_1 (xor a b)); intros.\n  assert (two_p (size (xor a b)) <= two_p (Z.max (size a) (size b))).\n  apply two_p_monotone. split. generalize (size_range (xor a b)); omega.\n  apply size_xor.\n  omega.\nQed.\n\nEnd Make.\n\n(** * Specialization to integers of size 8, 32, and 64 bits *)\n\nModule Wordsize_32.\n  Definition wordsize := 32%nat.\n  Remark wordsize_not_zero: wordsize <> 0%nat.\n  Proof. unfold wordsize; congruence. Qed.\nEnd Wordsize_32.\n\nStrategy opaque [Wordsize_32.wordsize].\n\nModule Int := Make(Wordsize_32).\n\nStrategy 0 [Wordsize_32.wordsize].\n\nNotation int := Int.int.\n\nRemark int_wordsize_divides_modulus:\n  Zdivide (Z_of_nat Int.wordsize) Int.modulus.\nProof.\n  exists (two_p (32-5)); reflexivity.\nQed.\n\nModule Wordsize_256.\n  Definition wordsize := 256%nat.\n  Remark wordsize_not_zero: wordsize <> 0%nat.\n  Proof. unfold wordsize; congruence. Qed.\nEnd Wordsize_256.\n\nStrategy opaque [Wordsize_256.wordsize].\n\nModule Int256 := Make(Wordsize_256).\n\nStrategy 0 [Wordsize_256.wordsize].\n\nNotation int256 := Int256.int.\n\nModule Wordsize_8.\n  Definition wordsize := 8%nat.\n  Remark wordsize_not_zero: wordsize <> 0%nat.\n  Proof. unfold wordsize; congruence. Qed.\nEnd Wordsize_8.\n\nStrategy opaque [Wordsize_8.wordsize].\n\nModule Byte := Make(Wordsize_8).\n\nStrategy 0 [Wordsize_8.wordsize].\n\nNotation byte := Byte.int.\n\nModule Wordsize_64.\n  Definition wordsize := 64%nat.\n  Remark wordsize_not_zero: wordsize <> 0%nat.\n  Proof. unfold wordsize; congruence. Qed.\nEnd Wordsize_64.\n\nStrategy opaque [Wordsize_64.wordsize].\n\nModule Int64.\n\nInclude Make(Wordsize_64).\n\n(** Shifts with amount given as a 32-bit integer *)\n\nDefinition iwordsize': Int.int := Int.repr zwordsize.\n\nDefinition shl' (x: int) (y: Int.int): int :=\n  repr (Z.shiftl (unsigned x) (Int.unsigned y)).\nDefinition shru' (x: int) (y: Int.int): int :=\n  repr (Z.shiftr (unsigned x) (Int.unsigned y)).\nDefinition shr' (x: int) (y: Int.int): int :=\n  repr (Z.shiftr (signed x) (Int.unsigned y)).\nDefinition rol' (x: int) (y: Int.int): int :=\n  rol x (repr (Int.unsigned y)).\nDefinition shrx' (x: int) (y: Int.int): int :=\n  divs x (shl' one y).\nDefinition shr_carry' (x: int) (y: Int.int): int :=\n  if lt x zero && negb (eq (and x (sub (shl' one y) one)) zero)\n  then one else zero.\n\nLemma bits_shl':\n  forall x y i,\n  0 <= i < zwordsize ->\n  testbit (shl' x y) i =\n  if zlt i (Int.unsigned y) then false else testbit x (i - Int.unsigned y).\nProof.\n  intros. unfold shl'. rewrite testbit_repr; auto.\n  destruct (zlt i (Int.unsigned y)).\n  apply Z.shiftl_spec_low. auto.\n  apply Z.shiftl_spec_high. omega. omega.\nQed.\n\nLemma bits_shru':\n  forall x y i,\n  0 <= i < zwordsize ->\n  testbit (shru' x y) i =\n  if zlt (i + Int.unsigned y) zwordsize then testbit x (i + Int.unsigned y) else false.\nProof.\n  intros. unfold shru'. rewrite testbit_repr; auto.\n  rewrite Z.shiftr_spec. fold (testbit x (i + Int.unsigned y)).\n  destruct (zlt (i + Int.unsigned y) zwordsize).\n  auto.\n  apply bits_above; auto.\n  omega.\nQed.\n\nLemma bits_shr':\n  forall x y i,\n  0 <= i < zwordsize ->\n  testbit (shr' x y) i =\n  testbit x (if zlt (i + Int.unsigned y) zwordsize then i + Int.unsigned y else zwordsize - 1).\nProof.\n  intros. unfold shr'. rewrite testbit_repr; auto.\n  rewrite Z.shiftr_spec. apply bits_signed.\n  generalize (Int.unsigned_range y); omega.\n  omega.\nQed.\n\nLemma shl'_mul_two_p:\n  forall x y,\n  shl' x y = mul x (repr (two_p (Int.unsigned y))).\nProof.\n  intros. unfold shl', mul. apply eqm_samerepr.\n  rewrite Zshiftl_mul_two_p. apply eqm_mult. apply eqm_refl. apply eqm_unsigned_repr.\n  generalize (Int.unsigned_range y); omega.\nQed.\n\nLemma shl'_one_two_p:\n  forall y, shl' one y = repr (two_p (Int.unsigned y)).\nProof.\n  intros. rewrite shl'_mul_two_p. rewrite mul_commut. rewrite mul_one. auto.\nQed.\n\nTheorem shl'_mul:\n  forall x y,\n  shl' x y = mul x (shl' one y).\nProof.\n  intros. rewrite shl'_one_two_p. apply shl'_mul_two_p.\nQed.\n\nTheorem shl'_zero:\n  forall x, shl' x Int.zero = x.\nProof.\n  intros. unfold shl'. rewrite Int.unsigned_zero. unfold Z.shiftl.\n  apply repr_unsigned.\nQed.\n\nTheorem shru'_zero :\n  forall x, shru' x Int.zero = x.\nProof.\n  intros. unfold shru'. rewrite Int.unsigned_zero. unfold Z.shiftr.\n  apply repr_unsigned.\nQed.\n\nTheorem shr'_zero :\n  forall x, shr' x Int.zero = x.\nProof.\n  intros. unfold shr'. rewrite Int.unsigned_zero. unfold Z.shiftr.\n  apply repr_signed.\nQed.\n\nTheorem shrx'_zero:\n  forall x, shrx' x Int.zero = x.\nProof.\n  intros. change (shrx' x Int.zero) with (shrx x zero). apply shrx_zero. compute; auto.\nQed.\n\nTheorem shrx'_carry:\n  forall x y,\n  Int.ltu y (Int.repr 63) = true ->\n  shrx' x y = add (shr' x y) (shr_carry' x y).\nProof.\n  intros. apply Int.ltu_inv in H. change (Int.unsigned (Int.repr 63)) with 63 in H.\n  set (y1 := Int64.repr (Int.unsigned y)).\n  assert (U: unsigned y1 = Int.unsigned y).\n  { apply unsigned_repr. assert (63 < max_unsigned) by reflexivity. omega. }\n  transitivity (shrx x y1).\n- unfold shrx', shrx, shl', shl. rewrite U; auto.\n- rewrite shrx_carry.\n+ f_equal.\n  unfold shr, shr'. rewrite U; auto.\n  unfold shr_carry, shr_carry', shl, shl'. rewrite U; auto.\n+ unfold ltu. apply zlt_true. rewrite U; tauto.\nQed.\n\nTheorem shrx'_shr_2:\n  forall x y,\n  Int.ltu y (Int.repr 63) = true ->\n  shrx' x y = shr' (add x (shru' (shr' x (Int.repr 63)) (Int.sub (Int.repr 64) y))) y.\nProof.\n  intros.\n  set (z := repr (Int.unsigned y)).\n  apply Int.ltu_inv in H. change (Int.unsigned (Int.repr 63)) with 63 in H.\n  assert (N1: 63 < max_unsigned) by reflexivity.\n  assert (N2: 63 < Int.max_unsigned) by reflexivity.\n  assert (A: unsigned z = Int.unsigned y).\n  { unfold z; apply unsigned_repr; omega. }\n  assert (B: unsigned (sub (repr 64) z) = Int.unsigned (Int.sub (Int.repr 64) y)).\n  { unfold z. unfold sub, Int.sub.\n    change (unsigned (repr 64)) with 64.\n    change (Int.unsigned (Int.repr 64)) with 64.\n    rewrite (unsigned_repr (Int.unsigned y)) by omega.\n    rewrite unsigned_repr, Int.unsigned_repr by omega.\n    auto. }\n  unfold shrx', shr', shru', shl'.\n  rewrite <- A.\n  change (Int.unsigned (Int.repr 63)) with (unsigned (repr 63)).\n  rewrite <- B.\n  apply shrx_shr_2.\n  unfold ltu. apply zlt_true. change (unsigned z < 63). rewrite A; omega.\nQed.\n\nRemark int_ltu_2_inv:\n  forall y z,\n  Int.ltu y iwordsize' = true ->\n  Int.ltu z iwordsize' = true ->\n  Int.unsigned (Int.add y z) <= Int.unsigned iwordsize' ->\n  let y' := repr (Int.unsigned y) in\n  let z' := repr (Int.unsigned z) in\n     Int.unsigned y = unsigned y'\n  /\\ Int.unsigned z = unsigned z'\n  /\\ ltu y' iwordsize = true\n  /\\ ltu z' iwordsize = true\n  /\\ Int.unsigned (Int.add y z) = unsigned (add y' z')\n  /\\ add y' z' = repr (Int.unsigned (Int.add y z)).\nProof.\n  intros. apply Int.ltu_inv in H. apply Int.ltu_inv in H0.\n  change (Int.unsigned iwordsize') with 64 in *.\n  assert (128 < max_unsigned) by reflexivity.\n  assert (128 < Int.max_unsigned) by reflexivity.\n  assert (Y: unsigned y' = Int.unsigned y) by (apply unsigned_repr; omega).\n  assert (Z: unsigned z' = Int.unsigned z) by (apply unsigned_repr; omega).\n  assert (P: Int.unsigned (Int.add y z) = unsigned (add y' z')).\n  { unfold Int.add. rewrite Int.unsigned_repr by omega.\n    unfold add. rewrite unsigned_repr by omega. congruence. }\n  intuition auto.\n  apply zlt_true. rewrite Y; auto.\n  apply zlt_true. rewrite Z; auto.\n  rewrite P. rewrite repr_unsigned. auto.\nQed.\n\nTheorem or_ror':\n  forall x y z,\n  Int.ltu y iwordsize' = true ->\n  Int.ltu z iwordsize' = true ->\n  Int.add y z = iwordsize' ->\n  ror x (repr (Int.unsigned z)) = or (shl' x y) (shru' x z).\nProof.\n  intros. destruct (int_ltu_2_inv y z) as (A & B & C & D & E & F); auto. rewrite H1; omega.\n  replace (shl' x y) with (shl x (repr (Int.unsigned y))).\n  replace (shru' x z) with (shru x (repr (Int.unsigned z))).\n  apply or_ror; auto. rewrite F, H1. reflexivity.\n  unfold shru, shru'; rewrite <- B; auto.\n  unfold shl, shl'; rewrite <- A; auto.\nQed.\n\nTheorem shl'_shl':\n  forall x y z,\n  Int.ltu y iwordsize' = true ->\n  Int.ltu z iwordsize' = true ->\n  Int.ltu (Int.add y z) iwordsize' = true ->\n  shl' (shl' x y) z = shl' x (Int.add y z).\nProof.\n  intros. apply Int.ltu_inv in H1.\n  destruct (int_ltu_2_inv y z) as (A & B & C & D & E & F); auto. omega.\n  set (y' := repr (Int.unsigned y)) in *.\n  set (z' := repr (Int.unsigned z)) in *.\n  replace (shl' x y) with (shl x y').\n  replace (shl' (shl x y') z) with (shl (shl x y') z').\n  replace (shl' x (Int.add y z)) with (shl x (add y' z')).\n  apply shl_shl; auto. apply zlt_true. rewrite <- E.\n  change (unsigned iwordsize) with zwordsize. tauto.\n  unfold shl, shl'. rewrite E; auto.\n  unfold shl at 1, shl'. rewrite <- B; auto.\n  unfold shl, shl'; rewrite <- A; auto.\nQed.\n\nTheorem shru'_shru':\n  forall x y z,\n  Int.ltu y iwordsize' = true ->\n  Int.ltu z iwordsize' = true ->\n  Int.ltu (Int.add y z) iwordsize' = true ->\n  shru' (shru' x y) z = shru' x (Int.add y z).\nProof.\n  intros. apply Int.ltu_inv in H1.\n  destruct (int_ltu_2_inv y z) as (A & B & C & D & E & F); auto. omega.\n  set (y' := repr (Int.unsigned y)) in *.\n  set (z' := repr (Int.unsigned z)) in *.\n  replace (shru' x y) with (shru x y').\n  replace (shru' (shru x y') z) with (shru (shru x y') z').\n  replace (shru' x (Int.add y z)) with (shru x (add y' z')).\n  apply shru_shru; auto. apply zlt_true. rewrite <- E.\n  change (unsigned iwordsize) with zwordsize. tauto.\n  unfold shru, shru'. rewrite E; auto.\n  unfold shru at 1, shru'. rewrite <- B; auto.\n  unfold shru, shru'; rewrite <- A; auto.\nQed.\n\nTheorem shr'_shr':\n  forall x y z,\n  Int.ltu y iwordsize' = true ->\n  Int.ltu z iwordsize' = true ->\n  Int.ltu (Int.add y z) iwordsize' = true ->\n  shr' (shr' x y) z = shr' x (Int.add y z).\nProof.\n  intros. apply Int.ltu_inv in H1.\n  destruct (int_ltu_2_inv y z) as (A & B & C & D & E & F); auto. omega.\n  set (y' := repr (Int.unsigned y)) in *.\n  set (z' := repr (Int.unsigned z)) in *.\n  replace (shr' x y) with (shr x y').\n  replace (shr' (shr x y') z) with (shr (shr x y') z').\n  replace (shr' x (Int.add y z)) with (shr x (add y' z')).\n  apply shr_shr; auto. apply zlt_true. rewrite <- E.\n  change (unsigned iwordsize) with zwordsize. tauto.\n  unfold shr, shr'. rewrite E; auto.\n  unfold shr at 1, shr'. rewrite <- B; auto.\n  unfold shr, shr'; rewrite <- A; auto.\nQed.\n\n(** Powers of two with exponents given as 32-bit ints *)\n\nDefinition one_bits' (x: int) : list Int.int :=\n  List.map Int.repr (Z_one_bits wordsize (unsigned x) 0).\n\nDefinition is_power2' (x: int) : option Int.int :=\n  match Z_one_bits wordsize (unsigned x) 0 with\n  | i :: nil => Some (Int.repr i)\n  | _ => None\n  end.\n\nTheorem one_bits'_range:\n  forall x i, In i (one_bits' x) -> Int.ltu i iwordsize' = true.\nProof.\n  intros.\n  destruct (list_in_map_inv _ _ _ H) as [i0 [EQ IN]].\n  exploit Z_one_bits_range; eauto. intros R.\n  unfold Int.ltu. rewrite EQ. rewrite Int.unsigned_repr.\n  change (Int.unsigned iwordsize') with zwordsize. apply zlt_true. omega.\n  assert (zwordsize < Int.max_unsigned) by reflexivity. omega.\nQed.\n\nFixpoint int_of_one_bits' (l: list Int.int) : int :=\n  match l with\n  | nil => zero\n  | a :: b => add (shl' one a) (int_of_one_bits' b)\n  end.\n\nTheorem one_bits'_decomp:\n  forall x, x = int_of_one_bits' (one_bits' x).\nProof.\n  assert (REC: forall l,\n           (forall i, In i l -> 0 <= i < zwordsize) ->\n           int_of_one_bits' (List.map Int.repr l) = repr (powerserie l)).\n  { induction l; simpl; intros.\n  - auto.\n  - rewrite IHl by eauto. apply eqm_samerepr; apply eqm_add.\n  + rewrite shl'_one_two_p. rewrite Int.unsigned_repr. apply eqm_sym; apply eqm_unsigned_repr.\n    exploit (H a). auto. assert (zwordsize < Int.max_unsigned) by reflexivity. omega.\n  + apply eqm_sym; apply eqm_unsigned_repr.\n  }\n  intros. rewrite <- (repr_unsigned x) at 1. unfold one_bits'. rewrite REC.\n  rewrite <- Z_one_bits_powerserie. auto. apply unsigned_range.\n  apply Z_one_bits_range.\nQed.\n\nLemma is_power2'_rng:\n  forall n logn,\n  is_power2' n = Some logn ->\n  0 <= Int.unsigned logn < zwordsize.\nProof.\n  unfold is_power2'; intros n logn P2.\n  destruct (Z_one_bits wordsize (unsigned n) 0) as [ | i [ | ? ?]] eqn:B; inv P2.\n  assert (0 <= i < zwordsize).\n  { apply Z_one_bits_range with (unsigned n). rewrite B; auto with coqlib. }\n  rewrite Int.unsigned_repr. auto.\n  assert (zwordsize < Int.max_unsigned) by reflexivity.\n  omega.\nQed.\n\nTheorem is_power2'_range:\n  forall n logn,\n  is_power2' n = Some logn -> Int.ltu logn iwordsize' = true.\nProof.\n  intros. unfold Int.ltu. change (Int.unsigned iwordsize') with zwordsize.\n  apply zlt_true. generalize (is_power2'_rng _ _ H). tauto.\nQed.\n\nLemma is_power2'_correct:\n  forall n logn,\n  is_power2' n = Some logn ->\n  unsigned n = two_p (Int.unsigned logn).\nProof.\n  unfold is_power2'; intros.\n  destruct (Z_one_bits wordsize (unsigned n) 0) as [ | i [ | ? ?]] eqn:B; inv H.\n  rewrite (Z_one_bits_powerserie (unsigned n)) by (apply unsigned_range).\n  rewrite Int.unsigned_repr. rewrite B; simpl. omega.\n  assert (0 <= i < zwordsize).\n  { apply Z_one_bits_range with (unsigned n). rewrite B; auto with coqlib. }\n  assert (zwordsize < Int.max_unsigned) by reflexivity.\n  omega.\nQed.\n\nTheorem mul_pow2':\n  forall x n logn,\n  is_power2' n = Some logn ->\n  mul x n = shl' x logn.\nProof.\n  intros. rewrite shl'_mul. f_equal. rewrite shl'_one_two_p.\n  rewrite <- (repr_unsigned n). f_equal. apply is_power2'_correct; auto.\nQed.\n\nTheorem divu_pow2':\n  forall x n logn,\n  is_power2' n = Some logn ->\n  divu x n = shru' x logn.\nProof.\n  intros. generalize (is_power2'_correct n logn H). intro.\n  symmetry. unfold divu. rewrite H0. unfold shru'. rewrite Zshiftr_div_two_p. auto.\n  eapply is_power2'_rng; eauto.\nQed.\n\n(** Decomposing 64-bit ints as pairs of 32-bit ints *)\n\nDefinition loword (n: int) : Int.int := Int.repr (unsigned n).\n\nDefinition hiword (n: int) : Int.int := Int.repr (unsigned (shru n (repr Int.zwordsize))).\n\nDefinition ofwords (hi lo: Int.int) : int :=\n  or (shl (repr (Int.unsigned hi)) (repr Int.zwordsize)) (repr (Int.unsigned lo)).\n\nLemma bits_loword:\n  forall n i, 0 <= i < Int.zwordsize -> Int.testbit (loword n) i = testbit n i.\nProof.\n  intros. unfold loword. rewrite Int.testbit_repr; auto.\nQed.\n\nLemma bits_hiword:\n  forall n i, 0 <= i < Int.zwordsize -> Int.testbit (hiword n) i = testbit n (i + Int.zwordsize).\nProof.\n  intros. unfold hiword. rewrite Int.testbit_repr; auto.\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity.\n  fold (testbit (shru n (repr Int.zwordsize)) i). rewrite bits_shru.\n  change (unsigned (repr Int.zwordsize)) with Int.zwordsize.\n  apply zlt_true. omega. omega.\nQed.\n\nLemma bits_ofwords:\n  forall hi lo i, 0 <= i < zwordsize ->\n  testbit (ofwords hi lo) i =\n  if zlt i Int.zwordsize then Int.testbit lo i else Int.testbit hi (i - Int.zwordsize).\nProof.\n  intros. unfold ofwords. rewrite bits_or; auto. rewrite bits_shl; auto.\n  change (unsigned (repr Int.zwordsize)) with Int.zwordsize.\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity.\n  destruct (zlt i Int.zwordsize).\n  rewrite testbit_repr; auto.\n  rewrite !testbit_repr; auto.\n  fold (Int.testbit lo i). rewrite Int.bits_above. apply orb_false_r. auto.\n  omega.\nQed.\n\nLemma lo_ofwords:\n  forall hi lo, loword (ofwords hi lo) = lo.\nProof.\n  intros. apply Int.same_bits_eq; intros.\n  rewrite bits_loword; auto. rewrite bits_ofwords. apply zlt_true. omega.\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity. omega.\nQed.\n\nLemma hi_ofwords:\n  forall hi lo, hiword (ofwords hi lo) = hi.\nProof.\n  intros. apply Int.same_bits_eq; intros.\n  rewrite bits_hiword; auto. rewrite bits_ofwords.\n  rewrite zlt_false. f_equal. omega. omega.\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity. omega.\nQed.\n\nLemma ofwords_recompose:\n  forall n, ofwords (hiword n) (loword n) = n.\nProof.\n  intros. apply same_bits_eq; intros. rewrite bits_ofwords; auto.\n  destruct (zlt i Int.zwordsize).\n  apply bits_loword. omega.\n  rewrite bits_hiword. f_equal. omega.\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity. omega.\nQed.\n\nLemma ofwords_add:\n  forall lo hi, ofwords hi lo = repr (Int.unsigned hi * two_p 32 + Int.unsigned lo).\nProof.\n  intros. unfold ofwords. rewrite shifted_or_is_add.\n  apply eqm_samerepr. apply eqm_add. apply eqm_mult.\n  apply eqm_sym; apply eqm_unsigned_repr.\n  apply eqm_refl.\n  apply eqm_sym; apply eqm_unsigned_repr.\n  change Int.zwordsize with 32; change zwordsize with 64; omega.\n  rewrite unsigned_repr. generalize (Int.unsigned_range lo). intros [A B]. exact B.\n  assert (Int.max_unsigned < max_unsigned) by (compute; auto).\n  generalize (Int.unsigned_range_2 lo); omega.\nQed.\n\nLemma ofwords_add':\n  forall lo hi, unsigned (ofwords hi lo) = Int.unsigned hi * two_p 32 + Int.unsigned lo.\nProof.\n  intros. rewrite ofwords_add. apply unsigned_repr.\n  generalize (Int.unsigned_range hi) (Int.unsigned_range lo).\n  change (two_p 32) with Int.modulus.\n  change Int.modulus with 4294967296.\n  change max_unsigned with 18446744073709551615.\n  omega.\nQed.\n\nRemark eqm_mul_2p32:\n  forall x y, Int.eqm x y -> eqm (x * two_p 32) (y * two_p 32).\nProof.\n  intros. destruct H as [k EQ]. exists k. rewrite EQ.\n  change Int.modulus with (two_p 32).\n  change modulus with (two_p 32 * two_p 32).\n  ring.\nQed.\n\nLemma ofwords_add'':\n  forall lo hi, signed (ofwords hi lo) = Int.signed hi * two_p 32 + Int.unsigned lo.\nProof.\n  intros. rewrite ofwords_add.\n  replace (repr (Int.unsigned hi * two_p 32 + Int.unsigned lo))\n     with (repr (Int.signed hi * two_p 32 + Int.unsigned lo)).\n  apply signed_repr.\n  generalize (Int.signed_range hi) (Int.unsigned_range lo).\n  change (two_p 32) with Int.modulus.\n  change min_signed with (Int.min_signed * Int.modulus).\n  change max_signed with (Int.max_signed * Int.modulus + Int.modulus - 1).\n  change Int.modulus with 4294967296.\n  omega.\n  apply eqm_samerepr. apply eqm_add. apply eqm_mul_2p32. apply Int.eqm_signed_unsigned. apply eqm_refl.\nQed.\n\n(** Expressing 64-bit operations in terms of 32-bit operations *)\n\nLemma decompose_bitwise_binop:\n  forall f f64 f32 xh xl yh yl,\n  (forall x y i, 0 <= i < zwordsize -> testbit (f64 x y) i = f (testbit x i) (testbit y i)) ->\n  (forall x y i, 0 <= i < Int.zwordsize -> Int.testbit (f32 x y) i = f (Int.testbit x i) (Int.testbit y i)) ->\n  f64 (ofwords xh xl) (ofwords yh yl) = ofwords (f32 xh yh) (f32 xl yl).\nProof.\n  intros. apply Int64.same_bits_eq; intros.\n  rewrite H by auto. rewrite ! bits_ofwords by auto.\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity.\n  destruct (zlt i Int.zwordsize); rewrite H0 by omega; auto.\nQed.\n\nLemma decompose_and:\n  forall xh xl yh yl,\n  and (ofwords xh xl) (ofwords yh yl) = ofwords (Int.and xh yh) (Int.and xl yl).\nProof.\n  intros. apply decompose_bitwise_binop with andb.\n  apply bits_and. apply Int.bits_and.\nQed.\n\nLemma decompose_or:\n  forall xh xl yh yl,\n  or (ofwords xh xl) (ofwords yh yl) = ofwords (Int.or xh yh) (Int.or xl yl).\nProof.\n  intros. apply decompose_bitwise_binop with orb.\n  apply bits_or. apply Int.bits_or.\nQed.\n\nLemma decompose_xor:\n  forall xh xl yh yl,\n  xor (ofwords xh xl) (ofwords yh yl) = ofwords (Int.xor xh yh) (Int.xor xl yl).\nProof.\n  intros. apply decompose_bitwise_binop with xorb.\n  apply bits_xor. apply Int.bits_xor.\nQed.\n\nLemma decompose_not:\n  forall xh xl,\n  not (ofwords xh xl) = ofwords (Int.not xh) (Int.not xl).\nProof.\n  intros. unfold not, Int.not. rewrite <- decompose_xor. f_equal.\n  apply (Int64.eq_spec mone (ofwords Int.mone Int.mone)).\nQed.\n\nLemma decompose_shl_1:\n  forall xh xl y,\n  0 <= Int.unsigned y < Int.zwordsize ->\n  shl' (ofwords xh xl) y =\n  ofwords (Int.or (Int.shl xh y) (Int.shru xl (Int.sub Int.iwordsize y)))\n          (Int.shl xl y).\nProof.\n  intros.\n  assert (Int.unsigned (Int.sub Int.iwordsize y) = Int.zwordsize - Int.unsigned y).\n  { unfold Int.sub. rewrite Int.unsigned_repr. auto.\n    rewrite Int.unsigned_repr_wordsize. generalize Int.wordsize_max_unsigned; omega. }\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity.\n  apply Int64.same_bits_eq; intros.\n  rewrite bits_shl' by auto. symmetry. rewrite bits_ofwords by auto.\n  destruct (zlt i Int.zwordsize). rewrite Int.bits_shl by omega.\n  destruct (zlt i (Int.unsigned y)). auto.\n  rewrite bits_ofwords by omega. rewrite zlt_true by omega. auto.\n  rewrite zlt_false by omega. rewrite bits_ofwords by omega.\n  rewrite Int.bits_or by omega. rewrite Int.bits_shl by omega.\n  rewrite Int.bits_shru by omega. rewrite H0.\n  destruct (zlt (i - Int.unsigned y) (Int.zwordsize)).\n  rewrite zlt_true by omega. rewrite zlt_true by omega.\n  rewrite orb_false_l. f_equal. omega.\n  rewrite zlt_false by omega. rewrite zlt_false by omega.\n  rewrite orb_false_r. f_equal. omega.\nQed.\n\nLemma decompose_shl_2:\n  forall xh xl y,\n  Int.zwordsize <= Int.unsigned y < zwordsize ->\n  shl' (ofwords xh xl) y =\n  ofwords (Int.shl xl (Int.sub y Int.iwordsize)) Int.zero.\nProof.\n  intros.\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity.\n  assert (Int.unsigned (Int.sub y Int.iwordsize) = Int.unsigned y - Int.zwordsize).\n  { unfold Int.sub. rewrite Int.unsigned_repr. auto.\n    rewrite Int.unsigned_repr_wordsize. generalize (Int.unsigned_range_2 y). omega. }\n  apply Int64.same_bits_eq; intros.\n  rewrite bits_shl' by auto. symmetry. rewrite bits_ofwords by auto.\n  destruct (zlt i Int.zwordsize). rewrite zlt_true by omega. apply Int.bits_zero.\n  rewrite Int.bits_shl by omega.\n  destruct (zlt i (Int.unsigned y)).\n  rewrite zlt_true by omega. auto.\n  rewrite zlt_false by omega.\n  rewrite bits_ofwords by omega. rewrite zlt_true by omega. f_equal. omega.\nQed.\n\nLemma decompose_shru_1:\n  forall xh xl y,\n  0 <= Int.unsigned y < Int.zwordsize ->\n  shru' (ofwords xh xl) y =\n  ofwords (Int.shru xh y)\n          (Int.or (Int.shru xl y) (Int.shl xh (Int.sub Int.iwordsize y))).\nProof.\n  intros.\n  assert (Int.unsigned (Int.sub Int.iwordsize y) = Int.zwordsize - Int.unsigned y).\n  { unfold Int.sub. rewrite Int.unsigned_repr. auto.\n    rewrite Int.unsigned_repr_wordsize. generalize Int.wordsize_max_unsigned; omega. }\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity.\n  apply Int64.same_bits_eq; intros.\n  rewrite bits_shru' by auto. symmetry. rewrite bits_ofwords by auto.\n  destruct (zlt i Int.zwordsize).\n  rewrite zlt_true by omega.\n  rewrite bits_ofwords by omega.\n  rewrite Int.bits_or by omega. rewrite Int.bits_shl by omega.\n  rewrite Int.bits_shru by omega. rewrite H0.\n  destruct (zlt (i + Int.unsigned y) (Int.zwordsize)).\n  rewrite zlt_true by omega.\n  rewrite orb_false_r. auto.\n  rewrite zlt_false by omega.\n  rewrite orb_false_l. f_equal. omega.\n  rewrite Int.bits_shru by omega.\n  destruct (zlt (i + Int.unsigned y) zwordsize).\n  rewrite bits_ofwords by omega.\n  rewrite zlt_true by omega. rewrite zlt_false by omega. f_equal. omega.\n  rewrite zlt_false by omega. auto.\nQed.\n\nLemma decompose_shru_2:\n  forall xh xl y,\n  Int.zwordsize <= Int.unsigned y < zwordsize ->\n  shru' (ofwords xh xl) y =\n  ofwords Int.zero (Int.shru xh (Int.sub y Int.iwordsize)).\nProof.\n  intros.\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity.\n  assert (Int.unsigned (Int.sub y Int.iwordsize) = Int.unsigned y - Int.zwordsize).\n  { unfold Int.sub. rewrite Int.unsigned_repr. auto.\n    rewrite Int.unsigned_repr_wordsize. generalize (Int.unsigned_range_2 y). omega. }\n  apply Int64.same_bits_eq; intros.\n  rewrite bits_shru' by auto. symmetry. rewrite bits_ofwords by auto.\n  destruct (zlt i Int.zwordsize).\n  rewrite Int.bits_shru by omega. rewrite H1.\n  destruct (zlt (i + Int.unsigned y) zwordsize).\n  rewrite zlt_true by omega. rewrite bits_ofwords by omega.\n  rewrite zlt_false by omega. f_equal; omega.\n  rewrite zlt_false by omega. auto.\n  rewrite zlt_false by omega. apply Int.bits_zero.\nQed.\n\nLemma decompose_shr_1:\n  forall xh xl y,\n  0 <= Int.unsigned y < Int.zwordsize ->\n  shr' (ofwords xh xl) y =\n  ofwords (Int.shr xh y)\n          (Int.or (Int.shru xl y) (Int.shl xh (Int.sub Int.iwordsize y))).\nProof.\n  intros.\n  assert (Int.unsigned (Int.sub Int.iwordsize y) = Int.zwordsize - Int.unsigned y).\n  { unfold Int.sub. rewrite Int.unsigned_repr. auto.\n    rewrite Int.unsigned_repr_wordsize. generalize Int.wordsize_max_unsigned; omega. }\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity.\n  apply Int64.same_bits_eq; intros.\n  rewrite bits_shr' by auto. symmetry. rewrite bits_ofwords by auto.\n  destruct (zlt i Int.zwordsize).\n  rewrite zlt_true by omega.\n  rewrite bits_ofwords by omega.\n  rewrite Int.bits_or by omega. rewrite Int.bits_shl by omega.\n  rewrite Int.bits_shru by omega. rewrite H0.\n  destruct (zlt (i + Int.unsigned y) (Int.zwordsize)).\n  rewrite zlt_true by omega.\n  rewrite orb_false_r. auto.\n  rewrite zlt_false by omega.\n  rewrite orb_false_l. f_equal. omega.\n  rewrite Int.bits_shr by omega.\n  destruct (zlt (i + Int.unsigned y) zwordsize).\n  rewrite bits_ofwords by omega.\n  rewrite zlt_true by omega. rewrite zlt_false by omega. f_equal. omega.\n  rewrite zlt_false by omega. rewrite bits_ofwords by omega.\n  rewrite zlt_false by omega. f_equal.\nQed.\n\nLemma decompose_shr_2:\n  forall xh xl y,\n  Int.zwordsize <= Int.unsigned y < zwordsize ->\n  shr' (ofwords xh xl) y =\n  ofwords (Int.shr xh (Int.sub Int.iwordsize Int.one))\n          (Int.shr xh (Int.sub y Int.iwordsize)).\nProof.\n  intros.\n  assert (zwordsize = 2 * Int.zwordsize) by reflexivity.\n  assert (Int.unsigned (Int.sub y Int.iwordsize) = Int.unsigned y - Int.zwordsize).\n  { unfold Int.sub. rewrite Int.unsigned_repr. auto.\n    rewrite Int.unsigned_repr_wordsize. generalize (Int.unsigned_range_2 y). omega. }\n  apply Int64.same_bits_eq; intros.\n  rewrite bits_shr' by auto. symmetry. rewrite bits_ofwords by auto.\n  destruct (zlt i Int.zwordsize).\n  rewrite Int.bits_shr by omega. rewrite H1.\n  destruct (zlt (i + Int.unsigned y) zwordsize).\n  rewrite zlt_true by omega. rewrite bits_ofwords by omega.\n  rewrite zlt_false by omega. f_equal; omega.\n  rewrite zlt_false by omega. rewrite bits_ofwords by omega.\n  rewrite zlt_false by omega. auto.\n  rewrite Int.bits_shr by omega.\n  change (Int.unsigned (Int.sub Int.iwordsize Int.one)) with (Int.zwordsize - 1).\n  destruct (zlt (i + Int.unsigned y) zwordsize);\n  rewrite bits_ofwords by omega.\n  symmetry. rewrite zlt_false by omega. f_equal.\n  destruct (zlt (i - Int.zwordsize + (Int.zwordsize - 1)) Int.zwordsize); omega.\n  symmetry. rewrite zlt_false by omega. f_equal.\n  destruct (zlt (i - Int.zwordsize + (Int.zwordsize - 1)) Int.zwordsize); omega.\nQed.\n\nLemma decompose_add:\n  forall xh xl yh yl,\n  add (ofwords xh xl) (ofwords yh yl) =\n  ofwords (Int.add (Int.add xh yh) (Int.add_carry xl yl Int.zero))\n          (Int.add xl yl).\nProof.\n  intros. symmetry. rewrite ofwords_add. rewrite add_unsigned.\n  apply eqm_samerepr.\n  rewrite ! ofwords_add'. rewrite (Int.unsigned_add_carry xl yl).\n  set (cc := Int.add_carry xl yl Int.zero).\n  set (Xl := Int.unsigned xl); set (Xh := Int.unsigned xh);\n  set (Yl := Int.unsigned yl); set (Yh := Int.unsigned yh).\n  change Int.modulus with (two_p 32).\n  replace (Xh * two_p 32 + Xl + (Yh * two_p 32 + Yl))\n     with ((Xh + Yh) * two_p 32 + (Xl + Yl)) by ring.\n  replace (Int.unsigned (Int.add (Int.add xh yh) cc) * two_p 32 +\n              (Xl + Yl - Int.unsigned cc * two_p 32))\n     with ((Int.unsigned (Int.add (Int.add xh yh) cc) - Int.unsigned cc) * two_p 32\n           + (Xl + Yl)) by ring.\n  apply eqm_add. 2: apply eqm_refl. apply eqm_mul_2p32.\n  replace (Xh + Yh) with ((Xh + Yh + Int.unsigned cc) - Int.unsigned cc) by ring.\n  apply Int.eqm_sub. 2: apply Int.eqm_refl.\n  apply Int.eqm_unsigned_repr_l. apply Int.eqm_add. 2: apply Int.eqm_refl.\n  apply Int.eqm_unsigned_repr_l. apply Int.eqm_refl.\nQed.\n\nLemma decompose_sub:\n  forall xh xl yh yl,\n  sub (ofwords xh xl) (ofwords yh yl) =\n  ofwords (Int.sub (Int.sub xh yh) (Int.sub_borrow xl yl Int.zero))\n          (Int.sub xl yl).\nProof.\n  intros. symmetry. rewrite ofwords_add.\n  apply eqm_samerepr.\n  rewrite ! ofwords_add'. rewrite (Int.unsigned_sub_borrow xl yl).\n  set (bb := Int.sub_borrow xl yl Int.zero).\n  set (Xl := Int.unsigned xl); set (Xh := Int.unsigned xh);\n  set (Yl := Int.unsigned yl); set (Yh := Int.unsigned yh).\n  change Int.modulus with (two_p 32).\n  replace (Xh * two_p 32 + Xl - (Yh * two_p 32 + Yl))\n     with ((Xh - Yh) * two_p 32 + (Xl - Yl)) by ring.\n  replace (Int.unsigned (Int.sub (Int.sub xh yh) bb) * two_p 32 +\n              (Xl - Yl + Int.unsigned bb * two_p 32))\n     with ((Int.unsigned (Int.sub (Int.sub xh yh) bb) + Int.unsigned bb) * two_p 32\n           + (Xl - Yl)) by ring.\n  apply eqm_add. 2: apply eqm_refl. apply eqm_mul_2p32.\n  replace (Xh - Yh) with ((Xh - Yh - Int.unsigned bb) + Int.unsigned bb) by ring.\n  apply Int.eqm_add. 2: apply Int.eqm_refl.\n  apply Int.eqm_unsigned_repr_l. apply Int.eqm_add. 2: apply Int.eqm_refl.\n  apply Int.eqm_unsigned_repr_l. apply Int.eqm_refl.\nQed.\n\nLemma decompose_sub':\n  forall xh xl yh yl,\n  sub (ofwords xh xl) (ofwords yh yl) =\n  ofwords (Int.add (Int.add xh (Int.not yh)) (Int.add_carry xl (Int.not yl) Int.one))\n          (Int.sub xl yl).\nProof.\n  intros. rewrite decompose_sub. f_equal.\n  rewrite Int.sub_borrow_add_carry by auto.\n  rewrite Int.sub_add_not_3. rewrite Int.xor_assoc. rewrite Int.xor_idem.\n  rewrite Int.xor_zero. auto.\n  rewrite Int.xor_zero_l. unfold Int.add_carry.\n  destruct (zlt (Int.unsigned xl + Int.unsigned (Int.not yl) + Int.unsigned Int.one) Int.modulus);\n  compute; [right|left]; apply Int.mkint_eq; auto.\nQed.\n\nDefinition mul' (x y: Int.int) : int := repr (Int.unsigned x * Int.unsigned y).\n\nLemma mul'_mulhu:\n  forall x y, mul' x y = ofwords (Int.mulhu x y) (Int.mul x y).\nProof.\n  intros.\n  rewrite ofwords_add. unfold mul', Int.mulhu, Int.mul.\n  set (p := Int.unsigned x * Int.unsigned y).\n  set (ph := p / Int.modulus). set (pl := p mod Int.modulus).\n  transitivity (repr (ph * Int.modulus + pl)).\n- f_equal. rewrite Zmult_comm. apply Z_div_mod_eq. apply Int.modulus_pos.\n- apply eqm_samerepr. apply eqm_add. apply eqm_mul_2p32. auto with ints.\n  rewrite Int.unsigned_repr_eq. apply eqm_refl.\nQed.\n\nLemma decompose_mul:\n  forall xh xl yh yl,\n  mul (ofwords xh xl) (ofwords yh yl) =\n  ofwords (Int.add (Int.add (hiword (mul' xl yl)) (Int.mul xl yh)) (Int.mul xh yl))\n          (loword (mul' xl yl)).\nProof.\n  intros.\n  set (pl := loword (mul' xl yl)); set (ph := hiword (mul' xl yl)).\n  assert (EQ0: unsigned (mul' xl yl) = Int.unsigned ph * two_p 32 + Int.unsigned pl).\n  { rewrite <- (ofwords_recompose (mul' xl yl)). apply ofwords_add'. }\n  symmetry. rewrite ofwords_add. unfold mul. rewrite !ofwords_add'.\n  set (XL := Int.unsigned xl); set (XH := Int.unsigned xh);\n  set (YL := Int.unsigned yl); set (YH := Int.unsigned yh).\n  set (PH := Int.unsigned ph) in *. set (PL := Int.unsigned pl) in *.\n  transitivity (repr (((PH + XL * YH) + XH * YL) * two_p 32 + PL)).\n  apply eqm_samerepr. apply eqm_add. 2: apply eqm_refl.\n  apply eqm_mul_2p32.\n  rewrite Int.add_unsigned. apply Int.eqm_unsigned_repr_l. apply Int.eqm_add.\n  rewrite Int.add_unsigned. apply Int.eqm_unsigned_repr_l. apply Int.eqm_add.\n  apply Int.eqm_refl.\n  unfold Int.mul. apply Int.eqm_unsigned_repr_l. apply Int.eqm_refl.\n  unfold Int.mul. apply Int.eqm_unsigned_repr_l. apply Int.eqm_refl.\n  transitivity (repr (unsigned (mul' xl yl) + (XL * YH + XH * YL) * two_p 32)).\n  rewrite EQ0. f_equal. ring.\n  transitivity (repr ((XL * YL + (XL * YH + XH * YL) * two_p 32))).\n  apply eqm_samerepr. apply eqm_add. 2: apply eqm_refl.\n  unfold mul'. apply eqm_unsigned_repr_l. apply eqm_refl.\n  transitivity (repr (0 + (XL * YL + (XL * YH + XH * YL) * two_p 32))).\n  rewrite Zplus_0_l; auto.\n  transitivity (repr (XH * YH * (two_p 32 * two_p 32) + (XL * YL + (XL * YH + XH * YL) * two_p 32))).\n  apply eqm_samerepr. apply eqm_add. 2: apply eqm_refl.\n  change (two_p 32 * two_p 32) with modulus. exists (- XH * YH). ring.\n  f_equal. ring.\nQed.\n\nLemma decompose_mul_2:\n  forall xh xl yh yl,\n  mul (ofwords xh xl) (ofwords yh yl) =\n  ofwords (Int.add (Int.add (Int.mulhu xl yl) (Int.mul xl yh)) (Int.mul xh yl))\n          (Int.mul xl yl).\nProof.\n  intros. rewrite decompose_mul. rewrite mul'_mulhu.\n  rewrite hi_ofwords, lo_ofwords. auto.\nQed.\n\nLemma decompose_ltu:\n  forall xh xl yh yl,\n  ltu (ofwords xh xl) (ofwords yh yl) = if Int.eq xh yh then Int.ltu xl yl else Int.ltu xh yh.\nProof.\n  intros. unfold ltu. rewrite ! ofwords_add'. unfold Int.ltu, Int.eq.\n  destruct (zeq (Int.unsigned xh) (Int.unsigned yh)).\n  rewrite e. destruct (zlt (Int.unsigned xl) (Int.unsigned yl)).\n  apply zlt_true; omega.\n  apply zlt_false; omega.\n  change (two_p 32) with Int.modulus.\n  generalize (Int.unsigned_range xl) (Int.unsigned_range yl).\n  change Int.modulus with 4294967296. intros.\n  destruct (zlt (Int.unsigned xh) (Int.unsigned yh)).\n  apply zlt_true; omega.\n  apply zlt_false; omega.\nQed.\n\nLemma decompose_leu:\n  forall xh xl yh yl,\n  negb (ltu (ofwords yh yl) (ofwords xh xl)) =\n  if Int.eq xh yh then negb (Int.ltu yl xl) else Int.ltu xh yh.\nProof.\n  intros. rewrite decompose_ltu. rewrite Int.eq_sym.\n  unfold Int.eq. destruct (zeq (Int.unsigned xh) (Int.unsigned yh)).\n  auto.\n  unfold Int.ltu. destruct (zlt (Int.unsigned xh) (Int.unsigned yh)).\n  rewrite zlt_false by omega; auto.\n  rewrite zlt_true by omega; auto.\nQed.\n\nLemma decompose_lt:\n  forall xh xl yh yl,\n  lt (ofwords xh xl) (ofwords yh yl) = if Int.eq xh yh then Int.ltu xl yl else Int.lt xh yh.\nProof.\n  intros. unfold lt. rewrite ! ofwords_add''. rewrite Int.eq_signed.\n  destruct (zeq (Int.signed xh) (Int.signed yh)).\n  rewrite e. unfold Int.ltu. destruct (zlt (Int.unsigned xl) (Int.unsigned yl)).\n  apply zlt_true; omega.\n  apply zlt_false; omega.\n  change (two_p 32) with Int.modulus.\n  generalize (Int.unsigned_range xl) (Int.unsigned_range yl).\n  change Int.modulus with 4294967296. intros.\n  unfold Int.lt. destruct (zlt (Int.signed xh) (Int.signed yh)).\n  apply zlt_true; omega.\n  apply zlt_false; omega.\nQed.\n\nLemma decompose_le:\n  forall xh xl yh yl,\n  negb (lt (ofwords yh yl) (ofwords xh xl)) =\n  if Int.eq xh yh then negb (Int.ltu yl xl) else Int.lt xh yh.\nProof.\n  intros. rewrite decompose_lt. rewrite Int.eq_sym.\n  rewrite Int.eq_signed. destruct (zeq (Int.signed xh) (Int.signed yh)).\n  auto.\n  unfold Int.lt. destruct (zlt (Int.signed xh) (Int.signed yh)).\n  rewrite zlt_false by omega; auto.\n  rewrite zlt_true by omega; auto.\nQed.\n\n(** Utility proofs for mixed 32bit and 64bit arithmetic *)\n\nRemark int_unsigned_range:\n  forall x, 0 <= Int.unsigned x <= max_unsigned.\nProof.\n  intros.\n  unfold max_unsigned. unfold modulus.\n  generalize (Int.unsigned_range x).\n  unfold Int.modulus in *.\n  change (wordsize) with  64%nat in *.\n  change (Int.wordsize) with 32%nat in *.\n  unfold two_power_nat. simpl.\n  omega.\nQed.\n\nRemark int_unsigned_repr:\n  forall x, unsigned (repr (Int.unsigned x)) = Int.unsigned x.\nProof.\n  intros. rewrite unsigned_repr. auto.\n  apply int_unsigned_range.\nQed.\n\nLemma int_sub_ltu:\n  forall x y,\n    Int.ltu x y= true ->\n    Int.unsigned (Int.sub y x) = unsigned (sub (repr (Int.unsigned y)) (repr (Int.unsigned x))).\nProof.\n  intros. generalize (Int.sub_ltu x y H). intros. unfold Int.sub. unfold sub.\n  rewrite Int.unsigned_repr. rewrite unsigned_repr.\n  rewrite unsigned_repr by apply int_unsigned_range. rewrite int_unsigned_repr. reflexivity.\n  rewrite unsigned_repr by apply int_unsigned_range.\n  rewrite int_unsigned_repr. generalize (int_unsigned_range y).\n  omega.\n  generalize (Int.sub_ltu x y H). intros.\n  generalize (Int.unsigned_range_2 y). intros. omega.\nQed.\n\nEnd Int64.\n\nStrategy 0 [Wordsize_64.wordsize].\n\nNotation int64 := Int64.int.\n\nGlobal Opaque Int.repr Int64.repr Byte.repr.\n\n(** * Specialization to offsets in pointer values *)\n\n(* Module Wordsize_Ptrofs. *)\n(*   Definition wordsize := if Archi.ptr64 then 64%nat else 32%nat. *)\n(*   Remark wordsize_not_zero: wordsize <> 0%nat. *)\n(*   Proof. unfold wordsize; destruct Archi.ptr64; congruence. Qed. *)\n(* End Wordsize_Ptrofs. *)\n\n(* Strategy opaque [Wordsize_Ptrofs.wordsize]. *)\n\n(* Module Ptrofs. *)\n\n(* Include Make(Wordsize_Ptrofs). *)\n\n(* Definition to_int (x: int): Int.int := Int.repr (unsigned x). *)\n\n(* Definition to_int64 (x: int): Int64.int := Int64.repr (unsigned x). *)\n\n(* Definition of_int (x: Int.int) : int := repr (Int.unsigned x). *)\n\n(* Definition of_intu := of_int. *)\n\n(* Definition of_ints (x: Int.int) : int := repr (Int.signed x). *)\n\n(* Definition of_int64 (x: Int64.int) : int := repr (Int64.unsigned x). *)\n\n(* Definition of_int64u := of_int64. *)\n\n(* Definition of_int64s (x: Int64.int) : int := repr (Int64.signed x). *)\n\n(* Section AGREE32. *)\n\n(* Hypothesis _32: Archi.ptr64 = false. *)\n\n(* Lemma modulus_eq32: modulus = Int.modulus. *)\n(* Proof. *)\n(*   unfold modulus, wordsize. *)\n(*   change Wordsize_Ptrofs.wordsize with (if Archi.ptr64 then 64%nat else 32%nat). *)\n(*   rewrite _32. reflexivity. *)\n(* Qed. *)\n\n(* Lemma eqm32: *)\n(*   forall x y, Int.eqm x y <-> eqm x y. *)\n(* Proof. *)\n(*   intros. unfold Int.eqm, eqm. rewrite modulus_eq32; tauto. *)\n(* Qed. *)\n\n(* Definition agree32 (a: Ptrofs.int) (b: Int.int) : Prop := *)\n(*   Ptrofs.unsigned a = Int.unsigned b. *)\n\n(* Lemma agree32_repr: *)\n(*   forall i, agree32 (Ptrofs.repr i) (Int.repr i). *)\n(* Proof. *)\n(*   intros; red. rewrite Ptrofs.unsigned_repr_eq, Int.unsigned_repr_eq. *)\n(*   apply f_equal2. auto. apply modulus_eq32. *)\n(* Qed. *)\n\n(* Lemma agree32_signed: *)\n(*   forall a b, agree32 a b -> Ptrofs.signed a = Int.signed b. *)\n(* Proof. *)\n(*   unfold agree32; intros. unfold signed, Int.signed, half_modulus, Int.half_modulus. *)\n(*   rewrite modulus_eq32. rewrite H. auto. *)\n(* Qed. *)\n\n(* Lemma agree32_of_int: *)\n(*   forall b, agree32 (of_int b) b. *)\n(* Proof. *)\n(*   unfold of_int; intros. rewrite <- (Int.repr_unsigned b) at 2. apply agree32_repr. *)\n(* Qed. *)\n\n(* Lemma agree32_of_ints: *)\n(*   forall b, agree32 (of_ints b) b. *)\n(* Proof. *)\n(*   unfold of_int; intros. rewrite <- (Int.repr_signed b) at 2. apply agree32_repr. *)\n(* Qed. *)\n\n(* Lemma agree32_of_int_eq: *)\n(*   forall a b, agree32 a b -> of_int b = a. *)\n(* Proof. *)\n(*   unfold agree32, of_int; intros. rewrite <- H. apply repr_unsigned. *)\n(* Qed. *)\n\n(* Lemma agree32_of_ints_eq: *)\n(*   forall a b, agree32 a b -> of_ints b = a. *)\n(* Proof. *)\n(*   unfold of_ints; intros. erewrite <- agree32_signed by eauto. apply repr_signed. *)\n(* Qed. *)\n\n(* Lemma agree32_to_int: *)\n(*   forall a, agree32 a (to_int a). *)\n(* Proof. *)\n(*   unfold agree32, to_int; intros. rewrite <- (agree32_repr (unsigned a)). *)\n(*   rewrite repr_unsigned; auto. *)\n(* Qed. *)\n\n(* Lemma agree32_to_int_eq: *)\n(*   forall a b, agree32 a b -> to_int a = b. *)\n(* Proof. *)\n(*   unfold agree32, to_int; intros. rewrite H. apply Int.repr_unsigned. *)\n(* Qed. *)\n\n(* Lemma agree32_neg: *)\n(*   forall a1 b1, agree32 a1 b1 -> agree32 (Ptrofs.neg a1) (Int.neg b1). *)\n(* Proof. *)\n(*   unfold agree32, Ptrofs.neg, Int.neg; intros. rewrite H. apply agree32_repr. *)\n(* Qed. *)\n\n(* Lemma agree32_add: *)\n(*   forall a1 b1 a2 b2, *)\n(*   agree32 a1 b1 -> agree32 a2 b2 -> agree32 (Ptrofs.add a1 a2) (Int.add b1 b2). *)\n(* Proof. *)\n(*   unfold agree32, Ptrofs.add, Int.add; intros. rewrite H, H0. apply agree32_repr. *)\n(* Qed. *)\n\n(* Lemma agree32_sub: *)\n(*   forall a1 b1 a2 b2, *)\n(*   agree32 a1 b1 -> agree32 a2 b2 -> agree32 (Ptrofs.sub a1 a2) (Int.sub b1 b2). *)\n(* Proof. *)\n(*   unfold agree32, Ptrofs.sub, Int.sub; intros. rewrite H, H0. apply agree32_repr. *)\n(* Qed. *)\n\n(* Lemma agree32_mul: *)\n(*   forall a1 b1 a2 b2, *)\n(*   agree32 a1 b1 -> agree32 a2 b2 -> agree32 (Ptrofs.mul a1 a2) (Int.mul b1 b2). *)\n(* Proof. *)\n(*   unfold agree32, Ptrofs.mul, Int.mul; intros. rewrite H, H0. apply agree32_repr. *)\n(* Qed. *)\n\n(* Lemma agree32_divs: *)\n(*   forall a1 b1 a2 b2, *)\n(*   agree32 a1 b1 -> agree32 a2 b2 -> agree32 (Ptrofs.divs a1 a2) (Int.divs b1 b2). *)\n(* Proof. *)\n(*   intros; unfold agree32, Ptrofs.divs, Int.divs. *)\n(*   erewrite ! agree32_signed by eauto. apply agree32_repr. *)\n(* Qed. *)\n\n(* Lemma of_int_to_int: *)\n(*   forall n, of_int (to_int n) = n. *)\n(* Proof. *)\n(*   intros; unfold of_int, to_int. apply eqm_repr_eq. rewrite <- eqm32. *)\n(*   apply Int.eqm_sym; apply Int.eqm_unsigned_repr. *)\n(* Qed. *)\n\n(* End AGREE32. *)\n\n(* Section AGREE64. *)\n\n(* Hypothesis _64: Archi.ptr64 = true. *)\n\n(* Lemma modulus_eq64: modulus = Int64.modulus. *)\n(* Proof. *)\n(*   unfold modulus, wordsize. *)\n(*   change Wordsize_Ptrofs.wordsize with (if Archi.ptr64 then 64%nat else 32%nat). *)\n(*   rewrite _64. reflexivity. *)\n(* Qed. *)\n\n(* Lemma eqm64: *)\n(*   forall x y, Int64.eqm x y <-> eqm x y. *)\n(* Proof. *)\n(*   intros. unfold Int64.eqm, eqm. rewrite modulus_eq64; tauto. *)\n(* Qed. *)\n\n(* Definition agree64 (a: Ptrofs.int) (b: Int64.int) : Prop := *)\n(*   Ptrofs.unsigned a = Int64.unsigned b. *)\n\n(* Lemma agree64_repr: *)\n(*   forall i, agree64 (Ptrofs.repr i) (Int64.repr i). *)\n(* Proof. *)\n(*   intros; red. rewrite Ptrofs.unsigned_repr_eq, Int64.unsigned_repr_eq. *)\n(*   apply f_equal2. auto. apply modulus_eq64. *)\n(* Qed. *)\n\n(* Lemma agree64_signed: *)\n(*   forall a b, agree64 a b -> Ptrofs.signed a = Int64.signed b. *)\n(* Proof. *)\n(*   unfold agree64; intros. unfold signed, Int64.signed, half_modulus, Int64.half_modulus. *)\n(*   rewrite modulus_eq64. rewrite H. auto. *)\n(* Qed. *)\n\n(* Lemma agree64_of_int: *)\n(*   forall b, agree64 (of_int64 b) b. *)\n(* Proof. *)\n(*   unfold of_int64; intros. rewrite <- (Int64.repr_unsigned b) at 2. apply agree64_repr. *)\n(* Qed. *)\n\n(* Lemma agree64_of_int_eq: *)\n(*   forall a b, agree64 a b -> of_int64 b = a. *)\n(* Proof. *)\n(*   unfold agree64, of_int64; intros. rewrite <- H. apply repr_unsigned. *)\n(* Qed. *)\n\n(* Lemma agree64_to_int: *)\n(*   forall a, agree64 a (to_int64 a). *)\n(* Proof. *)\n(*   unfold agree64, to_int64; intros. rewrite <- (agree64_repr (unsigned a)). *)\n(*   rewrite repr_unsigned; auto. *)\n(* Qed. *)\n\n(* Lemma agree64_to_int_eq: *)\n(*   forall a b, agree64 a b -> to_int64 a = b. *)\n(* Proof. *)\n(*   unfold agree64, to_int64; intros. rewrite H. apply Int64.repr_unsigned. *)\n(* Qed. *)\n\n(* Lemma agree64_neg: *)\n(*   forall a1 b1, agree64 a1 b1 -> agree64 (Ptrofs.neg a1) (Int64.neg b1). *)\n(* Proof. *)\n(*   unfold agree64, Ptrofs.neg, Int64.neg; intros. rewrite H. apply agree64_repr. *)\n(* Qed. *)\n\n(* Lemma agree64_add: *)\n(*   forall a1 b1 a2 b2, *)\n(*   agree64 a1 b1 -> agree64 a2 b2 -> agree64 (Ptrofs.add a1 a2) (Int64.add b1 b2). *)\n(* Proof. *)\n(*   unfold agree64, Ptrofs.add, Int.add; intros. rewrite H, H0. apply agree64_repr. *)\n(* Qed. *)\n\n(* Lemma agree64_sub: *)\n(*   forall a1 b1 a2 b2, *)\n(*   agree64 a1 b1 -> agree64 a2 b2 -> agree64 (Ptrofs.sub a1 a2) (Int64.sub b1 b2). *)\n(* Proof. *)\n(*   unfold agree64, Ptrofs.sub, Int.sub; intros. rewrite H, H0. apply agree64_repr. *)\n(* Qed. *)\n\n(* Lemma agree64_mul: *)\n(*   forall a1 b1 a2 b2, *)\n(*   agree64 a1 b1 -> agree64 a2 b2 -> agree64 (Ptrofs.mul a1 a2) (Int64.mul b1 b2). *)\n(* Proof. *)\n(*   unfold agree64, Ptrofs.mul, Int.mul; intros. rewrite H, H0. apply agree64_repr. *)\n(* Qed. *)\n\n(* Lemma agree64_divs: *)\n(*   forall a1 b1 a2 b2, *)\n(*   agree64 a1 b1 -> agree64 a2 b2 -> agree64 (Ptrofs.divs a1 a2) (Int64.divs b1 b2). *)\n(* Proof. *)\n(*   intros; unfold agree64, Ptrofs.divs, Int64.divs. *)\n(*   erewrite ! agree64_signed by eauto. apply agree64_repr. *)\n(* Qed. *)\n\n(* Lemma of_int64_to_int64: *)\n(*   forall n, of_int64 (to_int64 n) = n. *)\n(* Proof. *)\n(*   intros; unfold of_int64, to_int64. apply eqm_repr_eq. rewrite <- eqm64. *)\n(*   apply Int64.eqm_sym; apply Int64.eqm_unsigned_repr. *)\n(* Qed. *)\n\n(* End AGREE64. *)\n\n(* Hint Resolve *)\n(*   agree32_repr agree32_of_int agree32_of_ints agree32_of_int_eq agree32_of_ints_eq *)\n(*   agree32_to_int agree32_to_int_eq agree32_neg agree32_add agree32_sub agree32_mul agree32_divs *)\n(*   agree64_repr agree64_of_int agree64_of_int_eq *)\n(*   agree64_to_int agree64_to_int_eq agree64_neg agree64_add agree64_sub agree64_mul agree64_divs : ptrofs. *)\n\n(* End Ptrofs. *)\n\n(* Strategy 0 [Wordsize_Ptrofs.wordsize]. *)\n\n(* Notation ptrofs := Ptrofs.int. *)\n\n(* Global Opaque Ptrofs.repr. *)\n\nHint Resolve Int.modulus_pos Int.eqm_refl Int.eqm_refl2 Int.eqm_sym Int.eqm_trans\n  Int.eqm_small_eq Int.eqm_add Int.eqm_neg Int.eqm_sub Int.eqm_mult\n  Int.eqm_unsigned_repr Int.eqm_unsigned_repr_l Int.eqm_unsigned_repr_r\n  Int.unsigned_range Int.unsigned_range_2\n  Int.repr_unsigned Int.repr_signed Int.unsigned_repr : ints.\n\nHint Resolve Int64.modulus_pos Int64.eqm_refl Int64.eqm_refl2 Int64.eqm_sym Int64.eqm_trans\n  Int64.eqm_small_eq Int64.eqm_add Int64.eqm_neg Int64.eqm_sub Int64.eqm_mult\n  Int64.eqm_unsigned_repr Int64.eqm_unsigned_repr_l Int64.eqm_unsigned_repr_r\n  Int64.unsigned_range Int64.unsigned_range_2\n  Int64.repr_unsigned Int64.repr_signed Int64.unsigned_repr : ints.\n\n(* Hint Resolve Ptrofs.modulus_pos Ptrofs.eqm_refl Ptrofs.eqm_refl2 Ptrofs.eqm_sym Ptrofs.eqm_trans *)\n(*   Ptrofs.eqm_small_eq Ptrofs.eqm_add Ptrofs.eqm_neg Ptrofs.eqm_sub Ptrofs.eqm_mult *)\n(*   Ptrofs.eqm_unsigned_repr Ptrofs.eqm_unsigned_repr_l Ptrofs.eqm_unsigned_repr_r *)\n(*   Ptrofs.unsigned_range Ptrofs.unsigned_range_2 *)\n(*   Ptrofs.repr_unsigned Ptrofs.repr_signed Ptrofs.unsigned_repr : ints. *)\n"
  },
  {
    "path": "src/cclib/Maps.v",
    "content": "\n(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** Applicative finite maps are the main data structure used in this\n  project.  A finite map associates data to keys.  The two main operations\n  are [set k d m], which returns a map identical to [m] except that [d]\n  is associated to [k], and [get k m] which returns the data associated\n  to key [k] in map [m].  In this library, we distinguish two kinds of maps:\n- Trees: the [get] operation returns an option type, either [None]\n  if no data is associated to the key, or [Some d] otherwise.\n- Maps: the [get] operation always returns a data.  If no data was explicitly\n  associated with the key, a default data provided at map initialization time\n  is returned.\n\n  In this library, we provide efficient implementations of trees and\n  maps whose keys range over the type [positive] of binary positive\n  integers or any type that can be injected into [positive].  The\n  implementation is based on radix-2 search trees (uncompressed\n  Patricia trees) and guarantees logarithmic-time operations.  An\n  inefficient implementation of maps as functions is also provided.\n*)\n\nRequire Import Equivalence EquivDec.\nRequire Import Coqlib.\n\n(* To avoid useless definitions of inductors in extracted code. *)\nLocal Unset Elimination Schemes.\nLocal Unset Case Analysis Schemes.\n\nSet Implicit Arguments.\n\n(** * The abstract signatures of trees *)\n\nModule Type TREE.\n  Parameter elt: Type.\n  Parameter elt_eq: forall (a b: elt), {a = b} + {a <> b}.\n  Parameter t: Type -> Type.\n  Parameter empty: forall (A: Type), t A.\n  Parameter get: forall (A: Type), elt -> t A -> option A.\n  Parameter set: forall (A: Type), elt -> A -> t A -> t A.\n  Parameter remove: forall (A: Type), elt -> t A -> t A.\n\n  Definition get_default {A:Type} (default:A) (k:elt) (m : t A) : A :=\n    match get k m with\n    | Some v => v\n    | NONE => default\n    end.\n\n  (** The ``good variables'' properties for trees, expressing\n    commutations between [get], [set] and [remove]. *)\n  Axiom gempty:\n    forall (A: Type) (i: elt), get i (empty A) = None.\n  Axiom gss:\n    forall (A: Type) (i: elt) (x: A) (m: t A), get i (set i x m) = Some x.\n  Axiom gso:\n    forall (A: Type) (i j: elt) (x: A) (m: t A),\n    i <> j -> get i (set j x m) = get i m.\n  Axiom gsspec:\n    forall (A: Type) (i j: elt) (x: A) (m: t A),\n    get i (set j x m) = if elt_eq i j then Some x else get i m.\n  (* We could implement the following, but it's not needed for the moment.\n  Hypothesis gsident:\n    forall (A: Type) (i: elt) (m: t A) (v: A),\n    get i m = Some v -> set i v m = m.\n  Hypothesis grident:\n    forall (A: Type) (i: elt) (m: t A) (v: A),\n    get i m = None -> remove i m = m.\n  *)\n  Axiom grs:\n    forall (A: Type) (i: elt) (m: t A), get i (remove i m) = None.\n  Axiom gro:\n    forall (A: Type) (i j: elt) (m: t A),\n    i <> j -> get i (remove j m) = get i m.\n  Axiom grspec:\n    forall (A: Type) (i j: elt) (m: t A),\n    get i (remove j m) = if elt_eq i j then None else get i m.\n\n  (** Extensional equality between trees. *)\n  Parameter beq: forall (A: Type), (A -> A -> bool) -> t A -> t A -> bool.\n  Axiom beq_correct:\n    forall (A: Type) (eqA: A -> A -> bool) (t1 t2: t A),\n    beq eqA t1 t2 = true <->\n    (forall (x: elt),\n     match get x t1, get x t2 with\n     | None, None => True\n     | Some y1, Some y2 => eqA y1 y2 = true\n     | _, _ => False\n    end).\n\n  (** Applying a function to all data of a tree. *)\n  Parameter map:\n    forall (A B: Type), (elt -> A -> B) -> t A -> t B.\n  Axiom gmap:\n    forall (A B: Type) (f: elt -> A -> B) (i: elt) (m: t A),\n    get i (map f m) = option_map (f i) (get i m).\n\n  (** Same as [map], but the function does not receive the [elt] argument. *)\n  Parameter map1:\n    forall (A B: Type), (A -> B) -> t A -> t B.\n  Axiom gmap1:\n    forall (A B: Type) (f: A -> B) (i: elt) (m: t A),\n    get i (map1 f m) = option_map f (get i m).\n\n  (** Applying a function pairwise to all data of two trees. *)\n  (*\n  Parameter combine:\n    forall (A B C: Type), (option A -> option B -> option C) -> t A -> t B -> t C.\n  Axiom gcombine:\n    forall (A B C: Type) (f: option A -> option B -> option C),\n    f None None = None ->\n    forall (m1: t A) (m2: t B) (i: elt),\n    get i (combine f m1 m2) = f (get i m1) (get i m2). *)\n\n  (** Enumerating the bindings of a tree. *)\n  Parameter elements:\n    forall (A: Type), t A -> list (elt * A).\n  Axiom elements_correct:\n    forall (A: Type) (m: t A) (i: elt) (v: A),\n    get i m = Some v -> In (i, v) (elements m).\n  Axiom elements_complete:\n    forall (A: Type) (m: t A) (i: elt) (v: A),\n    In (i, v) (elements m) -> get i m = Some v.\n  Axiom elements_keys_norepet:\n    forall (A: Type) (m: t A),\n    list_norepet (List.map (@fst elt A) (elements m)).\n  Axiom elements_extensional:\n    forall (A: Type) (m n: t A),\n    (forall i, get i m = get i n) ->\n    elements m = elements n.\n  Axiom elements_remove:\n    forall (A: Type) i v (m: t A),\n    get i m = Some v ->\n    exists l1 l2, elements m = l1 ++ (i,v) :: l2 /\\ elements (remove i m) = l1 ++ l2.\n\n  (** Folding a function over all bindings of a tree. *)\n  Parameter fold:\n    forall (A B: Type), (B -> elt -> A -> B) -> t A -> B -> B.\n  Axiom fold_spec:\n    forall (A B: Type) (f: B -> elt -> A -> B) (v: B) (m: t A),\n    fold f m v =\n    List.fold_left (fun a p => f a (fst p) (snd p)) (elements m) v.\n  (** Same as [fold], but the function does not receive the [elt] argument. *)\n  Parameter fold1:\n    forall (A B: Type), (B -> A -> B) -> t A -> B -> B.\n  Axiom fold1_spec:\n    forall (A B: Type) (f: B -> A -> B) (v: B) (m: t A),\n    fold1 f m v =\n    List.fold_left (fun a p => f a (snd p)) (elements m) v.\nEnd TREE.\n\n(** * The abstract signatures of maps *)\n\nModule Type MAP.\n  Parameter elt: Type.\n  Parameter elt_eq: forall (a b: elt), {a = b} + {a <> b}.\n  Parameter t: Type -> Type.\n  Parameter init: forall (A: Type), A -> t A.\n  Parameter get: forall (A: Type), elt -> t A -> A.\n  Parameter set: forall (A: Type), elt -> A -> t A -> t A.\n  Axiom gi:\n    forall (A: Type) (i: elt) (x: A), get i (init x) = x.\n  Axiom gss:\n    forall (A: Type) (i: elt) (x: A) (m: t A), get i (set i x m) = x.\n  Axiom gso:\n    forall (A: Type) (i j: elt) (x: A) (m: t A),\n    i <> j -> get i (set j x m) = get i m.\n  Axiom gsspec:\n    forall (A: Type) (i j: elt) (x: A) (m: t A),\n    get i (set j x m) = if elt_eq i j then x else get i m.\n  Axiom gsident:\n    forall (A: Type) (i j: elt) (m: t A), get j (set i (get i m) m) = get j m.\n  Parameter map: forall (A B: Type), (A -> B) -> t A -> t B.\n  Axiom gmap:\n    forall (A B: Type) (f: A -> B) (i: elt) (m: t A),\n    get i (map f m) = f(get i m).\nEnd MAP.\n\n(** * An implementation of trees over type [positive] *)\n\nModule PTree <: TREE.\n  Definition elt := positive.\n  Definition elt_eq := peq.\n\n  Inductive tree (A : Type) : Type :=\n    | Leaf : tree A\n    | Node : tree A -> option A -> tree A -> tree A.\n\n  Arguments Leaf [A].\n  Arguments Node [A].\n  Scheme tree_ind := Induction for tree Sort Prop.\n\n  Definition t := tree.\n\n  Definition empty (A : Type) := (Leaf : t A).\n\n  Fixpoint get (A : Type) (i : positive) (m : t A) {struct i} : option A :=\n    match m with\n    | Leaf => None\n    | Node l o r =>\n        match i with\n        | xH => o\n        | xO ii => get ii l\n        | xI ii => get ii r\n        end\n    end.\n\n  Fixpoint set (A : Type) (i : positive) (v : A) (m : t A) {struct i} : t A :=\n    match m with\n    | Leaf =>\n        match i with\n        | xH => Node Leaf (Some v) Leaf\n        | xO ii => Node (set ii v Leaf) None Leaf\n        | xI ii => Node Leaf None (set ii v Leaf)\n        end\n    | Node l o r =>\n        match i with\n        | xH => Node l (Some v) r\n        | xO ii => Node (set ii v l) o r\n        | xI ii => Node l o (set ii v r)\n        end\n    end.\n\n  Fixpoint remove (A : Type) (i : positive) (m : t A) {struct i} : t A :=\n    match i with\n    | xH =>\n        match m with\n        | Leaf => Leaf\n        | Node Leaf o Leaf => Leaf\n        | Node l o r => Node l None r\n        end\n    | xO ii =>\n        match m with\n        | Leaf => Leaf\n        | Node l None Leaf =>\n            match remove ii l with\n            | Leaf => Leaf\n            | mm => Node mm None Leaf\n            end\n        | Node l o r => Node (remove ii l) o r\n        end\n    | xI ii =>\n        match m with\n        | Leaf => Leaf\n        | Node Leaf None r =>\n            match remove ii r with\n            | Leaf => Leaf\n            | mm => Node Leaf None mm\n            end\n        | Node l o r => Node l o (remove ii r)\n        end\n    end.\n\n  Theorem gempty:\n    forall (A: Type) (i: positive), get i (empty A) = None.\n  Proof.\n    induction i; simpl; auto.\n  Qed.\n\n  Theorem gss:\n    forall (A: Type) (i: positive) (x: A) (m: t A), get i (set i x m) = Some x.\n  Proof.\n    induction i; destruct m; simpl; auto.\n  Qed.\n\n    Lemma gleaf : forall (A : Type) (i : positive), get i (Leaf : t A) = None.\n    Proof. exact gempty. Qed.\n\n  Theorem gso:\n    forall (A: Type) (i j: positive) (x: A) (m: t A),\n    i <> j -> get i (set j x m) = get i m.\n  Proof.\n    induction i; intros; destruct j; destruct m; simpl;\n       try rewrite <- (gleaf A i); auto; try apply IHi; congruence.\n  Qed.\n\n  Theorem gsspec:\n    forall (A: Type) (i j: positive) (x: A) (m: t A),\n    get i (set j x m) = if peq i j then Some x else get i m.\n  Proof.\n    intros.\n    destruct (peq i j); [ rewrite e; apply gss | apply gso; auto ].\n  Qed.\n\n  Theorem gsident:\n    forall (A: Type) (i: positive) (m: t A) (v: A),\n    get i m = Some v -> set i v m = m.\n  Proof.\n    induction i; intros; destruct m; simpl; simpl in H; try congruence.\n     rewrite (IHi m2 v H); congruence.\n     rewrite (IHi m1 v H); congruence.\n  Qed.\n\n  Theorem set2:\n    forall (A: Type) (i: elt) (m: t A) (v1 v2: A),\n    set i v2 (set i v1 m) = set i v2 m.\n  Proof.\n    induction i; intros; destruct m; simpl; try (rewrite IHi); auto.\n  Qed.\n\n\n  Theorem set_swap : forall (A: Type)  (i1 i2: elt) (m: t A) (v1 v2: A),\n      i1 <> i2 -> \n      set i2 v2 (set i1 v1 m) = set i1 v1 (set i2 v2 m) .\n  Proof.\n    induction i1; destruct i2; destruct m; simpl;\n        try reflexivity; intros; try rewrite IHi1; congruence.\n  Qed.\n  \n  Lemma rleaf : forall (A : Type) (i : positive), remove i (Leaf : t A) = Leaf.\n  Proof. destruct i; simpl; auto. Qed.\n\n  Theorem grs:\n    forall (A: Type) (i: positive) (m: t A), get i (remove i m) = None.\n  Proof.\n    induction i; destruct m.\n     simpl; auto.\n     destruct m1; destruct o; destruct m2 as [ | ll oo rr]; simpl; auto.\n      rewrite (rleaf A i); auto.\n      cut (get i (remove i (Node ll oo rr)) = None).\n        destruct (remove i (Node ll oo rr)); auto; apply IHi.\n        apply IHi.\n     simpl; auto.\n     destruct m1 as [ | ll oo rr]; destruct o; destruct m2; simpl; auto.\n      rewrite (rleaf A i); auto.\n      cut (get i (remove i (Node ll oo rr)) = None).\n        destruct (remove i (Node ll oo rr)); auto; apply IHi.\n        apply IHi.\n     simpl; auto.\n     destruct m1; destruct m2; simpl; auto.\n  Qed.\n\n  Theorem gro:\n    forall (A: Type) (i j: positive) (m: t A),\n    i <> j -> get i (remove j m) = get i m.\n  Proof.\n    induction i; intros; destruct j; destruct m;\n        try rewrite (rleaf A (xI j));\n        try rewrite (rleaf A (xO j));\n        try rewrite (rleaf A 1); auto;\n        destruct m1; destruct o; destruct m2;\n        simpl;\n        try apply IHi; try congruence;\n        try rewrite (rleaf A j); auto;\n        try rewrite (gleaf A i); auto.\n     cut (get i (remove j (Node m2_1 o m2_2)) = get i (Node m2_1 o m2_2));\n        [ destruct (remove j (Node m2_1 o m2_2)); try rewrite (gleaf A i); auto\n        | apply IHi; congruence ].\n     destruct (remove j (Node m1_1 o0 m1_2)); simpl; try rewrite (gleaf A i);\n        auto.\n     destruct (remove j (Node m2_1 o m2_2)); simpl; try rewrite (gleaf A i);\n        auto.\n     cut (get i (remove j (Node m1_1 o0 m1_2)) = get i (Node m1_1 o0 m1_2));\n        [ destruct (remove j (Node m1_1 o0 m1_2)); try rewrite (gleaf A i); auto\n        | apply IHi; congruence ].\n     destruct (remove j (Node m2_1 o m2_2)); simpl; try rewrite (gleaf A i);\n        auto.\n     destruct (remove j (Node m1_1 o0 m1_2)); simpl; try rewrite (gleaf A i);\n        auto.\n  Qed.\n\n  Theorem grspec:\n    forall (A: Type) (i j: elt) (m: t A),\n    get i (remove j m) = if elt_eq i j then None else get i m.\n  Proof.\n    intros. destruct (elt_eq i j). subst j. apply grs. apply gro; auto.\n  Qed.\n\n  Section BOOLEAN_EQUALITY.\n\n    Variable A: Type.\n    Variable beqA: A -> A -> bool.\n\n    Fixpoint bempty (m: t A) : bool :=\n      match m with\n      | Leaf => true\n      | Node l None r => bempty l && bempty r\n      | Node l (Some _) r => false\n      end.\n\n    Fixpoint beq (m1 m2: t A) {struct m1} : bool :=\n      match m1, m2 with\n      | Leaf, _ => bempty m2\n      | _, Leaf => bempty m1\n      | Node l1 o1 r1, Node l2 o2 r2 =>\n          match o1, o2 with\n          | None, None => true\n          | Some y1, Some y2 => beqA y1 y2\n          | _, _ => false\n          end\n          && beq l1 l2 && beq r1 r2\n      end.\n\n    Lemma bempty_correct:\n      forall m, bempty m = true <-> (forall x, get x m = None).\n    Proof.\n      induction m; simpl.\n      split; intros. apply gleaf. auto.\n      destruct o; split; intros.\n      congruence.\n      generalize (H xH); simpl; congruence.\n      destruct (andb_prop _ _ H). rewrite IHm1 in H0. rewrite IHm2 in H1.\n      destruct x; simpl; auto.\n      apply andb_true_intro; split.\n      apply IHm1. intros; apply (H (xO x)).\n      apply IHm2. intros; apply (H (xI x)).\n    Qed.\n\n    Lemma beq_correct:\n      forall m1 m2,\n      beq m1 m2 = true <->\n      (forall (x: elt),\n       match get x m1, get x m2 with\n       | None, None => True\n       | Some y1, Some y2 => beqA y1 y2 = true\n       | _, _ => False\n       end).\n    Proof.\n      induction m1; intros.\n    - simpl. rewrite bempty_correct. split; intros.\n      rewrite gleaf. rewrite H. auto.\n      generalize (H x). rewrite gleaf. destruct (get x m2); tauto.\n    - destruct m2.\n      + unfold beq. rewrite bempty_correct. split; intros.\n        rewrite H. rewrite gleaf. auto.\n        generalize (H x). rewrite gleaf. destruct (get x (Node m1_1 o m1_2)); tauto.\n      + simpl. split; intros.\n        * destruct (andb_prop _ _ H). destruct (andb_prop _ _ H0).\n          rewrite IHm1_1 in H3. rewrite IHm1_2 in H1.\n          destruct x; simpl. apply H1. apply H3.\n          destruct o; destruct o0; auto || congruence.\n        * apply andb_true_intro. split. apply andb_true_intro. split.\n          generalize (H xH); simpl. destruct o; destruct o0; tauto.\n          apply IHm1_1. intros; apply (H (xO x)).\n          apply IHm1_2. intros; apply (H (xI x)).\n    Qed.\n\n  End BOOLEAN_EQUALITY.\n\n  Fixpoint prev_append (i j: positive) {struct i} : positive :=\n    match i with\n      | xH => j\n      | xI i' => prev_append i' (xI j)\n      | xO i' => prev_append i' (xO j)\n    end.\n\n  Definition prev (i: positive) : positive :=\n    prev_append i xH.\n\n  Lemma prev_append_prev i j:\n    prev (prev_append i j) = prev_append j i.\n  Proof.\n    revert j. unfold prev.\n    induction i as [i IH|i IH|]. 3: reflexivity.\n    intros j. simpl. rewrite IH. reflexivity.\n    intros j. simpl. rewrite IH. reflexivity.\n  Qed.\n\n  Lemma prev_involutive i :\n    prev (prev i) = i.\n  Proof (prev_append_prev i xH).\n\n  Lemma prev_append_inj i j j' :\n    prev_append i j = prev_append i j' -> j = j'.\n  Proof.\n    revert j j'.\n    induction i as [i Hi|i Hi|]; intros j j' H; auto;\n    specialize (Hi _ _ H); congruence.\n  Qed.\n\n    Fixpoint xmap (A B : Type) (f : positive -> A -> B) (m : t A) (i : positive)\n             {struct m} : t B :=\n      match m with\n      | Leaf => Leaf\n      | Node l o r => Node (xmap f l (xO i))\n                           (match o with None => None | Some x => Some (f (prev i) x) end)\n                           (xmap f r (xI i))\n      end.\n\n  Definition map (A B : Type) (f : positive -> A -> B) m := xmap f m xH.\n\n    Lemma xgmap:\n      forall (A B: Type) (f: positive -> A -> B) (i j : positive) (m: t A),\n      get i (xmap f m j) = option_map (f (prev (prev_append i j))) (get i m).\n    Proof.\n      induction i; intros; destruct m; simpl; auto.\n    Qed.\n\n  Theorem gmap:\n    forall (A B: Type) (f: positive -> A -> B) (i: positive) (m: t A),\n    get i (map f m) = option_map (f i) (get i m).\n  Proof.\n    intros A B f i m.\n    unfold map.\n    rewrite xgmap. repeat f_equal. exact (prev_involutive i).\n  Qed.\n\n  Fixpoint map1 (A B: Type) (f: A -> B) (m: t A) {struct m} : t B :=\n    match m with\n    | Leaf => Leaf\n    | Node l o r => Node (map1 f l) (option_map f o) (map1 f r)\n    end.\n\n  Theorem gmap1:\n    forall (A B: Type) (f: A -> B) (i: elt) (m: t A),\n    get i (map1 f m) = option_map f (get i m).\n  Proof.\n    induction i; intros; destruct m; simpl; auto.\n  Qed.\n\n  Definition Node' (A: Type) (l: t A) (x: option A) (r: t A): t A :=\n    match l, x, r with\n    | Leaf, None, Leaf => Leaf\n    | _, _, _ => Node l x r\n    end.\n\n  Lemma gnode':\n    forall (A: Type) (l r: t A) (x: option A) (i: positive),\n    get i (Node' l x r) = get i (Node l x r).\n  Proof.\n    intros. unfold Node'.\n    destruct l; destruct x; destruct r; auto.\n    destruct i; simpl; auto; rewrite gleaf; auto.\n  Qed.\n\n  Fixpoint filter1 (A: Type) (pred: A -> bool) (m: t A) {struct m} : t A :=\n    match m with\n    | Leaf => Leaf\n    | Node l o r =>\n        let o' := match o with None => None | Some x => if pred x then o else None end in\n        Node' (filter1 pred l) o' (filter1 pred r)\n    end.\n\n  Theorem gfilter1:\n    forall (A: Type) (pred: A -> bool) (i: elt) (m: t A),\n    get i (filter1 pred m) =\n    match get i m with None => None | Some x => if pred x then Some x else None end.\n  Proof.\n    intros until m. revert m i. induction m; simpl; intros.\n    rewrite gleaf; auto.\n    rewrite gnode'. destruct i; simpl; auto. destruct o; auto.\n  Qed.\n\n  Section COMBINE.\n\n  Variables A B C: Type.\n  Variable f: option A -> option B -> option C.\n  Hypothesis f_none_none: f None None = None.\n\n  Fixpoint xcombine_l (m : t A) {struct m} : t C :=\n      match m with\n      | Leaf => Leaf\n      | Node l o r => Node' (xcombine_l l) (f o None) (xcombine_l r)\n      end.\n\n  Lemma xgcombine_l :\n          forall (m: t A) (i : positive),\n          get i (xcombine_l m) = f (get i m) None.\n    Proof.\n      induction m; intros; simpl.\n      repeat rewrite gleaf. auto.\n      rewrite gnode'. destruct i; simpl; auto.\n    Qed.\n\n  Fixpoint xcombine_r (m : t B) {struct m} : t C :=\n      match m with\n      | Leaf => Leaf\n      | Node l o r => Node' (xcombine_r l) (f None o) (xcombine_r r)\n      end.\n\n  Lemma xgcombine_r :\n          forall (m: t B) (i : positive),\n          get i (xcombine_r m) = f None (get i m).\n    Proof.\n      induction m; intros; simpl.\n      repeat rewrite gleaf. auto.\n      rewrite gnode'. destruct i; simpl; auto.\n    Qed.\n\n  Fixpoint combine (m1: t A) (m2: t B) {struct m1} : t C :=\n    match m1 with\n    | Leaf => xcombine_r m2\n    | Node l1 o1 r1 =>\n        match m2 with\n        | Leaf => xcombine_l m1\n        | Node l2 o2 r2 => Node' (combine l1 l2) (f o1 o2) (combine r1 r2)\n        end\n    end.\n\n  Theorem gcombine:\n      forall (m1: t A) (m2: t B) (i: positive),\n      get i (combine m1 m2) = f (get i m1) (get i m2).\n  Proof.\n    induction m1; intros; simpl.\n    rewrite gleaf. apply xgcombine_r.\n    destruct m2; simpl.\n    rewrite gleaf. rewrite <- xgcombine_l. auto.\n    repeat rewrite gnode'. destruct i; simpl; auto.\n  Qed.\n\n  End COMBINE.\n\n  Lemma xcombine_lr :\n    forall (A B: Type) (f g : option A -> option A -> option B) (m : t A),\n    (forall (i j : option A), f i j = g j i) ->\n    xcombine_l f m = xcombine_r g m.\n    Proof.\n      induction m; intros; simpl; auto.\n      rewrite IHm1; auto.\n      rewrite IHm2; auto.\n      rewrite H; auto.\n    Qed.\n\n  Theorem combine_commut:\n    forall (A B: Type) (f g: option A -> option A -> option B),\n    (forall (i j: option A), f i j = g j i) ->\n    forall (m1 m2: t A),\n    combine f m1 m2 = combine g m2 m1.\n  Proof.\n    intros A B f g EQ1.\n    assert (EQ2: forall (i j: option A), g i j = f j i).\n      intros; auto.\n    induction m1; intros; destruct m2; simpl;\n      try rewrite EQ1;\n      repeat rewrite (xcombine_lr f g);\n      repeat rewrite (xcombine_lr g f);\n      auto.\n     rewrite IHm1_1.\n     rewrite IHm1_2.\n     auto.\n  Qed.\n\n    Fixpoint xelements (A : Type) (m : t A) (i : positive)\n                       (k: list (positive * A)) {struct m}\n                       : list (positive * A) :=\n      match m with\n      | Leaf => k\n      | Node l None r =>\n          xelements l (xO i) (xelements r (xI i) k)\n      | Node l (Some x) r =>\n          xelements l (xO i)\n            ((prev i, x) :: xelements r (xI i) k)\n      end.\n\n  Definition elements (A: Type) (m : t A) := xelements m xH nil.\n\n  Remark xelements_append:\n    forall A (m: t A) i k1 k2,\n    xelements m i (k1 ++ k2) = xelements m i k1 ++ k2.\n  Proof.\n    induction m; intros; simpl.\n  - auto.\n  - destruct o; rewrite IHm2; rewrite <- IHm1; auto.\n  Qed.\n\n  Remark xelements_leaf:\n    forall A i, xelements (@Leaf A) i nil = nil.\n  Proof.\n    intros; reflexivity.\n  Qed.\n\n  Remark xelements_node:\n    forall A (m1: t A) o (m2: t A) i,\n    xelements (Node m1 o m2) i nil =\n       xelements m1 (xO i) nil\n    ++ match o with None => nil | Some v => (prev i, v) :: nil end\n    ++ xelements m2 (xI i) nil.\n  Proof.\n    intros. simpl. destruct o; simpl; rewrite <- xelements_append; auto.\n  Qed.\n\n    Lemma xelements_incl:\n      forall (A: Type) (m: t A) (i : positive) k x,\n      In x k -> In x (xelements m i k).\n    Proof.\n      induction m; intros; simpl.\n      auto.\n      destruct o.\n      apply IHm1. simpl; right; auto.\n      auto.\n    Qed.\n\n    Lemma xelements_correct:\n      forall (A: Type) (m: t A) (i j : positive) (v: A) k,\n      get i m = Some v -> In (prev (prev_append i j), v) (xelements m j k).\n    Proof.\n      induction m; intros.\n       rewrite (gleaf A i) in H; congruence.\n       destruct o; destruct i; simpl; simpl in H.\n        apply xelements_incl. right. auto.\n        auto.\n        inv H. apply xelements_incl. left. reflexivity.\n        apply xelements_incl. auto.\n        auto.\n        inv H.\n    Qed.\n\n  Theorem elements_correct:\n    forall (A: Type) (m: t A) (i: positive) (v: A),\n    get i m = Some v -> In (i, v) (elements m).\n  Proof.\n    intros A m i v H.\n    generalize (xelements_correct m i xH nil H). rewrite prev_append_prev. exact id.\n  Qed.\n\n  Lemma in_xelements:\n    forall (A: Type) (m: t A) (i k: positive) (v: A) ,\n    In (k, v) (xelements m i nil) ->\n    exists j, k = prev (prev_append j i) /\\ get j m = Some v.\n  Proof.\n    induction m; intros.\n  - rewrite xelements_leaf in H. contradiction.\n  - rewrite xelements_node in H. rewrite ! in_app_iff in H. destruct H as [P | [P | P]].\n    + exploit IHm1; eauto. intros (j & Q & R). exists (xO j); auto.\n    + destruct o; simpl in P; intuition auto. inv H. exists xH; auto.\n    + exploit IHm2; eauto. intros (j & Q & R). exists (xI j); auto.\n  Qed.\n\n  Theorem elements_complete:\n    forall (A: Type) (m: t A) (i: positive) (v: A),\n    In (i, v) (elements m) -> get i m = Some v.\n  Proof.\n    unfold elements. intros A m i v H. exploit in_xelements; eauto. intros (j & P & Q).\n    rewrite prev_append_prev in P. change i with (prev_append 1 i) in P.\n    exploit prev_append_inj; eauto. intros; congruence.\n  Qed.\n\n  Definition xkeys (A: Type) (m: t A) (i: positive) :=\n    List.map (@fst positive A) (xelements m i nil).\n\n  Remark xkeys_leaf:\n    forall A i, xkeys (@Leaf A) i = nil.\n  Proof.\n    intros; reflexivity.\n  Qed.\n\n  Remark xkeys_node:\n    forall A (m1: t A) o (m2: t A) i,\n    xkeys (Node m1 o m2) i =\n       xkeys m1 (xO i)\n    ++ match o with None => nil | Some v => prev i :: nil end\n    ++ xkeys m2 (xI i).\n  Proof.\n    intros. unfold xkeys. rewrite xelements_node. rewrite ! map_app. destruct o; auto.\n  Qed.\n\n  Lemma in_xkeys:\n    forall (A: Type) (m: t A) (i k: positive),\n    In k (xkeys m i) ->\n    (exists j, k = prev (prev_append j i)).\n  Proof.\n    unfold xkeys; intros.\n    apply (list_in_map_inv) in H. destruct H as ((j, v) & -> & H).\n    exploit in_xelements; eauto. intros (k & P & Q). exists k; auto.\n  Qed.\n\n  Lemma xelements_keys_norepet:\n    forall (A: Type) (m: t A) (i: positive),\n    list_norepet (xkeys m i).\n  Proof.\n    induction m; intros.\n  - rewrite xkeys_leaf; constructor.\n  - assert (NOTIN1: ~ In (prev i) (xkeys m1 (xO i))).\n    { red; intros. exploit in_xkeys; eauto. intros (j & EQ).\n      rewrite prev_append_prev in EQ. simpl in EQ. apply prev_append_inj in EQ. discriminate. }\n    assert (NOTIN2: ~ In (prev i) (xkeys m2 (xI i))).\n    { red; intros. exploit in_xkeys; eauto. intros (j & EQ).\n      rewrite prev_append_prev in EQ. simpl in EQ. apply prev_append_inj in EQ. discriminate. }\n    assert (DISJ: forall x, In x (xkeys m1 (xO i)) -> In x (xkeys m2 (xI i)) -> False).\n    { intros. exploit in_xkeys. eexact H. intros (j1 & EQ1).\n      exploit in_xkeys. eexact H0. intros (j2 & EQ2).\n      rewrite prev_append_prev in *. simpl in *. rewrite EQ2 in EQ1. apply prev_append_inj in EQ1. discriminate. }\n    rewrite xkeys_node. apply list_norepet_append. auto.\n    destruct o; simpl; auto. constructor; auto.\n    red; intros. red; intros; subst y. destruct o; simpl in H0.\n    destruct H0. subst x. tauto. eauto. eauto.\n  Qed.\n\n  Theorem elements_keys_norepet:\n    forall (A: Type) (m: t A),\n    list_norepet (List.map (@fst elt A) (elements m)).\n  Proof.\n    intros. apply (xelements_keys_norepet m xH).\n  Qed.\n\n  Remark xelements_empty:\n    forall (A: Type) (m: t A) i, (forall i, get i m = None) -> xelements m i nil = nil.\n  Proof.\n    induction m; intros.\n    auto.\n    rewrite xelements_node. rewrite IHm1, IHm2. destruct o; auto.\n    generalize (H xH); simpl; congruence.\n    intros. apply (H (xI i0)).\n    intros. apply (H (xO i0)).\n  Qed.\n\n  Theorem elements_canonical_order':\n    forall (A B: Type) (R: A -> B -> Prop) (m: t A) (n: t B),\n    (forall i, option_rel R (get i m) (get i n)) ->\n    list_forall2\n      (fun i_x i_y => fst i_x = fst i_y /\\ R (snd i_x) (snd i_y))\n      (elements m) (elements n).\n  Proof.\n    intros until n. unfold elements. generalize 1%positive. revert m n.\n    induction m; intros.\n  - simpl. rewrite xelements_empty. constructor.\n    intros. specialize (H i). rewrite gempty in H. inv H; auto.\n  - destruct n as [ | n1 o' n2 ].\n  + rewrite (xelements_empty (Node m1 o m2)). simpl; constructor.\n    intros. specialize (H i). rewrite gempty in H. inv H; auto.\n  + rewrite ! xelements_node. repeat apply list_forall2_app.\n    apply IHm1. intros. apply (H (xO i)).\n    generalize (H xH); simpl; intros OR; inv OR.\n    constructor.\n    constructor. auto. constructor.\n    apply IHm2. intros. apply (H (xI i)).\n  Qed.\n\n  Theorem elements_canonical_order:\n    forall (A B: Type) (R: A -> B -> Prop) (m: t A) (n: t B),\n    (forall i x, get i m = Some x -> exists y, get i n = Some y /\\ R x y) ->\n    (forall i y, get i n = Some y -> exists x, get i m = Some x /\\ R x y) ->\n    list_forall2\n      (fun i_x i_y => fst i_x = fst i_y /\\ R (snd i_x) (snd i_y))\n      (elements m) (elements n).\n  Proof.\n    intros. apply elements_canonical_order'.\n    intros. destruct (get i m) as [x|] eqn:GM.\n    exploit H; eauto. intros (y & P & Q). rewrite P; constructor; auto.\n    destruct (get i n) as [y|] eqn:GN.\n    exploit H0; eauto. intros (x & P & Q). congruence.\n    constructor.\n  Qed.\n\n  Theorem elements_extensional:\n    forall (A: Type) (m n: t A),\n    (forall i, get i m = get i n) ->\n    elements m = elements n.\n  Proof.\n    intros.\n    exploit (@elements_canonical_order' _ _ (fun (x y: A) => x = y) m n).\n    intros. rewrite H. destruct (get i n); constructor; auto.\n    induction 1. auto. destruct a1 as [a2 a3]; destruct b1 as [b2 b3]; simpl in *.\n    destruct H0. congruence.\n  Qed.\n\n  Lemma xelements_remove:\n    forall (A: Type) v (m: t A) i j,\n    get i m = Some v ->\n    exists l1 l2,\n    xelements m j nil = l1 ++ (prev (prev_append i j), v) :: l2\n    /\\ xelements (remove i m) j nil = l1 ++ l2.\n  Proof.\n    induction m; intros.\n  - rewrite gleaf in H; discriminate.\n  - assert (REMOVE: xelements (remove i (Node m1 o m2)) j nil =\n                    xelements (match i with\n                               | xH => Node m1 None m2\n                               | xO ii => Node (remove ii m1) o m2\n                               | xI ii => Node m1 o (remove ii m2) end)\n                              j nil).\n    {\n      destruct i; simpl remove.\n      destruct m1; auto. destruct o; auto. destruct (remove i m2); auto.\n      destruct o; auto. destruct m2; auto. destruct (remove i m1); auto.\n      destruct m1; auto. destruct m2; auto.\n    }\n    rewrite REMOVE. destruct i; simpl in H.\n    + destruct (IHm2 i (xI j) H) as (l1 & l2 & EQ & EQ').\n      exists (xelements m1 (xO j) nil ++\n              match o with None => nil | Some x => (prev j, x) :: nil end ++\n              l1);\n      exists l2; split.\n      rewrite xelements_node, EQ, ! app_ass. auto.\n      rewrite xelements_node, EQ', ! app_ass. auto.\n    + destruct (IHm1 i (xO j) H) as (l1 & l2 & EQ & EQ').\n      exists l1;\n      exists (l2 ++\n              match o with None => nil | Some x => (prev j, x) :: nil end ++\n              xelements m2 (xI j) nil);\n      split.\n      rewrite xelements_node, EQ, ! app_ass. auto.\n      rewrite xelements_node, EQ', ! app_ass. auto.\n    + subst o. exists (xelements m1 (xO j) nil); exists (xelements m2 (xI j) nil); split.\n      rewrite xelements_node. rewrite prev_append_prev. auto.\n      rewrite xelements_node; auto.\n  Qed.\n\n  Theorem elements_remove:\n    forall (A: Type) i v (m: t A),\n    get i m = Some v ->\n    exists l1 l2, elements m = l1 ++ (i,v) :: l2 /\\ elements (remove i m) = l1 ++ l2.\n  Proof.\n    intros. exploit xelements_remove. eauto. instantiate (1 := xH).\n    rewrite prev_append_prev. auto.\n  Qed.\n\n  Fixpoint xfold (A B: Type) (f: B -> positive -> A -> B)\n                 (i: positive) (m: t A) (v: B) {struct m} : B :=\n    match m with\n    | Leaf => v\n    | Node l None r =>\n        let v1 := xfold f (xO i) l v in\n        xfold f (xI i) r v1\n    | Node l (Some x) r =>\n        let v1 := xfold f (xO i) l v in\n        let v2 := f v1 (prev i) x in\n        xfold f (xI i) r v2\n    end.\n\n  Definition fold (A B : Type) (f: B -> positive -> A -> B) (m: t A) (v: B) :=\n    xfold f xH m v.\n\n  Lemma xfold_xelements:\n    forall (A B: Type) (f: B -> positive -> A -> B) m i v l,\n    List.fold_left (fun a p => f a (fst p) (snd p)) l (xfold f i m v) =\n    List.fold_left (fun a p => f a (fst p) (snd p)) (xelements m i l) v.\n  Proof.\n    induction m; intros.\n    simpl. auto.\n    destruct o; simpl.\n    rewrite <- IHm1. simpl. rewrite <- IHm2. auto.\n    rewrite <- IHm1. rewrite <- IHm2. auto.\n  Qed.\n\n  Theorem fold_spec:\n    forall (A B: Type) (f: B -> positive -> A -> B) (v: B) (m: t A),\n    fold f m v =\n    List.fold_left (fun a p => f a (fst p) (snd p)) (elements m) v.\n  Proof.\n    intros. unfold fold, elements. rewrite <- xfold_xelements. auto.\n  Qed.\n\n  Fixpoint fold1 (A B: Type) (f: B -> A -> B) (m: t A) (v: B) {struct m} : B :=\n    match m with\n    | Leaf => v\n    | Node l None r =>\n        let v1 := fold1 f l v in\n        fold1 f r v1\n    | Node l (Some x) r =>\n        let v1 := fold1 f l v in\n        let v2 := f v1 x in\n        fold1 f r v2\n    end.\n\n  Lemma fold1_xelements:\n    forall (A B: Type) (f: B -> A -> B) m i v l,\n    List.fold_left (fun a p => f a (snd p)) l (fold1 f m v) =\n    List.fold_left (fun a p => f a (snd p)) (xelements m i l) v.\n  Proof.\n    induction m; intros.\n    simpl. auto.\n    destruct o; simpl.\n    rewrite <- IHm1. simpl. rewrite <- IHm2. auto.\n    rewrite <- IHm1. rewrite <- IHm2. auto.\n  Qed.\n\n  Theorem fold1_spec:\n    forall (A B: Type) (f: B -> A -> B) (v: B) (m: t A),\n    fold1 f m v =\n    List.fold_left (fun a p => f a (snd p)) (elements m) v.\n  Proof.\n    intros. apply fold1_xelements with (l := @nil (positive * A)).\n  Qed.\n\n  (* This is used in the proofless backend as a simple way to union two globalenvs.\n     It will not be well-behaved if there is overlap between the keys, and we\n     currently don't prove any theorems about it. *)\n  Definition union (A:Type) (m1 m2 : t A) : t A :=\n    fold (fun m k v => set k v m) m1 m2.\n\n  Definition get_default {A:Type} (default:A) (k:elt) (m : t A) : A :=\n    match get k m with\n    | Some v => v\n    | NONE => default\n    end.\n\nEnd PTree.\n\n(** * An implementation of maps over type [positive] *)\n\nModule PMap <: MAP.\n  Definition elt := positive.\n  Definition elt_eq := peq.\n\n  Definition t (A : Type) : Type := (A * PTree.t A)%type.\n\n  Definition init (A : Type) (x : A) :=\n    (x, PTree.empty A).\n\n  Definition get (A : Type) (i : positive) (m : t A) :=\n    match PTree.get i (snd m) with\n    | Some x => x\n    | None => fst m\n    end.\n\n  Definition set (A : Type) (i : positive) (x : A) (m : t A) :=\n    (fst m, PTree.set i x (snd m)).\n\n  Theorem gi:\n    forall (A: Type) (i: positive) (x: A), get i (init x) = x.\n  Proof.\n    intros. unfold init. unfold get. simpl. rewrite PTree.gempty. auto.\n  Qed.\n\n  Theorem gss:\n    forall (A: Type) (i: positive) (x: A) (m: t A), get i (set i x m) = x.\n  Proof.\n    intros. unfold get. unfold set. simpl. rewrite PTree.gss. auto.\n  Qed.\n\n  Theorem gso:\n    forall (A: Type) (i j: positive) (x: A) (m: t A),\n    i <> j -> get i (set j x m) = get i m.\n  Proof.\n    intros. unfold get. unfold set. simpl. rewrite PTree.gso; auto.\n  Qed.\n\n  Theorem gsspec:\n    forall (A: Type) (i j: positive) (x: A) (m: t A),\n    get i (set j x m) = if peq i j then x else get i m.\n  Proof.\n    intros. destruct (peq i j).\n     rewrite e. apply gss. auto.\n     apply gso. auto.\n  Qed.\n\n  Theorem gsident:\n    forall (A: Type) (i j: positive) (m: t A),\n    get j (set i (get i m) m) = get j m.\n  Proof.\n    intros. destruct (peq i j).\n     rewrite e. rewrite gss. auto.\n     rewrite gso; auto.\n  Qed.\n\n  Definition map (A B : Type) (f : A -> B) (m : t A) : t B :=\n    (f (fst m), PTree.map1 f (snd m)).\n\n  Theorem gmap:\n    forall (A B: Type) (f: A -> B) (i: positive) (m: t A),\n    get i (map f m) = f(get i m).\n  Proof.\n    intros. unfold map. unfold get. simpl. rewrite PTree.gmap1.\n    unfold option_map. destruct (PTree.get i (snd m)); auto.\n  Qed.\n\n  Theorem set2:\n    forall (A: Type) (i: elt) (x y: A) (m: t A),\n    set i y (set i x m) = set i y m.\n  Proof.\n    intros. unfold set. simpl. decEq. apply PTree.set2.\n  Qed.\n\nEnd PMap.\n\n(** * An implementation of maps over any type that injects into type [positive] *)\n\nModule Type INDEXED_TYPE.\n  Parameter t: Type.\n  Parameter index: t -> positive.\n  Parameter index_inv : positive -> t.\n  Axiom index_invertible : forall x, index_inv (index x) = x.\n  Axiom index_inj: forall (x y: t), index x = index y -> x = y.\n  \n  Parameter eq: forall (x y: t), {x = y} + {x <> y}.\nEnd INDEXED_TYPE.\n\nModule IMap(X: INDEXED_TYPE).\n\n  Definition elt := X.t.\n  Definition elt_eq := X.eq.\n  Definition t : Type -> Type := PMap.t.\n  Definition init (A: Type) (x: A) := PMap.init x.\n  Definition get (A: Type) (i: X.t) (m: t A) := PMap.get (X.index i) m.\n  Definition set (A: Type) (i: X.t) (v: A) (m: t A) := PMap.set (X.index i) v m.\n  Definition map (A B: Type) (f: A -> B) (m: t A) : t B := PMap.map f m.\n\n  Lemma gi:\n    forall (A: Type) (x: A) (i: X.t), get i (init x) = x.\n  Proof.\n    intros. unfold get, init. apply PMap.gi.\n  Qed.\n\n  Lemma gss:\n    forall (A: Type) (i: X.t) (x: A) (m: t A), get i (set i x m) = x.\n  Proof.\n    intros. unfold get, set. apply PMap.gss.\n  Qed.\n\n  Lemma gso:\n    forall (A: Type) (i j: X.t) (x: A) (m: t A),\n    i <> j -> get i (set j x m) = get i m.\n  Proof.\n    intros. unfold get, set. apply PMap.gso.\n    red. intro. apply H. apply X.index_inj; auto.\n  Qed.\n\n  Lemma gsspec:\n    forall (A: Type) (i j: X.t) (x: A) (m: t A),\n    get i (set j x m) = if X.eq i j then x else get i m.\n  Proof.\n    intros. unfold get, set.\n    rewrite PMap.gsspec.\n    case (X.eq i j); intro.\n    subst j. rewrite peq_true. reflexivity.\n    rewrite peq_false. reflexivity.\n    red; intro. elim n. apply X.index_inj; auto.\n  Qed.\n\n  Lemma gmap:\n    forall (A B: Type) (f: A -> B) (i: X.t) (m: t A),\n    get i (map f m) = f(get i m).\n  Proof.\n    intros. unfold map, get. apply PMap.gmap.\n  Qed.\n\n  Lemma set2:\n    forall (A: Type) (i: elt) (x y: A) (m: t A),\n    set i y (set i x m) = set i y m.\n  Proof.\n    intros. unfold set. apply PMap.set2.\n  Qed.\n\n  (* This is used in the proofless backend as a simple way to union two globalenvs.\n     It will not be well-behaved if there is overlap between the keys, and we\n     currently don't prove any theorems about it. *)\n  Definition union (A:Type) (m1 m2 : t A) : t A :=\n    (fst m1, PTree.union (snd m1) (snd m2)).\nEnd IMap.\n\nModule ZIndexed.\n  Definition t := Z.\n  Definition index (z: Z): positive :=\n    match z with\n    | Z0 => xH\n    | Zpos p => xO p\n    | Zneg p => xI p\n    end.\n\n  Definition index_inv (p:positive) : Z :=\n    match p with\n    | xH => Z0\n    | xO p' => Zpos p'\n    | xI p' => Zneg p'\n    end.\n\n  Lemma index_invertible : forall x,\n    index_inv (index x) = x.\n  Proof.  \n    intros; destruct x; reflexivity.\n  Qed.\n    \n  Lemma index_inj: forall (x y: Z), index x = index y -> x = y.\n  Proof.\n    intros.\n    assert (H0: index_inv (index x) = index_inv (index y)) by congruence.\n    rewrite ?index_invertible in H0.\n    assumption.\n  Qed.\n\n  Definition eq := zeq.\nEnd ZIndexed.\n\nModule ZMap := IMap(ZIndexed).\n\nModule NIndexed.\n  Definition t := N.\n  Definition index (n: N): positive :=\n    match n with\n    | N0 => xH\n    | Npos p => xO p\n    end.\n\n  Definition index_inv (p:positive) : N :=\n    match p with\n    | xH => N0\n    | xO p' => Npos p'\n    | xI _ => N0\n    end.\n\n  Lemma index_invertible : forall x,\n    index_inv (index x) = x.\n  Proof.  \n    intros; destruct x; reflexivity.\n  Qed.\n    \n  Lemma index_inj: forall (x y: N), index x = index y -> x = y.\n  Proof.\n    intros.\n    assert (H0: index_inv (index x) = index_inv (index y)) by congruence.\n    rewrite ?index_invertible in H0.\n    assumption.\n  Qed.\n\n  \n  Lemma eq: forall (x y: N), {x = y} + {x <> y}.\n  Proof.\n    decide equality. apply peq.\n  Qed.\nEnd NIndexed.\n\nModule NMap := IMap(NIndexed).\n\n(** * An implementation of maps over any type with decidable equality *)\n\nModule Type EQUALITY_TYPE.\n  Parameter t: Type.\n  Parameter eq: forall (x y: t), {x = y} + {x <> y}.\nEnd EQUALITY_TYPE.\n\nModule EMap(X: EQUALITY_TYPE) <: MAP.\n\n  Definition elt := X.t.\n  Definition elt_eq := X.eq.\n  Definition t (A: Type) := X.t -> A.\n  Definition init (A: Type) (v: A) := fun (_: X.t) => v.\n  Definition get (A: Type) (x: X.t) (m: t A) := m x.\n  Definition set (A: Type) (x: X.t) (v: A) (m: t A) :=\n    fun (y: X.t) => if X.eq y x then v else m y.\n  Lemma gi:\n    forall (A: Type) (i: elt) (x: A), init x i = x.\n  Proof.\n    intros. reflexivity.\n  Qed.\n  Lemma gss:\n    forall (A: Type) (i: elt) (x: A) (m: t A), (set i x m) i = x.\n  Proof.\n    intros. unfold set. case (X.eq i i); intro.\n    reflexivity. tauto.\n  Qed.\n  Lemma gso:\n    forall (A: Type) (i j: elt) (x: A) (m: t A),\n    i <> j -> (set j x m) i = m i.\n  Proof.\n    intros. unfold set. case (X.eq i j); intro.\n    congruence. reflexivity.\n  Qed.\n  Lemma gsspec:\n    forall (A: Type) (i j: elt) (x: A) (m: t A),\n    get i (set j x m) = if elt_eq i j then x else get i m.\n  Proof.\n    intros. unfold get, set, elt_eq. reflexivity.\n  Qed.\n  Lemma gsident:\n    forall (A: Type) (i j: elt) (m: t A), get j (set i (get i m) m) = get j m.\n  Proof.\n    intros. unfold get, set. case (X.eq j i); intro.\n    congruence. reflexivity.\n  Qed.\n  Definition map (A B: Type) (f: A -> B) (m: t A) :=\n    fun (x: X.t) => f(m x).\n  Lemma gmap:\n    forall (A B: Type) (f: A -> B) (i: elt) (m: t A),\n    get i (map f m) = f(get i m).\n  Proof.\n    intros. unfold get, map. reflexivity.\n  Qed.\nEnd EMap.\n\n(** * An implementation of trees over any type that injects into type [positive] *)\n\nModule ITree(X: INDEXED_TYPE) <: TREE.\n\n  Definition elt := X.t.\n  Definition elt_eq := X.eq.\n  Definition t (A: Type) : Type :=\n    { tr : PTree.t A | forall x, PTree.get x tr <> None ->\n                                 X.index (X.index_inv x) = x }.\n\n  Program Definition empty (A: Type): t A := PTree.empty A.\n  Next Obligation.\n    rewrite PTree.gempty in H.\n    congruence.\n  Qed.\n    \n  Program Definition get (A: Type) (k: elt) (m: t A): option A := PTree.get (X.index k) m.\n\n  Definition get_default {A:Type} (default:A) (k:elt) (m : t A) : A :=\n    match get k m with\n    | Some v => v\n    | NONE => default\n    end.\n\n  Program Definition set (A: Type) (k: elt) (v: A) (m: t A): t A\n    := PTree.set (X.index k) v m.\n  Next Obligation.\n    destruct m as [m INV]; simpl in H.\n    destruct (peq x (X.index k)).\n    + rewrite e.\n      rewrite X.index_invertible.\n      reflexivity.\n    + rewrite PTree.gso in H by assumption.\n      auto.\n  Qed.\n      \n  Program Definition remove (A: Type) (k: elt) (m: t A): t A\n    := PTree.remove (X.index k) m.\n  Next Obligation.\n    destruct m as [m INV]; simpl in H.\n    destruct (peq x (X.index k)).\n    + rewrite e.\n      rewrite X.index_invertible.\n      reflexivity.\n    + rewrite PTree.gro in H by assumption.\n      auto.\n  Qed.    \n    \n  Theorem gempty:\n    forall (A: Type) (i: elt), get i (empty A) = None.\n  Proof.\n    intros. apply PTree.gempty.\n  Qed.\n  \n  Theorem gss:\n    forall (A: Type) (i: elt) (x: A) (m: t A), get i (set i x m) = Some x.\n  Proof.\n    intros. apply PTree.gss.\n  Qed.\n  \n  Theorem gso:\n    forall (A: Type) (i j: elt) (x: A) (m: t A),\n    i <> j -> get i (set j x m) = get i m.\n  Proof.\n    intros. apply PTree.gso. red; intros; elim H; apply X.index_inj; auto.\n  Qed.\n  \n  Theorem gsspec:\n    forall (A: Type) (i j: elt) (x: A) (m: t A),\n    get i (set j x m) = if elt_eq i j then Some x else get i m.\n  Proof.\n    intros. destruct (elt_eq i j). subst j; apply gss. apply gso; auto.\n  Qed.\n  \n  Theorem grs:\n    forall (A: Type) (i: elt) (m: t A), get i (remove i m) = None.\n  Proof.\n    intros. apply PTree.grs.\n  Qed.\n  \n  Theorem gro:\n    forall (A: Type) (i j: elt) (m: t A),\n    i <> j -> get i (remove j m) = get i m.\n  Proof.\n    intros. apply PTree.gro. red; intros; elim H; apply X.index_inj; auto.\n  Qed.\n  \n  Theorem grspec:\n    forall (A: Type) (i j: elt) (m: t A),\n    get i (remove j m) = if elt_eq i j then None else get i m.\n  Proof.\n    intros. destruct (elt_eq i j). subst j; apply grs. apply gro; auto.\n  Qed.\n\n  Program Definition beq: forall (A: Type), (A -> A -> bool) -> t A -> t A -> bool\n    := PTree.beq.\n  \n  Theorem beq_correct:\n    forall (A: Type) (eqA: A -> A -> bool) (t1 t2: t A),\n    beq eqA t1 t2 = true <->\n    forall (x: elt),\n     match get x t1, get x t2 with\n     | None, None => True\n     | Some y1, Some y2 => eqA y1 y2 = true\n     | _, _ => False\n    end.\n  Proof.\n    unfold beq, get. split; intros.\n    + rewrite PTree.beq_correct in H. apply H.\n    + rewrite PTree.beq_correct.\n      destruct t1 as [t1 INV1].\n      destruct t2 as [t2 INV2].\n      simpl in *.\n      intros x.\n      specialize (H (X.index_inv x)).\n      destruct (PTree.get x t1) eqn:e1; destruct (PTree.get x t2) eqn:e2; simpl.\n      * rewrite (INV1 x), e1, e2 in H; congruence.\n      * rewrite (INV1 x), e1, e2 in H; congruence.\n      * rewrite (INV2 x), e1, e2 in H; congruence.\n      * auto.\n  Qed.\n\n\n  (* This probably could be defined, but it seems annoying...*)\n  (*\n  Program Definition combine: forall (A B C: Type), (option A -> option B -> option C) -> t A -> t B -> t C := PTree.combine.\n  Next Obligation.\n    destruct x3 as [m1 INV1].\n    destruct x4 as [m2 INV2].\n    simpl in *.\n    \n  \n  Theorem gcombine:\n    forall (A B C: Type) (f: option A -> option B -> option C),\n    f None None = None ->\n    forall (m1: t A) (m2: t B) (i: elt),\n    get i (combine f m1 m2) = f (get i m1) (get i m2).\n  Proof.\n    intros. apply PTree.gcombine. auto.\n  Qed.\n  *)\n\n  Program Definition map (A B: Type) (f : elt -> A -> B) (m: t A) : t B :=\n    PTree.map (fun p a => f (X.index_inv p) a) m.\n  Next Obligation.\n    destruct m as [m INV].\n    simpl in H.\n    apply INV.\n    rewrite PTree.gmap in H.\n    intros C.\n    rewrite C in H.\n    simpl in H.\n    congruence.\n  Qed.\n    \n  Theorem gmap:\n    forall (A B: Type) (f: elt -> A -> B) (i: elt) (m: t A),\n      get i (map f m) = option_map (f i) (get i m).\n  Proof.\n    intros.\n    unfold get, map.\n    replace (f i) with (f (X.index_inv (X.index i)))\n      by (f_equal; exact (X.index_invertible i)). \n    change (f (X.index_inv (X.index i)))\n     with  ((fun (p : positive) (a : A) => f (X.index_inv p) a) (X.index i)).\n    apply PTree.gmap.\n  Qed.\n\n  Program Definition map1:\n    forall (A B: Type), (A -> B) -> t A -> t B := PTree.map1.\n  Next Obligation.\n    destruct x2 as [m INV].\n    simpl in H.\n    apply INV.\n    rewrite PTree.gmap1 in H.\n    intros C.\n    rewrite C in H.\n    simpl in H.\n    congruence.\n  Qed.\n\n  Theorem gmap1:\n    forall (A B: Type) (f: A -> B) (i: elt) (m: t A),\n      get i (map1 f m) = option_map f (get i m).\n  Proof.\n    unfold get, map1.\n    intros.\n    apply PTree.gmap1.\n  Qed.\n    \n  (** Enumerating the bindings of a tree. *)\n  Program Definition elements (A: Type) (m: t A) : list (elt * A)\n    := List.map (fun xA => (X.index_inv (fst xA), snd xA)) (PTree.elements m).\n                                       \n  Theorem elements_correct:\n    forall (A: Type) (m: t A) (i: elt) (v: A),\n      get i m = Some v -> In (i, v) (elements m).\n  Proof.\n    unfold get, elements.\n    intros.\n    apply PTree.elements_correct in H.\n    rewrite List.in_map_iff.\n    exists (X.index i, v).\n    split; auto.\n    simpl.\n    rewrite X.index_invertible.\n    reflexivity.\n  Qed.\n\n  Theorem elements_complete:\n    forall (A: Type) (m: t A) (i: elt) (v: A),\n      In (i, v) (elements m) -> get i m = Some v.\n  Proof.    \n    unfold elements, get.\n    intros.\n    destruct m as [m INV].\n    simpl in *.\n    apply PTree.elements_complete.\n    rewrite in_map_iff in H.\n    destruct H as [[p u] [H1 H2]].\n    simpl in H1.\n    inversion H1. subst.\n    rewrite INV.\n    + assumption.\n    + apply PTree.elements_complete in H2.\n      congruence.\n  Qed.\n  \n  Theorem elements_keys_norepet:\n    forall (A: Type) (m: t A),\n      list_norepet (List.map (@fst elt A) (elements m)).\n  Proof.\n    intros.\n    destruct m as [m INV].\n    unfold elements.\n    rewrite map_map.\n    simpl.\n    rewrite <- (@map_map _ _ _ fst). \n    apply list_map_norepet.\n    + apply PTree.elements_keys_norepet.\n    + intros.\n      intros C.\n      assert (X.index (X.index_inv x) = X.index (X.index_inv y)) by congruence.\n      rewrite (INV x) in H2.\n      rewrite (INV y) in H2.\n      * congruence.\n      * rewrite in_map_iff in H0.\n        destruct H0 as [[k a] [Hfst Hin]].\n        apply PTree.elements_complete in Hin.\n        simpl in Hfst; inversion Hfst; subst.\n        congruence.\n      * rewrite in_map_iff in H.\n        destruct H as [[k a] [Hfst Hin]].\n        apply PTree.elements_complete in Hin.\n        simpl in Hfst; inversion Hfst; subst.\n        congruence.\n  Qed.\n  \n  Theorem elements_extensional:\n    forall (A: Type) (m n: t A),\n    (forall i, get i m = get i n) ->\n    elements m = elements n.\n  Proof.\n    unfold get, elements.\n    destruct m as [m INVm].\n    destruct n as [n INVn].\n    simpl.\n    intros.\n    rewrite (PTree.elements_extensional n m); [reflexivity|].\n    intros i.\n    specialize (H (X.index_inv i)).\n    destruct (PTree.get i n) eqn:?;\n    destruct (PTree.get i m) eqn:?.\n    * rewrite (INVm i) in H; congruence.\n    * rewrite (INVn i) in H; congruence.\n    * rewrite (INVm i) in H; congruence.\n    * reflexivity.\n  Qed.\n  \n  Theorem elements_remove:\n    forall (A: Type) i v (m: t A),\n    get i m = Some v ->\n    exists l1 l2, elements m = l1 ++ (i,v) :: l2 /\\ elements (remove i m) = l1 ++ l2.\n  Proof.\n    unfold get, remove, elements.\n    intros.\n    destruct m as [m INV].\n    simpl in *.\n    assert (H' := PTree.elements_remove _ _ H).\n    destruct H' as [l1 [l2 [H1 H2]]].\n    exists (List.map (fun xA : positive * A => (X.index_inv (fst xA), snd xA)) l1).\n    exists (List.map (fun xA : positive * A => (X.index_inv (fst xA), snd xA)) l2).\n    rewrite H1.\n    rewrite H2.\n    repeat rewrite map_app.\n    simpl.\n    rewrite X.index_invertible.\n    split; reflexivity.\n  Qed.\n    \n  (** Folding a function over all bindings of a tree. *)\n  Program Definition fold (A B: Type) (f : B -> elt -> A -> B) (m : t A) (b: B) : B\n    := PTree.fold (fun b x a => f b (X.index_inv x) a) m b.\n\n  Lemma fold_left_equal : forall A B (f g : A->B->A) l v,\n      (forall x y, f x y = g x y) ->\n      fold_left f l v = fold_left g l v.\n  Proof.\n    induction l.\n    - reflexivity.\n    - simpl. intros.\n      rewrite (IHl _ H).\n      rewrite H.\n      reflexivity.\n  Qed.\n\n  Lemma fold_left_map : forall A B C (f : A->B->A) (g : C -> B) (l : list C) v,\n      fold_left f (List.map g l) v = fold_left (fun x y => f x (g y)) l v.\n  Proof.\n    induction l.\n    - reflexivity.\n    - simpl. intros.\n      rewrite IHl.\n      reflexivity.\n  Qed.\n  \n  Theorem fold_spec:\n    forall (A B: Type) (f: B -> elt -> A -> B) (v: B) (m: t A),\n    fold f m v =\n    List.fold_left (fun a p => f a (fst p) (snd p)) (elements m) v.\n  Proof.\n    intros.\n    unfold fold, elements.\n    rewrite PTree.fold_spec.\n    rewrite fold_left_map.\n    apply fold_left_equal.\n    reflexivity.\n  Qed.\n  \n  Program Definition fold1 (A B: Type) (f : B -> A -> B) (m: t A) (v: B) : B\n    := PTree.fold1 f m v.\n  \n  Theorem fold1_spec:\n    forall (A B: Type) (f: B -> A -> B) (v: B) (m: t A),\n    fold1 f m v =\n    List.fold_left (fun a p => f a (snd p)) (elements m) v.\n  Proof.\n    intros.\n    unfold fold1, elements.\n    rewrite PTree.fold1_spec.\n    rewrite fold_left_map.\n    apply fold_left_equal.\n    reflexivity.\n  Qed.\n\nEnd ITree.\n\nModule ZTree := ITree(ZIndexed).\n\nRequire Import cclib.Integers.\n\nModule Int256Indexed <: INDEXED_TYPE.\n\nDefinition t := int256.\nDefinition index (i : int256) :=\n  let (intval, _) := i in\n  match intval with\n  | Z0 => xH\n  | Zpos p => xO p\n  | Zneg p => xI p\n  end.\n\nDefinition index_inv p :=\n  match p with\n  | xH => Int256.zero\n  | xO p' => Int256.repr (Zpos p')\n  | xI p' => Int256.repr (Zneg p')\n  end.\n\n  Lemma zlt_proof_irrelevance :\n    forall {x y : Z}  (p q : x < y), p = q.\n  Proof.\n    intros.\n    apply Eqdep_dec.eq_proofs_unicity.\n    decide equality.\n  Qed.\n\n  Lemma range_proof_irrelevance :\n    forall {x y z : Z}  (p q : x < y < z), p = q.\n  Proof.\n    intros.\n    destruct p as [p1 p2].\n    destruct q as [q1 q2].\n    rewrite (zlt_proof_irrelevance p1 q1).\n    rewrite (zlt_proof_irrelevance p2 q2).\n    reflexivity.\n  Qed.\n\n  Transparent Int256.Z_mod_modulus.\n  Lemma modulus_nop : forall x,\n      -1 < x < Int256.modulus -> Int256.Z_mod_modulus x = x.\n  Proof.\n    intros.\n    unfold Int256.Z_mod_modulus.\n    destruct x.\n    + reflexivity.\n    + rewrite Int256.P_mod_two_p_eq.\n      rewrite Zmod_small by (unfold Int256.modulus in H; omega).\n      reflexivity.\n    + destruct H.\n      unfold Z.lt in H.\n      simpl in H.\n      destruct p; simpl in H; congruence.\n  Qed.\n  Opaque Int256.Z_mod_modulus.\n  \n  Transparent Int256.repr.\n  Lemma index_invertible : forall x, index_inv (index x) = x.\n  Proof.\n    intros.\n    destruct x as [x x_range].\n    destruct x; simpl.\n    + unfold Int256.zero.\n      unfold Int256.repr.\n      rewrite (range_proof_irrelevance (Int256.Z_mod_modulus_range' 0) x_range).\n      reflexivity.\n    + unfold Int256.repr.\n      generalize (Int256.Z_mod_modulus_range' (Z.pos p)).      \n      rewrite (modulus_nop x_range).\n      intros a.\n      rewrite (range_proof_irrelevance a x_range).\n      reflexivity.\n    + unfold Int256.repr.\n      generalize (Int256.Z_mod_modulus_range' (Z.neg p)).      \n      rewrite (modulus_nop x_range).\n      intros a.\n      rewrite (range_proof_irrelevance a x_range).\n      reflexivity.\n  Qed.\n  Opaque Int256.repr.\n  \n  Lemma index_inj: forall (x y: int256), index x = index y -> x = y.\n  Proof.\n    unfold index; destruct x; destruct y; intros;\n      try discriminate; try reflexivity.\n    apply Int256.mkint_eq.\n    destruct intval; destruct intval0; try (inversion H); try reflexivity.\n  Qed.\n\n  Definition eq := Int256.eq_dec.\n\nEnd Int256Indexed.\n\nModule Int256Tree := ITree(Int256Indexed).\nModule Int256Map := IMap(Int256Indexed).\n\n(** * Additional properties over trees *)\n\nModule Tree_Properties(T: TREE).\n\n  (** An induction principle over [fold]. *)\n\n  Section TREE_FOLD_IND.\n\n  Variables V A: Type.\n  Variable f: A -> T.elt -> V -> A.\n  Variable P: T.t V -> A -> Prop.\n  Variable init: A.\n  Variable m_final: T.t V.\n\n  Hypothesis P_compat:\n    forall m m' a,\n    (forall x, T.get x m = T.get x m') ->\n    P m a -> P m' a.\n\n  Hypothesis H_base:\n    P (T.empty _) init.\n\n  Hypothesis H_rec:\n    forall m a k v,\n    T.get k m = None -> T.get k m_final = Some v -> P m a -> P (T.set k v m) (f a k v).\n\n  Let f' (a: A) (p : T.elt * V) := f a (fst p) (snd p).\n\n  Let P' (l: list (T.elt * V)) (a: A) : Prop :=\n    forall m, list_equiv l (T.elements m) -> P m a.\n\n  Remark H_base':\n    P' nil init.\n  Proof.\n    red; intros. apply P_compat with (T.empty _); auto.\n    intros. rewrite T.gempty. symmetry. case_eq (T.get x m); intros; auto.\n    assert (In (x, v) nil). rewrite (H (x, v)). apply T.elements_correct. auto.\n    contradiction.\n  Qed.\n\n  Remark H_rec':\n    forall k v l a,\n    ~In k (List.map (@fst T.elt V) l) ->\n    In (k, v) (T.elements m_final) ->\n    P' l a ->\n    P' (l ++ (k, v) :: nil) (f a k v).\n  Proof.\n    unfold P'; intros.\n    set (m0 := T.remove k m).\n    apply P_compat with (T.set k v m0).\n      intros. unfold m0. rewrite T.gsspec. destruct (T.elt_eq x k).\n      symmetry. apply T.elements_complete. rewrite <- (H2 (x, v)).\n      apply in_or_app. simpl. intuition congruence.\n      apply T.gro. auto.\n    apply H_rec. unfold m0. apply T.grs. apply T.elements_complete. auto.\n    apply H1. red. intros [k' v'].\n    split; intros.\n    apply T.elements_correct. unfold m0. rewrite T.gro. apply T.elements_complete.\n    rewrite <- (H2 (k', v')). apply in_or_app. auto.\n    red; intro; subst k'. elim H. change k with (fst (k, v')). apply in_map. auto.\n    assert (T.get k' m0 = Some v'). apply T.elements_complete. auto.\n    unfold m0 in H4. rewrite T.grspec in H4. destruct (T.elt_eq k' k). congruence.\n    assert (In (k', v') (T.elements m)). apply T.elements_correct; auto.\n    rewrite <- (H2 (k', v')) in H5. destruct (in_app_or _ _ _ H5). auto.\n    simpl in H6. intuition congruence.\n  Qed.\n\n  Lemma fold_rec_aux:\n    forall l1 l2 a,\n    list_equiv (l2 ++ l1) (T.elements m_final) ->\n    list_disjoint (List.map (@fst T.elt V) l1) (List.map (@fst T.elt V) l2) ->\n    list_norepet (List.map (@fst T.elt V) l1) ->\n    P' l2 a -> P' (l2 ++ l1) (List.fold_left f' l1 a).\n  Proof.\n    induction l1; intros; simpl.\n    rewrite <- List.app_nil_end. auto.\n    destruct a as [k v]; simpl in *. inv H1.\n    change ((k, v) :: l1) with (((k, v) :: nil) ++ l1). rewrite <- List.app_ass. apply IHl1.\n    rewrite app_ass. auto.\n    red; intros. rewrite map_app in H3. destruct (in_app_or _ _ _ H3). apply H0; auto with coqlib.\n    simpl in H4. intuition congruence.\n    auto.\n    unfold f'. simpl. apply H_rec'; auto. eapply list_disjoint_notin; eauto with coqlib.\n    rewrite <- (H (k, v)). apply in_or_app. simpl. auto.\n  Qed.\n\n  Theorem fold_rec:\n    P m_final (T.fold f m_final init).\n  Proof.\n    intros. rewrite T.fold_spec. fold f'.\n    assert (P' (nil ++ T.elements m_final) (List.fold_left f' (T.elements m_final) init)).\n      apply fold_rec_aux.\n      simpl. red; intros; tauto.\n      simpl. red; intros. elim H0.\n      apply T.elements_keys_norepet.\n      apply H_base'.\n    simpl in H. red in H. apply H. red; intros. tauto.\n  Qed.\n\n  End TREE_FOLD_IND.\n\n  (** A nonnegative measure over trees *)\n\n  Section MEASURE.\n\n  Variable V: Type.\n\n  Definition cardinal (x: T.t V) : nat := List.length (T.elements x).\n\n  Theorem cardinal_remove:\n    forall x m y, T.get x m = Some y -> (cardinal (T.remove x m) < cardinal m)%nat.\n  Proof.\n    unfold cardinal; intros.\n    exploit T.elements_remove; eauto. intros (l1 & l2 & P & Q).\n    rewrite P, Q. rewrite ! app_length. simpl. omega.\n  Qed.\n\n  Theorem cardinal_set:\n    forall x m y, T.get x m = None -> (cardinal m < cardinal (T.set x y m))%nat.\n  Proof.\n    intros. set (m' := T.set x y m).\n    replace (cardinal m) with (cardinal (T.remove x m')).\n    apply cardinal_remove with y. unfold m'; apply T.gss.\n    unfold cardinal. f_equal. apply T.elements_extensional.\n    intros. unfold m'. rewrite T.grspec, T.gsspec.\n    destruct (T.elt_eq i x); auto. congruence.\n  Qed.\n\n  End MEASURE.\n\n  (** Forall and exists *)\n\n  Section FORALL_EXISTS.\n\n  Variable A: Type.\n\n  Definition for_all (m: T.t A) (f: T.elt -> A -> bool) : bool :=\n    T.fold (fun b x a => b && f x a) m true.\n\n  Lemma for_all_correct:\n    forall m f,\n    for_all m f = true <-> (forall x a, T.get x m = Some a -> f x a = true).\n  Proof.\n    intros m0 f.\n    unfold for_all. apply fold_rec; intros.\n  - (* Extensionality *)\n    rewrite H0. split; intros. rewrite <- H in H2; auto. rewrite H in H2; auto.\n  - (* Base case *)\n    split; intros. rewrite T.gempty in H0; congruence. auto.\n  - (* Inductive case *)\n    split; intros.\n    destruct (andb_prop _ _ H2). rewrite T.gsspec in H3. destruct (T.elt_eq x k).\n    inv H3. auto.\n    apply H1; auto.\n    apply andb_true_intro. split.\n    rewrite H1. intros. apply H2. rewrite T.gso; auto. congruence.\n    apply H2. apply T.gss.\n  Qed.\n\n  Definition exists_ (m: T.t A) (f: T.elt -> A -> bool) : bool :=\n    T.fold (fun b x a => b || f x a) m false.\n\n  Lemma exists_correct:\n    forall m f,\n    exists_ m f = true <-> (exists x a, T.get x m = Some a /\\ f x a = true).\n  Proof.\n    intros m0 f.\n    unfold exists_. apply fold_rec; intros.\n  - (* Extensionality *)\n    rewrite H0. split; intros (x0 & a0 & P & Q); exists x0; exists a0; split; auto; congruence.\n  - (* Base case *)\n    split; intros. congruence. destruct H as (x & a & P & Q). rewrite T.gempty in P; congruence.\n  - (* Inductive case *)\n    split; intros.\n    destruct (orb_true_elim _ _ H2).\n    rewrite H1 in e. destruct e as (x1 & a1 & P & Q).\n    exists x1; exists a1; split; auto. rewrite T.gso; auto. congruence.\n    exists k; exists v; split; auto. apply T.gss.\n    destruct H2 as (x1 & a1 & P & Q). apply orb_true_intro.\n    rewrite T.gsspec in P. destruct (T.elt_eq x1 k).\n    inv P. right; auto.\n    left. apply H1. exists x1; exists a1; auto.\n  Qed.\n\n  Remark exists_for_all:\n    forall m f,\n    exists_ m f = negb (for_all m (fun x a => negb (f x a))).\n  Proof.\n    intros. unfold exists_, for_all. rewrite ! T.fold_spec.\n    change false with (negb true). generalize (T.elements m) true.\n    induction l; simpl; intros.\n    auto.\n    rewrite <- IHl. f_equal.\n    destruct b; destruct (f (fst a) (snd a)); reflexivity.\n  Qed.\n\n  Remark for_all_exists:\n    forall m f,\n    for_all m f = negb (exists_ m (fun x a => negb (f x a))).\n  Proof.\n    intros. unfold exists_, for_all. rewrite ! T.fold_spec.\n    change true with (negb false). generalize (T.elements m) false.\n    induction l; simpl; intros.\n    auto.\n    rewrite <- IHl. f_equal.\n    destruct b; destruct (f (fst a) (snd a)); reflexivity.\n  Qed.\n\n  Lemma for_all_false:\n    forall m f,\n    for_all m f = false <-> (exists x a, T.get x m = Some a /\\ f x a = false).\n  Proof.\n    intros. rewrite for_all_exists.\n    rewrite negb_false_iff. rewrite exists_correct.\n    split; intros (x & a & P & Q); exists x; exists a; split; auto.\n    rewrite negb_true_iff in Q. auto.\n    rewrite Q; auto.\n  Qed.\n\n  Lemma exists_false:\n    forall m f,\n    exists_ m f = false <-> (forall x a, T.get x m = Some a -> f x a = false).\n  Proof.\n    intros. rewrite exists_for_all.\n    rewrite negb_false_iff. rewrite for_all_correct.\n    split; intros. apply H in H0. rewrite negb_true_iff in H0. auto. rewrite H; auto.\n  Qed.\n\n  End FORALL_EXISTS.\n\n  (** More about [beq] *)\n\n  Section BOOLEAN_EQUALITY.\n\n  Variable A: Type.\n  Variable beqA: A -> A -> bool.\n\n  Theorem beq_false:\n    forall m1 m2,\n    T.beq beqA m1 m2 = false <->\n    exists x, match T.get x m1, T.get x m2 with\n              | None, None => False\n              | Some a1, Some a2 => beqA a1 a2 = false\n              | _, _ => True\n              end.\n  Proof.\n    intros; split; intros.\n  - (* beq = false -> existence *)\n    set (p1 := fun x a1 => match T.get x m2 with None => false | Some a2 => beqA a1 a2 end).\n    set (p2 := fun x a2 => match T.get x m1 with None => false | Some a1 => beqA a1 a2 end).\n    destruct (for_all m1 p1) eqn:F1; [destruct (for_all m2 p2) eqn:F2 | idtac].\n    + cut (T.beq beqA m1 m2 = true). congruence.\n      rewrite for_all_correct in *. rewrite T.beq_correct; intros.\n      destruct (T.get x m1) as [a1|] eqn:X1.\n      generalize (F1 _ _ X1). unfold p1. destruct (T.get x m2); congruence.\n      destruct (T.get x m2) as [a2|] eqn:X2; auto.\n      generalize (F2 _ _ X2). unfold p2. rewrite X1. congruence.\n    + rewrite for_all_false in F2. destruct F2 as (x & a & P & Q).\n      exists x. rewrite P. unfold p2 in Q. destruct (T.get x m1); auto.\n    + rewrite for_all_false in F1. destruct F1 as (x & a & P & Q).\n      exists x. rewrite P. unfold p1 in Q. destruct (T.get x m2); auto.\n  - (* existence -> beq = false *)\n    destruct H as [x P].\n    destruct (T.beq beqA m1 m2) eqn:E; auto.\n    rewrite T.beq_correct in E.\n    generalize (E x). destruct (T.get x m1); destruct (T.get x m2); tauto || congruence.\n  Qed.\n\n  End BOOLEAN_EQUALITY.\n\n  (** Extensional equality between trees *)\n\n  Section EXTENSIONAL_EQUALITY.\n\n  Variable A: Type.\n  Variable eqA: A -> A -> Prop.\n  Hypothesis eqAeq: Equivalence eqA.\n\n  Definition Equal (m1 m2: T.t A) : Prop :=\n    forall x, match T.get x m1, T.get x m2 with\n                  | None, None => True\n                  | Some a1, Some a2 => a1 === a2\n                  | _, _ => False\n              end.\n\n  Lemma Equal_refl: forall m, Equal m m.\n  Proof.\n    intros; red; intros. destruct (T.get x m); auto. reflexivity.\n  Qed.\n\n  Lemma Equal_sym: forall m1 m2, Equal m1 m2 -> Equal m2 m1.\n  Proof.\n    intros; red; intros. generalize (H x). destruct (T.get x m1); destruct (T.get x m2); auto. intros; symmetry; auto.\n  Qed.\n\n  Lemma Equal_trans: forall m1 m2 m3, Equal m1 m2 -> Equal m2 m3 -> Equal m1 m3.\n  Proof.\n    intros; red; intros. generalize (H x) (H0 x).\n    destruct (T.get x m1); destruct (T.get x m2); try tauto;\n    destruct (T.get x m3); try tauto.\n    intros. transitivity a0; auto.\n  Qed.\n\n  Instance Equal_Equivalence : Equivalence Equal := {\n    Equivalence_Reflexive := Equal_refl;\n    Equivalence_Symmetric := Equal_sym;\n    Equivalence_Transitive := Equal_trans\n  }.\n\n  Hypothesis eqAdec: EqDec A eqA.\n\n  Program Definition Equal_dec (m1 m2: T.t A) : { m1 === m2 } + { m1 =/= m2 } :=\n    match T.beq (fun a1 a2 => proj_sumbool (a1 == a2)) m1 m2 with\n    | true => left _\n    | false => right _\n    end.\n  Next Obligation.\n    rename Heq_anonymous into B.\n    symmetry in B. rewrite T.beq_correct in B.\n    red; intros. generalize (B x).\n    destruct (T.get x m1); destruct (T.get x m2); auto.\n    intros. eapply proj_sumbool_true; eauto.\n  Qed.\n  Next Obligation.\n    assert (T.beq (fun a1 a2 => proj_sumbool (a1 == a2)) m1 m2 = true).\n    apply T.beq_correct; intros.\n    generalize (H x).\n    destruct (T.get x m1); destruct (T.get x m2); try tauto.\n    intros. apply proj_sumbool_is_true; auto.\n    unfold equiv, complement in H0. congruence.\n  Qed.\n\n  Instance Equal_EqDec : EqDec (T.t A) Equal := Equal_dec.\n\n  End EXTENSIONAL_EQUALITY.\n\n  (** Creating a tree from a list of (key, value) pairs. *)\n\n  Section OF_LIST.\n\n  Variable A: Type.\n\n  Let f := fun (m: T.t A) (k_v: T.elt * A) => T.set (fst k_v) (snd k_v) m.\n\n  Definition of_list (l: list (T.elt * A)) : T.t A :=\n    List.fold_left f l (T.empty _).\n\n  Lemma in_of_list:\n    forall l k v, T.get k (of_list l) = Some v -> In (k, v) l.\n  Proof.\n    assert (REC: forall k v l m,\n             T.get k (fold_left f l m) = Some v -> In (k, v) l \\/ T.get k m = Some v).\n    { induction l as [ | [k1 v1] l]; simpl; intros.\n    - tauto.\n    - apply IHl in H. unfold f in H. simpl in H. rewrite T.gsspec in H.\n      destruct H; auto.\n      destruct (T.elt_eq k k1). inv H. auto. auto.\n    }\n    intros. apply REC in H. rewrite T.gempty in H. intuition congruence.\n  Qed.\n\n  Lemma of_list_dom:\n    forall l k, In k (map fst l) -> exists v, T.get k (of_list l) = Some v.\n  Proof.\n    assert (REC: forall k l m,\n              In k (map fst l) \\/ (exists v, T.get k m = Some v) ->\n              exists v, T.get k (fold_left f l m) = Some v).\n    { induction l as [ | [k1 v1] l]; simpl; intros.\n    - tauto.\n    - apply IHl. unfold f; rewrite T.gsspec. simpl. destruct (T.elt_eq k k1).\n      right; econstructor; eauto.\n      intuition congruence.\n    }\n    intros. apply REC. auto.\n  Qed.\n\n  Remark of_list_unchanged:\n    forall k l m, ~In k (map fst l) -> T.get k (List.fold_left f l m) = T.get k m.\n  Proof.\n    induction l as [ | [k1 v1] l]; simpl; intros.\n  - auto.\n  - rewrite IHl by tauto. unfold f; apply T.gso; intuition auto.\n  Qed.\n\n  Lemma of_list_unique:\n    forall k v l1 l2,\n    ~In k (map fst l2) -> T.get k (of_list (l1 ++ (k, v) :: l2)) = Some v.\n  Proof.\n    intros. unfold of_list. rewrite fold_left_app. simpl.\n    rewrite of_list_unchanged by auto. unfold f; apply T.gss.\n  Qed.\n\n  Lemma of_list_norepet:\n    forall l k v, list_norepet (map fst l) -> In (k, v) l -> T.get k (of_list l) = Some v.\n  Proof.\n    assert (REC: forall k v l m,\n              list_norepet (map fst l) ->\n              In (k, v) l ->\n              T.get k (fold_left f l m) = Some v).\n    { induction l as [ | [k1 v1] l]; simpl; intros.\n      contradiction.\n      inv H. destruct H0.\n      inv H. rewrite of_list_unchanged by auto. apply T.gss.\n      apply IHl; auto.\n    }\n    intros; apply REC; auto.\n  Qed.\n\n  Lemma of_list_elements:\n    forall m k, T.get k (of_list (T.elements m)) = T.get k m.\n  Proof.\n    intros. destruct (T.get k m) as [v|] eqn:M.\n  - apply of_list_norepet. apply T.elements_keys_norepet. apply T.elements_correct; auto.\n  - destruct (T.get k (of_list (T.elements m))) as [v|] eqn:M'; auto.\n    apply in_of_list in M'. apply T.elements_complete in M'. congruence.\n  Qed.\n\n  End OF_LIST.\n\n  Lemma of_list_related:\n    forall (A B: Type) (R: A -> B -> Prop) k l1 l2,\n    list_forall2 (fun ka kb => fst ka = fst kb /\\ R (snd ka) (snd kb)) l1 l2 ->\n    option_rel R (T.get k (of_list l1)) (T.get k (of_list l2)).\n  Proof.\n    intros until k. unfold of_list.\n    set (R' := fun ka kb => fst ka = fst kb /\\ R (snd ka) (snd kb)).\n    set (fa := fun (m : T.t A) (k_v : T.elt * A) => T.set (fst k_v) (snd k_v) m).\n    set (fb := fun (m : T.t B) (k_v : T.elt * B) => T.set (fst k_v) (snd k_v) m).\n    assert (REC: forall l1 l2, list_forall2 R' l1 l2 ->\n                 forall m1 m2, option_rel R (T.get k m1) (T.get k m2) ->\n                 option_rel R (T.get k (fold_left fa l1 m1)) (T.get k (fold_left fb l2 m2))).\n    { induction 1; intros; simpl.\n    - auto.\n    - apply IHlist_forall2. unfold fa, fb. rewrite ! T.gsspec.\n      destruct H as [E F]. rewrite E. destruct (T.elt_eq k (fst b1)).\n      constructor; auto.\n      auto. }\n    intros. apply REC; auto. rewrite ! T.gempty. constructor.\n  Qed.\n\n\n  (* folding a commutative function respects permutations. *)\n\n  Require Import Permutation.\n\n  (* norepet is from Compcert's Coqlib, NoDup is from the Coq standard lib, they mean the same thing. *)\n  Lemma norepet_NoDup : forall A (l : list A), list_norepet l -> NoDup l.\n  Proof.  \n    induction 1; constructor; auto.\n  Qed.\n\n  Lemma NoDup_map : forall A B (f:A->B) (l : list A), NoDup (map f l) -> NoDup l.\n  Proof.\n    intros.\n    remember (map f l) as l1.\n    revert l Heql1.\n    induction H.\n    + destruct l; simpl in *; try congruence; constructor.\n    + intros.\n      destruct l0; simpl in *; try congruence; constructor;\n        inversion Heql1; subst; auto using in_map.\n  Qed.    \n\n  Lemma elements_NoDup : forall A (m : T.t A), NoDup (T.elements m).\n  Proof.\n    intros.\n    apply NoDup_map with (f:=fst).\n    apply norepet_NoDup.\n    apply T.elements_keys_norepet.\n  Qed.\n\n  Lemma set_permutation : forall {A} k (v:A) m,\n      T.get k m = None ->\n      Permutation (T.elements (T.set k v m)) ((k,v) :: T.elements m).\n  Proof.\n    intros.\n    apply NoDup_Permutation. \n    - apply elements_NoDup.\n    - constructor.\n       intros HIn; apply T.elements_complete in HIn; congruence.\n       apply elements_NoDup.\n    - intros [k' v']. split.\n      * destruct (T.elt_eq k' k).\n        + subst. \n          intros HIn.\n          apply T.elements_complete in HIn.\n          rewrite T.gss in HIn.\n          inversion HIn; subst.\n          simpl; auto.\n        + intros HIn.\n          apply T.elements_complete in HIn.\n          rewrite T.gso in HIn by auto.\n          right.\n          apply T.elements_correct.\n          auto.\n      * destruct 1.\n        + inversion H0;  subst.\n          apply T.elements_correct.\n          rewrite T.gss. auto.\n        + assert (k'<>k).\n            { apply T.elements_complete in H0. intros ?. congruence. }\n          apply T.elements_correct.\n          apply T.elements_complete in H0.  \n          rewrite T.gso; auto.\n  Qed.\n\n  Lemma get_permutation : forall {A} k (v:A) m,\n      T.get k m = Some v ->\n      exists lst, Permutation (T.elements m) (lst ++ (k,v)::nil).\n  Proof.\n    intros A k v m Hget.\n    assert (Hin := T.elements_correct Hget).\n    assert (Hnodup := T.elements_keys_norepet m).\n    apply norepet_NoDup in Hnodup.\n    destruct (in_split _ _ Hin) as [elements1 [ elements2  elements_eq]].\n    exists (elements1 ++ elements2).\n    rewrite elements_eq in *.\n    clear Hin elements_eq.\n    rewrite <- !app_assoc.\n    apply Permutation_app_head.\n    apply Permutation_cons_append.\n  Qed.\n\n  Lemma NoDup_snoc : forall {A} (x:A) l,\n      NoDup (x::l) -> NoDup (l++x::nil).\n  Proof.\n    induction l.\n    - constructor.\n      simpl; intuition.\n      constructor.\n    - simpl.\n      inversion 1.\n      inversion H3.\n      simpl in *.\n      subst.\n      constructor.\n      + rewrite in_app.\n        simpl in *.\n        intuition.\n      + apply IHl.        \n        constructor;\n          intuition.\n  Qed.\n      \n  \n  Section fold_permutation.\n    Context  (A B K : Type)\n             (f1 : A->B->A) \n             (f1_comm : forall (b1 b2 : B) a, f1 (f1 a b1) b2 = f1 (f1 a b2) b1)\n             (f : A -> K -> B -> A)\n             (f_comm : forall k1 b1 k2 b2 a,\n                 k1 <> k2 -> \n                 f (f a k1 b1) k2 b2 = f (f a k2 b2) k1 b1).\n\n    Lemma fold1_permutation : forall l l',\n        Permutation l l'  -> forall init,\n        List.fold_left f1 l init = List.fold_left f1 l' init.\n    Proof.\n      induction 1; intros.\n      - reflexivity.\n      - simpl. rewrite IHPermutation.\n        reflexivity.\n      - simpl. rewrite f1_comm. reflexivity.\n      - rewrite IHPermutation1, IHPermutation2.\n        reflexivity.\n    Qed.\n\n    Definition NoDup_keys (l : list (K*B)) := NoDup (map fst l).\n\n    Lemma Permutation_NoDup_keys : forall l l',\n        Permutation l l' -> NoDup_keys l -> NoDup_keys l'.\n    Proof.\n      unfold NoDup_keys.\n      intros.\n      apply Permutation_NoDup with (map fst l).\n      - apply Permutation_map.\n        assumption.\n      - assumption.\n    Qed.\n\n    Lemma NoDup_keys_inv_cons : forall a l,\n        NoDup_keys (a::l) ->\n        NoDup_keys l.\n    Proof.\n      unfold NoDup_keys.\n      simpl.\n      intros.\n      rewrite NoDup_cons_iff in H.\n      tauto.\n    Qed.\n\n    Lemma fold_permutation : forall l l',\n        Permutation l l' -> NoDup_keys l -> forall init,\n            List.fold_left (fun a p => f a (fst p) (snd p)) l  init\n          = List.fold_left (fun a p => f a (fst p) (snd p)) l' init.\n    Proof.\n      induction 1; intros.\n      - reflexivity.\n      - simpl. rewrite IHPermutation.\n        + reflexivity.\n        + apply NoDup_keys_inv_cons in H0.\n          assumption.\n      - simpl.\n        rewrite f_comm.\n        + reflexivity.\n        + unfold NoDup_keys in H.\n          simpl in H.\n          rewrite !NoDup_cons_iff in H.\n          simpl in H.\n          intros H1.\n          symmetry in H1.\n          tauto.\n      - rewrite IHPermutation1, IHPermutation2 by eauto using Permutation_NoDup_keys .\n        reflexivity.\n    Qed.\n  End fold_permutation.\n\n  Section fold1_set.\n    Context  {A} {B} (f : A->B->A)\n             (f_comm : forall (x y : B) a, f (f a x) y = f (f a y) x).\n\n    Lemma f1_comm : forall (x y : T.elt * B) (a : A),\n        (fun a0 p => f a0 (snd p))\n          ((fun a0 p => f a0 (snd p)) a x) y =\n        (fun a0 p => f a0 (snd p))\n          ((fun a0 p => f a0 (snd p)) a y) x.\n    intros [kx x] [ky y] init.\n    simpl.  \n    apply f_comm.\n    Qed.\n\n    Lemma fold1_extensional : forall init m m',\n        (forall k,  T.get k m = T.get k m') ->\n        T.fold1 f m init = T.fold1 f m' init.\n    Proof.\n      intros.\n      repeat rewrite T.fold1_spec.\n      refine (fold1_permutation _ _ _ _).\n      + intros.\n        apply f_comm.\n      + apply NoDup_Permutation; try apply elements_NoDup.\n        intros [k' v'].\n        split; intros HIn;\n        apply T.elements_complete in HIn;\n        apply T.elements_correct;\n        rewrite H in *;  \n        auto.\n    Qed.\n\n    Lemma elements_set_decompose : forall {A} k (v:A) m,\n      T.elements (T.set k v m) = T.elements (T.set k v (T.remove k m)).\n    Proof.\n      intros.\n      apply  T.elements_extensional.\n      intros i. destruct (T.elt_eq i k).\n      + subst. repeat rewrite T.gss. reflexivity.\n      + repeat rewrite T.gso by auto. rewrite T.gro by auto.\n        reflexivity.\n    Qed.\n\n    Lemma fold1_set : forall init k v m,\n      T.fold1 f (T.set k v m) init = T.fold1 f (T.remove k m) (f init v).\n    Proof.\n      intros.\n      repeat rewrite T.fold1_spec.\n      rewrite elements_set_decompose.\n      assert (HPerm: Permutation (T.elements (T.set k v (T.remove k m)))\n                                 ((k,v):: T.elements (T.remove k m)))\n        by (apply set_permutation; apply T.grs).\n      rewrite (fold1_permutation _ f1_comm HPerm).\n      reflexivity.\n    Qed.\n\n    Lemma fold1_get : forall init k v m,\n      T.get k m = Some v ->\n      T.fold1 f m init = T.fold1 f (T.remove k m) (f init v).\n    Proof.\n      intros.\n      replace (T.fold1 f m init)\n        with  (T.fold1 f (T.set k v m) init).\n        + apply fold1_set.\n        + apply fold1_extensional.\n          intros k0.\n          destruct (T.elt_eq k0 k); subst.\n           - rewrite T.gss; auto.\n           - rewrite T.gso; auto.\n    Qed.\n\n\n    Lemma fold1_remove_set : forall init k v m,\n        T.fold1 f (T.remove k (T.set k v m)) init = T.fold1 f (T.remove k m) init.\n    Proof.\n      intros.\n      apply fold1_extensional.\n      intros k0.\n      repeat rewrite T.grspec.\n      destruct (T.elt_eq k0 k); subst.\n      + reflexivity.\n      + rewrite T.gso; auto.\n    Qed.\n  End fold1_set.\n\n  Section sum.\n    Require Import ZArith.\n    Definition sum (m : T.t Z) := T.fold1 Z.add m 0.\n\n    Lemma plus_comm : forall x y a : Z, a + x + y = a + y + x.\n    intros; omega.\n    Qed.\n\n    Theorem constant_sum : forall (m : T.t Z) k v k' v' i,\n        T.get k  m = Some v ->\n        T.get k' m = Some v' ->\n        k <> k' ->\n        sum (T.set k (v - i) (T.set k' (v' + i) m)) = sum m.\n    Proof.\n      intros m k v k' v' i Hget_k Hget_k' Hneq.\n      unfold sum.\n      rewrite fold1_get with (k0:=k') (v0:=(v'+i));\n        [|apply plus_comm|rewrite T.gso by congruence; rewrite T.gss; reflexivity].\n      rewrite fold1_get with (k0:=k) (v0:=(v - i));\n        [|apply plus_comm|rewrite T.gro by congruence; rewrite T.gss; reflexivity].\n      rewrite fold1_get with (k0:=k') (v0:=v') (m0:=m);\n        [|apply plus_comm|congruence].\n      rewrite fold1_get with (k0:=k) (v0:=v) (m0:=T.remove k' m);\n        [|apply plus_comm|rewrite T.gro; congruence].\n      replace (T.fold1 Z.add\n                       (T.remove k (T.remove k' (T.set k (v - i) (T.set k' (v' + i) m))))\n                       (0 + (v' + i) + (v - i)))\n      with (T.fold1 Z.add\n                   (T.remove k (T.remove k' m))\n                   (0 + (v' + i) + (v - i))).\n      + f_equal.\n        omega.\n      + apply fold1_extensional.\n        - apply plus_comm.\n        - intros k0.\n          destruct (T.elt_eq k0 k); destruct (T.elt_eq k0 k'); subst;\n          (repeat first [rewrite T.grs| rewrite T.gro by auto|rewrite T.gso by auto ]);\n          reflexivity.\n    Qed.\n\n    Definition nonzero_elements (m : T.t Z) :=\n      List.filter (fun e => negb (Z.eqb (snd e) 0)) (T.elements m).\n\n    Lemma nonzero_elements_spec : forall m k v,\n        In (k,v) (nonzero_elements m) <->\n        (In (k,v) (T.elements m) /\\ v<>0).\n    Proof.\n      unfold nonzero_elements.\n      intros.\n      rewrite filter_In.\n      rewrite negb_true_iff.\n      simpl.\n      rewrite Z.eqb_neq.\n      intuition.\n    Qed.\n\n    Lemma sum_fold_left_nonzero : forall m init,\n      List.fold_left (fun a p => a + (snd p)) (nonzero_elements m) init =\n      List.fold_left (fun a p => a + (snd p)) (T.elements m) init.\n    Proof.\n      intros m.\n      unfold nonzero_elements.\n      induction (T.elements m).\n      - reflexivity.\n      - simpl.\n        destruct (snd a =? 0) eqn:?.\n        + rewrite Z.eqb_eq in Heqb.\n          simpl.\n          intros init.\n          replace (init + snd a) with init by omega.\n          apply IHl.\n        + intros init.\n          simpl.\n          apply IHl.\n    Qed.\n\n    Lemma NoDup_filter : forall A f (l:list A), NoDup l -> NoDup (filter f l).\n    Proof.\n      induction l.\n      + simpl; constructor.\n      + intros H.\n        rewrite NoDup_cons_iff in H.\n        destruct H.\n        simpl.\n        destruct (f a).\n        * apply NoDup_cons.\n          rewrite filter_In; tauto.\n          auto.\n        * auto.\n    Qed.\n\n    Lemma nonzero_elements_extensional:\n      forall (m n: T.t Z),\n      (forall i, T.get_default 0 i m = T.get_default 0 i n) ->\n      Permutation (nonzero_elements m) (nonzero_elements n).\n    Proof.\n      intros.\n      apply NoDup_Permutation.\n      - apply NoDup_filter.\n        apply elements_NoDup.\n      - apply NoDup_filter.\n        apply elements_NoDup.\n      - intros [k v].\n        rewrite ?nonzero_elements_spec.\n        unfold T.get_default in H.\n        intuition.\n        + apply T.elements_complete in H1.\n          apply T.elements_correct.\n          specialize (H k).\n          rewrite H1 in H.\n          destruct (T.get k n) as [v'|]; [congruence|subst;tauto].\n        + apply T.elements_complete in H1.\n          apply T.elements_correct.\n          specialize (H k).\n          rewrite H1 in H.\n          destruct (T.get k m) as [v'|]; [congruence|subst;tauto].\n    Qed.\n\n    Lemma sum_extensional:\n      forall (m n: T.t Z) init,\n        (forall i, T.get_default 0 i m = T.get_default 0 i n) ->\n        T.fold1 Z.add m init = T.fold1 Z.add n init.\n    Proof.\n      intros.\n      rewrite ?T.fold1_spec.\n      rewrite <- ?sum_fold_left_nonzero.\n      apply fold1_permutation.\n      - intros; omega.\n      - apply nonzero_elements_extensional.\n        auto.\n    Qed.\n\n    Lemma  get_default_ss : forall A (def:A) k v m,\n        T.get_default def k (T.set k v m) = v.\n    Proof.\n      intros.\n      unfold T.get_default.\n      rewrite T.gss.\n      reflexivity.\n    Qed.\n\n    Lemma get_default_so : forall A (def:A) k k0 v m,\n        k <> k0 ->\n        T.get_default def k (T.set k0 v m) = T.get_default def k m.\n    Proof.\n      intros.\n      unfold T.get_default.\n      rewrite T.gso; auto.\n    Qed.\n\n    Lemma get_default_ro : forall A (def:A) k k0 m,\n        k <> k0 ->\n        T.get_default def k (T.remove k0 m) = T.get_default def k m.\n    Proof.\n      intros.\n      unfold T.get_default.\n      rewrite T.gro; auto.\n    Qed.\n\n    Lemma get_default_rs : forall A (def:A) k m,\n        T.get_default def k (T.remove k m) = def.\n    Proof.\n      intros.\n      unfold T.get_default.\n      rewrite T.grs; auto.\n    Qed.\n\n    Lemma sum_get_default : forall init k v m,\n      T.get_default 0 k m = v ->\n      T.fold1 Z.add m init = T.fold1 Z.add (T.remove k m) (Z.add init v).\n    Proof.\n      intros.\n      replace (T.fold1 Z.add m init)\n        with  (T.fold1 Z.add (T.set k v m) init).\n        + apply fold1_set.\n          intros; omega.\n        + apply sum_extensional.\n          intros k0.\n          destruct (T.elt_eq k0 k); subst.\n           - rewrite get_default_ss; auto.\n           - rewrite get_default_so; auto.\n    Qed.\n\n    (* A fancier version of the theorem constant_sum, which knows about \n       reading the default value zero. *)\n    Theorem constant_sum' : forall (m : T.t Z) k v k' v' i,\n        T.get_default 0 k  m = v ->\n        T.get_default 0 k' m = v' ->\n        k <> k' ->\n        sum (T.set k (v - i) (T.set k' (v' + i) m)) = sum m.\n    Proof.\n      intros m k v k' v' i Hget_k Hget_k' Hneq.\n      unfold sum.\n      rewrite fold1_get with (k0:=k') (v0:=(v'+i));\n        [|apply plus_comm|rewrite T.gso by congruence; rewrite T.gss; reflexivity].\n      rewrite fold1_get with (k0:=k) (v0:=(v - i));\n        [|apply plus_comm|rewrite T.gro by congruence; rewrite T.gss; reflexivity].\n\n      rewrite sum_get_default with (k:=k') (v:=v') (m:=m); [|assumption].\n      rewrite sum_get_default with (k:=k) (v:=v) (m:=T.remove k' m); [|rewrite get_default_ro; auto].\n      replace (T.fold1 Z.add\n                       (T.remove k (T.remove k' (T.set k (v - i) (T.set k' (v' + i) m))))\n                       (0 + (v' + i) + (v - i)))\n      with (T.fold1 Z.add\n                   (T.remove k (T.remove k' m))\n                   (0 + (v' + i) + (v - i))).\n      + f_equal.\n        omega.\n      + apply fold1_extensional.\n        - intros; omega.\n        - intros k0.\n          destruct (T.elt_eq k0 k); destruct (T.elt_eq k0 k'); subst;\n          (repeat first [rewrite T.grs| rewrite T.gro by auto|rewrite T.gso by auto ]);\n          reflexivity.\n    Qed.\n\n    Lemma sum_nonnegative' : forall (m : T.t Z) init,\n        (forall k v, T.get k m = Some v -> v >= 0) ->\n        T.fold1 Z.add m init >= init.\n    Proof.\n      intros.\n      rewrite T.fold1_spec.\n      assert (H' : forall k v, In (k,v) (T.elements m) -> v >= 0).\n      {\n        intros.\n        apply T.elements_complete in H0.\n        eauto.\n      }\n      clear H.\n      revert init H'.\n      induction (T.elements m); intros; simpl in *.\n      - omega.\n      - apply Zge_trans with (init + snd a).\n        apply IHl.\n        + intros; apply H' with k. auto.        \n        + assert (snd a >= 0).\n          { destruct a as [k v]. apply H' with k. left. reflexivity. }\n          omega.\n    Qed.\n    \n    Lemma sum_nonnegative : forall (m : T.t Z),\n        (forall k v, T.get k m = Some v -> v >= 0) ->\n        sum m >= 0.\n    Proof.\n      intros.\n      unfold sum.\n      apply sum_nonnegative'; auto; omega.\n    Qed.\n\n    Lemma sum_bound1 : forall (m : T.t Z) k1 B,\n        (forall k v, T.get k m = Some v -> v >= 0) ->\n        sum m <= B ->\n        T.get_default 0 k1 m <= B.\n    Proof.\n      intros.\n      assert (B >= 0).\n      {\n        pose (sum_nonnegative H).\n        omega.\n      }\n\n      unfold sum in H0.\n      rewrite (@sum_get_default _ k1 _ _ eq_refl) in H0.\n      assert (forall (k : T.elt) (v : Z),\n      T.get k (T.remove k1 m) = Some v -> v >= 0).\n      {\n        intros.\n        destruct (T.elt_eq k k1); subst.\n        - rewrite T.grs in H2; congruence.\n        - rewrite !T.gro  in H2 by congruence.\n          eapply H; eauto.\n      }\n      assert (H4 := @sum_nonnegative' (T.remove k1 m)\n                                      (0 + T.get_default 0 k1 m)\n                                      H2).\n      omega.\n    Qed.\n    \n    Lemma sum_bound2 : forall (m : T.t Z) k1 k2 B,\n        k1<>k2 ->\n        (forall k v, T.get k m = Some v -> v >= 0) ->\n        sum m <= B ->\n        T.get_default 0 k1 m + T.get_default 0 k2 m <= B.\n    Proof.\n      intros.\n      assert (B >= 0).\n      {\n        pose (sum_nonnegative H0).\n        omega.\n      }\n\n      unfold sum in H1.\n      rewrite (@sum_get_default _ k1 _ _ eq_refl) in H1.\n      rewrite (@sum_get_default _ k2 _ _ eq_refl) in H1.\n      assert (forall (k : T.elt) (v : Z),\n      T.get k (T.remove k2 (T.remove k1 m)) = Some v -> v >= 0).\n      {\n        intros.\n        destruct (T.elt_eq k k2), (T.elt_eq k k1); subst.\n        - rewrite T.grs in H3; congruence.\n        - rewrite T.grs in H3. congruence.\n        - rewrite !T.gro, T.grs in H3 by congruence. congruence.\n        - rewrite !T.gro  in H3 by congruence.\n          eapply H0; eauto.\n      }\n      assert (H4 := @sum_nonnegative' (T.remove k2 (T.remove k1 m))\n                                      (0 + T.get_default 0 k1 m + T.get_default 0 k2 (T.remove k1 m))\n                                      H3).\n      remember ( T.fold1 Z.add (T.remove k2 (T.remove k1 m))\n                         (0 + T.get_default 0 k1 m + T.get_default 0 k2 (T.remove k1 m))) as blah.\n      clear Heqblah.\n      rewrite get_default_ro in H4 by congruence.\n      omega.\n    Qed.\n    \n    Lemma sum_swap : forall (m : T.t Z) k v k' v',\n        k <> k' ->\n        sum (T.set k v (T.set k' v' m)) = \n        sum (T.set k' v' (T.set k v m)).\n    Proof.\n      intros.\n      unfold sum.\n      apply fold1_extensional.\n      - intros; omega.\n      - intros k0.\n        destruct (T.elt_eq k0 k); destruct (T.elt_eq k0 k'); subst;\n          try congruence;\n            (repeat first [rewrite T.gss| rewrite T.grs| rewrite T.gro by auto|rewrite T.gso by auto ];\n             auto).\n    Qed.\n\n  End sum.\nEnd Tree_Properties.\n\nModule PTree_Properties := Tree_Properties(PTree).\nModule ZTree_Properties := Tree_Properties(ZTree).\nModule Int256Tree_Properties := Tree_Properties(Int256Tree).\n\n(* Ideally this would be a module functor, but I'm too lazy to figure out\n   how to make it depend on both TREE and MAP at the same time,\n   so I just prove it for Int256Map & Int256Tree for now. *)\nSection MapOfTree.\n   Context (A B : Type) (f : A -> B) (default : A).\n\n   \n   Definition map_of_tree (t : Int256Tree.t A) : Int256Map.t B :=\n    Int256Tree.fold (fun m k v => Int256Map.set k (f v) m)\n                    t\n                    (Int256Map.init (f default)).\n\n   Lemma mot_ins_commute :\n     let f := (fun m k v => Int256Map.set k (f v) m)\n     in\n     forall k1 b1 k2 b2 a,\n         k1 <> k2 -> \n         f (f a k1 b1) k2 b2 = f (f a k2 b2) k1 b1.\n   Proof.\n     intros.\n     unfold f0.\n     unfold Int256Map.set.\n     unfold PMap.set.\n     simpl.\n     rewrite PTree.set_swap.\n     - reflexivity.\n     - intros C; apply Int256Indexed.index_inj in C.\n       congruence.\n   Qed.\n       \n   Lemma fold_left_last : forall A B (f:A->B->A) l x init,\n     fold_left f (l ++ x :: nil) init = f (fold_left f l init) x.\n   Proof.\n     intros.\n     rewrite fold_left_app.\n     reflexivity.\n   Qed.\n\n   Require Import Permutation.\n   \n   Lemma map_of_tree_Some : forall i t v,\n    Int256Tree.get i t = Some v ->\n    Int256Map.get i (map_of_tree t) = f v.\n   Proof.\n     intros.\n     unfold map_of_tree.\n     rewrite Int256Tree.fold_spec.\n     assert (Hin := Int256Tree.elements_correct _ _ H).\n     assert (Hnodup := Int256Tree.elements_keys_norepet t).\n     apply Int256Tree_Properties.norepet_NoDup in Hnodup.\n     destruct (in_split _ _ Hin) as [elements1 [ elements2  elements_eq]].\n     rewrite elements_eq in *.\n     clear Hin elements_eq.\n     rewrite (@Int256Tree_Properties.fold_permutation _ _ _\n                (fun m k v => Int256Map.set k (f v) m)\n                mot_ins_commute                                      \n                (elements1 ++ (i, v) :: elements2)\n                (elements1 ++ elements2 ++ (i, v) :: nil)).\n     - rewrite !app_assoc.\n       rewrite fold_left_last.\n       simpl.\n       rewrite Int256Map.gss.\n       reflexivity.\n     - apply Permutation_app_head.\n       apply Permutation_cons_append.\n     - exact Hnodup.\n   Qed.\n\n   Lemma map_of_tree_None' : forall i lst m,\n       ~In i (map fst lst) ->\n       Int256Map.get i m = f default ->\n    Int256Map.get i\n                  (fold_left\n                     (fun a p  =>\n                        Int256Map.set (fst p) (f (snd p)) a) lst\n                     m)\n    = f default.\n   Proof.\n     induction lst.\n     - simpl.\n       auto.\n     - simpl.\n       intros.\n       apply IHlst.\n       tauto.\n       rewrite Int256Map.gso; auto; tauto.\n   Qed.\n   \n   Lemma map_of_tree_None : forall i t,\n    Int256Tree.get i t = None ->\n    Int256Map.get i (map_of_tree t) = f default.\n   Proof.\n     intros.\n     unfold map_of_tree.\n     rewrite Int256Tree.fold_spec.\n     rewrite map_of_tree_None'.\n     - auto.\n     - intros Hin.\n       apply list_in_map_inv in Hin.\n       destruct Hin as [[v ty] [v_eq Hin]].\n       apply Int256Tree.elements_complete in Hin.\n       simpl in v_eq; inversion v_eq; subst.\n       congruence.\n     - rewrite Int256Map.gi; auto.\n   Qed.   \n\n   Lemma map_of_tree_set : forall i t v,\n       map_of_tree (Int256Tree.set i v t)\n       = Int256Map.set i (f v) (map_of_tree t).\n   Proof.\n     (* I'm pretty sure this is true, but proving it seems annoying. *)\n   Admitted.\n\nEnd MapOfTree.\n\n\n   \n(** * Useful notations *)\n\nNotation \"a ! b\" := (PTree.get b a) (at level 1).\nNotation \"a !! b\" := (PMap.get b a) (at level 1).\n"
  },
  {
    "path": "src/core/Cval.v",
    "content": "Require Import BinInt.  \nRequire Import cclib.Coqlib.\nRequire Import cclib.Integers.\nRequire Import cclib.Maps.\nRequire Import cclib.Errors.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.Values.HighValues.\nRequire Import backend.Environments.ExtEnv.\nNotation tint := (Tint I256 Unsigned).\nNotation tchar := (Tint I8 Unsigned).\nNotation tchar_pointer := (Tpointer tchar).\nInductive cval : Type :=\n  | CVval : val -> cval\n  | CVany : cval \n  | CVstruct : cstruct_val -> cval\n  | CVarray : carray_val -> cval\n  | CVhashmap : chashmap_val -> cval\nwith cstruct_val :  Type :=\n  | CSmap (map : PTree.t cval)\nwith carray_val : Type :=\n  | CAmap (map : ZMap.t cval)\nwith chashmap_val : Type :=\n   | CHmap (map : Int256Map.t cval)\n.\nDefinition cval_unary_operation op (v: cval) t : option cval :=\n  match v with\n  | CVval v' => match sem_unary_operation op v' t with\n    | Some v'' => Some (CVval v'')\n    | None => None\n    end\n  | _ => None\n  end.\nDefinition cval_binary_operation \n    op cv1 t1 cv2 t2 : option cval :=\n  match cv1, cv2 with\n  | CVval v1, CVval v2 =>\n    \n    match sem_binary_operation op v1 t1 v2 t2  with\n    | Some v => Some (CVval v)\n    | None => None\n    end\n  | _, _ => None\n  end.\nDefinition cval_field_access f cv t : option cval :=\n  match cv, t with\n  | CVstruct (CSmap map), Tstruct _ flds =>\n    match struct_field flds f with\n    | Some _ =>  PTree.get f map\n    | _ => None\n    end\n  | _, _ => None\n  end.\nDefinition cval_field_update f cv t newfield : option cval :=\n  match cv, t with\n  | CVstruct (CSmap map), Tstruct _ flds =>\n     Some (CVstruct (CSmap (PTree.set f newfield map)))\n  | _, _ => None\n  end.\nDefinition cval_array_indexing idx cv t : option cval :=\n  match cv, t with\n  | CVarray (CAmap map), Tarray _ n =>\n    if zle 0 idx && zlt idx n then\n      Some (ZMap.get idx map)\n    else\n      None\n  | _, _ => None\n  end.\nDefinition cval_array_update idx cv t newelem : option cval :=\n  match cv, t with\n  | CVarray (CAmap map), Tarray _ n  =>\n    if zle 0 idx && zlt idx n then\n      Some (CVarray (CAmap (ZMap.set idx newelem map)))\n    else\n      None\n  | _, _ => None\n  end.\nDefinition cval_hashmap_lookup idx cv t : option cval :=\n  match cv, t with\n  | CVhashmap (CHmap map),  Thashmap tint _ =>\n      Some (Int256Map.get idx map)\n  | _, _ => None\n  end.\nDefinition cval_hashmap_update idx cv t newelem : option cval :=\n  match cv, t with\n  | CVhashmap (CHmap map), Thashmap tint n  =>\n      Some (CVhashmap (CHmap (Int256Map.set idx newelem map)))\n  | _, _ => None\n  end.\nInductive cval_basic : cval -> Prop :=\n  | CVBint : forall i, cval_basic (CVval (Vint i))\n  .\nInductive cval_basic_match : val -> cval -> Prop :=\n| CVBMval_int : forall i, cval_basic_match (Vint i) (CVval (Vint i))\n| CVBMany : forall v, cval_basic_match v CVany\n  .\n  Inductive cval_match : val -> cval -> Prop :=\n  | CVMval : forall v,  cval_match v (CVval v)\n      \n  | CVMany : forall v, cval_match v CVany.\n  Definition is_immediate_type (ty : type) : bool :=\n    match ty with\n    | Tint _ _ => true\n    | _ => false\n    end.\n  Inductive cval_match_indirect (m : ext_env)\n      : type -> ident_ext -> cval -> Prop :=\n  | CVMIval : forall ty b v cv,\n      is_immediate_type ty = true ->\n      IdentExtMap.get b m = EEVal v ->\n      cval_match v cv ->\n      cval_match_indirect m ty b cv\n  | CVMIstruct : forall i flds b vs,\n    cval_match_struct m flds b vs ->\n    cval_match_indirect m (Tstruct i flds) b (CVstruct vs)\n  | CVMIarray : forall ty n b vs,\n    cval_match_array m ty b vs n ->\n    cval_match_indirect m (Tarray ty n) b  (CVarray vs)\n  | CVMIhash : forall ty  b vs,\n    cval_match_hash_int m ty b vs ->\n    cval_match_indirect m (Thashmap tint ty) b (CVhashmap vs)\n  with cval_match_struct (m : ext_env)\n      : fieldlist -> ident_ext -> cstruct_val -> Prop :=\n  | CFMmapped : forall flds b map, \n      (forall i ofs ty,\n      struct_field flds i = Some (ofs, ty) -> \n      exists cv,\n        PTree.get i map = Some cv /\\\n        cval_match_indirect m ty (Field b i) cv) ->\n    cval_match_struct m flds b (CSmap map)\n  with cval_match_array (m : ext_env)\n      : type -> ident_ext -> carray_val -> Z -> Prop :=\n  | CAMmapped : forall ty b map n,\n    (forall idx, 0 <= idx < n ->\n      cval_match_indirect m ty (Index b (Int256.repr idx))\n                          (ZMap.get idx map)) ->\n    cval_match_array m ty b (CAmap map) n\n  with cval_match_hash_int (m : ext_env)\n      : type -> ident_ext -> chashmap_val -> Prop :=\n  | CHIMmapped : forall ty b map,\n    (forall idx, \n      cval_match_indirect m ty (Index b idx)\n                          (Int256Map.get idx map)) ->\n    cval_match_hash_int m ty b (CHmap map) .\n  Lemma cval_basic_match_cval_match v cv :\n    cval_basic_match v cv -> cval_match v cv.\n  Proof. Admitted.\n  \n  Lemma cval_sem_unary_operation op v1 cv1 cv2 t :\n    cval_match v1 cv1 ->\n    cval_unary_operation op cv1 t = Some cv2 ->\n    exists v2, sem_unary_operation op v1 t = Some v2 /\\ cval_match v2 cv2.\n  Proof. Admitted.\n  Ltac TrivialExists :=\n    match goal with\n    | |- exists v', Some ?v = Some v' /\\ _ => exists v; split; auto\n    | |- exists v', (forall _, Some ?v = Some v') /\\ _ => exists v; split; auto\n    | _ => idtac\n    end.\n  \n  Lemma cval_sem_binary_operation op v1 v2 cv1 cv2 cv t1 t2 :\n      cval_match v1 cv1 -> cval_match v2 cv2 ->\n      cval_binary_operation op cv1 t1 cv2 t2 = Some cv ->\n      exists v, sem_binary_operation op v1 t1 v2 t2 = Some v /\\\n                cval_match v cv.\n  Proof. Admitted.\n  \n  Lemma cval_sem_field_access f cv1 cv2 t1 :\n      cval_field_access f cv1 t1 = Some cv2 ->\n      exists id flds t2 delta,\n        t1 = Tstruct id flds /\\\n        struct_field flds f = Some (delta, t2) /\\\n        forall m b,\n          cval_match_indirect m t1 b cv1 ->\n          cval_match_indirect m t2 (Field b f) cv2.\n  Proof. Admitted.\n  Require Import lib.ArithInv.\n  \n  Lemma cval_sem_array_indexing idx cv1 cv2 t1 :\n      cval_array_indexing idx cv1 t1 = Some cv2 ->\n      exists t2 n,\n        t1 = Tarray t2 n /\\\n        forall m b,\n          cval_match_indirect m t1 b cv1 ->\n          cval_match_indirect m t2 (Index b (Int256.repr idx)) cv2.\n  Proof. Admitted.\n  Lemma cval_sem_hashmap_lookup idx cv1 cv2 t1 :\n      cval_hashmap_lookup idx cv1 t1 = Some cv2 ->\n      exists t2,\n        t1 = Thashmap tint t2 /\\\n        forall m b,\n          cval_match_indirect m t1 b cv1 ->\n          cval_match_indirect m t2 (Index b idx) cv2.\n  Proof. Admitted.\n  Lemma cval_match_indirect_eq m m' i ty cv :\n      cval_match_indirect m ty i cv ->\n      (forall i',\n          ident_ext_extends i i' ->\n          IdentExtMap.get i' m = IdentExtMap.get i' m') ->\n      cval_match_indirect m' ty i cv\n  with cval_match_struct_eq m m' flds i csv :\n      cval_match_struct m flds i csv ->\n      (forall i',\n          ident_ext_extends i i' ->\n          IdentExtMap.get i' m = IdentExtMap.get i' m') ->\n      cval_match_struct m' flds i csv\n  with cval_match_array_eq m m' i ty cav n :\n         cval_match_array m ty i cav n ->\n      (forall i',\n          ident_ext_extends i i' ->\n          IdentExtMap.get i' m = IdentExtMap.get i' m') ->         \n      cval_match_array m' ty i cav n\n  with cval_match_hash_int_eq m m' i ty chv :\n         cval_match_hash_int m ty i chv ->\n      (forall i',\n          ident_ext_extends i i' ->\n          IdentExtMap.get i' m = IdentExtMap.get i' m') ->         \n      cval_match_hash_int m' ty i chv.  \n  Proof. Admitted.\n"
  },
  {
    "path": "src/core/HyperType.v",
    "content": "Require Import BinInt.  \nRequire Import Coq.Lists.List.\nRequire Import BinInt.    \nRequire Import cclib.Coqlib.\nRequire Import cclib.Errors.\nRequire Import backend.Values.HighValues.\nRequire Import cclib.Integers.\nRequire Import cclib.Maps.\nRequire Import backend.AST.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.MemoryModel.\nRequire Import backend.MachineModel.\nRequire Import backend.Environments.ExtEnv.\nRequire Import DeepSpec.core.Cval.\nRequire Import DeepSpec.core.MemoryModel.\nRequire Import DeepSpec.lib.OProp.\nRequire Import DeepSpec.lib.Monad.ContOptionMonad.\nInductive type_marker {T} (t : T) := create_type_marker : type_marker t.\nSection HYPER_TYPE.\n  \n  \n  Inductive type_pair : Type :=\n    Tpair : Type -> type -> type_pair.\n  Definition unpair_ty tp := match tp with Tpair _ ty => ty end.\n  Definition unpair_ft tp := match tp with Tpair ft _ => ft end.\n  \n  \n  Class HyperTypeImpl (tp : type_pair) : Type := {\n    \n    ht_cval : unpair_ft tp -> cval;\n    \n    ht_default : unpair_ft tp;\n    \n    ht_ft_cond : unpair_ft tp -> Prop;\n    \n    ht_ty_cond : cval -> Prop\n               := fun cv => exists f, ht_ft_cond f /\\ ht_cval f = cv;\n    \n    ht_valid_ft_cond : unpair_ft tp -> Prop;\n    ht_valid_ty_cond : cval -> Prop\n      := fun cv => exists f, ht_valid_ft_cond f /\\ ht_ft_cond f /\\ ht_cval f = cv;\n    \n    ht_valid_ft_ocond : OProp1 (unpair_ft tp)\n  }.\n  \n  Class HyperType (tp : type_pair)`{hti : HyperTypeImpl tp} : Prop := {\n    \n    \n    ht_ft_rel_core : forall f, ht_ft_cond f -> exists cv, ht_cval f = cv;\n    \n    ht_ft_rel : forall f, ht_ft_cond f -> exists cv, ht_ty_cond cv /\\ ht_cval f = cv\n      := fun f fc => match ht_ft_rel_core f fc with ex_intro cv r =>\n           ex_intro _ cv (conj (ex_intro _ f (conj fc r)) r) end;\n    \n    ht_ty_rel : forall cv, ht_ty_cond cv -> exists f, ht_ft_cond f /\\ ht_cval f = cv\n      := fun cv vc => vc;\n    \n    ht_default_ft_cond : ht_ft_cond ht_default;\n    \n    ht_valid_ft_ocond_same :\n      forall f, ht_valid_ft_cond f <-> oProp1 ht_valid_ft_ocond f\n  }.\n  \n  Inductive ht_option_cval `{HyperTypeImpl} :\n      option (unpair_ft tp) -> option cval -> Prop :=\n  | ht_none_cval : ht_option_cval None None\n  | ht_some_cval : forall f v, ht_cval f = v -> ht_option_cval (Some f) (Some v).\n  Definition ht_cval_some `{HyperTypeImpl} f vo := ht_option_cval (Some f) vo.\n  \n  \n  Definition ht_rel `{HyperTypeImpl} f v :=\n    cval_match v (ht_cval f).\n  Inductive ht_option_rel `{HyperTypeImpl} :\n      option (unpair_ft tp) -> option val -> Prop :=\n  | ht_none_rel : ht_option_rel None None\n  | ht_some_rel : forall f v, ht_rel f v -> ht_option_rel (Some f) (Some v).\n  Definition ht_rel_some `{HyperTypeImpl} f vo :=\n    ht_option_rel (Some f) vo.\n  \n  \n  \n  Class HyperByValueType (tp : type_pair) `{hti : HyperTypeImpl tp} : Prop := {\n    ht_by_value_access_mode : is_immediate_type (unpair_ty tp) = true;\n    \n    \n  }.\n  \n  \n  \n  \n  Global Arguments ht_ty_cond tp {_} v.\n  Global Arguments ht_valid_ty_cond tp {_} cv.\n  \n  Class hyper_type_pair : Type := mk_hyper_type_pair {\n    _tp_type_pair      : type_pair;\n    _tp_ty             := unpair_ty _tp_type_pair;\n    _tp_ft             := unpair_ft _tp_type_pair;\n    tp_hyper_type_impl :> HyperTypeImpl _tp_type_pair\n  }.\n  Definition tp_type_pair := @_tp_type_pair.\n  Definition tp_ty        := @_tp_ty.\n  Definition tp_ft        := @_tp_ft.\n  \n  Global Arguments mk_hyper_type_pair _ {_}.\n  \n  \n  \n  \n  \n  \n  Context `{LayerSpec : LayerSpecClass}.\n  \n  Class HyperBuiltin0Impl (tp  : type_pair) : Type := {\n    Hquery0 : machine_env GetHighData -> unpair_ft tp;\n    Hbuiltin0 : MachineModel.builtin0\n  }.\n  Class HyperBuiltin0 (tp  : type_pair) \n    `{hti : HyperTypeImpl tp, !HyperBuiltin0Impl tp} : Prop := {\n    Hbuiltin0_returns : forall me,\n      ht_ft_cond (Hquery0 me);\n    Hbuiltin0_correct : forall me,\n      ht_cval (Hquery0 me) = (CVval (me_query me (Qcall0 Hbuiltin0)));\n  }.\n  Class HyperBuiltin1Impl (arg_tp tp  : type_pair) : Type := {\n    Hquery1 : machine_env GetHighData -> unpair_ft arg_tp -> unpair_ft tp;\n    Hbuiltin1 : MachineModel.builtin1\n  }.\n  Class HyperBuiltin1 (arg_tp tp  : type_pair) \n    `{arg_hti : HyperTypeImpl arg_tp, hti : HyperTypeImpl tp, !HyperBuiltin1Impl arg_tp tp} : Prop := {\n    Hbuiltin1_returns : forall me f,\n      ht_ft_cond f ->\n      ht_ft_cond (Hquery1 me f);\n    Hbuiltin1_correct : forall me f v,\n      ht_ft_cond f ->\n      ht_cval f = v ->\n      exists v',\n        v = CVval v' /\\\n        ht_cval (Hquery1 me f) = CVval (me_query me (Qcall1 Hbuiltin1 v'));\n  }.\n  \n  Class HyperUnaryImpl (op : unary_operation)(tp tpo : type_pair) : Type := {\n    \n    Hunary_cond : unpair_ft tp -> Prop;\n    Hunary_ocond : OProp1 (unpair_ft tp);\n    \n    Hunary : unpair_ft tp -> unpair_ft tpo;\n  }.\n  Class HyperUnaryOp (op : unary_operation)(tp tpo : type_pair)\n     `{hti : HyperTypeImpl tp, htio : HyperTypeImpl tpo, !HyperUnaryImpl op tp tpo}\n      : Prop := {\n    Hunary_ocond_same : forall f, Hunary_cond f <-> oProp1 Hunary_ocond f;\n    \n    Hunary_returns : forall f, ht_ft_cond f -> Hunary_cond f ->\n      ht_ft_cond (Hunary f);\n    Hunary_correct : forall f v, ht_ft_cond f -> Hunary_cond f -> ht_cval f = v ->\n      ht_cval_some (Hunary f) (cval_unary_operation op v (unpair_ty tp));\n  }.\n  Class HyperUnaryPassthrough op (tp tpo : type_pair)\n     `{hti : HyperTypeImpl tp, htio : HyperTypeImpl tpo, !HyperUnaryImpl op tp tpo}\n     : Prop := {\n    \n  }.\n  \n  Class HyperBinaryImpl (op : binary_operation)(tpl tpr tpo : type_pair)\n      : Type := {\n    \n    Hbinary_cond : unpair_ft tpl -> unpair_ft tpr -> Prop;\n    Hbinary_ocond : OProp2 (unpair_ft tpl) (unpair_ft tpr);\n    Hbinary : unpair_ft tpl -> unpair_ft tpr -> unpair_ft tpo;\n  }.\n  Class HyperBinaryOp (op : binary_operation)(tpl tpr tpo : type_pair)\n     `{htil : HyperTypeImpl tpl, htir : HyperTypeImpl tpr,\n       htio : HyperTypeImpl tpo, !HyperBinaryImpl op tpl tpr tpo} : Prop := {\n    Hbinary_ocond_same : forall f f', Hbinary_cond f f' <->\n                                      oProp2 Hbinary_ocond f f';\n    \n    Hbinary_returns : forall f f', ht_ft_cond f -> ht_ft_cond f' ->\n      Hbinary_cond f f' -> ht_ft_cond (Hbinary f f');\n    Hbinary_correct : forall f f' v v',\n      ht_ft_cond f -> ht_ft_cond f' -> Hbinary_cond f f' ->\n      ht_cval f = v -> ht_cval f' = v' ->\n      ht_cval_some (Hbinary f f') (cval_binary_operation op v (unpair_ty tpl)\n                                                            v' (unpair_ty tpr))\n  }.\n  Class HyperBinaryPassthrough op (tpl tpr tpo : type_pair)\n     `{htil : HyperTypeImpl tpl, htir : HyperTypeImpl tpr,\n       htio : HyperTypeImpl tpo, !HyperBinaryImpl op tpl tpr tpo} : Prop := {\n    \n  }.\nEnd HYPER_TYPE.\nAdd Printing Constructor hyper_type_pair.\nSection HLIST.\n  Inductive HList (F : hyper_type_pair -> Type) :\n      list hyper_type_pair -> Type :=\n  | HNil  : HList F nil\n  | HCons : forall (x : hyper_type_pair)(ls : list hyper_type_pair),\n              F x -> HList F ls -> HList F (x :: ls).\n  Global Arguments HNil {_}.\n  Global Arguments HCons {_} _ _ _ _.\n  Definition hlist_hd {a b F} (hlist : HList F (a :: b)) : F a :=\n    match hlist in HList _ x return match x with\n                                    | nil => unit\n                                    | cons a _ => F a\n                                    end with\n    | HNil => tt\n    | HCons _ _ x _ => x\n    end.\n  Definition hlist_tl {a b F} (hlist : HList F (a :: b)) : HList F b :=\n    match hlist in HList _ x return match x with\n                                    | nil => unit\n                                    | cons _ ls => HList F ls\n                                    end with\n    | HNil => tt\n    | HCons _ _ _ x => x\n    end.\n  Fixpoint HList_map_nodep {a F A}\n    (f : forall htp : hyper_type_pair, F htp -> A)(hlist : HList F a) :\n      list A :=\n    match hlist with\n    | HNil => nil\n    | HCons x _ y hl => cons (f x y) (HList_map_nodep f hl)\n    end.\n  Fixpoint HList_map {a F G}\n    (f : forall htp : hyper_type_pair, F htp -> G htp)(hlist : HList F a) :\n      HList G a :=\n    match hlist with\n    | HNil => HNil\n    | HCons x _ y hl => HCons _ _ (f x y) (HList_map f hl)\n    end.\n  Fixpoint HList_fold_right_nodep {a F A}\n      (f : forall htp : hyper_type_pair, F htp -> A -> A)(a0 : A)\n      (hlist : HList F a) : A :=\n    match hlist with\n    | HNil => a0\n    | HCons x _ y hl => f x y (HList_fold_right_nodep f a0 hl)\n    end.\n  Fixpoint list_curried_type (params : list hyper_type_pair) T : Type :=\n    match params with\n    | nil => T\n    | htp :: l => tp_ft htp -> list_curried_type l T\n    end.\n  Fixpoint apply_curried_func {params T} :\n      list_curried_type params T -> HList tp_ft params -> T :=\n    match params with\n    | nil => fun t _ => t\n    | htp :: l => fun f hlist => @apply_curried_func l T\n                                   (f (hlist_hd hlist)) (hlist_tl hlist)\n    end.\nEnd HLIST.\nSection HLIST_PROPS.\n  Context`{LayerSpecClass}. \n  Inductive ht_list_rel : forall ls, HList tp_ft ls -> list val -> Prop :=\n  | ht_nil_rel : ht_list_rel nil HNil nil\n  | ht_cons_rel : forall htp ls f fs v vs,\n    ht_rel f v -> ht_list_rel ls fs vs ->\n    ht_list_rel (cons htp ls) (HCons htp ls f fs) (cons v vs).\n  Inductive ht_list_ft_cond :\n      forall {ls}(es1 : HList tp_ft ls), Prop :=\n  | ht_nil_ft_cond : ht_list_ft_cond HNil\n  | ht_cons_ft_cond : forall htp ls e es,\n    ht_ft_cond e -> ht_list_ft_cond es ->\n    ht_list_ft_cond (HCons htp ls e es).\n  \n  Inductive ht_list_valid_ft_cond:\n    forall {ls} (es1 : HList tp_ft ls), Prop :=\n  | ht_nil_valid_ft_cond: ht_list_valid_ft_cond HNil\n  | ht_cons_valid_ft_cond: forall htp ls e es,\n      ht_valid_ft_cond e -> ht_list_valid_ft_cond es ->\n      ht_list_valid_ft_cond (HCons htp ls e es).\n  End HLIST_PROPS.\nSection HYPER_CONSTRUCTOR.\n  Fixpoint compose_fieldlist fld_ids fld_tps {struct fld_tps} :=\n    match fld_tps, fld_ids with\n    | nil, nil => Some Fnil\n    | htp :: res_tps, fld_id :: res_ids =>\n      match compose_fieldlist res_ids res_tps with\n      | Some res => Some (Fcons fld_id (tp_ty htp) res)\n      | None => None\n      end\n    | _, _ => None\n    end.\n  Lemma compose_fieldlist_length_eq_ids_fieldlist :\n    forall fld_ids fld_tps fieldlist,\n    compose_fieldlist fld_ids fld_tps = Some fieldlist ->\n    length fld_ids = fieldlist_length fieldlist.\n  Proof. Admitted.\n  Definition compose_Tstruct struct_id fld_ids fld_tps :=\n    match compose_fieldlist fld_ids fld_tps with\n    | Some fieldlist => Some (Tstruct struct_id fieldlist)\n    | None => None\n    end.\n  Fixpoint compose_cstruct_val map fld_ids {fld_tps}\n      (fs : HList tp_ft fld_tps){struct fs} :=\n    match fs with\n    | HNil => map\n    | HCons htp _ f res => match fld_ids with\n      | nil => map  \n      | fld_id :: res_ids =>\n        compose_cstruct_val (PTree.set fld_id (ht_cval f) map) res_ids res\n      end\n    end.\n  Definition compose_cval_struct fld_ids {fld_tps}(fs : HList tp_ft fld_tps) :=\n    CVstruct (CSmap (compose_cstruct_val (PTree.empty cval) fld_ids fs)).\n  Class HyperConstructor tp `{hti : HyperTypeImpl tp} fld_ids fld_tps constr\n      : Prop := {\n    hc_compose_ty_eq : exists struct_id,\n      compose_Tstruct struct_id fld_ids fld_tps = Some (unpair_ty tp);\n    hc_fld_ids_norepet : list_norepet fld_ids;\n    hc_constr_correct : forall args : HList tp_ft fld_tps,\n      compose_cval_struct fld_ids args\n        = ht_cval (apply_curried_func constr args);\n    hc_constr_returns : forall args : HList tp_ft fld_tps,\n      ht_list_ft_cond args ->\n      ht_ft_cond (apply_curried_func constr args)\n  }.\n  Class HyperConstructorPassthrough\n      tp `{hti : HyperTypeImpl tp} fld_tps (constr: list_curried_type fld_tps (unpair_ft tp)) : Prop := {\n  }.\nEnd HYPER_CONSTRUCTOR.\nSection HYPER_LTYPE.\n  Context`{HM : HyperMem}.\n  Definition GetOpt S V := S -> ContOpt V.\n  Definition SetOpt S V := V -> S -> ContOpt S.\n  Definition getter_of_data tp := GetOpt GetHighData (unpair_ft tp).\n  Definition setter_of_data tp := SetOpt GetHighData (unpair_ft tp).\n  Record ltype_pair tp := {\n    ltype_tp_marker : type_marker tp;   \n    ltype_get : GetHighData -> unpair_ft tp;                   \n    ltype_set : unpair_ft tp -> GetHighData -> GetHighData;\n    ltype_set_ocond : OProp1 GetHighData;                      \n    ltype_get_extra_ocond : OProp1 GetHighData;                \n    ltype_ghost : bool;     \n    ltype_ident : ident_ext;    \n  }.\n  Global Arguments ltype_get {_} _ _.\n  Global Arguments ltype_set {_} _ _ _.\n  Global Arguments ltype_set_ocond {_} _.\n  Global Arguments ltype_get_extra_ocond {_} _.\n  Global Arguments ltype_ghost {_} _.\n  Global Arguments ltype_ident {_} _.\n  Class HyperLTypeDir {tp}`{HyperTypeImpl tp} (i : ident_ext) \n      (getter : GetHighData -> unpair_ft tp)\n      (setter : unpair_ft tp -> GetHighData -> GetHighData)\n      (setter_ocond getter_extra_ocond : OProp1 GetHighData) : Prop := {\n    \n    \n    ltype_get_match : forall j d m, match_AbData d m j ->\n      oProp1 (setter_ocond /\\ getter_extra_ocond)%oprop1 d ->\n      ht_ft_cond (getter d) /\\\n      cval_match_indirect m (unpair_ty tp) i (ht_cval (getter d));\n    \n    ltype_set_match : forall f j d m, ht_ft_cond f ->\n      mem_match j d m -> oProp1 setter_ocond d ->\n      forall m',  \n        (forall i',  \n          ident_ext_extends i i' \\/\n          IdentExtMap.get i' (fst m') = IdentExtMap.get i' (fst m)) ->\n        (snd m) = (snd m') ->\n        cval_match_indirect (fst m') (unpair_ty tp) i (ht_cval f) ->\n        mem_match j (setter f d) m'\n  }.\n  \n  Class HyperLTypeStatic {tp}(lt : ltype_pair tp) (new_glbl : list ident) : Prop := {\n  }.\n  \n  Class HyperLType {tp}`{hti : HyperTypeImpl tp}(lt : ltype_pair tp) : Prop := {\n    \n    \n    hyper_ltype_direct :\n      lt.(ltype_ghost) = false ->\n      HyperLTypeDir lt.(ltype_ident) \n                    lt.(ltype_get) lt.(ltype_set)\n                    lt.(ltype_set_ocond) lt.(ltype_get_extra_ocond);\n    \n    \n  }.\n  Lemma cval_match_indirect_by_value_load `{hbvt : HyperByValueType} m i cv:\n      cval_match_indirect m (unpair_ty tp) i cv ->\n      exists v, IdentExtMap.get i m = EEVal v\n             /\\ cval_match v cv.\n  Proof. Admitted.\n  Lemma cval_match_indirect_by_value_store `{hbvt : HyperByValueType} m i v cv :\n      IdentExtMap.get i m = EEVal v ->\n      cval_match v cv ->\n      cval_match_indirect m (unpair_ty tp) i cv.\n  Proof. Admitted.\n  \n  \n  Class HyperFieldImpl (tp_struct tp_field : type_pair)(id : ident) : Type := {\n    Hfield_get : unpair_ft tp_struct -> unpair_ft tp_field;\n    Hfield_set : unpair_ft tp_field -> unpair_ft tp_struct -> unpair_ft tp_struct\n  }.\n  Class HyperField (tp_struct tp_field : type_pair)(id : ident)\n    `{htis : HyperTypeImpl tp_struct, htif : HyperTypeImpl tp_field,\n     !HyperFieldImpl tp_struct tp_field id} : Prop := {\n    Hfield_size_pos : sizeof_words (unpair_ty tp_field) > 0;\n    Hfield_get_returns : forall f, ht_ft_cond f -> ht_ft_cond (Hfield_get f);\n    Hfield_set_returns : forall f st, ht_ft_cond f -> ht_ft_cond st ->\n      ht_ft_cond (Hfield_set f st);\n    Hfield_get_correct : forall st, ht_ft_cond st -> ht_valid_ft_cond st ->\n      ht_cval_some (Hfield_get st)\n        (cval_field_access id (ht_cval st) (unpair_ty tp_struct));\n    Hfield_set_correct : forall f st, ht_ft_cond f -> ht_ft_cond st ->\n      ht_cval_some (Hfield_set f st)\n                   (cval_field_update id (ht_cval st) (unpair_ty tp_struct) (ht_cval f));\n    \n    Hfield_delta_correct :\n     exists x ofs fList,\n        (unpair_ty tp_struct = Tstruct x fList  /\\\n         struct_field fList id = Some (ofs, unpair_ty tp_field))\n  }.\n  \n  Class HyperFieldPassthrough (tp_struct tp_field : type_pair)(id : ident)\n    `{htis : HyperTypeImpl tp_struct, htif : HyperTypeImpl tp_field,\n     !HyperFieldImpl tp_struct tp_field id} : Prop := {\n    \n  }.\n  Class HyperIndexImpl (tp_array tp_elem : type_pair) : Type := {\n    Hindex_size : Z;\n    Hindex_get : Z -> unpair_ft tp_array -> unpair_ft tp_elem;\n    Hindex_set : Z -> unpair_ft tp_elem -> unpair_ft tp_array -> unpair_ft tp_array\n  }.\n  Class HyperIndex (tp_array tp_elem : type_pair)\n    `{htis : HyperTypeImpl tp_array, htif : HyperTypeImpl tp_elem,\n     !HyperIndexImpl tp_array tp_elem} : Prop := {\n    Hindex_get_returns : forall a i, (0 <= i < Hindex_size)%Z ->\n      ht_ft_cond a -> ht_ft_cond (Hindex_get i a);\n    Hindex_set_returns : forall f a i, (0 <= i < Hindex_size)%Z ->\n      ht_ft_cond f -> ht_ft_cond a -> ht_ft_cond (Hindex_set i f a);\n    Hindex_get_correct : forall a i, (0 <= i < Hindex_size)%Z ->\n      ht_cval_some (Hindex_get i a)\n        (cval_array_indexing i (ht_cval a) (unpair_ty tp_array));\n    Hindex_set_correct : forall f a i,\n      (0 <= i < Hindex_size)%Z ->\n      ht_cval_some (Hindex_set i f a)\n        (cval_array_update i (ht_cval a) (unpair_ty tp_array) (ht_cval f));\n    Hindex_array_type :\n      unpair_ty tp_array = Tarray (unpair_ty tp_elem) Hindex_size ;\n    Hindex_size_bound : 0 <= Hindex_size < Int256.modulus\n  }.\n  Class HyperIndexPassthrough (tp_array tp_elem : type_pair)\n    `{htis : HyperTypeImpl tp_array, htif : HyperTypeImpl tp_elem,\n     !HyperIndexImpl tp_array tp_elem} : Prop := {\n    \n  }.\n  Class HyperIntHashImpl (tp_array tp_elem : type_pair) : Type := {\n    \n    Hhash_get : int256 -> unpair_ft tp_array -> unpair_ft tp_elem;\n    Hhash_set : int256 -> unpair_ft tp_elem -> unpair_ft tp_array -> unpair_ft tp_array\n  }.\n  Class HyperIntHash (tp_array tp_elem : type_pair)\n    `{htis : HyperTypeImpl tp_array,  htif : HyperTypeImpl tp_elem,\n     !HyperIntHashImpl tp_array tp_elem} : Prop := {\n    Hhash_get_returns : forall a i, \n      ht_ft_cond a -> ht_ft_cond (Hhash_get i a);\n    Hhash_set_returns : forall f a i,\n      ht_ft_cond f -> ht_ft_cond a -> ht_ft_cond (Hhash_set i f a);\n    Hhash_get_correct : forall a i, \n      ht_cval_some (Hhash_get i a)\n        (cval_hashmap_lookup i (ht_cval a) (unpair_ty tp_array));\n    Hhash_set_correct : forall f a i,\n      ht_cval_some (Hhash_set i f a)\n        (cval_hashmap_update i (ht_cval a) (unpair_ty tp_array) (ht_cval f));\n    Hhash_type :\n      unpair_ty tp_array = Thashmap tint (unpair_ty tp_elem)\n  }.\n  \nEnd HYPER_LTYPE.\nSection ISO_TYPE.\n  Class HyperTypeIsoImpl (tp : type_pair) : Type := {\n    ht_iso_ft_cond : unpair_ft tp -> Prop;\n    ht_iso_ty_cond : val -> Prop;\n    ht_iso_default : unpair_ft tp;\n    ht_implement : unpair_ft tp -> val;\n    ht_spec : val -> unpair_ft tp\n  }.\n  Class HyperTypeIso (tp : type_pair)`{hti : HyperTypeIsoImpl tp} : Prop := {\n    ht_implement_returns : forall f, ht_iso_ft_cond f -> ht_iso_ty_cond (ht_implement f);\n    ht_spec_returns : forall v, ht_iso_ty_cond v -> ht_iso_ft_cond (ht_spec v);\n    ht_iso_default_ft_cond : ht_iso_ft_cond ht_iso_default;\n    ht_proof_left : forall f, ht_iso_ft_cond f -> ht_spec (ht_implement f) = f;\n    ht_proof_right : forall v, ht_iso_ty_cond v -> ht_implement (ht_spec v) = v \n  }.\n  Global Arguments ht_iso_ty_cond tp {_} v.\n  Context`{HyperTypeIso}.\n  Global Instance hyper_type_iso_impl : HyperTypeImpl tp := {\n    ht_cval f := CVval (ht_implement f);\n    ht_ft_cond := ht_iso_ft_cond;\n    ht_default := ht_iso_default;\n    ht_valid_ft_cond f := True;\n    ht_valid_ft_ocond := otrue1;\n    \n  }.\n  Global Instance hyper_type_iso : HyperType tp.\n  Proof. Admitted.\nEnd ISO_TYPE.\n"
  },
  {
    "path": "src/core/HyperTypeInst.v",
    "content": "Require Import ZArith.\nRequire Import Znumtheory.\nRequire Import backend.Values.HighValues.\nRequire Import cclib.Integers.\nRequire Import backend.AST.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import DeepSpec.core.Cval.\nRequire Import DeepSpec.core.HyperType.\nRequire Import DeepSpec.core.MemoryModel.\nRequire Import DeepSpec.lib.OProp.\nRequire Import DeepSpec.lib.Monad.ContOptionMonad.\nNotation tvoid_unit := (Tpair unit Tvoid).\nSection HYPER_TYPE_UNIT.\n  Global Instance void_unit_impl : HyperTypeImpl tvoid_unit := {\n    ht_cval := fun _ => CVany;\n    ht_ft_cond := fun _ => True;\n    ht_default := tt;\n    ht_valid_ft_cond := fun _ => False;\n    ht_valid_ft_ocond := ofalse1;\n    \n  }.\n  Global Instance void_unit : HyperType tvoid_unit.\n  Proof. Admitted.\n  Definition void_unit_pair := mk_hyper_type_pair tvoid_unit.\n  \nEnd HYPER_TYPE_UNIT.\nSection HYPER_LTYPE_COMPOSITION.\n  Context`{HM : HyperMem}.\n  Context {tp : type_pair}.\n  Variable (whole : ltype_pair tp).\n  Context`{hti : HyperTypeImpl tp, hlt : !HyperLType whole}.\n  Section HYPER_LTYPE_FIELD.\n    Context {tp_field : type_pair}.\n    Variable (tid : ident).\n    Context`{htif : !HyperTypeImpl tp_field,\n             hfieldi : !HyperFieldImpl tp tp_field tid,\n             hfield : !HyperField tp tp_field tid}.\n    Definition field_ltype_pair : ltype_pair tp_field := {|\n      ltype_tp_marker := create_type_marker tp_field;\n      ltype_get s := Hfield_get (whole.(ltype_get) s);\n      ltype_set v s :=\n        whole.(ltype_set)\n          (Hfield_set v (whole.(ltype_get) s))\n        s;\n      ltype_set_ocond :=\n        (whole.(ltype_set_ocond) /\\ whole.(ltype_get_extra_ocond))%oprop1;\n      ltype_get_extra_ocond :=\n        omap1 (fun p y => p (whole.(ltype_get) y)) ht_valid_ft_ocond;\n      ltype_ghost := whole.(ltype_ghost);\n      ltype_ident := (Field (whole.(ltype_ident)) tid)\n    |}.\n    Lemma nat_le_discrete (n m : nat) :\n        (n <= m -> exists n', n' + n = m)%nat.\n    Proof. Admitted.\n    Context {htw : HyperType tp}.\n    Global Instance field_ltype : HyperLType field_ltype_pair.\n    Proof. Admitted.\n  End HYPER_LTYPE_FIELD.\n  \n  Section HYPER_LTYPE_INDEX.\n    Context {tp_elem : type_pair}.\n    Context`{htif : HyperTypeImpl tp_elem,\n             hidxi : !HyperIndexImpl tp tp_elem,\n             hidx : !HyperIndex tp tp_elem}.\n    Variable (idx : Z).\n    Definition indexing_ltype_pair : ltype_pair tp_elem := {|\n      ltype_tp_marker := create_type_marker tp_elem;\n      ltype_get s := Hindex_get idx (whole.(ltype_get) s);\n      ltype_set v s :=\n        whole.(ltype_set)\n          (Hindex_set idx v (whole.(ltype_get) s))\n        s;\n      ltype_set_ocond :=\n        (whole.(ltype_set_ocond) /\\ whole.(ltype_get_extra_ocond))%oprop1;\n      ltype_get_extra_ocond := otrue1;\n      ltype_ghost := whole.(ltype_ghost);\n      ltype_ident := (Index whole.(ltype_ident) (Int256.repr idx))\n    |}.\n    Require Import cclib.Coqlib.\n    \n    Global Instance indexing_ltype :\n      forall idx_in_bound : 0 <= idx < Hindex_size,\n      HyperLType indexing_ltype_pair.\n    Proof. Admitted.\n  End HYPER_LTYPE_INDEX.\n  Section HYPER_LTYPE_HASH.\n    Context {tp_elem : type_pair}.\n    Context`{htif : HyperTypeImpl tp_elem,\n             hidxi : !HyperIntHashImpl tp tp_elem,\n             hidx : !HyperIntHash tp tp_elem}.                             \n    Variable (idx : int256).\n    Definition inthash_ltype_pair : ltype_pair tp_elem := {|\n      ltype_tp_marker := create_type_marker tp_elem;\n      ltype_get s := Hhash_get idx (whole.(ltype_get) s);\n      ltype_set v s :=\n        whole.(ltype_set)\n          (Hhash_set idx v (whole.(ltype_get) s))\n        s;\n      ltype_set_ocond :=\n        (whole.(ltype_set_ocond) /\\ whole.(ltype_get_extra_ocond))%oprop1;\n      ltype_get_extra_ocond := otrue1;\n      ltype_ghost := whole.(ltype_ghost);\n      ltype_ident := (Index whole.(ltype_ident) idx)\n   |}.\n    Global Instance inthash_ltype :\n      HyperLType inthash_ltype_pair.\n    Proof. Admitted.\n  End HYPER_LTYPE_HASH.\nEnd HYPER_LTYPE_COMPOSITION.\nNotation tint_bool := (Tpair bool tint).\nSection Integer256Extra.\nLemma modulus_gt_zero : Int256.modulus > 0.\nProof. Admitted.\nTheorem sub_sub : forall x y z,\n    Int256.sub (Int256.sub x y) z = Int256.sub x (Int256.add y z).\nProof. Admitted.\nTheorem add_repr : forall x y,\n    Int256.add (Int256.repr x) (Int256.repr y) = Int256.repr (x + y).\nProof. Admitted.\nTheorem sub_repr : forall x y,\n    Int256.sub (Int256.repr x) (Int256.repr y) = Int256.repr (x - y).\nProof. Admitted.\nTheorem mul_repr : forall x y,\n    Int256.mul (Int256.repr x) (Int256.repr y) = Int256.repr (x * y).\nProof. Admitted.\nTheorem add_shifted : forall x y z,\n    Int256.add (Int256.sub x z) (Int256.add y z) = Int256.add x y.\nProof. Admitted.\nEnd Integer256Extra.\nSection HYPER_TYPE_BOOL.\n  Local Open Scope Z_scope.\n  Lemma small_modulo : 0 mod Int256.modulus = 0 /\\ 1 mod Int256.modulus = 1.\n  Proof. Admitted.\n  Definition zero_mod_modulus := proj1 small_modulo.\n  Definition one_mod_modulus := proj2 small_modulo.\n  Ltac rewrite_unsigned_repr :=\n    try unfold Int256.zero, Int256.one;\n    try rewrite Int256.unsigned_repr_eq;\n    try rewrite zero_mod_modulus;\n    try rewrite one_mod_modulus.\n  Local Instance int_bool_iso_impl : HyperTypeIsoImpl tint_bool := {\n    ht_iso_ty_cond v := match v with\n      | Vint i => Int256.unsigned i = 0 \\/ Int256.unsigned i = 1\n      | _ => False\n      end;\n    ht_iso_ft_cond f := True;\n    ht_iso_default := false;\n    ht_implement f := Vint (if f then Int256.one else Int256.zero);\n    ht_spec v := match v with\n      | Vint i => Int256.unsigned i =? 1\n      | _ => false\n      end\n  }.\n  Local Instance int_bool_iso : HyperTypeIso tint_bool.\n  Proof. Admitted.\n  Global Instance int_bool_impl : HyperTypeImpl tint_bool := _.\n  Global Instance int_bool : HyperType tint_bool := _.\n  \n  Definition int_bool_pair :=\n    @mk_hyper_type_pair tint_bool int_bool_impl.\n  Lemma ht_ty_cond_0_1 :\n      ht_ty_cond tint_bool (CVval (Vint (Int256.repr 0))) /\\\n      ht_ty_cond tint_bool (CVval (Vint (Int256.repr 1))).\n  Proof. Admitted.\n  Definition int_bool_zero := proj1 ht_ty_cond_0_1.\n  Definition int_bool_one  := proj2 ht_ty_cond_0_1.\n  Global Instance int_bool_notbool_impl\n      : HyperUnaryImpl Onotbool tint_bool tint_bool := {\n    Hunary_cond ft := True;\n    Hunary_ocond := otrue1;\n    Hunary := negb\n  }.\n  Global Instance int_bool_notbool : HyperUnaryOp Onotbool tint_bool tint_bool.\n  Proof. Admitted.\n  Global Instance int_bool_notbool_passthrough\n      : HyperUnaryPassthrough Onotbool tint_bool tint_bool.\n  \n  Global Instance int_bool_or_impl\n      : HyperBinaryImpl Oor tint_bool tint_bool tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary := orb\n  }.\n  Global Instance int_bool_or\n     : HyperBinaryOp Oor tint_bool tint_bool tint_bool := {\n  }.\n  Proof. Admitted.\n  Global Instance int_bool_or_passthrough\n      : HyperBinaryPassthrough Oor tint_bool tint_bool tint_bool.\n  \n  Global Instance int_bool_xor_impl\n      : HyperBinaryImpl Oxor tint_bool tint_bool tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary := xorb\n  }.\n  Global Instance int_bool_xor\n      : HyperBinaryOp Oxor tint_bool tint_bool tint_bool := {\n  }.\n  Proof. Admitted.\n  Global Instance int_bool_xor_passthrough\n      : HyperBinaryPassthrough Oxor tint_bool tint_bool tint_bool.\n  \n  Global Instance int_bool_and_impl\n      : HyperBinaryImpl Oand tint_bool tint_bool tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary := andb\n  }.\n  Global Instance int_bool_and\n      : HyperBinaryOp Oand tint_bool tint_bool tint_bool := {\n  }.\n  Proof. Admitted.\n  Global Instance int_bool_and_passthrough\n      : HyperBinaryPassthrough Oand tint_bool tint_bool tint_bool.\n  \n  Global Instance int_bool_eq_impl\n      : HyperBinaryImpl Oeq tint_bool tint_bool tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary f f' := negb (xorb f f')\n  }.\n  Global Instance int_bool_eq\n      : HyperBinaryOp Oeq tint_bool tint_bool tint_bool := {\n  }.\n  Proof. Admitted.\n  Global Instance int_bool_eq_passthrough\n      : HyperBinaryPassthrough Oeq tint_bool tint_bool tint_bool.\n  \n  Global Instance int_bool_ne_impl\n      : HyperBinaryImpl One tint_bool tint_bool tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary := xorb\n  }.\n  Global Instance int_bool_ne\n      : HyperBinaryOp One tint_bool tint_bool tint_bool := {\n  }.\n  Proof. Admitted.\n  Global Instance int_bool_ne_passthrough\n      : HyperBinaryPassthrough One tint_bool tint_bool tint_bool.\n  \n  \nEnd HYPER_TYPE_BOOL.\nSection HYPER_TYPE_INT.\n  Local Open Scope Z_scope.\n  Class IntegerBound (bound : Z) : Prop := {\n    integer_bound_within_modulus : Int256.modulus >= bound;\n    integer_bound_positive : 0 < bound\n  }.\n  Definition Z_bounded (bound : Z){_ : IntegerBound bound} := Z.\n  Typeclasses Opaque Z_bounded.\n  Opaque Int256.repr.\n  \nSection BOUNDED.\n  \n  Variable bound : Z.\n  Context `{bound_cond : IntegerBound bound}.\n  Definition tint_Z_bounded\n    := Tpair (Z_bounded bound) tint.\n  Lemma unsigned_repr_eq (f : Z_bounded bound)(cond : -1 < f /\\ bound > f)\n      : Int256.unsigned (Int256.repr f) = f.\n  Proof. Admitted.\n  Lemma bounded_repr_injective  : forall (f f' : Z_bounded bound)\n                                 (cond : -1 < f /\\ bound > f)\n                                 (cond' : -1 < f' /\\ bound > f'),\n      (Int256.repr f) = (Int256.repr f') -> f = f'.\n  Proof. Admitted.\n    \n  Instance int_Z_iso_impl : HyperTypeIsoImpl tint_Z_bounded := {\n    ht_iso_ty_cond v := match v with\n      | Vint i => bound > Int256.unsigned i\n      | _ => False\n      end;\n    ht_iso_ft_cond f := -1 < f /\\ bound > f;\n    ht_iso_default := 0;\n    ht_implement f := (Vint (Int256.repr f));\n    ht_spec v := match v with\n      | Vint i => Int256.unsigned i\n      | _ => 0\n      end\n   }.\n  \n  Instance int_Z_iso : HyperTypeIso tint_Z_bounded.\n  Proof. Admitted.\n  Instance int_Z_impl : HyperTypeImpl tint_Z_bounded := _.\n  Instance int_Z : HyperType tint_Z_bounded := _.\n  \n  \n  Instance int_Z_bounded_add_impl\n      : HyperBinaryImpl Oadd tint_Z_bounded tint_Z_bounded tint_Z_bounded := {\n    Hbinary_cond f f' := f + f' < bound;\n    Hbinary_ocond := oprop2 (fun f f' => f + f' < bound);\n    Hbinary := Z.add\n  }.\n  Instance int_Z_bounded_add\n      : HyperBinaryOp Oadd tint_Z_bounded tint_Z_bounded tint_Z_bounded := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_add_passthrough\n      : HyperBinaryPassthrough Oadd tint_Z_bounded tint_Z_bounded tint_Z_bounded.\n  \n  Instance int_Z_bounded_sub_impl\n      : HyperBinaryImpl Osub tint_Z_bounded tint_Z_bounded tint_Z_bounded := {\n    Hbinary_cond f f' := f >= f';\n    Hbinary_ocond := oprop2 (fun f f' => f >= f');\n    Hbinary := Z.sub\n  }.\n  Instance int_Z_bounded_sub\n      : HyperBinaryOp Osub tint_Z_bounded tint_Z_bounded tint_Z_bounded := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_sub_passthrough\n      : HyperBinaryPassthrough Osub tint_Z_bounded tint_Z_bounded tint_Z_bounded.\n  \n  Instance int_Z_bounded_mul_impl\n      : HyperBinaryImpl Omul tint_Z_bounded tint_Z_bounded tint_Z_bounded := {\n    Hbinary_cond f f' := f * f' < bound;\n    Hbinary_ocond := oprop2 (fun f f' => f * f' < bound);\n    Hbinary := Z.mul\n  }.\n  Instance int_Z_bounded_mul\n      : HyperBinaryOp Omul tint_Z_bounded tint_Z_bounded tint_Z_bounded := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_mul_passthrough\n      : HyperBinaryPassthrough Omul tint_Z_bounded tint_Z_bounded tint_Z_bounded.\n  \n  Instance int_Z_bounded_mod_impl\n      : HyperBinaryImpl Omod tint_Z_bounded tint_Z_bounded tint_Z_bounded := {\n    Hbinary_cond f f' := f' <> 0;\n    Hbinary_ocond := oprop2 (fun f f' => f' <> 0);\n    Hbinary := Z.modulo\n  }.\n  Instance int_Z_bounded_mod\n      : HyperBinaryOp Omod tint_Z_bounded tint_Z_bounded tint_Z_bounded := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_mod_passthrough\n      : HyperBinaryPassthrough Omod tint_Z_bounded tint_Z_bounded tint_Z_bounded.\n  \n  \n  Instance int_Z_bounded_div_impl\n      : HyperBinaryImpl Odiv tint_Z_bounded tint_Z_bounded tint_Z_bounded := {\n    Hbinary_cond f f' := f' <> 0;\n    Hbinary_ocond := oprop2 (fun f f' => f' <> 0);\n    Hbinary := Z.div\n  }.\n  Instance int_Z_bounded_div\n      : HyperBinaryOp Odiv tint_Z_bounded tint_Z_bounded tint_Z_bounded := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_div_passthrough\n      : HyperBinaryPassthrough Odiv tint_Z_bounded tint_Z_bounded tint_Z_bounded.\n  \n  Instance int_Z_bounded_eq_impl\n      : HyperBinaryImpl Oeq tint_Z_bounded tint_Z_bounded tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary := Z.eqb\n  }.\n  Instance int_Z_bounded_eq\n      : HyperBinaryOp Oeq tint_Z_bounded tint_Z_bounded tint_bool := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_eq_passthrough\n      : HyperBinaryPassthrough Oeq tint_Z_bounded tint_Z_bounded tint_bool.\n  \n  Instance int_Z_bounded_ne_impl\n      : HyperBinaryImpl One tint_Z_bounded tint_Z_bounded tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary f f' := negb (Z.eqb f f')\n  }.\n  Instance int_Z_bounded_ne\n      : HyperBinaryOp One tint_Z_bounded tint_Z_bounded tint_bool := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_ne_passthrough\n      : HyperBinaryPassthrough One tint_Z_bounded tint_Z_bounded tint_bool.\n  \n  Instance int_Z_bounded_lt_impl\n      : HyperBinaryImpl Olt tint_Z_bounded tint_Z_bounded tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary := Z.ltb\n  }.\n  Instance int_Z_bounded_lt\n      : HyperBinaryOp Olt tint_Z_bounded tint_Z_bounded tint_bool := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_lt_passthrough\n      : HyperBinaryPassthrough Olt tint_Z_bounded tint_Z_bounded tint_bool.\n  \n  Instance int_Z_bounded_gt_impl\n      : HyperBinaryImpl Ogt tint_Z_bounded tint_Z_bounded tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary := Z.gtb\n  }.\n  Instance int_Z_bounded_gt\n      : HyperBinaryOp Ogt tint_Z_bounded tint_Z_bounded tint_bool := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_gt_passthrough\n      : HyperBinaryPassthrough Ogt tint_Z_bounded tint_Z_bounded tint_bool.\n  \n  Instance int_Z_bounded_le_impl\n      : HyperBinaryImpl Ole tint_Z_bounded tint_Z_bounded tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary := Z.leb\n  }.\n  Instance int_Z_bounded_le\n      : HyperBinaryOp Ole tint_Z_bounded tint_Z_bounded tint_bool := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_le_passthrough\n      : HyperBinaryPassthrough Ole tint_Z_bounded tint_Z_bounded tint_bool.\n  \n  Instance int_Z_bounded_ge_impl\n      : HyperBinaryImpl Oge tint_Z_bounded tint_Z_bounded tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary := Z.geb\n  }.\n  Instance int_Z_bounded_ge\n      : HyperBinaryOp Oge tint_Z_bounded tint_Z_bounded tint_bool := {\n  }.\n  Proof. Admitted.\n  Instance int_Z_bounded_ge_passthrough\n      : HyperBinaryPassthrough Oge tint_Z_bounded tint_Z_bounded tint_bool.\n  \nEnd BOUNDED.\n  Global Instance modulus_bound : IntegerBound Int256.modulus := {\n    integer_bound_within_modulus := Z.le_ge _ _ (Zle_refl Int256.modulus);\n    integer_bound_positive := Z.gt_lt _ _ (Int256.modulus_pos)\n  }.\n  Definition tint_Z32 := tint_Z_bounded Int256.modulus.\n  Typeclasses Transparent tint_Z32 tint_Z_bounded.\n  Definition int_Z32_impl := int_Z_impl Int256.modulus.\n  Definition int_Z32 := int_Z Int256.modulus.\n  \n  Definition int_Z32_pair := @mk_hyper_type_pair tint_Z32 int_Z32_impl .\n  \n  Existing Instance int_Z32_impl.\n  Lemma int_Z32_ty_cond z\n      : ht_ty_cond tint_Z32 (CVval (HighValues.Vint (Int256.repr z))).\n  Proof. Admitted.\n  Definition int_Z32_add_impl := int_Z_bounded_add_impl Int256.modulus.\n  Definition int_Z32_sub_impl := int_Z_bounded_sub_impl Int256.modulus.\n  Definition int_Z32_mul_impl := int_Z_bounded_mul_impl Int256.modulus.\n  Definition int_Z32_mod_impl := int_Z_bounded_mod_impl Int256.modulus.\n  Definition int_Z32_div_impl := int_Z_bounded_div_impl Int256.modulus.\n  Definition int_Z32_add := int_Z_bounded_add Int256.modulus.\n  Definition int_Z32_sub := int_Z_bounded_sub Int256.modulus.\n  Definition int_Z32_mul := int_Z_bounded_mul Int256.modulus.\n  Definition int_Z32_mod := int_Z_bounded_mod Int256.modulus.\n  Definition int_Z32_div := int_Z_bounded_div Int256.modulus.\n  Definition int_Z32_add_passthrough := int_Z_bounded_add_passthrough Int256.modulus.\n  Definition int_Z32_sub_passthrough := int_Z_bounded_sub_passthrough Int256.modulus.\n  Definition int_Z32_mul_passthrough := int_Z_bounded_mul_passthrough Int256.modulus.\n  Definition int_Z32_mod_passthrough := int_Z_bounded_mod_passthrough Int256.modulus.\n  Definition int_Z32_div_passthrough := int_Z_bounded_div_passthrough Int256.modulus.  \n  \n  Definition int_Z32_eq_impl := int_Z_bounded_eq_impl Int256.modulus.\n  Definition int_Z32_ne_impl := int_Z_bounded_ne_impl Int256.modulus.\n  Definition int_Z32_lt_impl := int_Z_bounded_lt_impl Int256.modulus.\n  Definition int_Z32_gt_impl := int_Z_bounded_gt_impl Int256.modulus.\n  Definition int_Z32_le_impl := int_Z_bounded_le_impl Int256.modulus.\n  Definition int_Z32_ge_impl := int_Z_bounded_ge_impl Int256.modulus.\n  Definition int_Z32_eq := int_Z_bounded_eq Int256.modulus.\n  Definition int_Z32_ne := int_Z_bounded_ne Int256.modulus.\n  Definition int_Z32_lt := int_Z_bounded_lt Int256.modulus.\n  Definition int_Z32_gt := int_Z_bounded_gt Int256.modulus.\n  Definition int_Z32_le := int_Z_bounded_le Int256.modulus.\n  Definition int_Z32_ge := int_Z_bounded_ge Int256.modulus.\n  Definition int_Z32_eq_passthrough := int_Z_bounded_eq_passthrough Int256.modulus.\n  Definition int_Z32_ne_passthrough := int_Z_bounded_ne_passthrough Int256.modulus.\n  Definition int_Z32_lt_passthrough := int_Z_bounded_lt_passthrough Int256.modulus.\n  Definition int_Z32_gt_passthrough := int_Z_bounded_gt_passthrough Int256.modulus.\n  Definition int_Z32_le_passthrough := int_Z_bounded_le_passthrough Int256.modulus.\n  Definition int_Z32_ge_passthrough := int_Z_bounded_ge_passthrough Int256.modulus.\nEnd HYPER_TYPE_INT.\nNotation Z32 := (Z_bounded Int256.modulus).\nExisting Instances int_Z32_impl int_Z32 .\nExisting Instances int_Z32_add_impl int_Z32_sub_impl int_Z32_mul_impl\n                   int_Z32_mod_impl int_Z32_div_impl.\nExisting Instances int_Z32_add int_Z32_sub int_Z32_mul int_Z32_mod int_Z32_div.\nExisting Instances int_Z32_add_passthrough int_Z32_sub_passthrough\n                   int_Z32_mul_passthrough int_Z32_mod_passthrough\n                   int_Z32_div_passthrough.\nExisting Instances int_Z32_eq_impl int_Z32_ne_impl int_Z32_lt_impl\n                   int_Z32_gt_impl int_Z32_le_impl int_Z32_ge_impl.\nExisting Instances int_Z32_eq int_Z32_ne int_Z32_lt int_Z32_gt\n                   int_Z32_le int_Z32_ge.\nExisting Instances int_Z32_eq_passthrough int_Z32_ne_passthrough\n                   int_Z32_lt_passthrough int_Z32_gt_passthrough\n                   int_Z32_le_passthrough int_Z32_ge_passthrough.\nRequire Import Omega.\nSection HYPER_TYPE_UNSIGNED.\n  \n  Definition tint_U := Tpair int256 tint.\n  Instance int_U_iso_impl : HyperTypeIsoImpl tint_U :=\n    {\n      ht_iso_ft_cond f := True;\n      ht_iso_ty_cond v := match v with\n                            | Vint i => Int256.modulus > Int256.unsigned i\n                            | _ => False\n                          end;\n      ht_iso_default := Int256.zero;\n      ht_implement f := (Vint f);\n      ht_spec v := match v with\n                     | Vint i => i\n                     | _ => Int256.zero\n                   end\n    }.\n  Instance int_U_iso : HyperTypeIso tint_U.\n  Proof. Admitted.\n  Instance int_U_impl : HyperTypeImpl tint_U := _.\n  Instance int_U : HyperType tint_U := _.\n  \n  \n  Instance int_U_add_impl : HyperBinaryImpl Oadd tint_U tint_U tint_U :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary x y := Int256.add x y\n    }.\n  Instance int_U_add : HyperBinaryOp Oadd tint_U tint_U tint_U :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_add_passthrough : HyperBinaryPassthrough Oadd tint_U tint_U tint_U.\n  \n  \n  Instance int_U_sub_impl : HyperBinaryImpl Osub tint_U tint_U tint_U :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary x y := Int256.sub x y\n    }.\n  Instance int_U_sub : HyperBinaryOp Osub tint_U tint_U tint_U :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_sub_passthrough : HyperBinaryPassthrough Osub tint_U tint_U tint_U.\n  \n  \n  Instance int_U_mul_impl : HyperBinaryImpl Omul tint_U tint_U tint_U :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary x y := Int256.mul x y\n    }.\n  Instance int_U_mul : HyperBinaryOp Omul tint_U tint_U tint_U :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_mul_passthrough : HyperBinaryPassthrough Omul tint_U tint_U tint_U.\n  \n  \n  Instance int_U_mod_impl : HyperBinaryImpl Omod tint_U tint_U tint_U :=\n    {\n      Hbinary_cond f f' := f' <> Int256.zero;\n      Hbinary_ocond := oprop2 (fun f f' => f' <> Int256.zero);\n      Hbinary := Int256.modu\n    }.\n    \n  Instance int_U_mod : HyperBinaryOp Omod tint_U tint_U tint_U :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_mod_passthrough : HyperBinaryPassthrough Omod tint_U tint_U tint_U.\n  \n  \n  Instance int_U_div_impl : HyperBinaryImpl Odiv tint_U tint_U tint_U :=\n    {\n      Hbinary_cond f f' := f' <> Int256.zero;\n      Hbinary_ocond := oprop2 (fun f f' => f' <> Int256.zero);\n      Hbinary := Int256.divu\n    }.\n  Instance int_U_div : HyperBinaryOp Odiv tint_U tint_U tint_U :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_div_passthrough : HyperBinaryPassthrough Odiv tint_U tint_U tint_U.\n  \n  \n  Instance int_U_eq_impl : HyperBinaryImpl Oeq tint_U tint_U tint_bool :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary := Int256.cmpu Ceq\n    }.\n  Opaque val_eq_dec.\n  \n  Instance int_U_eq : HyperBinaryOp Oeq tint_U tint_U tint_bool :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_eq_passthrough : HyperBinaryPassthrough Oeq tint_U tint_U tint_bool .\n  \n  \n  Instance int_U_ne_impl : HyperBinaryImpl One tint_U tint_U tint_bool :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary := Int256.cmpu Cne\n    }.\n  Instance int_U_ne : HyperBinaryOp One tint_U tint_U tint_bool :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_ne_passthrough : HyperBinaryPassthrough One tint_U tint_U tint_bool.\n  \n  \n  \n  Instance int_U_lt_impl : HyperBinaryImpl Olt tint_U tint_U tint_bool :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary := Int256.cmpu Clt\n    }.\n  Instance int_U_lt : HyperBinaryOp Olt tint_U tint_U tint_bool :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_lt_passthrough : HyperBinaryPassthrough Olt tint_U tint_U tint_bool.\n  \n  \n  Instance int_U_gt_impl : HyperBinaryImpl Ogt tint_U tint_U tint_bool :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary := Int256.cmpu Cgt\n    }.\n  Instance int_U_gt : HyperBinaryOp Ogt tint_U tint_U tint_bool :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_gt_passthrough : HyperBinaryPassthrough Ogt tint_U tint_U tint_bool.\n  \n  \n  Instance int_U_le_impl : HyperBinaryImpl Ole tint_U tint_U tint_bool :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary := Int256.cmpu Cle\n    }.\n  Instance int_U_le : HyperBinaryOp Ole tint_U tint_U tint_bool :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_le_passthrough : HyperBinaryPassthrough Ole tint_U tint_U tint_bool.\n  \n  \n  Instance int_U_ge_impl : HyperBinaryImpl Oge tint_U tint_U tint_bool :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary := Int256.cmpu Cge\n    }.\n  Instance int_U_ge : HyperBinaryOp Oge tint_U tint_U tint_bool :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_ge_passthrough : HyperBinaryPassthrough Oge tint_U tint_U tint_bool.\n  \n  \n  Instance int_U_notint_impl : HyperUnaryImpl Onotint tint_U tint_U :=\n    {\n      Hunary_cond ft := True;\n      Hunary_ocond := otrue1;\n      Hunary := Int256.not\n    }.\n  Instance int_U_notint : HyperUnaryOp Onotint tint_U tint_U.\n  Proof. Admitted.\n  Instance int_U_notint_passthrough : HyperUnaryPassthrough Onotint tint_U tint_U.\n  \n  \n  Instance int_U_and_impl : HyperBinaryImpl Oand tint_U tint_U tint_U :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary := Int256.and\n    }.\n  Instance int_U_and : HyperBinaryOp Oand tint_U tint_U tint_U :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_and_passthrough : HyperBinaryPassthrough Oand tint_U tint_U tint_U.\n  \n  \n  \n  Instance int_U_or_impl : HyperBinaryImpl Oor tint_U tint_U tint_U :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary := Int256.or\n    }.\n  Instance int_U_or : HyperBinaryOp Oor tint_U tint_U tint_U :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_or_passthrough : HyperBinaryPassthrough Oor tint_U tint_U tint_U.\n  \n  \n  Instance int_U_shl_impl : HyperBinaryImpl Oshl tint_U tint_Z32 tint_U :=\n    {\n      Hbinary_cond f f' := f' < Int256.zwordsize;\n      Hbinary_ocond := oprop2 (fun f f' => f' < Int256.zwordsize);\n      Hbinary x y := Int256.shl x (Int256.repr y)\n    }.\n  Lemma lt_zwordsize_lt_iwordsize :\n    forall f,\n      -1 < f < Int256.zwordsize ->\n      Int256.ltu (Int256.repr f) Int256.iwordsize = true.\n  Proof. Admitted.\n  \n  Instance int_U_shl : HyperBinaryOp Oshl tint_U tint_Z32 tint_U :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_shl_passthrough : HyperBinaryPassthrough Oshl tint_U tint_Z32 tint_U.\n  \n  \n  Instance int_U_shr_impl : HyperBinaryImpl Oshr tint_U tint_Z32 tint_U :=\n    {\n      Hbinary_cond f f' := f' < Int256.zwordsize;\n      Hbinary_ocond := oprop2 (fun f f' => f' < Int256.zwordsize);\n      Hbinary x y := Int256.shru x (Int256.repr y)\n    }.\n  Instance int_U_shr : HyperBinaryOp Oshr tint_U tint_Z32 tint_U :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_shr_passthrough : HyperBinaryPassthrough Oshr tint_U tint_Z32 tint_U.\n  \n  \n  Instance int_U_xor_impl : HyperBinaryImpl Oxor tint_U tint_U tint_U :=\n    {\n      Hbinary_cond f f' := True;\n      Hbinary_ocond := otrue2;\n      Hbinary := Int256.xor\n    }.\n  Instance int_U_xor : HyperBinaryOp Oxor tint_U tint_U tint_U :=\n    {\n    }.\n  Proof. Admitted.\n  Instance int_U_xor_passthrough : HyperBinaryPassthrough Oxor tint_U tint_U tint_U.\n  \n  \n  Typeclasses Transparent tint_U.\n  Definition int_U_pair := @mk_hyper_type_pair tint_U int_U_impl.\n  Existing Instance int_U_impl.\n  Lemma int_U_ty_cond z :\n    ht_ty_cond tint_U (CVval (HighValues.Vint z)).\n  Proof. Admitted.\nEnd HYPER_TYPE_UNSIGNED.\nExisting Instances int_U_impl int_U .\nExisting Instances\n         int_U_add_impl int_U_sub_impl int_U_mul_impl\n         int_U_mod_impl int_U_div_impl.\nExisting Instances\n         int_U_add int_U_sub\n         int_U_mul int_U_mod int_U_div.\nExisting Instances\n         int_U_add_passthrough int_U_sub_passthrough\n         int_U_mul_passthrough int_U_mod_passthrough int_U_div_passthrough.\nExisting Instances\n         int_U_eq_impl int_U_ne_impl\n         int_U_lt_impl int_U_gt_impl int_U_le_impl int_U_ge_impl.\nExisting Instances\n         int_U_eq int_U_ne\n         int_U_lt int_U_gt int_U_le int_U_ge.\nExisting Instances\n         int_U_eq_passthrough int_U_ne_passthrough\n         int_U_lt_passthrough int_U_gt_passthrough\n         int_U_le_passthrough int_U_ge_passthrough.\nExisting Instances\n         int_U_notint_impl int_U_and_impl int_U_or_impl\n         int_U_shl_impl int_U_shr_impl int_U_xor_impl.\nExisting Instances\n         int_U_notint int_U_and int_U_or\n         int_U_shl int_U_shr int_U_xor.\nExisting Instances\n         int_U_notint_passthrough int_U_and_passthrough int_U_or_passthrough\n         int_U_shl_passthrough int_U_shr_passthrough int_U_xor_passthrough.\nRequire Import backend.MachineModel.\nSection WITH_DATA.\nContext `{LayerSpec : LayerSpecClass}.\nLocal Arguments HyperBuiltin0 {_} {tp} {hti} (HyperBuiltin0Impl0).\nLocal Arguments HyperBuiltin1 {_} {arg_tp} {tp} {arg_hti} {hti} (HyperBuiltin1Impl0).\nInstance builtin0_address_impl : HyperBuiltin0Impl tint_U\n  := Build_HyperBuiltin0Impl tint_U me_address Baddress.\nInstance builtin0_address : HyperBuiltin0 builtin0_address_impl.\nconstructor; reflexivity.\nQed.\nInstance builtin0_origin_impl : HyperBuiltin0Impl tint_U\n  := Build_HyperBuiltin0Impl tint_U me_origin Borigin.\nInstance builtin0_origin : HyperBuiltin0 builtin0_origin_impl.\nconstructor; reflexivity.\nQed.\nInstance builtin0_caller_impl : HyperBuiltin0Impl tint_U\n  := Build_HyperBuiltin0Impl tint_U me_caller Bcaller.\nInstance builtin0_caller : HyperBuiltin0 builtin0_caller_impl.\nconstructor; reflexivity.\nQed.\nInstance builtin0_callvalue_impl : HyperBuiltin0Impl tint_U\n  := Build_HyperBuiltin0Impl tint_U me_callvalue Bcallvalue.\nInstance builtin0_callvalue : HyperBuiltin0 builtin0_callvalue_impl.\nconstructor; reflexivity.\nQed.\nInstance builtin0_coinbase_impl : HyperBuiltin0Impl tint_U\n  := Build_HyperBuiltin0Impl tint_U me_coinbase Bcoinbase.\nInstance builtin0_coinbase : HyperBuiltin0 builtin0_coinbase_impl.\nconstructor; reflexivity.\nQed.\nInstance builtin0_timestamp_impl : HyperBuiltin0Impl tint_U\n  := Build_HyperBuiltin0Impl tint_U me_timestamp Btimestamp.\nInstance builtin0_timestamp : HyperBuiltin0 builtin0_timestamp_impl.\nconstructor; reflexivity.\nQed.\nInstance builtin0_number_impl : HyperBuiltin0Impl tint_U\n  := Build_HyperBuiltin0Impl tint_U me_number Bnumber.\nInstance builtin0_number : HyperBuiltin0 builtin0_number_impl.\nconstructor; reflexivity.\nQed.\nInstance builtin1_balance_impl : HyperBuiltin1Impl tint_U tint_U\n  := Build_HyperBuiltin1Impl tint_U tint_U me_balance Bbalance.\nInstance builtin1_balance : HyperBuiltin1 builtin1_balance_impl.\nconstructor.\n- \n  constructor.\n- \n  intros.\n  simpl in H0.\n  exists (Vint f).\n  split.\n  + symmetry. apply H0.\n  + reflexivity.\nQed.\nInstance builtin1_blockhash_impl : HyperBuiltin1Impl tint_U tint_U\n  := Build_HyperBuiltin1Impl tint_U tint_U me_blockhash Bblockhash.\nInstance builtin1_blockhash : HyperBuiltin1 builtin1_blockhash_impl.\nconstructor.\n- \n  constructor.\n- \n  intros.\n  simpl in H0.\n  exists (Vint f).\n  split.\n  + symmetry. apply H0.\n  + reflexivity.\nQed.\nEnd WITH_DATA.\nRequire Import backend.SymbolicKeccak.\nInductive hashvalue : Set :=\n| hashval_int256 : int256 -> hashvalue\n| hashval_hash1 : hashvalue -> hashvalue\n| hashval_hash2 : hashvalue -> hashvalue -> hashvalue.\nFixpoint val_of_hashvalue hv :=\n  match hv with\n  | hashval_int256 i => Vint i\n  | hashval_hash1 hv1 => sha_1 (val_of_hashvalue hv1)\n  | hashval_hash2 hv1 hv2 => sha_2 (val_of_hashvalue hv1) (val_of_hashvalue hv2)\n  end.\nLemma val_of_hashvalue_injective : forall hv hv',\n    val_of_hashvalue hv = val_of_hashvalue hv' ->\n    hv = hv'.\nProof. Admitted.\n  \nDefinition tint_hashvalue := Tpair hashvalue tint.\nInstance int_hashvalue_impl : HyperTypeImpl tint_hashvalue := {\n  ht_cval hv := CVval (val_of_hashvalue hv);\n  ht_default := hashval_int256 Int256.zero;\n  ht_ft_cond hv := True;\n  ht_valid_ft_cond hv := True;\n  ht_valid_ft_ocond := otrue1;\n  \n}.\nInstance int_hashvalue : HyperType tint_hashvalue.\n constructor.\n - intros hv _.   \n   eexists. reflexivity.\n - simpl. tauto.\n - simpl. tauto.\nQed.\nDefinition int_hashvalue_pair :=\n    @mk_hyper_type_pair tint_hashvalue int_hashvalue_impl.\nGlobal Instance int_hashvalue_hash1_impl\n  : HyperUnaryImpl Osha_1 tint_hashvalue tint_hashvalue := {\n Hunary_cond ft := True;\n Hunary_ocond := otrue1;\n Hunary := hashval_hash1\n}.\nGlobal Instance int_hashvalue_hash1 : HyperUnaryOp Osha_1 tint_hashvalue tint_hashvalue.\nProof. Admitted.\nGlobal Instance int_hashvalue_hash1_passthrough : HyperUnaryPassthrough  Osha_1 tint_hashvalue tint_hashvalue.\nGlobal Instance int_hashvalue_hash1_U_impl\n  : HyperUnaryImpl Osha_1 tint_U tint_hashvalue := {\n Hunary_cond ft := True;\n Hunary_ocond := otrue1;\n Hunary f := (hashval_hash1 (hashval_int256 f))\n}.\n             \nGlobal Instance int_hashvalue_hash1_U : HyperUnaryOp Osha_1 tint_U tint_hashvalue.\nProof. Admitted.\nGlobal Instance int_hashvalue_hash1_U_passthrough : HyperUnaryPassthrough Osha_1 tint_U tint_hashvalue.\nGlobal Instance int_hashvalue_hash2_impl :\n  HyperBinaryImpl Osha_2 tint_hashvalue tint_hashvalue tint_hashvalue := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary := hashval_hash2\n  }.\n  Global Instance int_hashvalue_hash2 \n     : HyperBinaryOp Osha_2 tint_hashvalue tint_hashvalue tint_hashvalue := {\n  }.\n  Proof. Admitted.\n  \n  Global Instance int_hashvalue_hash2_passthrough\n     : HyperBinaryPassthrough Osha_2 tint_hashvalue tint_hashvalue tint_hashvalue := {\n                                                                                    }.\n  \nGlobal Instance int_hashvalue_hash2_U1impl :\n  HyperBinaryImpl Osha_2 tint_U tint_hashvalue tint_hashvalue := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary x y := hashval_hash2 (hashval_int256 x) y\n  }.\n  Global Instance int_hashvalue_hash2_U1 \n     : HyperBinaryOp Osha_2 tint_U tint_hashvalue tint_hashvalue := {\n  }.\n  Proof. Admitted.\n  \n  Global Instance int_hashvalue_hash2_U1_passthrough\n     : HyperBinaryPassthrough Osha_2 tint_U tint_hashvalue tint_hashvalue := {\n                                                                                    }.\n  \nGlobal Instance int_hashvalue_hash2_U2_impl :\n  HyperBinaryImpl Osha_2 tint_hashvalue tint_U tint_hashvalue := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary x y := hashval_hash2 x (hashval_int256 y)\n  }.\n  Global Instance int_hashvalue_hash2_U2\n     : HyperBinaryOp Osha_2 tint_hashvalue tint_U tint_hashvalue := {\n  }.\n  Proof. Admitted.\n  \n  Global Instance int_hashvalue_hash2_U2_passthrough\n     : HyperBinaryPassthrough Osha_2 tint_hashvalue tint_U tint_hashvalue := {\n                                                                                    }.\n  \nGlobal Instance int_hashvalue_hash2_U12_impl :\n  HyperBinaryImpl Osha_2 tint_U tint_U tint_hashvalue := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary x y := hashval_hash2 (hashval_int256 x) (hashval_int256 y)\n  }.\n  Global Instance int_hashvalue_hash2_U12\n     : HyperBinaryOp Osha_2 tint_U tint_U tint_hashvalue := {\n  }.\n  Proof. Admitted.\n  \n  Global Instance int_hashvalue_hash2_U12_passthrough\n     : HyperBinaryPassthrough Osha_2 tint_U tint_U tint_hashvalue := {\n                                                                                    }.\n  \n  Definition hashvalue_eq_dec : forall (hv hv' : hashvalue), \n      {hv = hv'} + {hv <> hv'}.\n    decide equality.\n    apply Int256.eq_dec.\n  Defined.\n  \n  Definition hashvalue_eqb (hv hv' : hashvalue) : bool :=\n    if hashvalue_eq_dec hv hv' then true else false.    \n  Global Instance hashvalue_bool_eq_impl\n    : HyperBinaryImpl Oeq tint_hashvalue tint_hashvalue tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary f f' := hashvalue_eqb f f'\n  }.\n  Global Instance hashvalue_bool_eq\n      : HyperBinaryOp Oeq tint_hashvalue tint_hashvalue tint_bool := {\n  }.\n  Proof. Admitted.\n  Global Instance hashvalue_bool_eq_passthrough\n      : HyperBinaryPassthrough Oeq tint_hashvalue tint_hashvalue tint_bool.\n  \n  Global Instance hashvalue_bool_ne_impl\n      : HyperBinaryImpl One tint_hashvalue tint_hashvalue tint_bool := {\n    Hbinary_cond f f' := True;\n    Hbinary_ocond := otrue2;\n    Hbinary f f' := negb (hashvalue_eqb f f')\n  }.\n  Global Instance hashvalue_bool_ne\n      : HyperBinaryOp One tint_hashvalue tint_hashvalue tint_bool := {\n  }.\n  Proof. Admitted.\n  Global Instance int_hashvalue_ne_passthrough\n      : HyperBinaryPassthrough One tint_hashvalue tint_hashvalue tint_bool.\n  \n"
  },
  {
    "path": "src/core/MemoryModel.v",
    "content": "Require Import ZArith.\nRequire Import backend.Values.HighValues.\nRequire Import backend.MemoryModel.\nRequire Export backend.AbstractData.\n \nClass MemoryModelOps (mem: Type) := {\n empty: mem;\n}.\nRequire Export DeepSpec.lib.Lens.\nSection LAYER_SPEC_CLASSES.\nClass LayerSpecClass : Type := {\n  \n  \n  memModelOps :> MemoryModelOps mem;\n  \n  GetHighData : Type;\n  GetLowData := GetHighData\n}.\nContext`{LayerSpec : LayerSpecClass}.\nClass CompatRelOps (D1 D2: compatdata) :=\n  {\n    relate_AbData: meminj -> cdata_type D1 -> cdata_type D2 -> Prop;\n    match_AbData: cdata_type D1 -> mem -> meminj -> Prop;\n    new_glbl: list AST.ident\n  }.\nClass CompatRel D1 D2 `{ops: !CompatRelOps D1 D2} :=\n  {\n    \n  }.\nClass compatrel D1 D2 :=\n  {\n    crel_ops :> CompatRelOps D1 D2;\n    crel_prf :> CompatRel D1 D2\n  }.\nClass OverlaySpecClass : Type := {\n  \n  \n  cdataOpsHigh      :> CompatDataOps GetHighData;\n  cdataHigh         :> CompatData GetHighData;\n  GetHighDataX      : compatdata\n                    := @cdata GetHighData _ _\n \n}.\nClass UnderlaySpecClass : Type := {\n  cdataOpsLow       : CompatDataOps GetLowData;\n  cdataLow          : CompatData GetLowData;\n  GetLowDataX       : compatdata\n                    := cdata  GetLowData ;\n  MemLow            := mwd GetLowDataX; \n   \n}.\nContext`{OverlaySpec : !OverlaySpecClass}.\nContext`{UnderlaySpec : !UnderlaySpecClass}.\nClass HyperMem : Type := {\n  Hcompatrel :> compatrel GetHighDataX GetLowDataX;\n  mem_match j (d : GetHighData)(ml : MemLow) :=\n    relate_AbData j d (snd ml) /\\ match_AbData d (fst ml) j\n}.\nContext`{HM : !HyperMem}.\nEnd LAYER_SPEC_CLASSES.\n"
  },
  {
    "path": "src/core/SEnv.v",
    "content": "Require Import backend.Values.HighValues.\nRequire Import backend.Environments.AllEnvironments.\nRequire Import cclib.Maps.\nRequire Import backend.MemoryModel.\nRequire Import backend.Ctypes.\nRequire Import DeepSpec.core.Cval.\nRequire Import DeepSpec.core.HyperType.\nRequire Import DeepSpec.core.MemoryModel.\nRequire Import DeepSpec.lib.SimpleMaps.\nRequire Export DeepSpec.lib.SimpleIndexedMaps.\nModule TypePairProjection <: TypeProjection.\n  Definition A := hyper_type_pair.\n  Definition proj := tp_ft.\nEnd TypePairProjection.\nModule SpecTree := IPList(TypePairProjection).\nDefinition spec_env_t := SpecTree.t.\nDefinition senv_cond {tmp} (se : spec_env_t tmp)\n  := forall i tp hti,\n       forall eq : (tmp ! i)%alist ~~~ Some (@mk_hyper_type_pair tp hti), \n         ht_ft_cond (SpecTree.get_eq i se eq).\nDefinition lenv_cond `{LayerSpecClass}{tmp} (se : spec_env_t tmp)(le : temp_env)\n  := forall i tp hti,\n       forall eq : (tmp ! i)%alist ~~~ Some (@mk_hyper_type_pair tp hti),\n         ht_ft_cond (SpecTree.get_eq i se eq) /\\\n         ht_rel_some (SpecTree.get_eq i se eq) (le ! i).\nLemma lenv_senv_cond `{LayerSpecClass}{tmp}{se : spec_env_t tmp}{le} :\n    lenv_cond se le -> senv_cond se.\nProof. Admitted.\nModule HyperTypeProjection <: TypeProjection.\n  Definition A := hyper_type_pair.\n  Definition proj htp := HyperType (tp_type_pair htp).\nEnd HyperTypeProjection.\nDefinition proj1_ex {A : Prop}{P : A -> Prop}(e : ex P) : A :=\n  match e with ex_intro x _ => x end.\nDefinition proj2_ex {A : Prop}{P : A -> Prop}(e : ex P) : P (proj1_ex e) :=\n  match e with ex_intro _ Px => Px end.\nDefinition proj1_sig2 {A P Q}(s : sig2 P Q) : A :=\n  match s with exist2 a _ _ => a end.\nDefinition proj2_sig2 {A}{P Q : A -> Prop}(s : sig2 P Q)\n  : P (proj1_sig2 s) := match s with exist2 _ p _ => p end.\nDefinition proj3_sig2 {A}{P Q : A -> Prop}(s : sig2 P Q)\n  : Q (proj1_sig2 s) := match s with exist2 _ _ q => q end.\nDefinition car := @fst.\nDefinition cdr := @snd.\nDefinition cadr A B C a := car B C (cdr A _ a).\nDefinition cddr A B C a := cdr B C (cdr A _ a).\nDefinition caar A B C a := car A B (car _ C a).\nDefinition cdar A B C a := cdr A B (car _ C a).\nDefinition caddr A B C D a := car C D (cddr A B _ a).\nDefinition cdddr A B C D a := cdr C D (cddr A B _ a).\nDefinition cadddr A B C D E a := car D E (cdddr A B C _ a).\nDefinition cddddr A B C D E a := cdr D E (cdddr A B C _ a).\nDefinition caddddr A B C D E F a := car E F (cddddr A B C D _ a).\nDefinition cdddddr A B C D E F a := cdr E F (cddddr A B C D _ a).\nArguments car [A B] _.          Arguments cdr [A B] _.\nArguments cadr [A B C] _.       Arguments cddr [A B C] _.\nArguments caar [A B C] _.       Arguments cdar [A B C] _.\nArguments caddr [A B C D] _.    Arguments cdddr [A B C D] _.\nArguments cadddr [A B C D E] _. Arguments cddddr [A B C D E] _.\nArguments caddddr [A B C D E F] _. Arguments cdddddr [A B C D E F] _.\nDefinition proj12 A B C a := @proj1 B C (@proj2 A _ a).\nDefinition proj22 A B C a := @proj2 B C (@proj2 A _ a).\nDefinition proj122 A B C D a := @proj1 C D (@proj22 A B _ a).\nDefinition proj222 A B C D a := @proj2 C D (@proj22 A B _ a).\nArguments proj12 [A B C] _.    Arguments proj22 [A B C] _.\nArguments proj122 [A B C D] _. Arguments proj222 [A B C D] _.\nLemma some_injective {A}{a b : A} : Some a = Some b -> a = b.\nProof. Admitted.\n"
  },
  {
    "path": "src/core/Syntax.v",
    "content": "Require Import BinPosDef.  \nRequire Import List.\nRequire Import Bool.\nRequire Import BinInt.\nRequire Import backend.AST.\nRequire Import backend.MemoryModel.\nRequire Import backend.Values.HighValues.\nRequire Import cclib.Integers.\nRequire Import cclib.Maps.\nRequire Import backend.Statements.StmtMiniC.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.MachineModel.\nRequire Import DeepSpec.core.Cval.\nRequire Import DeepSpec.core.SEnv.\nRequire Import DeepSpec.core.HyperType.\nRequire Import DeepSpec.core.HyperTypeInst.\nRequire Import DeepSpec.core.MemoryModel.\nRequire Import DeepSpec.lib.OProp.\nRequire Import DeepSpec.lib.Monad.ContOptionMonad.\nGeneralizable Variables tp tpl tpr tpo.  \nSection VARIABLE.\n  \n  Context `{HM : HyperMem}.\n  Definition variable tp := ltype_pair tp.\n  \n  Definition offset_zero := Int256.zero.\n  \n  Record variable_prf {tp}`{HyperTypeImpl tp}(v : variable tp) : Prop\n      := mk_var_prf {\n    \n    VARoffset_zero : v.(ltype_ident) = Field Global (ident_ext_base (v.(ltype_ident)));\n    VARltype : HyperLType v\n  }.\n  Global Arguments VARoffset_zero {_ _ _} _.\n  Global Arguments VARltype       {_ _ _} _.\n  \n  \n  Class variable_passthrough_prf {tp}`{HyperTypeImpl tp}(v : variable tp) : Prop\n    := mk_var_pt_prf {\n    \n    VAR_relate_impl_eq j d1 d2 :\n      relate_AbData j d1 d2 ->\n      (v.(ltype_get) d1) = (v.(ltype_get) d2);\n    \n    VAR_relate_impl_update j d1 d2 :\n      relate_AbData j d1 d2 ->\n      forall f,\n        relate_AbData j (v.(ltype_set) f d1) (v.(ltype_set) f d2);\n    \n    VAR_match_impl_update j d m :\n      match_AbData d m j ->\n      forall f,\n        match_AbData (v.(ltype_set) f d) m j;\n    \n  }.\nEnd VARIABLE.\nCoercion create_type_pair_marker := @create_type_marker type_pair.\nSection EXPR_CONSTR.\n  Context `{HM : HyperMem}.\n    \n  \n  Inductive expr_constr : forall tp {hti : HyperTypeImpl tp}, Type :=\n  | ECconst_int : forall tp `{HyperTypeImpl tp},\n    unpair_ft tp -> Int.int -> expr_constr tp          \n  | ECconst_int256 : forall tp `{HyperTypeImpl tp},\n    unpair_ft tp -> Int256.int -> expr_constr tp          \n  | ECtempvar : forall tp `{HyperTypeImpl tp},\n      ident -> expr_constr tp                         \n  | ECbuiltin0 : forall tp `{HyperTypeImpl tp, !HyperBuiltin0Impl tp},\n      expr_constr tp  \n  | ECbuiltin1 : forall atp tp `{HyperTypeImpl atp, HyperTypeImpl tp, !HyperBuiltin1Impl atp tp},\n      expr_constr atp ->  expr_constr tp  \n  | ECunop : forall tp op `{HyperTypeImpl tp, HyperTypeImpl tpo, HyperUnaryImpl op tpo tp},\n    expr_constr tpo -> expr_constr tp\n                                                       \n  | ECbinop : forall tp op `{HyperTypeImpl tp, HyperTypeImpl tpl, HyperTypeImpl tpr,\n                             HyperBinaryImpl op tpl tpr tp},\n    expr_constr tpl -> expr_constr tpr -> expr_constr tp\n  \n  \n  with lexpr_constr : forall tp `{hti : HyperTypeImpl tp}, Type :=\n  | LCvar : forall`{HyperTypeImpl tp}(v : variable tp), lexpr_constr tp\n                                                              \n  | LCfield : forall tp id `{HyperTypeImpl tp, HyperTypeImpl tpl, !HyperFieldImpl tpl tp id},\n    lexpr_constr tpl -> lexpr_constr tp\n                               \n  | LCindex : forall tp `{HyperTypeImpl tp, HyperTypeImpl tpl, !HyperIndexImpl tpl tp},\n      lexpr_constr tpl -> expr_constr tint_Z32 -> lexpr_constr tp\n                               \n  | LChash : forall tp `{HyperTypeImpl tp, HyperTypeImpl tpl, !HyperIntHashImpl tpl tp},\n      lexpr_constr tpl -> expr_constr tint_U -> lexpr_constr tp\n                               \n  .\n  Fixpoint lexpr_is_ghost `{HyperTypeImpl}(e : lexpr_constr tp) :=\n    match e with\n    | LCvar _ _ v => v.(ltype_ghost)\n    | LCfield _ tid _ _ _ pfieldi e' => lexpr_is_ghost e'\n    | LCindex _ _ _ _ _ e_arr e_idx => lexpr_is_ghost e_arr\n    | LChash _ _ _ _ _ e_arr e_idx => lexpr_is_ghost e_arr\n    end.\n  \n  \n  Inductive expr_constr_prf : forall `{HyperType tp}, expr_constr tp -> Prop :=\n  \n  | ECPconst_int256 : forall`{HyperType tp} f i (fc : ht_ft_cond f)\n    (rel : ht_cval f = CVval (Vint i)), expr_constr_prf (ECconst_int256 _ f i)\n  | ECPtempvar : forall`{ht : HyperType tp} t, expr_constr_prf (ECtempvar tp t)\n  | ECPbuiltin0 : forall `{HyperBuiltin0 (LayerSpec := LayerSpec) tp, !HyperType tp}, expr_constr_prf (ECbuiltin0 tp)\n  | ECPbuiltin1 : forall atp `{HyperBuiltin1 (LayerSpec := LayerSpec) atp tp, !HyperType atp, !HyperType tp} e,\n    expr_constr_prf e ->\n    expr_constr_prf (ECbuiltin1 atp tp e)\n  | ECPunop : forall op `{HyperUnaryOp op tpo tp, ht : !HyperType tp,\n                          hto : !HyperType tpo} e,\n    expr_constr_prf e -> expr_constr_prf (ECunop _ op e)\n  | ECPbinop : forall op `{HyperBinaryOp op tpl tpr tp, ht : !HyperType tp,\n                           htl : !HyperType tpl, htr : !HyperType tpr} el er,\n    expr_constr_prf el -> expr_constr_prf er ->\n    expr_constr_prf (ECbinop _ op el er)\n  with lexpr_constr_prf : forall`{HyperType tp}, lexpr_constr tp -> Prop :=\n  | LCPvar : forall`{HyperType tp} var (v_prf : variable_prf var),\n    lexpr_constr_prf (LCvar var)\n  | LCPfield : forall id `{HyperField tpl tp id, !HyperType tpl, !HyperType tp}\n                      e (ec : lexpr_constr_prf e),\n    lexpr_constr_prf (LCfield tp id e)\n  | LCPindex : forall`{HyperIndex tpl tp, !HyperType tp, !HyperType tpl} e idx,\n    lexpr_constr_prf e -> expr_constr_prf idx ->\n    lexpr_constr_prf (LCindex tp e idx)\n  | LCPhash : forall`{HyperIntHash tpl tp, !HyperType tp, !HyperType tpl} e idx,\n    lexpr_constr_prf e -> expr_constr_prf idx ->\n    lexpr_constr_prf (LChash tp e idx)\n  .\n  \n  Inductive expr_constr_passthrough_prf :\n      forall`{HyperTypeImpl tp}, expr_constr tp -> Prop :=\n  | ECPPconst_int : forall`{hti : HyperTypeImpl tp} f i,\n    expr_constr_passthrough_prf (ECconst_int tp f i)\n  | ECPPtempvar : forall`{hti : HyperTypeImpl tp} t,\n    expr_constr_passthrough_prf (ECtempvar tp t)\n  | ECPPunop : forall tp op `{htu : HyperUnaryPassthrough op tpo tp} e,\n    expr_constr_passthrough_prf e -> expr_constr_passthrough_prf (ECunop tp op e)\n  | ECPPbinop : forall tp op `{htb : HyperBinaryPassthrough op tpl tpr tp} el er,\n    expr_constr_passthrough_prf el -> expr_constr_passthrough_prf er ->\n    expr_constr_passthrough_prf (ECbinop tp op el er)\n  with lexpr_constr_passthrough_prf :\n      forall`{HyperTypeImpl tp}, lexpr_constr tp -> Prop :=\n  | LCPPvar : forall`{hti : HyperTypeImpl tp} var (v_prf : variable_passthrough_prf var),\n    lexpr_constr_passthrough_prf (LCvar var)\n  | LCPPfield : forall id `{htf : HyperFieldPassthrough tpl tp id} e,\n    lexpr_constr_passthrough_prf e ->\n    lexpr_constr_passthrough_prf (LCfield tp id e)\n  | LCPPindex : forall `{htd : HyperIndexPassthrough tpl tp} e idx,\n    lexpr_constr_passthrough_prf e -> expr_constr_passthrough_prf idx ->\n    lexpr_constr_passthrough_prf (LCindex tp e idx)\n  .\nEnd EXPR_CONSTR.\nSection STMT_CONSTR.\n  \n  \n  \n  Context `{HM : HyperMem}.\n  Definition function_return_dec returns\n    := match tp_ty returns with\n       | Tvoid => false\n       | _ => true\n       end.\n  Require Import DeepSpec.lib.Monad.StateMonadOption.\n  Import MonadNotation.\n  Open Scope monad_scope.\n  Definition DS := osT GetHighData.\n  Instance Monad_DS : Monad DS := MosT GetHighData.\n  Instance MonadLaws_DS : MonadLaws (Monad_stateT GetHighData Monad_option).\n  Proof. Admitted.\n  Instance MonadState_DS : MonadState GetHighData DS.\n  apply MonadState_stateT.\n  apply Monad_option.\n  Defined.\n  Instance MonadZero_DS : MonadZero DS.\n  apply MonadZero_stateT.\n  apply Monad_option.\n  apply Zero_option.\n  Defined.\n  \n  Record primitive (argt : list hyper_type_pair)(ret : hyper_type_pair)\n      : Type := mk_prim {\n    PRIMident : ident;\n                    \n    \n    PRIMghost : bool;                 \n    PRIMpure  : bool;                 \n    PRIMargt_marker : type_marker argt;\n    PRIMret_marker : type_marker ret;\n    \n    PRIMcond : HList tp_ft argt -> machine_env GetHighData -> GetHighData -> Prop;\n    PRIMsem_opt : HList tp_ft argt -> machine_env GetHighData -> DS (tp_ft ret)\n  }.\n  \n  Global Arguments PRIMident {_ _} _.\n  \n  Global Arguments PRIMghost {_ _} _.\n  Global Arguments PRIMpure  {_ _} _.\n  Global Arguments PRIMcond {_ _} _ _ _.\n  \n  \n  Global Arguments PRIMsem_opt {_ _} _ _.\n  \n  Fixpoint to_typelist argt :=\n    match argt with\n    | nil => Ctypes.Tnil\n    | cons x xs => Ctypes.Tcons (tp_ty x) (to_typelist xs)\n    end.\n  \n  Class primitive_prf {argt returns}(prim : primitive argt returns) := mk_prim_prf {\n    \n  \n    PRIMret_cond :\n      forall args me,\n        ht_list_ft_cond args ->\n        ht_list_valid_ft_cond args ->\n      forall (s : GetLowData) v,\n        evalStateT (prim.(PRIMsem_opt) args me) s = ret v ->\n        high_level_invariant (CompatDataOps := cdataOpsLow) s ->\n        \n        \n        ht_ft_cond v /\\\n        (function_return_dec returns = true -> ht_valid_ft_cond v);\n      \n  \n  \n    PRIMis_pure :\n      prim.(PRIMpure) = true ->\n      forall args me d,\n      forall d', execStateT (prim.(PRIMsem_opt) args me) d = ret d' ->\n                 d = d';\n    PRIMinv :\n      prim.(PRIMpure) = false ->\n      forall args me,\n        ht_list_ft_cond args ->\n        ht_list_valid_ft_cond args ->\n      forall (s s' : GetLowData),\n        execStateT (prim.(PRIMsem_opt) args me) s = ret s' ->\n        high_level_invariant (CompatDataOps := cdataOpsLow) s ->\n        high_level_invariant (CompatDataOps := cdataOpsLow) s'\n   }.\n  \n  Class primitive_exec_prf {argt ret}(prim : primitive argt ret) := mk_prim_exec_prf {\n    \n    \n  }.\n  Class primitive_passthrough_prf {argt ret}(prim : primitive argt ret)\n    := mk_prim_pt_prf {\n    \n    \n  }.\n  Definition expr_constr_list :=\n    HList (fun htp => expr_constr (tp_type_pair htp)).\n  Definition expr_constr_prf_conj {ls}(es : expr_constr_list ls) :=\n    HList_fold_right_nodep (fun htp e p =>\n        p /\\ { ht : HyperType (tp_type_pair htp) | expr_constr_prf (H := ht) e })\n      True es.\n  Definition expr_constr_passthrough_prf_conj {ls}(es : expr_constr_list ls) :=\n    HList_fold_right_nodep (fun htp e p => p /\\ expr_constr_passthrough_prf e)\n      True es.\n  Inductive cmd_constr : forall (returns : hyper_type_pair), Type :=\n  | CCskip : cmd_constr void_unit_pair                      \n  | CClet : forall {r}`{HyperTypeImpl tp}(id : ident),\n    cmd_constr (mk_hyper_type_pair tp) -> cmd_constr r -> cmd_constr r\n                                            \n  | CCload : forall`{HyperTypeImpl tp},\n    lexpr_constr tp -> cmd_constr (mk_hyper_type_pair tp)\n                                                           \n  | CCstore : forall`{HyperTypeImpl tp},\n    lexpr_constr tp -> expr_constr tp -> cmd_constr void_unit_pair\n                                        \n  | CCsequence : forall {r},\n    cmd_constr void_unit_pair -> cmd_constr r -> cmd_constr r \n  | CCifthenelse : forall {r},\n    expr_constr tint_bool -> cmd_constr r -> cmd_constr r -> cmd_constr r\n                                                           \n  | CCfor : forall id_it id_end : ident,\n    expr_constr tint_Z32 -> expr_constr tint_Z32 -> cmd_constr void_unit_pair ->\n    cmd_constr void_unit_pair                             \n  | CCfirst : forall {r}(id_it id_end id_dest : ident),\n    expr_constr tint_Z32 -> expr_constr tint_Z32 ->\n    cmd_constr int_bool_pair ->\n    cmd_constr r -> cmd_constr r -> cmd_constr r         \n  | CCfold : forall `{HyperTypeImpl tp}(id_it id_end id_recur id_dest : ident),\n    expr_constr tint_Z32 -> expr_constr tint_Z32 -> expr_constr tp ->\n    cmd_constr (mk_hyper_type_pair tp) ->\n    cmd_constr (mk_hyper_type_pair tp)                     \n  | CCcall : forall {argt ret},\n    primitive argt ret -> expr_constr_list argt -> cmd_constr ret\n                                              \n  \n                                                                \n  | CCtransfer : expr_constr tint_U -> expr_constr tint_U -> cmd_constr void_unit_pair\n                                                              \n  | CCyield : forall`{HyperTypeImpl tp},\n    expr_constr tp -> cmd_constr (mk_hyper_type_pair tp)\n                            \n  \n  | CCconstr : forall`{HyperTypeImpl tp}(fld_ids : list ident) fld_tps,\n    lexpr_constr tp -> expr_constr_list fld_tps ->\n    list_curried_type fld_tps (unpair_ft tp) ->\n    cmd_constr void_unit_pair\n  | CCassert : cmd_constr int_bool_pair -> cmd_constr void_unit_pair\n                                          \n  | CCdeny : cmd_constr int_bool_pair -> cmd_constr void_unit_pair\n                                          \n  \n                                            \n  | CCpanic : forall tp`{HyperTypeImpl tp},\n    cmd_constr (mk_hyper_type_pair tp)\n                         \n  \n  | CCrespec : forall {r} tmp', cmd_constr r ->\n    forall spec : spec_env_t tmp' -> DS (tp_ft r),\n    cmd_constr r                         \n  | CCrespec_opt : forall {r} tmp', cmd_constr r ->\n    forall spec :  machine_env GetHighData -> spec_env_t tmp' -> DS (tp_ft r), \n      \n    cmd_constr r                         \n  .\n  Inductive cmd_constr_passthrough_prf : forall ret, cmd_constr ret -> Prop :=\n  | CCPPskip : cmd_constr_passthrough_prf _ CCskip\n  | CCPPlet : forall {r}`{hti : HyperTypeImpl tp}(id : ident) c1 c2,\n    cmd_constr_passthrough_prf (mk_hyper_type_pair tp) c1 ->\n    cmd_constr_passthrough_prf r c2 ->\n    cmd_constr_passthrough_prf r (CClet id c1 c2)\n  | CCPPload : forall`{hti : HyperTypeImpl tp} e,\n    lexpr_constr_passthrough_prf e ->\n    cmd_constr_passthrough_prf (mk_hyper_type_pair tp) (CCload e)\n  | CCPPstore : forall`{hti : HyperTypeImpl tp} el er,\n    lexpr_constr_passthrough_prf el -> expr_constr_passthrough_prf er ->\n    cmd_constr_passthrough_prf _ (CCstore el er)\n  | CCPPsequence : forall {r} c1 c2,\n    cmd_constr_passthrough_prf _ c1 -> cmd_constr_passthrough_prf r c2 ->\n    cmd_constr_passthrough_prf r (CCsequence c1 c2)\n  | CCPPifthenelse : forall {r} e c1 c2,\n    expr_constr_passthrough_prf e ->\n    cmd_constr_passthrough_prf r c1 -> cmd_constr_passthrough_prf r c2 ->\n    cmd_constr_passthrough_prf r (CCifthenelse e c1 c2)\n  | CCPPfor : forall id_it id_end e1 e2 c,\n    expr_constr_passthrough_prf e1 -> expr_constr_passthrough_prf e2 ->\n    cmd_constr_passthrough_prf _ c ->\n    cmd_constr_passthrough_prf _ (CCfor id_it id_end e1 e2 c)\n  | CCPPfirst : forall {r} id_it id_end id_dest e1 e2 c3 c4 c5,\n    expr_constr_passthrough_prf e1 -> expr_constr_passthrough_prf e2 ->\n    cmd_constr_passthrough_prf _ c3 ->\n    cmd_constr_passthrough_prf r c4 -> cmd_constr_passthrough_prf r c5 ->\n    cmd_constr_passthrough_prf r (CCfirst id_it id_end id_dest e1 e2 c3 c4 c5)\n  | CCPPfold : forall `{hti : HyperTypeImpl tp} id_it id_end id_recur id_dest e1 e2 e3 c,\n    expr_constr_passthrough_prf e1 -> expr_constr_passthrough_prf e2 ->\n    expr_constr_passthrough_prf e3 ->\n    cmd_constr_passthrough_prf (mk_hyper_type_pair tp) c ->\n    cmd_constr_passthrough_prf (mk_hyper_type_pair tp)\n                               (CCfold id_it id_end id_recur id_dest e1 e2 e3 c)\n  | CCPPcall : forall {argt ret} prim arg,\n    expr_constr_passthrough_prf_conj arg ->\n    primitive_passthrough_prf prim ->\n    cmd_constr_passthrough_prf _ (@CCcall argt ret prim arg)\n  \n                         \n  | CCPPtransfer : forall e1 e2,\n    expr_constr_passthrough_prf e1 ->\n    expr_constr_passthrough_prf e2 ->\n    cmd_constr_passthrough_prf void_unit_pair (CCtransfer e1 e2)\n                               \n  | CCPPyield : forall`{hti : HyperTypeImpl tp} e,\n    expr_constr_passthrough_prf e ->\n    cmd_constr_passthrough_prf (mk_hyper_type_pair tp) (CCyield e)\n  | CCPPconstr : forall`{HyperTypeImpl tp} fld_ids fld_tps el flds constr\n      `{hcp : !HyperConstructorPassthrough tp fld_tps constr},\n    lexpr_constr_passthrough_prf el -> expr_constr_passthrough_prf_conj flds ->\n    cmd_constr_passthrough_prf _ (CCconstr fld_ids fld_tps el flds constr)\n  | CCPPassert : forall c,\n    cmd_constr_passthrough_prf _ c -> cmd_constr_passthrough_prf _ (CCassert c)\n  | CCPPdeny : forall c,\n    cmd_constr_passthrough_prf _ c -> cmd_constr_passthrough_prf _ (CCdeny c)\n  | CCPPpanic : forall tp`{HyperTypeImpl tp},\n    cmd_constr_passthrough_prf (mk_hyper_type_pair tp) (CCpanic tp)\n  | CCPPrespec : forall {r} tmp' c spec,\n    cmd_constr_passthrough_prf r (CCrespec tmp' c spec)\n  | CCPPrespec_opt: forall {r} tmp' c spec,\n    cmd_constr_passthrough_prf r (CCrespec_opt tmp' c spec)\n  .\n  \n  Record function_constr : Type := mk_function_constr {\n    FC_ident_start : ident;\n    FC_param_ident_start := Pos.succ FC_ident_start;\n    FC_params : list hyper_type_pair;\n    FC_returns : hyper_type_pair;\n    FC_body : cmd_constr FC_returns\n  }.\n  Definition function_constr_passthrough_prf f : Prop :=\n    cmd_constr_passthrough_prf f.(FC_returns) f.(FC_body).\nEnd STMT_CONSTR.\nCoercion create_list_marker := fun A => @create_type_marker (list A).\nCoercion create_hyper_type_pair_marker := @create_type_marker hyper_type_pair.\nSection CONSTR_PRF.\n  Context `{HM : HyperMem}.\n  \n  Inductive cmd_constr_prf (is_realizing : bool) :\n      forall ret (htr : HyperType (tp_type_pair ret)), cmd_constr ret -> Prop :=\n  | CCPskip : cmd_constr_prf is_realizing _ _ CCskip\n  | CCPlet : forall r `{ht : HyperType tp} htr id c1 c2,\n    function_return_dec (mk_hyper_type_pair tp) = true ->\n    cmd_constr_prf is_realizing (mk_hyper_type_pair tp) ht c1 ->\n    cmd_constr_prf is_realizing r htr c2 ->\n    cmd_constr_prf is_realizing r htr (CClet id c1 c2)\n  | CCPload : forall `{ht : HyperType tp, hbv : !HyperByValueType tp} e\n                \n                     (ec : lexpr_constr_prf e),\n    \n    (is_realizing && lexpr_is_ghost e = false) ->\n    cmd_constr_prf is_realizing (mk_hyper_type_pair tp) ht (CCload e)\n  | CCPstore : forall `{ht : HyperType tp, hbv : !HyperByValueType tp} el er\n                      (ecl : lexpr_constr_prf el)(ecr : expr_constr_prf er),\n    \n    (is_realizing || lexpr_is_ghost el = true) ->\n    cmd_constr_prf is_realizing _ _ (CCstore el er)\n  | CCPsequence : forall r htr c1 c2,\n    cmd_constr_prf is_realizing _ _ c1 ->\n    cmd_constr_prf is_realizing r htr c2 ->\n    cmd_constr_prf is_realizing r htr (CCsequence c1 c2)\n  | CCPifthenelse : forall r htr e c_true c_false\n                           (ec : expr_constr_prf e),\n    cmd_constr_prf is_realizing r htr c_true ->\n    cmd_constr_prf is_realizing r htr c_false ->\n    cmd_constr_prf is_realizing r htr (CCifthenelse e c_true c_false)\n  | CCPfor : forall id_it id_end e1 e2 c\n                   (ec1 : expr_constr_prf e1)(ec2 : expr_constr_prf e2),\n    cmd_constr_prf is_realizing _ _ c ->\n    cmd_constr_prf is_realizing _ _ (CCfor id_it id_end e1 e2 c)\n  | CCPfirst : forall r htr id_it id_end id_dest e1 e2 c3 c4 c5,\n    expr_constr_prf e1 -> expr_constr_prf e2 ->\n    cmd_constr_prf is_realizing int_bool_pair int_bool c3 ->\n    cmd_constr_prf is_realizing r htr c4 ->\n    cmd_constr_prf is_realizing r htr c5 ->\n    cmd_constr_prf is_realizing r htr\n                   (CCfirst id_it id_end id_dest e1 e2 c3 c4 c5)\n  | CCPfold : forall `{ht : HyperType tp} id_it id_end id_recur id_dest\n      e1 e2 e3 c (ec1 : expr_constr_prf e1)(ec2 : expr_constr_prf e2)\n      (ec3 : expr_constr_prf e3),\n    function_return_dec (mk_hyper_type_pair tp) = true ->\n    cmd_constr_prf is_realizing (mk_hyper_type_pair tp) ht c ->\n    cmd_constr_prf is_realizing (mk_hyper_type_pair tp) ht\n                   (CCfold id_it id_end id_recur id_dest e1 e2 e3 c)\n  | CCPcall : forall argt ret htr prim arg\n      (IHprim : @primitive_prf _ _ argt ret prim)\n      (IHprim_exec : primitive_exec_prf prim)\n      (IHprim_b : primitive_passthrough_prf prim)\n      (ecs : expr_constr_prf_conj arg),\n    \n    \n      \n      is_realizing || prim.(PRIMpure) = true ->\n    cmd_constr_prf is_realizing ret htr (CCcall prim arg)\n  \n  | CCPyield : forall `{ht : HyperType tp} e (ec : expr_constr_prf e),\n    cmd_constr_prf is_realizing (mk_hyper_type_pair tp) ht (CCyield e)\n  | CCPconstr : forall `{ht : HyperType tp} fld_ids fld_tps el flds constr\n      `{hc : !HyperConstructor tp fld_ids fld_tps constr}\n      (ecl : lexpr_constr_prf el)(fldc : expr_constr_prf_conj flds)\n      (flds_byvalue : HList\n        (fun htp : hyper_type_pair =>\n           HyperByValueType (tp_type_pair htp)) fld_tps),\n    \n    (is_realizing || lexpr_is_ghost el = true) ->\n    (length fld_ids <= Z.to_nat Int256.modulus)%nat ->\n    cmd_constr_prf is_realizing _ _ (CCconstr fld_ids fld_tps el flds constr)\n  | CCPtransfer : forall e1 e2,\n    expr_constr_prf e1 ->\n    expr_constr_prf e2 ->\n    cmd_constr_prf is_realizing _ _ (CCtransfer e1 e2)\n                   \n  \n  | CCPassert : forall c, cmd_constr_prf is_realizing _ _ c -> cmd_constr_prf is_realizing _ _ (CCassert c)\n  | CCPdeny : forall c, cmd_constr_prf is_realizing _ _ c -> cmd_constr_prf is_realizing _ _ (CCdeny c)\n  | CCPpanic : forall `{ht : HyperType} , cmd_constr_prf is_realizing _ _ (CCpanic tp )\n  | CCPrespec : forall r htr tmp' c spec,\n    \n    cmd_constr_prf is_realizing r htr c ->\n    cmd_constr_prf is_realizing r htr (CCrespec tmp' c spec)\n  | CCPrespec_opt : forall r htr tmp' c spec,\n    \n    is_realizing = true ->\n    cmd_constr_prf is_realizing r htr c ->\n    cmd_constr_prf is_realizing r htr (CCrespec_opt tmp' c spec)\n  .\n  Record function_constr_prf (is_realizing : bool) (f : function_constr) : Prop := mk_function_constr_prf {\n    \n    FC_returns_ht : HyperType (tp_type_pair f.(FC_returns));\n    FC_body_prf : cmd_constr_prf is_realizing f.(FC_returns) FC_returns_ht f.(FC_body)\n  }.\n  \n  \n  \nEnd CONSTR_PRF.\n"
  },
  {
    "path": "src/core/SynthesisExpr.v",
    "content": "Require Import BinInt.\nRequire Import backend.AST.\nRequire Import backend.Values.HighValues.\nRequire Import cclib.Integers.\nRequire Import cclib.Maps.  \nRequire Import backend.Expressions.ExpMiniC.\nRequire Import backend.Expressions.SemanticsMiniC.\nRequire Import backend.Statements.StmtMiniC.\nRequire Import backend.Cop.\nRequire Import backend.Ctypes.\nRequire Import backend.MachineModel.\nRequire Import DeepSpec.lib.SimpleMaps.\nRequire Import DeepSpec.lib.SimpleIndexedMaps.\nRequire Import DeepSpec.lib.OProp.\nRequire Import DeepSpec.lib.Monad.ContOptionMonad.\nRequire Import DeepSpec.core.Cval.\nRequire Import DeepSpec.core.SEnv.\nRequire Import DeepSpec.core.HyperType.\nRequire Import DeepSpec.core.HyperTypeInst.\nRequire Import DeepSpec.core.MemoryModel.\nRequire Import DeepSpec.core.Syntax.\nRequire Import DeepSpec.backend.phase.MiniC.Semantics.\n  \nSection EXPR_FUNC.\n  \n  Context`{HM : HyperMem}.\n  Context {ctx: int256}.\n  Context (me : machine_env GetHighData).\n  Let genv_t := genv.\n  \n  \n  Fixpoint synth_expr_wellformed\n      (tmp : AList.t hyper_type_pair)\n     `{HyperTypeImpl}\n      (e : expr_constr tp) {struct e} : Type :=\n    match e with\n    | ECconst_int _ _ f i => True\n    | ECconst_int256 _ _ f i => True\n    | ECtempvar _ _ i => (tmp ! i ~~~ Some (mk_hyper_type_pair tp))%alist\n    | ECbuiltin0 _ _ _ => True\n    | ECbuiltin1 _ _ _  _ _ e' => synth_expr_wellformed tmp e'\n    | ECunop _ op _ tpo _ _ e' => synth_expr_wellformed tmp e'\n    | ECbinop _ op _ tpl tpr _ _ _ el er =>\n      synth_expr_wellformed tmp el * synth_expr_wellformed tmp er\n    end%type\n  with synth_lexpr_wellformed tmp `{HyperTypeImpl}(e : lexpr_constr tp) {struct e}: Type :=\n    match e with\n    | LCvar _ _ v => True\n    | LCfield _ x _ _ _ pfieldi e' => synth_lexpr_wellformed tmp e'\n    | LCindex _ _ _ _ _ e' idx =>\n      synth_lexpr_wellformed tmp e' * synth_expr_wellformed tmp idx\n    | LChash _ _ _ _ _  e' idx =>\n      synth_lexpr_wellformed tmp e' * synth_expr_wellformed tmp idx\n    end%type.\n  \n  Fixpoint synth_expr_expr\n      (tmp : AList.t hyper_type_pair)\n     `{HyperTypeImpl}\n      (e : expr_constr tp) : expr :=\n    match e with\n    | ECconst_int _ _ _ i => Econst_int i (unpair_ty tp)\n    | ECconst_int256 _ _ _ i => Econst_int256 i (unpair_ty tp)\n    | ECtempvar _ _ tid => Etempvar tid (unpair_ty tp)\n    | ECbuiltin0 _ _ _ => Ecall0 Hbuiltin0 (unpair_ty tp)\n    | ECbuiltin1 _ _ _ _ _ e' => Ecall1 Hbuiltin1 (synth_expr_expr tmp e') (unpair_ty tp)\n    | ECunop _ op _ _ _ _ e' =>\n      Eunop op (synth_expr_expr tmp e') (unpair_ty tp)\n    | ECbinop _ op _ _ _ _ _ _ el er =>\n      Ebinop op (synth_expr_expr tmp el) (synth_expr_expr tmp er) (unpair_ty tp)\n    end.\n  Fixpoint synth_lexpr_expr tmp `{HyperTypeImpl}(e : lexpr_constr tp) : expr :=\n    match e with\n    | LCvar _ _ v => Eglob (ident_ext_base v.(ltype_ident)) (unpair_ty tp)\n    | LCfield _ x _ _ _ pfieldi e' =>\n      Efield (synth_lexpr_expr tmp e') x (unpair_ty tp)\n    | LCindex _ _ _ _ _ e' idx =>\n      Eindex (synth_lexpr_expr tmp e') (synth_expr_expr tmp idx) (unpair_ty tp)\n    | LChash _ _ _ _ _  e' idx =>\n      Eindex (synth_lexpr_expr tmp e') (synth_expr_expr tmp idx) (unpair_ty tp)\n      \n    end.\n  \n  Fixpoint synth_expr_spec\n      (tmp : AList.t hyper_type_pair)\n     `{HyperTypeImpl}\n      (e : expr_constr tp)\n      : synth_expr_wellformed tmp e -> spec_env_t tmp -> unpair_ft tp :=\n    match e with\n    | ECconst_int _ _ f _ => fun _ _ => f\n    | ECconst_int256 _ _ f _ => fun _ _ => f\n    | ECtempvar _ _ i => fun wf se => SpecTree.get_eq i se wf\n    | ECbuiltin0 _ _ _ => fun wf se => Hquery0 me\n    | ECbuiltin1 _ _ _ _ _ e' => fun wf se => Hquery1 me (synth_expr_spec tmp e' wf se)\n    | ECunop _ op _ tpo _ _ e' =>\n      fun wf se => Hunary (synth_expr_spec tmp e' wf se)\n    | ECbinop _ op _ tpl tpr _ _ _ el er =>\n      fun wf se => Hbinary (synth_expr_spec tmp el (car wf) se)\n                           (synth_expr_spec tmp er (cdr wf) se)\n    end.\n  \n  Fixpoint synth_lexpr_spec tmp `{HyperTypeImpl} (e : lexpr_constr tp)\n      : synth_lexpr_wellformed tmp e -> spec_env_t tmp -> ltype_pair tp :=\n    match e with\n    | LCvar _ _ v => fun _ _ => v\n    | LCfield _ tid _ _ _ pfieldi e' => fun wf se =>\n      let ptr := synth_lexpr_spec tmp e' wf se in\n      field_ltype_pair ptr tid\n    | LCindex _ _ _ _ _ e_arr e_idx => fun wf se =>\n      let ptr := synth_lexpr_spec tmp e_arr (car wf) se in\n      indexing_ltype_pair ptr (synth_expr_spec tmp e_idx (cdr wf) se)\n    | LChash _ _ _ _ _ e_arr e_idx => fun wf se =>\n      let ptr := synth_lexpr_spec tmp e_arr (car wf) se in\n      inthash_ltype_pair ptr (synth_expr_spec tmp e_idx (cdr wf) se)\n    end.\n  \n  \n  Fixpoint synth_expr_ocond\n      (tmp : AList.t hyper_type_pair)\n     `{HyperTypeImpl}\n      (e : expr_constr tp)\n      : synth_expr_wellformed tmp e -> OProp1 (spec_env_t tmp) :=\n    match e with\n    | ECconst_int _ _ f i => fun _ => otrue1\n    | ECconst_int256 _ _ f i => fun _ => otrue1\n    | ECtempvar _ _ t => fun _ => otrue1\n    | ECbuiltin0 _ _ _ => fun _ => otrue1                                    \n    | ECbuiltin1 _ _ _ _ _ e' => fun wf => synth_expr_ocond tmp e' wf\n    | ECunop _ op _ _ _ _ e' => fun wf =>\n      synth_expr_ocond tmp e' wf /\\\n      Hunary_ocond m{ synth_expr_spec tmp e' wf }\n    | ECbinop _ op _ _ _ _ _ _ el er => fun wf =>\n      synth_expr_ocond tmp el (car wf) /\\\n      synth_expr_ocond tmp er (cdr wf) /\\\n      Hbinary_ocond m{ synth_expr_spec tmp el (car wf) }\n                    m{ synth_expr_spec tmp er (cdr wf) }\n    end%oprop1\n  with synth_lexpr_ocond tmp `{HyperTypeImpl}(e : lexpr_constr tp)\n      : synth_lexpr_wellformed tmp e -> OProp1 (spec_env_t tmp) :=\n    match e with\n    | LCvar _ _ v => fun _ => otrue1\n    | LCfield _ x _ _ _ pfieldi e' => fun wf =>\n      synth_lexpr_ocond tmp e' wf\n    | LCindex _ _ _ _ _ e_arr e_idx => fun wf =>\n      synth_lexpr_ocond tmp e_arr (car wf) /\\\n      synth_expr_ocond tmp e_idx (cdr wf) /\\\n      {{ fun se => 0 <= synth_expr_spec tmp e_idx (cdr wf) se < Hindex_size }}%Z\n    | LChash  _ _ _ _ _ e_arr e_idx => fun wf =>\n      synth_lexpr_ocond tmp e_arr (car wf) /\\\n      synth_expr_ocond tmp e_idx (cdr wf)\n    end%oprop1.\n  \n  Fixpoint synth_expr_passthrough_ocond\n      (tmp : AList.t hyper_type_pair)\n     `{HyperTypeImpl}\n      (e : expr_constr tp)\n      : synth_expr_wellformed tmp e -> OProp :=\n    match e with\n    | ECconst_int _ _ f i => fun _ => otrue\n    | ECconst_int256 _ _ f i => fun _ => otrue\n    | ECtempvar _ _ t => fun _ => otrue\n    | ECbuiltin0 _ _ _ => fun _ => otrue                                \n    | ECbuiltin1 _ _ _ _ _ e' => fun wf => synth_expr_passthrough_ocond tmp e' wf\n    | ECunop _ op _ _ _ _ e' => fun wf => synth_expr_passthrough_ocond tmp e' wf\n    | ECbinop _ op _ _ _ _ _ _ el er => fun wf =>\n      synth_expr_passthrough_ocond tmp el (car wf) /\\\n      synth_expr_passthrough_ocond tmp er (cdr wf)\n    end%oprop\n  with synth_lexpr_passthrough_ocond tmp `{HyperTypeImpl}(e : lexpr_constr tp)\n      : synth_lexpr_wellformed tmp e -> OProp :=\n    match e with\n    | LCvar _ _ v => fun _ => otrue\n    | LCfield _ x _ _ _ pfieldi e' => fun wf =>\n      synth_lexpr_passthrough_ocond tmp e' wf\n    | LCindex _ _ _ _ _ e_arr e_idx => fun wf =>\n      synth_lexpr_passthrough_ocond tmp e_arr (car wf) /\\\n      synth_expr_passthrough_ocond tmp e_idx (cdr wf)\n    | LChash  _ _ _ _ _ e_arr e_idx => fun wf =>\n      synth_lexpr_passthrough_ocond tmp e_arr (car wf) /\\\n      synth_expr_passthrough_ocond tmp e_idx (cdr wf)\n    end%oprop.\n  \n  Lemma synth_expr_expr_preserves_type tmp `{HyperTypeImpl} e :\n      synth_expr_wellformed tmp e ->\n      typeof (synth_expr_expr tmp e) = unpair_ty tp.\n      \n  Proof. Admitted.\n  Lemma synth_lexpr_expr_preserves_type tmp `{HyperTypeImpl} e :\n      \n      typeof (synth_lexpr_expr tmp e) = unpair_ty tp.\n  Proof. Admitted.\n  \n  Theorem synth_expr_spec_satisfies_ft_cond {tmp}`{HyperType} e :\n    forall wf se, expr_constr_prf e ->\n      oProp1 (synth_expr_ocond tmp e wf) se -> senv_cond se ->\n      ht_ft_cond (synth_expr_spec tmp e wf se).\n  Proof. Admitted.\n  \n  \n  Lemma Int256_lt_repr : forall x y,\n      (0 <= x < Int256.modulus)%Z ->\n      (0 <= y < Int256.modulus)%Z ->\n      (Int256.lt (Int256.repr x) (Int256.repr y) = true) <-> (x < y)%Z.\n  Admitted.\nRequire Import Omega.  \n  \n  Theorem synth_expr_spec_correct {tmp}`{HyperType} e :\n    forall wf se le, expr_constr_prf e ->\n      oProp1 (synth_expr_ocond tmp e wf) se -> lenv_cond se le ->\n      exists v,\n        (forall m, eval_rvalue ctx me m le (synth_expr_expr tmp e) v) /\\\n        ht_rel (synth_expr_spec tmp e wf se) v\n  with synth_lexpr_spec_correct {tmp}`{HyperType} e :\n    forall wf se le, lexpr_constr_prf e ->\n      oProp1 (synth_lexpr_ocond tmp e wf) se -> lenv_cond se le ->\n      let ltp := synth_lexpr_spec tmp e wf se in \n        (forall m,\n          eval_lvalue ctx me m le (synth_lexpr_expr tmp e) ltp.(ltype_ident)) /\\\n        HyperLType ltp.\n  Proof. Admitted.\n  Theorem synth_lexpr_spec_is_ghost_eq {tmp}`{HyperTypeImpl} e wf se :\n    (synth_lexpr_spec tmp e wf se).(ltype_ghost) = lexpr_is_ghost e.\n  Proof. Admitted.\n  \n  \n  \n  \n  Lemma synth_lexpr_passthrough tmp `{HyperTypeImpl} e wf :\n    lexpr_constr_passthrough_prf e ->\n    oProp (synth_lexpr_passthrough_ocond tmp e wf) ->\n    forall se, variable_passthrough_prf (synth_lexpr_spec tmp e wf se).\n  Proof. Admitted.\nEnd EXPR_FUNC.\n"
  },
  {
    "path": "src/core/SynthesisFunc.v",
    "content": "Require Import BinPos.\nRequire Import List.\nRequire Import backend.AST.\nRequire Import backend.Values.HighValues.\nRequire Import backend.MemoryModel.\nRequire Import cclib.Coqlib.\nRequire Import cclib.Maps.\nRequire Import backend.Ctypes.\nRequire Import backend.Expressions.ExpMiniC.\nRequire Import backend.Statements.StmtMiniC.\nRequire Import backend.MachineModel.\nRequire Import DeepSpec.lib.IndexedMaps.\nRequire Import DeepSpec.lib.SimpleMaps.\nRequire Import DeepSpec.lib.SimpleIndexedMaps.\nRequire Import DeepSpec.lib.OProp.\nRequire        DeepSpec.lib.LangDef.\nRequire Import DeepSpec.core.SEnv.\nRequire Import DeepSpec.core.Cval.\nRequire Import DeepSpec.core.HyperType.\nRequire Import DeepSpec.core.MemoryModel.\nRequire Import DeepSpec.core.Syntax.\nRequire Import DeepSpec.core.SynthesisStmt.\nSection FUNC_FUNC.\n  Open Scope positive_scope.\n  Context`{TheLayerSpec : LayerSpecClass}.  \n  Context`{HM : HyperMem}.\n  Let genv_t := genv.\n  Definition func_spec_record returns :=\n    (GetHighData *  tp_ft returns)%type.\n  Definition mk_func_spec_record returns m  f : func_spec_record returns :=\n    ((m ), f).\n  Definition sf_mem {returns}(r : func_spec_record returns) :=  (fst r).\n  \n  Definition sf_return {returns}(r : func_spec_record returns) := snd r.\n  \n  Definition stmt_to_func_spec_record {tmp returns}\n      (s : spec_env_t tmp -> GetHighData -> stmt_spec_record returns)\n      se m\n  := let s' := s se m\n     in mk_func_spec_record returns s'.(ss_mem)  s'.(ss_return).\n  Record func_output_equivalent {returns} (j:meminj) (ml:mem) v\n      (r : func_spec_record returns) : Prop := mk_func_output_equivalent{\n    fo_return : function_return_dec returns = true -> cval_match v (ht_cval (sf_return r));\n    fo_ft_cond : ht_ft_cond (sf_return r)\n  }.\n  Global Arguments fo_return  {_ _ _ _ _} _ _.\n  Global Arguments fo_ft_cond {_ _ _ _ _} _.\n  Definition synth_func_pure f := synth_stmt_pure f.(FC_body).\n  \n  Definition param_folder p (htp : hyper_type_pair)\n    := (Pos.succ (fst p), AList.set (fst p) htp (snd p)).\n  Definition param_env params ident_start\n    := snd (fold_left param_folder params (ident_start, AList.empty)).\n  Fixpoint param_func_type (params : list hyper_type_pair) T : Type\n    := match params with\n       | nil => T\n       | htp :: l => tp_ft htp -> param_func_type l T\n       end.\n  Fixpoint abs_param_func' params T :\n    forall ident_start tmp, SpecTree.t tmp ->\n      (SpecTree.t (snd (fold_left param_folder params (ident_start, tmp)))\n        -> T) ->\n      param_func_type params T :=\n    match params as p\n    return forall ident_start tmp, SpecTree.t tmp ->\n      (SpecTree.t (snd (fold_left param_folder p (ident_start, tmp))) -> T) ->\n      param_func_type p T with\n    | nil => fun _ _ se t => t se\n    | htp :: l => fun ident_start tmp se t =>\n      fun f => abs_param_func' l T\n                 (Pos.succ ident_start) (AList.set ident_start htp tmp)\n                 (SpecTree.set ident_start htp f se) t\n    end.\n  Definition abs_param_func {params T} ident_start :\n      (SpecTree.t (param_env params ident_start) -> T) ->\n      param_func_type params T :=\n    abs_param_func' params T ident_start (AList.empty) SpecTree.empty.\n  Fixpoint hlist_param_func' params T (hlist : HList tp_ft params) :\n    forall ident_start tmp, SpecTree.t tmp ->\n      (SpecTree.t (snd (fold_left param_folder params (ident_start, tmp)))\n        -> T) -> T :=\n    match hlist in (HList _ p)\n    return forall ident_start tmp, SpecTree.t tmp ->\n      (SpecTree.t (snd (fold_left param_folder p (ident_start, tmp)))\n        -> T) -> T with\n    | HNil => fun _ _ se t => t se\n    | HCons htp l f rest => fun ident_start tmp se t =>\n      hlist_param_func' l T rest\n        (Pos.succ ident_start) (AList.set ident_start htp tmp)\n        (SpecTree.set ident_start htp f se) t\n    end.\n  Definition hlist_param_func {params T} ident_start\n      (t : SpecTree.t (param_env params ident_start) -> T)\n      (hlist : HList tp_ft params) : T\n    := hlist_param_func' params T hlist ident_start _ SpecTree.empty t.\n  Definition fn_params_folder p (htp : hyper_type_pair)\n    := (Pos.succ (fst p), (fst p, tp_ty htp) :: (snd p)).\n  Definition fn_params_fold params ident_start\n    := rev' (snd (fold_left fn_params_folder params (ident_start, nil))).\n  Definition synth_func_wellformed (f : function_constr) : Type :=\n    let param_tmp := param_env f.(FC_params) f.(FC_param_ident_start) in\n    synth_stmt_wellformed f.(FC_body) f.(FC_ident_start) param_tmp.\n  \n  Definition synth_func_func (f : function_constr) : function :=\n    let dest := f.(FC_ident_start) in\n    let ret_ty := tp_ty f.(FC_returns) in\n    let param_tmp := param_env f.(FC_params) f.(FC_param_ident_start) in\n    let body := synth_stmt_stmt f.(FC_body) dest param_tmp in {|\n      fn_return := ret_ty;\n      \n      fn_params := fn_params_fold f.(FC_params) f.(FC_param_ident_start);\n      fn_temps := (dest, ret_ty) :: synth_stmt_locals f.(FC_body) dest param_tmp;\n      fn_locals := nil;\n      fn_body := if function_return_dec f.(FC_returns)\n                    then Ssequence body (Sreturn (Some xH))\n                   else Ssequence body (Sreturn None)\n    |}.\n  \n  Definition synth_func_spec_ret (f : function_constr)\n    (wf : synth_func_wellformed f)\n    : param_func_type f.(FC_params) (machine_env GetHighData -> GetHighData -> tp_ft f.(FC_returns)) :=\n    let param_tmp := param_env f.(FC_params) f.(FC_param_ident_start) in\n    abs_param_func f.(FC_param_ident_start)\n      (fun se me m => synth_stmt_spec_ret me f.(FC_body) f.(FC_ident_start)\n                            param_tmp wf se m).\n  \n  Definition synth_func_spec_opt (f : function_constr)\n    (wf : synth_func_wellformed f)\n    \n    : param_func_type f.(FC_params)\n        (machine_env GetHighData -> DS (tp_ft (FC_returns f))) :=\n        \n    let param_tmp := param_env f.(FC_params) f.(FC_param_ident_start) in\n    abs_param_func f.(FC_param_ident_start)\n      (fun se me => synth_stmt_spec_opt me f.(FC_body) f.(FC_ident_start)\n                                       param_tmp wf se).\n  \n  Definition synth_func_cond (f : function_constr)(wf : synth_func_wellformed f) :=\n    let param_tmp := param_env f.(FC_params) f.(FC_param_ident_start) in\n    abs_param_func f.(FC_param_ident_start) (fun se me m =>\n       \n      if function_return_dec f.(FC_returns) then\n        synth_stmt_veri_cond me f.(FC_body) f.(FC_ident_start) param_tmp wf se m /\\\n        ht_valid_ft_cond\n          (synth_stmt_spec_ret me f.(FC_body) f.(FC_ident_start)\n            param_tmp wf se m)\n      else\n        synth_stmt_veri_cond me f.(FC_body) f.(FC_ident_start) param_tmp wf se m\n      ).\n  \n  Definition synth_func_obligation (f : function_constr)(wf : synth_func_wellformed f) :=\n    let param_tmp := param_env f.(FC_params) f.(FC_param_ident_start) in\n    abs_param_func f.(FC_param_ident_start)\n      (fun se me d => synth_stmt_obligation me f.(FC_body) f.(FC_ident_start) param_tmp wf se d).\n  \n  \n  \n  \n  \n  \n  \n  \n  Fixpoint spec_environment  (htps : list hyper_type_pair)\n         : forall (args : HList tp_ft htps) i (rest_typ : AList.t hyper_type_pair) (rest : SpecTree.t rest_typ), SpecTree.t (snd (fold_left param_folder htps (i, rest_typ))) :=\n    match  htps\n    return forall (args : HList tp_ft htps) i (rest_typ : AList.t hyper_type_pair) (rest : SpecTree.t rest_typ), SpecTree.t (snd (fold_left param_folder htps (i, rest_typ)))\n    with\n      | nil => fun args ident rest_typ rest => rest\n      | htp::htps => fun args i rest_typ rest =>\n         spec_environment htps (hlist_tl args) (Pos.succ i) (AList.set i htp rest_typ) (SpecTree.set i _ (hlist_hd args) rest)\n    end.\n  \n  Fixpoint apply_param_func {params T} :\n      param_func_type params T -> HList tp_ft params -> T :=\n    match params with\n    | nil => fun t _ => t\n    | htp :: l => fun f hlist => @apply_param_func l T\n                                   (f (hlist_hd hlist)) (hlist_tl hlist)\n    end.\n  Lemma apply_abs' \n  : forall T htps i tmp (se : SpecTree.t tmp)  \n           (f : SpecTree.t (snd (fold_left param_folder htps (i, tmp))) -> T) \n           args, \n     apply_param_func (abs_param_func' htps T i tmp se f) args\n   = f (spec_environment htps args i _ se).\n  Proof. Admitted.\n  Lemma apply_abs \n  : forall htps T i \n           (f : SpecTree.t (param_env htps i) -> T) \n           args, \n     apply_param_func (abs_param_func i f) args\n   = f (spec_environment htps args i _ (SpecTree.empty)).\n  Proof. Admitted.  \n  \nEnd FUNC_FUNC.\n"
  },
  {
    "path": "src/core/SynthesisStmt.v",
    "content": "Require Import BinIntDef.\nRequire Import BinPosDef.\nRequire Import Bool.\nRequire Import backend.AST.\nRequire Import backend.MemoryModel.\nRequire Import backend.Values.HighValues.\nRequire Import cclib.Coqlib.\nRequire Import cclib.Integers.\nRequire Import cclib.Maps.  \nRequire Import backend.Expressions.ExpMiniC.\nRequire Import backend.Statements.StmtMiniC.\nRequire Import backend.Cop.  \nRequire Import backend.Ctypes.\nRequire Import backend.MachineModel.\nRequire Import DeepSpec.lib.OProp.\nRequire Import DeepSpec.core.Cval.\nRequire Import DeepSpec.core.SEnv.\nRequire Import DeepSpec.core.HyperType.\nRequire Import DeepSpec.core.HyperTypeInst.\nRequire Import DeepSpec.core.MemoryModel.\nRequire Import DeepSpec.core.Syntax.\nRequire Import DeepSpec.core.SynthesisExpr.\nRequire        DeepSpec.lib.LangDef.\nRequire Import DeepSpec.lib.SimpleMaps.\nRequire Import DeepSpec.lib.SimpleIndexedMaps.\nRequire Import backend.phase.MiniC.Semantics.\nRequire Import backend.phase.MiniC.BigstepSemantics.\nLocal Open Scope Z.\nOpaque Monad.bind Monad.ret  MonadState.get MonadState.put MonadState.gets MonadState.modify StateMonad.runStateT StateMonad.execStateT StateMonad.evalStateT MonadZero.mzero.\nSection STMT_FUNC.\n  Context`{HM : HyperMem}.\n  Context (me : machine_env GetHighData).\n  \n  \n  Record stmt_spec_record returns : Type\n      := mk_stmt_spec_record{\n    ss_mem : GetHighData;\n    \n    ss_return : tp_ft returns   \n  }.\n  \n  Global Arguments mk_stmt_spec_record _ _  _.\n  Global Arguments ss_mem    {_} _.\n  \n  Global Arguments ss_return {_} _.\n  \n  Lemma stmt_spec_record_surjective {returns} r :\n      r = mk_stmt_spec_record returns r.(ss_mem)  r.(ss_return).\n  Proof. Admitted.\n  \n  Record stmt_output_equivalent {tmp returns}\n      (j : meminj)     \n      dest  \n      (ml : MemLow)    \n      (se : spec_env_t tmp)   \n      le                      \n      (r : stmt_spec_record returns) : Prop := mk_stmt_output_equivalent{\n    so_mem : mem_match j r.(ss_mem) ml;   \n    so_se  : lenv_cond se le;             \n    so_return : function_return_dec returns = true -> ht_rel_some r.(ss_return) (le ! dest);            \n    so_ft_cond : ht_ft_cond r.(ss_return)\n  }.\n  \n  Global Arguments so_mem     {_ _ _ _ _ _ _ _} _.\n  Global Arguments so_se      {_ _ _ _ _ _ _ _} _ _ _ _ _.\n  Global Arguments so_return  {_ _ _ _ _ _ _ _} _ _.\n  Global Arguments so_ft_cond {_ _ _ _ _ _ _ _} _.\n  \n  \n  Definition gss_iso {tmp i}{htp : hyper_type_pair} :\n      ((AList.set i htp tmp) ! i ~~~ Some htp)%alist.\n  Proof.\n    simpl.\n    rewrite Pos.eqb_refl.\n    exact identity_automorphism.\n  Defined.\n  Definition gso_iso {tmp i j}{htp htp' : hyper_type_pair} :\n      i <> j ->\n      (tmp ! i ~~~ Some htp)%alist ->\n      ((AList.set j htp' tmp) ! i ~~~ Some htp)%alist.\n  Proof.\n    intros.\n    rewrite AList.gso by assumption.\n    exact X.\n  Defined.\n  \n  \n  Definition for_start m (start_idx : Z) :=\n    (@mk_stmt_spec_record void_unit_pair m  tt, start_idx).\n  Definition for_step {tmp id_it}(se : spec_env_t tmp) :\n    let tmp' := AList.set id_it int_Z32_pair tmp in\n      (SpecTree.t tmp' -> GetHighData -> stmt_spec_record void_unit_pair) ->\n      stmt_spec_record void_unit_pair * Z ->\n      stmt_spec_record void_unit_pair * Z :=\n    fun f p =>\n      let '(r, idx) := p in\n      let r' := f (SpecTree.set id_it int_Z32_pair idx se) r.(ss_mem) in\n      ({|\n        ss_mem := r'.(ss_mem);\n        \n        ss_return := r'.(ss_return)\n      |}, idx + 1).\n  Definition fold_start htp (start_idx : Z)(start_recur : tp_ft htp) :=\n    (start_recur, start_idx).\n  Definition fold_step {htp tmp id_it id_recur}(se : spec_env_t tmp) m :\n    let tmp' := AList.set id_recur htp (AList.set id_it int_Z32_pair tmp) in\n      (SpecTree.t tmp' -> GetHighData -> stmt_spec_record htp) ->\n      tp_ft htp * Z -> tp_ft htp * Z :=\n    fun f p =>\n      let '(r, idx) := p in\n      ((f (SpecTree.set id_recur htp r\n           (SpecTree.set id_it int_Z32_pair idx se)) m).(ss_return),\n       idx + 1).\n  Definition dest_not_exist dest (tmp : AList.t hyper_type_pair) :=\n    (tmp ! dest ~~~ None)%alist.\n  Lemma dest_not_exist_ext {tmp dest} id htp :\n      dest_not_exist dest (AList.set id htp tmp) ->\n      dest_not_exist dest tmp.\n  Proof. Admitted.\n  Definition yield_expr dest e :=\n    Sset dest e.\n  \n  Fixpoint synth_stmt_pure {returns}(c : cmd_constr returns) : bool :=\n    match c with\n    | CCskip => true\n    | CClet _ tp _ id c1 c2 => synth_stmt_pure c1 && synth_stmt_pure c2\n    | CCload tp _ e => true\n    | CCstore _ _ el er => false\n    | CCsequence _ c1 c2 => synth_stmt_pure c1 && synth_stmt_pure c2\n    | CCifthenelse _ e c_true c_false =>\n      synth_stmt_pure c_true && synth_stmt_pure c_false\n    | CCfor id_it id_end e1 e2 c3 => false\n      \n    | CCfirst _ id_it id_end id_dest e1 e2 c3 c4 c5 =>\n      synth_stmt_pure c3 && synth_stmt_pure c4 && synth_stmt_pure c5\n    | CCfold tp _ id_it id_end id_recur id_dest e1 e2 e3 c4 => true\n    | CCcall argt ret prim args => prim.(PRIMpure)\n    | CCtransfer _ _ => true                                           \n    \n    | CCyield tp _ e => true\n    | CCconstr _ _ _ _ _ _ _ => false\n    | CCassert c => synth_stmt_pure c\n    \n    | CCdeny c => synth_stmt_pure c\n    | CCpanic _ _ => true\n    | CCrespec _ _ c _ => true\n    | CCrespec_opt _ _ c _ => false\n    end.\n  \n  Definition fold_synth_expr_wellformed tmp {tps}(es : expr_constr_list tps) :=\n    HList_fold_right_nodep\n      (fun htp (r : expr_constr _) a => prod (synth_expr_wellformed tmp (tp := tp_type_pair htp) r) a)\n      True\n      es.\n  Fixpoint synth_stmt_wellformed {returns}(c : cmd_constr returns) dest tmp : Type :=\n    match c with\n    | CCskip => dest_not_exist dest tmp\n    | CClet _ tp _ id c1 c2 =>\n      let tmp' := AList.set id (mk_hyper_type_pair tp) tmp in\n      ((tmp ! id ~~~ None) * dest_not_exist dest tmp') *\n      (synth_stmt_wellformed c1 id tmp * synth_stmt_wellformed c2 dest tmp')\n    | CCload tp _ e => synth_lexpr_wellformed tmp e\n    | CCstore _ _ el er =>\n      synth_lexpr_wellformed tmp el * synth_expr_wellformed tmp er\n    | CCsequence _ c1 c2 =>\n      synth_stmt_wellformed c1 dest tmp * synth_stmt_wellformed c2 dest tmp\n    | CCifthenelse _ e c_true c_false =>\n      synth_expr_wellformed tmp e *\n      (synth_stmt_wellformed c_true dest tmp *\n       synth_stmt_wellformed c_false dest tmp)\n    | CCfor id_it id_end e1 e2 c3 =>\n      let tmp' := AList.set id_end int_Z32_pair tmp in\n      let tmp'' := AList.set id_it int_Z32_pair tmp' in\n      ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n       dest_not_exist dest tmp'')) *\n      (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n       synth_stmt_wellformed c3 dest tmp''))\n    | CCfirst _ id_it id_end id_dest e1 e2 c3 c4 c5 =>\n      let tmp' := AList.set id_end int_Z32_pair tmp in\n      let tmp'' := AList.set id_it int_Z32_pair tmp' in\n      ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n       ((tmp'' ! id_dest ~~~ None) * (dest_not_exist dest tmp'' *\n        ((synth_stmt_pure c3 ~~~ true)))))) *\n      (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n       (synth_stmt_wellformed c3 id_dest tmp'' *\n       (synth_stmt_wellformed c4 dest tmp'' *\n        synth_stmt_wellformed c5 dest tmp''))))\n    | CCfold tp _ id_it id_end id_recur id_dest e1 e2 e3 c4 =>\n      let tmp' := AList.set id_end int_Z32_pair tmp in\n      let tmp'' := AList.set id_it int_Z32_pair tmp' in\n      let tmp''' := AList.set id_recur (mk_hyper_type_pair tp) tmp'' in\n      ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n       ((tmp'' ! id_recur ~~~ None) * ((tmp''' ! id_dest ~~~ None) *                \n       (dest_not_exist dest tmp''' * (synth_stmt_pure c4 ~~~ true)))))) *           \n      (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n       (synth_expr_wellformed tmp e3 * synth_stmt_wellformed c4 id_dest tmp''')))\n    | CCcall argt ret prim args => fold_synth_expr_wellformed tmp args\n    \n    | CCconstr _ _ _ _ el flds _ =>\n      synth_lexpr_wellformed tmp el * fold_synth_expr_wellformed tmp flds\n    | CCtransfer e1 e2 =>\n      synth_expr_wellformed tmp e1 * synth_expr_wellformed tmp e2\n                                                                 \n    | CCyield tp _ e => synth_expr_wellformed tmp e\n    | CCassert c => (synth_stmt_pure c ~~~ true) * synth_stmt_wellformed c dest tmp\n    | CCdeny c   => (synth_stmt_pure c ~~~ true) * synth_stmt_wellformed c dest tmp\n    \n    | CCpanic _ _ => True\n    | CCrespec _ tmp' c spec =>\n      ((tmp ~~~ tmp') * (synth_stmt_pure c ~~~ true)) *\n      synth_stmt_wellformed c dest tmp\n    | CCrespec_opt _ tmp' c spec => (tmp ~~~ tmp') * synth_stmt_wellformed c dest tmp\n    end%type%alist.\n  \n  Fixpoint synth_stmt_locals {returns}(c : cmd_constr returns) dest tmp :\n      list (ident * type) :=\n    match c with\n    | CCskip => nil\n    | CClet _ tp _ id c1 c2 =>\n      (id, unpair_ty tp) ::\n        synth_stmt_locals c1 id tmp ++\n          synth_stmt_locals c2 dest (AList.set id (mk_hyper_type_pair tp) tmp)\n    | CCload tp _ e => nil\n    | CCstore _ _ el er => nil\n    | CCsequence _ c1 c2 =>\n      synth_stmt_locals c1 dest tmp ++ synth_stmt_locals c2 dest tmp\n    | CCifthenelse _ e c_true c_false =>\n      synth_stmt_locals c_true dest tmp ++ synth_stmt_locals c_false dest tmp\n    | CCfor id_it id_end e1 e2 c3 =>\n      let tmp' := AList.set id_end int_Z32_pair tmp in\n      let tmp'' := AList.set id_it int_Z32_pair tmp' in\n      (id_it, tint) :: (id_end, tint) :: synth_stmt_locals c3 dest tmp''\n    | CCfirst _ id_it id_end id_dest e1 e2 c3 c4 c5 =>\n      let tmp' := AList.set id_end int_Z32_pair tmp in\n      let tmp'' := AList.set id_it int_Z32_pair tmp' in\n      (id_it, tint) :: (id_end, tint) :: (id_dest, tint) ::\n        synth_stmt_locals c3 id_dest tmp'' ++ synth_stmt_locals c4 dest tmp'' ++\n        synth_stmt_locals c5 dest tmp''\n    | CCfold tp _ id_it id_end id_recur id_dest e1 e2 e3 c4 =>\n      let tmp' := AList.set id_end int_Z32_pair tmp in\n      let tmp'' := AList.set id_it int_Z32_pair tmp' in\n      let tmp''' := AList.set id_recur (mk_hyper_type_pair tp) tmp'' in\n      (id_it, tint) :: (id_end, tint) :: (id_recur, unpair_ty tp) ::\n        (id_dest, unpair_ty tp) :: synth_stmt_locals c4 id_dest tmp'''\n    | CCcall argt ret prim args => nil\n    \n    | CCtransfer _ _ => nil\n    | CCconstr _ _ _ _ _ _ _ => nil\n    | CCyield tp _ e => nil\n    | CCassert _ => nil\n    | CCdeny _ => nil\n    \n    | CCpanic _ _ => nil\n    | CCrespec _ tmp' c cpec => synth_stmt_locals c dest tmp\n    | CCrespec_opt _ tmp' c spec => synth_stmt_locals c dest tmp\n    end.\n  Fixpoint synth_CCconstr_stmt tmp target fld_ids {fld_tps}\n      (flds : expr_constr_list fld_tps){struct flds} : statement :=\n    match flds with\n    | HNil => Sskip\n    | HCons htp _ fld_e res_es => match fld_ids with\n      | nil => Sskip  \n      | fld_id :: res_ids =>\n        Ssequence\n          (Sassign (Efield target fld_id (tp_ty htp))\n                   (synth_expr_expr tmp fld_e))\n          (synth_CCconstr_stmt tmp target res_ids res_es)\n      end\n    end.\n  \n  Fixpoint synth_stmt_stmt {returns}(c : cmd_constr returns) dest tmp : statement :=\n    match c with\n    | CCskip => Sskip\n    | CClet _ tp _ id c1 c2 =>\n      let tmp' := AList.set id (mk_hyper_type_pair tp) tmp in\n      Ssequence (synth_stmt_stmt c1 id tmp) (synth_stmt_stmt c2 dest tmp')\n    | CCload tp _ el => Sset dest (synth_lexpr_expr tmp el)\n    | CCstore _ _ el er =>\n      if lexpr_is_ghost el then\n        Sskip\n      else\n        Sassign (synth_lexpr_expr tmp el) (synth_expr_expr tmp er)\n    | CCsequence _ c1 c2 =>\n      Ssequence (synth_stmt_stmt c1 dest tmp) (synth_stmt_stmt c2 dest tmp)\n    | CCifthenelse _ e c_true c_false =>\n      Sifthenelse (synth_expr_expr tmp e) (synth_stmt_stmt c_true dest tmp)\n                                          (synth_stmt_stmt c_false dest tmp)\n    | CCfor id_it id_end e1 e2 c3 =>\n      let tmp' := AList.set id_end int_Z32_pair tmp in\n      let tmp'' := AList.set id_it int_Z32_pair tmp' in\n      Ssequence (Sset id_end (synth_expr_expr tmp e2))\n        (Sfor (Sset id_it (synth_expr_expr tmp e1))\n              (Ebinop Olt (Etempvar id_it tint) (Etempvar id_end tint) tint)\n              (synth_stmt_stmt c3 dest tmp'')\n              (Sset id_it (Ebinop Oadd (Etempvar id_it tint)\n                                       (Econst_int256 Int256.one tint) tint)))\n    | CCfirst _ id_it id_end id_dest e1 e2 c3 c4 c5 =>\n      let tmp' := AList.set id_end int_Z32_pair tmp in\n      let tmp'' := AList.set id_it int_Z32_pair tmp' in\n      let s3 := synth_stmt_stmt c3 id_dest tmp'' in\n      let s4 := synth_stmt_stmt c4 dest tmp'' in\n      let s5 := synth_stmt_stmt c5 dest tmp'' in\n      Ssequence\n        (Sset id_end (synth_expr_expr tmp e2))\n        (Ssequence\n          (Sset id_it (synth_expr_expr tmp e1))\n          (Sloop\n            (Ssequence\n              (Sifthenelse\n                (Ebinop Olt (Etempvar id_it tint) (Etempvar id_end tint) tint)\n                Sskip\n                (Ssequence\n                  (Sset id_it (Etempvar id_end tint))\n                  (Ssequence s5 Sbreak)))\n              (Ssequence\n                s3\n                (Sifthenelse\n                  (Etempvar id_dest tint)\n                  (Ssequence s4 Sbreak)\n                  (Sset id_it (Ebinop Oadd (Etempvar id_it tint)\n                                           (Econst_int256 Int256.one tint) tint)))))\n            ))\n    | CCfold tp _ id_it id_end id_recur id_dest e1 e2 e3 c4 =>\n      let tmp' := AList.set id_end int_Z32_pair tmp in\n      let tmp'' := AList.set id_it int_Z32_pair tmp' in\n      let tmp''' := AList.set id_recur (mk_hyper_type_pair tp) tmp'' in\n      Ssequence (Ssequence (Sset id_end (synth_expr_expr tmp e2))\n        (Sfor (Ssequence (Sset id_it (synth_expr_expr tmp e1))\n                         (Sset id_recur (synth_expr_expr tmp e3)))\n              (Ebinop Olt (Etempvar id_it tint) (Etempvar id_end tint) tint)\n              (synth_stmt_stmt c4 id_dest tmp''')\n              (Ssequence (Sset id_it (Ebinop Oadd (Etempvar id_it tint)\n                                             (Econst_int256 Int256.one tint) tint))\n                         (Sset id_recur (Etempvar id_dest (unpair_ty tp))))))\n        (Sset dest (Etempvar id_recur (unpair_ty tp)))\n    | CCcall argt ret prim args =>\n      \n      \n      let arg_ty := to_typelist argt in\n      let prim_type := Tfunction arg_ty (tp_ty ret)  in\n      let synth_expr_htp htp := synth_expr_expr tmp (tp := tp_type_pair htp) in\n      let return_tmp := if function_return_dec ret then\n                          Some dest\n                        else\n                          None in\n      Scall return_tmp prim.(PRIMident) \n                       (HList_map_nodep synth_expr_htp args)\n    \n    | CCtransfer e1 e2 => \n      Stransfer (synth_expr_expr tmp e1) (synth_expr_expr tmp e2)\n                                       \n    | CCyield tp _ e => Sset dest (synth_expr_expr tmp e)\n    | CCconstr _ _ fld_ids _ el args _ =>\n      if lexpr_is_ghost el then\n        Sskip\n      else\n        let target := synth_lexpr_expr tmp el in\n        synth_CCconstr_stmt tmp target fld_ids args\n    | CCassert c1 =>      \n      Ssequence (synth_stmt_stmt c1 dest tmp)\n                (Sifthenelse (Etempvar dest tint)\n                             Sskip\n                             Srevert)\n    | CCdeny c1 =>\n      Ssequence (synth_stmt_stmt c1 dest tmp)\n                (Sifthenelse (Etempvar dest tint)\n                             Srevert\n                             Sskip)\n    \n    | CCpanic _ _ => Srevert\n    | CCrespec _ tmp' c spec => synth_stmt_stmt c dest tmp\n    | CCrespec_opt _ tmp' c spec => synth_stmt_stmt c dest tmp\n    end.\n  Fixpoint map2_synth_expr_spec {tmp tps} es (se : spec_env_t tmp)\n      : @fold_synth_expr_wellformed tmp tps es -> HList tp_ft tps :=\n    match es with\n    | HNil => fun _ => HNil\n    | HCons x ls e es => fun wf =>\n      let (wf, IHwf) := wf\n      in HCons x ls (synth_expr_spec me tmp e wf se) (map2_synth_expr_spec es se IHwf)\n    end.\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.lib.Monad.StateMonad.\nRequire Import DeepSpec.lib.Monad.StateMonadOption.\nImport MonadNotation.\nOpen Scope monad_scope.\nExisting Instances Monad_DS MonadLaws_DS MonadState_DS MonadZero_DS.\nLemma Z_nonneg_peano_ind (P : Z -> Prop) :\n  P 0%Z ->\n  (forall z, 0 <= z -> P z -> P (Z.succ z)) ->\n  (forall p, P (Z.neg p)) ->\n  forall z, P z.\nProof. Admitted.\nLemma Z_pos_peano_ind (P : Z -> Prop) :\n  (forall z, z <= 0 -> P z) ->\n  (forall z, 0 <= z -> P z -> P (Z.succ z)) ->\n  forall z, P z.\nProof. Admitted.\nFixpoint Niteri {A:Type} (f:Z->A->A) (n:nat) (x:A) {struct n} : A :=\n  match n with\n  | O => x\n  | S n' => f (Z.of_nat n') (Niteri f n' x)\n  end.\nLemma Niteri_swap:\n  forall (n:nat) (A:Type) (f:Z->A->A) (x:A),\n    Niteri (fun z => f (Z.succ z)) n (f 0 x) = f (Z.of_nat n) (Niteri f n x).\nProof. Admitted.\nLemma Niteri_succ:\n  forall n (A:Type) (f:Z->A->A) (x:A),\n    Niteri f (S n) x = f (Z.of_nat n) (Niteri f n x).\nProof. Admitted.\n  \nLemma Niteri_add:\n  forall p q (A:Type) (f:Z->A->A) (x:A),\n    Niteri f (p+q) x = Niteri (fun z => f (z+(Z.of_nat q))) p (Niteri f q x).\nProof. Admitted.\nLemma Niteri_add1:\n  forall p (A:Type) (f:Z->A->A) (x:A),\n    Niteri f (S p) x = Niteri (fun z => f (Z.succ z)) p (Niteri f 1 x).\nProof. Admitted.\nDefinition Ziteri {A} (f:Z->A->A) (steps:Z) (x:A) :=\n    Niteri f (Z.to_nat steps) x.\nLemma Ziteri_base':\n  forall z (A:Type) (f:Z->A->A) (x:A),\n    z < 0 ->\n    Ziteri f z x = x.\nProof. Admitted.\nLemma Ziteri_base:\n  forall z (A:Type) (f:Z->A->A) (x:A),\n    z <= 0 ->\n    Ziteri f z x = x.\nProof. Admitted.\nLemma Ziteri_neg:\n  forall p (A:Type) (f:Z->A->A) (x:A),\n    Ziteri f (Zneg p) x = x.\nProof. Admitted.\nLemma Ziteri_0:\n  forall (A:Type) (f:Z->A->A) (x:A),\n    Ziteri f 0 x = x.\nProof. Admitted.\nLemma Ziteri_swap:\n  forall z (A:Type) (f:Z->A->A) (x:A),\n    0 <= z ->\n    Ziteri (fun z => f (Z.succ z)) z (f 0 x) = f z (Ziteri f z x).\nProof. Admitted.\nLemma Ziteri_succ:\n  forall z (A:Type) (f:Z->A->A) (x:A),\n    0 <= z ->\n    Ziteri f (Z.succ z) x = f z (Ziteri f z x).\nProof. Admitted.\nLemma Ziteri_add1:\n  forall p (A:Type) (f:Z->A->A) (x:A),\n    0 <= p ->\n    Ziteri f (Z.succ p) x = Ziteri (fun z => f (Z.succ z)) p (Ziteri f 1 x).\nProof. Admitted.\nDefinition failure_passing {A} (h: DS A -> DS A) : Prop :=\n  forall m x,\n  runStateT x m = mzero ->\n  runStateT (h x) m = mzero.\nLemma Niteri_from_none {A} (f: Z -> DS A -> DS A) (fp: forall n, failure_passing (f n)) n:\n  forall x m,\n  runStateT x m = mzero ->\n  runStateT (Niteri f n x) m = mzero.\nProof. Admitted.\nLemma Niteri_cut_0 {A} {f: Z -> DS A -> DS A} (fp: forall n, failure_passing (f n)) {n x m v s}:\n  runStateT (Niteri f n x) m = ret (v, s) ->\n  exists v' s', runStateT x m = ret (v', s').\nProof. Admitted.\nLemma Niteri_Ziteri {A} (f: Z -> DS A -> DS A) {P}:\n  forall x n,\n  P (Niteri f (Z.to_nat n) x) ->\n  P (Ziteri f n x).\nProof. Admitted.\nLemma Ziteri_from_none {A} (f: Z -> DS A -> DS A) (fp: forall n, failure_passing (f n)) n:\n  forall x m,\n    runStateT x m = mzero ->\n    runStateT (Ziteri f n x) m = mzero.\nProof. Admitted.\nLemma Ziteri_cut_0 {A} {f: Z -> DS A -> DS A} (fp: forall n, failure_passing (f n)) {n x m v s}:\n  runStateT (Ziteri f n x) m = ret (v, s) ->\n  exists v' s', runStateT x m = ret (v', s').\nProof. Admitted.\nDefinition oZiteri_wrapper {A} (f: Z -> A -> DS A) n x : DS A :=\n  r <- x;; f n r.\nLemma oZiteri_wrapper_unfolder {A} (f: Z -> A -> DS A) n x:\n  oZiteri_wrapper f n x = (r <- x;; f n r).\n  reflexivity.\nQed.\nDefinition oZiteri {A} (f: Z -> A -> DS A) n x : DS A :=\n  Ziteri (oZiteri_wrapper f) n (ret x).\nDefinition oNiteri {A} (f: Z -> A -> DS A) n x : DS A :=\n  Niteri (oZiteri_wrapper f) n (ret x).\nLemma oNiteri_unfolder {A} (f: Z -> A -> DS A) n x:\n  oNiteri f n x = Niteri (oZiteri_wrapper f) n (ret x).\n  reflexivity.\nQed.\nLemma oZiteri_unfolder {A} (f: Z -> A -> DS A) n x:\n  oZiteri f n x = Ziteri (oZiteri_wrapper f) n (ret x).\n  reflexivity.\nQed.\nLemma oZiteri_oNiteri {A} (f: Z -> A -> DS A) n x:\n  oZiteri f n x = oNiteri f (Z.to_nat n) x.\nProof. Admitted.\nDefinition first_map (check: Z -> DS (tp_ft int_bool_pair))\n           (start bound : Z) :=\n  oZiteri\n    ( fun i l => m <- get;; h <- check (start + i);; put m)\n    (bound - start)\n    tt.\nDefinition fold_step_opt {htp tmp id_it id_recur}(se : spec_env_t tmp) (start:Z):\n  let tmp' := AList.set id_recur htp (AList.set id_it int_Z32_pair tmp) in\n  (SpecTree.t tmp' -> DS (tp_ft htp)) ->\n  Z ->\n  tp_ft htp ->\n  DS (tp_ft htp) :=\n  fun c i r =>\n    c (SpecTree.set id_recur htp r\n                    (SpecTree.set id_it int_Z32_pair (start+i) se)).\nLemma oNiteri_link_head {A} {f: Z -> A -> DS A} {n x m v s}:\n  runStateT (oNiteri f 1 x) m = ret (v, s) ->\n  runStateT (oNiteri (fun z => f (Z.succ z)) n v) s =\n  runStateT (oNiteri f (S n) x) m.\nProof. Admitted.\nLemma oZiteri_link_head {A} {f: Z -> A -> DS A} {n x m v s}:\n  0 <= n ->\n  runStateT (oZiteri f 1 x) m = ret (v, s) ->\n  runStateT (oZiteri (fun z => f (Z.succ z)) n v) s =\n  runStateT (oZiteri f (Z.succ n) x) m.\nProof. Admitted.\nLemma failure_passing_oZiteri_wrapper {A} (f: Z -> A -> DS A):\n  forall n, failure_passing ((oZiteri_wrapper f) n).\nProof. Admitted.\nLemma oZiteri_0 {A} {f: Z -> A -> DS A} {x:A}:\n  oZiteri f 0 x = ret x.\nProof. Admitted.\nLemma oZiteri_base {A} {f: Z -> A -> DS A} {x:A} n:\n  n <= 0 ->\n  oZiteri f n x = ret x.\nProof. Admitted.\nLemma oZiteri_cut_head {A} {f: Z -> A -> DS A} {n x m v s}:\n  0 <= n ->\n  runStateT (oZiteri f (Z.succ n) x) m = ret (v, s) ->\n  exists v' s', runStateT (oZiteri f 1 x) m = ret (v', s') /\\\n                runStateT (oZiteri (fun z => f (Z.succ z)) n v') s' = ret (v, s).\nProof. Admitted.\nLemma Ziteri_1 {A} {f: Z -> A -> A} {x:A}:\n  Ziteri f 1 x = f 0 x.\nProof. Admitted.\nLemma oZiteri_1 {A} {f: Z -> A -> DS A} {x m}:\n  runStateT (oZiteri f 1 x) m = runStateT (f 0 x) m.\nProof. Admitted.\nLemma oZiteri_neg {A} {f: Z -> A -> DS A} {x:A} {p}:\n  oZiteri f (Z.neg p) x = ret x.\nProof. Admitted.\nLemma oZiteri_cut_tail {A} {f: Z -> A -> DS A} {n x m v s}:\n  0 <= n ->\n  runStateT (oZiteri f (Z.succ n) x) m = ret (v, s) ->\n  exists v' s', runStateT (oZiteri f n x) m = ret (v', s') /\\\n                runStateT (oZiteri (fun z => f (n + z)) 1 v') s' = ret (v, s).\nProof. Admitted.\nLemma oZiteri_mid {A} {f: Z -> A -> DS A} n0 n1 {x m v s}:\n  0 <= n0 ->\n  0 <= n1 ->\n  runStateT (oZiteri f (n0+n1) x) m = ret (v, s) ->\n  exists v' s', runStateT (oZiteri f n0 x) m = ret (v', s') /\\\n                runStateT (oZiteri (fun z => f (n0 + z)) n1 v') s' = ret (v, s).\nProof. Admitted.\nLemma oZiteri_pure {A} {f: Z -> A -> DS A}:\n  forall n m,\n  (forall z, 0 <= z < n -> forall r v s, runStateT (f z r) m = ret (v, s) -> m = s) ->\n  forall x v s, runStateT (oZiteri f n x) m = ret (v, s) ->\n                m = s.\nProof. Admitted.\nLemma oZiteri_connect {A} {f: Z -> A -> DS A}:\n  forall n x m,\n    (forall z, 0 <= z < n ->\n     forall v' s', runStateT (oZiteri f z x) m = ret (v', s') ->\n                   exists v s, runStateT (f z v') s' = ret (v, s)) ->\n  exists v s, runStateT (oZiteri f n x) m = ret (v, s).\nProof. Admitted.\nLemma oZiteri_pure_connect {A} {f: Z -> A -> DS A}:\n  forall n x m,\n    (forall z, 0 <= z < n ->\n     forall v', runStateT (oZiteri f z x) m = ret (v', m) ->\n                   exists v, runStateT (f z v') m = ret (v, m)) ->\n    exists v, runStateT (oZiteri f n x) m = ret (v, m).\nProof. Admitted.\nDefinition for_step_opt {tmp} {id_it : positive} (se : spec_env_t tmp) (start:Z) :\n  let tmp' := AList.set id_it int_Z32_pair tmp in\n  (spec_env_t tmp' -> DS unit) ->\n  Z ->\n  DS (tp_ft void_unit_pair) ->\n  DS (tp_ft void_unit_pair) :=\n  fun c i ma =>\n    ma;; c (SpecTree.set id_it int_Z32_pair (start+i) se).\nLemma for_from_none {tmp} id_it (se: spec_env_t tmp):\n  forall p f s0 start c,\n    runStateT c s0 = mzero ->\n    runStateT (Niteri (@for_step_opt _ id_it se start f)\n                      p\n                      c) s0 = mzero.\nProof. Admitted.\nLemma for_from_none' {tmp} id_it (se: spec_env_t tmp):\n  forall p f s0 start init,\n    runStateT init s0 = mzero ->\n    runStateT (Niteri (fun z => @for_step_opt _ id_it se start f (Z.succ z))\n                      p\n                      init) s0 = mzero.\nProof. Admitted.\nLemma for_n_plus_1__runStateT:\n  forall tmp id_it (se:spec_env_t tmp)\n    (f: SpecTree.ilist (AList.set id_it int_Z32_pair tmp) -> stateT GetHighData option (tp_ft void_unit_pair)) d start mh m',\n    runStateT (f (SpecTree.set id_it int_Z32_pair start se)) mh = ret (tt, m') ->\n    runStateT\n      (Niteri\n         (fun z : Z =>\n            @for_step_opt _ id_it se start f (Z.succ z)) d\n         (Niteri (for_step_opt se start f) 1 (ret tt)))\n      mh =\n    runStateT\n      (Niteri (for_step_opt se (start+1) f) d (ret tt))\n      m'.\nProof. Admitted.\nLemma for_n_plus_1__execStateT:\n  forall tmp id_it (se:spec_env_t tmp) (f: SpecTree.ilist (AList.set id_it int_Z32_pair tmp) -> stateT GetHighData option (tp_ft void_unit_pair)) d start mh m',\n    execStateT (f (SpecTree.set id_it int_Z32_pair start se)) mh = ret m' ->\n    execStateT\n      (Ziteri\n         (fun z : Z =>\n            @for_step_opt _ id_it se start f (Z.succ z)) d\n         (Ziteri (for_step_opt se start f) 1 (ret tt)))\n      mh =\n    execStateT\n      (Ziteri (for_step_opt se (start+1) f) d (ret tt))\n      m'.\nProof. Admitted.\nLemma for_cut_opt' {tmp id_it} (se : spec_env_t tmp):\n  let tmp' := AList.set id_it int_Z32_pair tmp in\n  forall f s0 start steps s,\n    0 <= steps ->\n    runStateT (Ziteri (@for_step_opt _ id_it se start f)\n                       (Z.succ steps)\n                       (ret tt)) s0 = ret (tt, s) ->\n    exists s',\n      runStateT (f (SpecTree.set id_it int_Z32_pair start se)) s0 = ret (tt, s')\n      /\\ runStateT (Ziteri (@for_step_opt _ id_it se (start+1) f)\n                          steps\n                          (ret tt)) s' = ret (tt, s).\nProof. Admitted.\nLemma oZiteri_fail_at_1 {A} {f: Z -> A -> DS A} {n x m}:\n  0 <= n ->\n  runStateT (oZiteri f 1 x) m = mzero ->\n  runStateT (oZiteri f (Z.succ n) x) m = mzero.\nProof. Admitted.\nLemma oZiteri_replace {A} {f: Z -> A -> DS A} {g: Z -> A -> DS A}:\n  (forall z r s, runStateT (f z r) s = runStateT (g z r) s) ->\n  forall n x m, runStateT (oZiteri f n x) m = runStateT (oZiteri g n x) m.\nProof. Admitted.\nLemma fold_n_plus_1__runStateT {htp tmp id_it id_recur} (se:spec_env_t tmp) f mh start init:\n  let tmp''' := AList.set id_recur htp (AList.set id_it int_Z32_pair tmp) in\n  let se_recur := SpecTree.set id_recur htp init (SpecTree.set id_it int_Z32_pair start se) in\n  forall v' s',\n  runStateT (f se_recur) mh = ret (v', s') ->\n  forall n,\n    0 <= n ->\n  runStateT\n    (oZiteri\n       (fold_step_opt se start f) (Z.succ n) init) mh =\n  runStateT\n    (oZiteri (fold_step_opt se (Z.succ start) f) n v') s'.\nProof. Admitted.\nLemma fold_cut_opt' {htp tmp id_it id_recur} (se : spec_env_t tmp) f mh start init:\n  let tmp''' := AList.set id_recur htp (AList.set id_it int_Z32_pair tmp) in\n  let se_recur := SpecTree.set id_recur htp init (SpecTree.set id_it int_Z32_pair start se) in\n  forall steps v s,\n    0 <= steps ->\n    runStateT (oZiteri (@fold_step_opt _ _ id_it id_recur se start f)\n                      (Z.succ steps)\n                      init) mh = ret (v, s) ->\n    exists v' s',\n      runStateT (f se_recur) mh = ret (v', s') /\\\n      runStateT (oZiteri (@fold_step_opt _ _ id_it id_recur se (Z.succ start) f)\n                        steps\n                        v') s' = ret (v, s).\nProof. Admitted.\nLemma for_cut_opt {tmp id_it} (se : spec_env_t tmp):\n  let tmp' := AList.set id_it int_Z32_pair tmp in\n  forall f s0 start steps s,\n    0 <= steps ->\n    execStateT (Ziteri (@for_step_opt _ id_it se start f)\n                       (Z.succ steps)\n                       (ret tt)) s0 = ret s ->\n    exists s',\n      execStateT (f (SpecTree.set id_it int_Z32_pair start se)) s0 = ret s'\n      /\\ execStateT (Ziteri (@for_step_opt _ id_it se (start+1) f)\n                           steps\n                           (ret tt)) s' = ret s.\nProof. Admitted.\nFixpoint Nfind (check:Z -> DS bool) (n:nat) {struct n} : DS (option Z) :=\n  match n with\n  | O => ret None\n  | S n' => res <- check (Z.of_nat n);;\n           if res\n           then ret (Some (Z.of_nat n))\n           else Nfind check n'\n  end.\nDefinition Zfind (check:Z -> DS bool) (z:Z) :=\n  Nfind check (Z.to_nat z).\nLemma Zfind_succ (check:Z -> DS bool) (z:Z):\n  0 <= z ->\n  Zfind check (Z.succ z) =\n  (res <- check (Z.succ z);;\n      if res\n      then ret (Some (Z.succ z))\n      else Zfind check z).\nProof. Admitted.\nLemma Zfind_pure (check:Z -> DS bool):\n  (forall z m v s, runStateT (check z) m = ret (v, s) -> m = s) ->\n  forall z m v s, runStateT (Zfind check z) m = ret (v, s) ->\n             m = s.\nProof. Admitted.\nDefinition first_spec {A}\n           (check: Z -> DS (tp_ft int_bool_pair)) (f: Z -> A)\n           (g: Z -> A) start bound (m:GetHighData) :=\n  let P n := is_true\n           (match evalStateT (check n) m with\n            | Some b => b\n            | None => false\n            end)\n  in\n  let Pdec n : {P n} + {~ P n} := bool_dec _ true in\n  match LangDef.min_ex P start bound Pdec with\n  | inleft (exist n _) => f n\n  | inright _ => g bound\n  end.\nLtac dest_first H :=\n  try unfold first_spec in H;\n  match type of H with\n  | runStateT match ?X with _ => _ end _ = _ =>\n    let n := fresh \"n\" in\n    let n_range := fresh \"n_range\" in\n    let Pn := fresh \"Pn\" in\n    let n_least := fresh \"n_least\" in\n    let no_n := fresh \"no_n\" in\n    destruct X as [(n & n_range & Pn & n_least) | no_n]\n  end.\nLtac dest_first_eqn H :=\n  try unfold first_spec in H;\n  match type of H with\n  | runStateT match ?X with _ => _ end _ = _ =>\n    let n := fresh \"n\" in\n    let n_range := fresh \"n_range\" in\n    let Pn := fresh \"Pn\" in\n    let n_least := fresh \"n_least\" in\n    let no_n := fresh \"no_n\" in\n    let first_eq := fresh \"first_eq\" in\n    destruct X as [(n & n_range & Pn & n_least) | no_n] eqn:first_eq\n  end.\nDefinition ext_call_me (ext_contract : int256) := {|\n  me_address := ext_contract;\n  me_origin := me_origin me;\n  me_caller := me_address me;\n  me_callvalue := me_callvalue me; \n  me_coinbase := me_coinbase me;\n  me_timestamp := me_timestamp me;\n  me_number := me_number me;\n  me_chainid := me_chainid me;\n  me_selfbalance := me_selfbalance me;\n  me_balance := me_balance me;\n  me_blockhash := me_blockhash me;\n  me_transfer := me_transfer me;\n  me_callmethod := me_callmethod me;\n  me_log := me_log me;\n|}.\nFixpoint synth_stmt_spec_opt {returns}(c : cmd_constr returns) dest tmp :\n  synth_stmt_wellformed c dest tmp -> spec_env_t tmp -> DS (tp_ft returns) :=\n  match c with\n  | CCskip => fun wf se => ret tt\n  | CClet _r tp _ id c1 c2 =>\n    let htp := mk_hyper_type_pair tp in\n    (fun (wf : let tmp' := AList.set id (mk_hyper_type_pair tp) tmp in\n            ((tmp ! id ~~~ None) * dest_not_exist dest tmp') *\n            (synth_stmt_wellformed c1 id tmp * synth_stmt_wellformed c2 dest tmp'))\n       se =>\n       spec1 <- (synth_stmt_spec_opt c1 id tmp (cadr wf) se);;\n       let se' := SpecTree.set id htp spec1 se in\n       (synth_stmt_spec_opt c2 dest _ (cddr wf) se'))\n  | CCload tp _ e => fun wf se =>\n    gets (synth_lexpr_spec me tmp e wf se).(ltype_get)\n  | CCstore _ _ el er => fun wf se =>\n    let f := synth_expr_spec me tmp er (cdr wf) se in\n    modify ((synth_lexpr_spec me tmp el (car wf) se).(ltype_set) f)\n  | CCsequence _ c1 c2 =>\n    fun (wf : synth_stmt_wellformed c1 dest tmp * synth_stmt_wellformed c2 dest tmp)\n      se =>\n      (synth_stmt_spec_opt c1 dest tmp (car wf) se) ;;\n      (synth_stmt_spec_opt c2 dest tmp (cdr wf) se)\n  | CCifthenelse _ e c_true c_false =>\n    fun (wf : synth_expr_wellformed tmp e *\n             (synth_stmt_wellformed c_true dest tmp * synth_stmt_wellformed c_false dest tmp))\n        se =>\n      if synth_expr_spec me tmp e (car wf) se\n      then synth_stmt_spec_opt c_true  dest tmp (cadr wf) se\n      else synth_stmt_spec_opt c_false dest tmp (cddr wf) se\n  | CCfor id_it id_end e1 e2 c3 =>\n    fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n            let tmp'' := AList.set id_it int_Z32_pair tmp' in\n            ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n             dest_not_exist dest tmp'')) *\n            (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n             synth_stmt_wellformed c3 dest tmp'')))\n      se =>\n      let start := synth_expr_spec me tmp e1 (cadr wf) se in\n      let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n      let initial_se := SpecTree.set id_end int_Z32_pair bound se in\n      Ziteri (for_step_opt initial_se start\n                         (synth_stmt_spec_opt c3 dest _ (cdddr wf)))\n           (bound - start)\n           (ret tt)\n  | CCfirst _ id_it id_end id_dest e1 e2 c3 c4 c5 =>\n    fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n              let tmp'' := AList.set id_it int_Z32_pair tmp' in\n              ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n               ((tmp'' ! id_dest ~~~ None) * (dest_not_exist dest tmp'' *\n                ((synth_stmt_pure c3 ~~~ true)))))) *\n              (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n               (synth_stmt_wellformed c3 id_dest tmp'' *\n               (synth_stmt_wellformed c4 dest tmp'' *\n                synth_stmt_wellformed c5 dest tmp'')))))\n      se =>\n      let start := (synth_expr_spec me tmp e1 (cadr wf) se) in\n      let bound := (synth_expr_spec me tmp e2 (caddr wf) se) in\n      m <- get;;\n      first_map\n      (fun n =>\n         synth_stmt_spec_opt c3 id_dest _ (cadddr wf)\n           (SpecTree.set id_it int_Z32_pair n\n           (SpecTree.set id_end int_Z32_pair bound se)))\n      start bound;;\n      first_spec\n      (fun n =>\n         synth_stmt_spec_opt c3 id_dest _ (cadddr wf)\n           (SpecTree.set id_it int_Z32_pair n\n           (SpecTree.set id_end int_Z32_pair bound se)))\n      (fun n =>\n         synth_stmt_spec_opt c4 dest _ (caddddr wf)\n           (SpecTree.set id_it int_Z32_pair n\n           (SpecTree.set id_end int_Z32_pair bound se)))\n      (fun n =>\n         synth_stmt_spec_opt c5 dest _ (cdddddr wf)\n           (SpecTree.set id_it int_Z32_pair bound \n           (SpecTree.set id_end int_Z32_pair n se)))\n      start\n      bound\n      m\n  | CCfold tp _ id_it id_end id_recur id_dest e1 e2 e3 c4 =>\n    let htp := mk_hyper_type_pair tp in\n    fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n              let tmp'' := AList.set id_it int_Z32_pair tmp' in\n              let tmp''' := AList.set id_recur (mk_hyper_type_pair tp) tmp'' in\n              ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n               ((tmp'' ! id_recur ~~~ None) * ((tmp''' ! id_dest ~~~ None) *\n               (dest_not_exist dest tmp''' * (synth_stmt_pure c4 ~~~ true)))))) *\n              (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n               (synth_expr_wellformed tmp e3 * synth_stmt_wellformed c4 id_dest tmp'''))))\n        se =>\n    let start := synth_expr_spec me tmp e1 (cadr wf) se in\n    let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n    let init := synth_expr_spec me tmp e3 (cadddr wf) se in\n    let initial_se := SpecTree.set id_end int_Z32_pair bound se in\n    oZiteri (fold_step_opt initial_se start\n                          (synth_stmt_spec_opt c4 id_dest _ (cddddr wf)))\n           (bound - start)\n           init\n  | CCcall argt ret prim args =>\n    fun wf se =>\n      let argv := map2_synth_expr_spec args se wf in\n      prim.(PRIMsem_opt) argv me\n  \n  | CCtransfer e1 e2 =>\n    fun (wf : synth_expr_wellformed tmp e1 *\n              synth_expr_wellformed tmp e2)\n        se =>\n      d <- get ;;\n      let (success , d') :=\n          me_transfer me\n                      (synth_expr_spec me tmp e1 (car wf) se)\n                      (synth_expr_spec me tmp e2 (cdr wf) se)\n                      d in\n      if (Int256.eq success Int256.one)\n      then put d'\n      else mzero\n  | CCyield tp _ e =>\n    fun wf se =>\n      ret (synth_expr_spec me tmp e wf se)\n  | CCconstr _ _ _ _ el flds constr =>\n    fun wf se =>\n      let l := synth_lexpr_spec me tmp el (car wf) se in\n      modify (l.(ltype_set)\n               (apply_curried_func\n                  constr\n                  (map2_synth_expr_spec flds se (cdr wf))))\n  | CCassert c =>\n    fun (wf: (synth_stmt_pure c ~~~ true) * synth_stmt_wellformed c dest tmp) se =>\n      v <- synth_stmt_spec_opt c dest tmp (cdr wf) se;;\n      guard v\n  | CCdeny c =>\n    fun (wf: (synth_stmt_pure c ~~~ true) * synth_stmt_wellformed c dest tmp) se =>\n      v <- synth_stmt_spec_opt c dest tmp (cdr wf) se;;\n      guard (negb v)\n  \n  | CCpanic _ _ => fun _ _ => mzero\n  | CCrespec _ tmp' c spec =>\n      fun (wf : ((tmp ~~~ tmp') * (synth_stmt_pure c ~~~ true)) *\n              synth_stmt_wellformed c dest tmp) se =>\n        m <- get;;\n        v <- spec (iso_f (caar wf) se);;\n        put m;;\n        ret v\n  | CCrespec_opt _ tmp' c spec =>\n    fun (wf : (tmp ~~~ tmp') * synth_stmt_wellformed c dest tmp) se =>\n      spec me (iso_f (car wf) se)\n  \nend %alist.\nDefinition synth_stmt_spec_ret {returns} (c : cmd_constr returns) dest tmp:\n  synth_stmt_wellformed c dest tmp -> spec_env_t tmp -> GetHighData -> tp_ft returns :=\n  fun wf se m =>\n    match evalStateT (synth_stmt_spec_opt c dest tmp wf se) m with\n    | Some v => v\n    | None => ht_default\n    end.\n  \nLemma fold_pure htp id_it id_recur tmp\n      (c:SpecTree.t (AList.set id_recur htp\n                    (AList.set id_it int_Z32_pair tmp)) -> DS (tp_ft htp))\n      (init:tp_ft htp) steps start:\n  (forall m v s se, runStateT (c se) m = ret (v, s) -> m = s) ->\n  forall m v s se, runStateT (oZiteri (@fold_step_opt htp tmp id_it id_recur se start c) steps init) m = ret (v, s) ->\n              m = s.\nProof. Admitted.\nLemma get_put_pure {A} {s v d} {f: DS A}:\n  runStateT (m <- get;; f ;; put m) d = ret (v, s) ->\n  d = s.\nProof. Admitted.\nLemma first_map_pure' (check: Z -> DS bool) start steps:\n  \n  forall m l s, runStateT (first_map check start (start + steps)) m = ret (l, s) ->\n           m = s.\nProof. Admitted.\nLemma first_map_pure (check: Z -> DS bool) start bound:\n  \n  forall m l s, runStateT (first_map check start bound) m = ret (l, s) ->\n           m = s.\nProof. Admitted.\n  \nFixpoint fold_CCcall_spec_ocond {tmp tps} es\n  : @fold_synth_expr_wellformed tmp tps es ->\n    OProp3 (HList tp_ft tps) (spec_env_t tmp) GetHighData ->\n    OProp2 (spec_env_t tmp) GetHighData :=\n  match es with\n  | HNil => fun _ acc => ounlift32a HNil acc\n  | HCons x ls e es =>\n    fun wf acc =>\n    let (wf, IHwf) := wf in\n    fold_CCcall_spec_ocond es IHwf\n      (omap3 (fun p args se m =>\n          p (HCons x _ (synth_expr_spec me _ e wf se) args) se m)\n        acc)\n  end.\n  \nLemma exists_impl {A} (P:A->Prop) (Q:A->Prop):\n  (forall x, Q x -> P x) ->\n  (exists x, Q x) ->\n  exists x, P x.\nProof. Admitted.\nLemma exists_impl2 {A B} (P:A->B->Prop) (Q:A->B->Prop):\n  (forall x y, Q x y -> P x y) ->\n  (exists x y, Q x y) ->\n  exists x y, P x y.\nProof. Admitted.\nLemma first_map_osT' (check: Z -> DS bool) start steps m:\n  (forall i, 0 <= i < steps -> exists v, runStateT (check (start+i)) m = ret (v, m)) ->\n  exists l, runStateT (first_map check start (start+steps)) m = ret (l, m).\nProof. Admitted.\nLemma first_map_osT (check: Z -> DS bool) start bound m:\n  (forall i, start <= i < bound -> exists v, runStateT (check i) m = ret (v, m)) ->\n  exists l, runStateT (first_map check start bound) m = ret (l, m).\nProof. Admitted.\nLemma first_map_osT_weak' (check: Z -> DS bool) start steps m:\n  (forall i, 0 <= i < steps -> exists v m', runStateT (check (start+i)) m = ret (v, m')) ->\n  exists l, runStateT (first_map check start (start+steps)) m = ret (l, m).\nProof. Admitted.\nLemma first_map_osT_weak (check: Z -> DS bool) start bound m:\n  (forall i, start <= i < bound -> exists v m', runStateT (check i) m = ret (v, m')) ->\n  exists l, runStateT (first_map check start bound) m = ret (l, m).\nProof. Admitted.\n  Lemma first_map_mid n (check: Z -> DS bool) start bound:\n    start <= n < bound ->\n    forall m v s, runStateT (first_map check start bound) m = ret (v, s) ->\n    exists v' s', runStateT (check n) m = ret (v', s').\n  Proof. Admitted.\n  Lemma some_injective_isomorphism {A}{a b : A} : Some a ~~~ Some b -> a ~~~ b.\n  Proof. Admitted.\n  Lemma set_lenv_cond tmp (se : SpecTree.t tmp) le i htp f v :\n    let set_se := SpecTree.set i htp f se in\n    let set_le := PTree.set i v le in\n      ht_ft_cond f ->\n      ht_rel f v ->\n      lenv_cond se le ->\n      lenv_cond set_se set_le.\n  Proof. Admitted.\n  Lemma unset_lenv_cond {tmp i htp f}{se : SpecTree.t tmp}{le} :\n      (tmp ! i ~~~ None)%alist ->\n      lenv_cond (SpecTree.set i htp f se) le -> lenv_cond se le.\n  Proof. Admitted.\n  \n  Lemma set_le_lenv_cond tmp (se : SpecTree.t tmp) le i v :\n      (tmp ! i)%alist ~~~ None -> lenv_cond se le -> lenv_cond se (PTree.set i v le).\n  Proof. Admitted.\n  \n  Lemma set_se_lenv_cond tmp (se : SpecTree.t tmp) le i htp f v :\n    let set_se := SpecTree.set i htp f se in\n      ht_ft_cond f ->\n      ht_rel f v ->\n      le ! i = Some v ->\n      lenv_cond se le ->\n      lenv_cond set_se le.\n  Proof. Admitted.\n  Lemma get_neq_idx_neq {tmp i j}{htp : hyper_type_pair} :\n    (tmp ! i)%alist ~~~ Some htp -> (tmp ! j)%alist ~~~ None -> i <> j.\n  Proof. Admitted.\n  Definition Z_to_val : Z -> val := @ht_implement tint_Z32 (int_Z_iso_impl _).\n  Lemma min_ex_elim_range {T} P lo hi Pdec (found_branch : Z -> T) not_found_branch :\n      ~ P lo ->\n      match LangDef.min_ex P lo hi Pdec with\n      | inleft (exist n _) => found_branch n\n      | inright _ => not_found_branch\n      end =\n      match LangDef.min_ex P (Z.succ lo) hi Pdec with\n      | inleft (exist m _) => found_branch m\n      | inright _ => not_found_branch\n      end.\n  Proof. Admitted.\n  \n  Fixpoint fold_expr_constr_list_cond {tmp tps} es\n    : @fold_synth_expr_wellformed tmp tps es ->\n      spec_env_t tmp -> Prop :=\n    match es with\n    | HNil => fun _ _ => True\n    | HCons x ls e es => fun wf se =>\n      let (wf, IHwf) := wf in\n      oProp1 (synth_expr_ocond me tmp e wf /\\\n    (omap1 (fun (p : unpair_ft (tp_type_pair x) -> Prop)\n                (y : spec_env_t tmp) =>\n              p\n                (synth_expr_spec me tmp e wf y))\n           ht_valid_ft_ocond) \n             )%oprop1 se /\\ \n      fold_expr_constr_list_cond es IHwf se\n    end.\n  Fixpoint synth_stmt_cond {returns}(c : cmd_constr returns) dest tmp :\n      synth_stmt_wellformed c dest tmp -> spec_env_t tmp -> GetHighData -> Prop :=\n    match c as t return synth_stmt_wellformed t dest tmp -> _ with\n    | CCskip => fun _ _ _ => True\n    | CClet _ tp _ id c1 c2 =>\n      fun (wf : let tmp' := AList.set id (mk_hyper_type_pair tp) tmp in\n                ((tmp ! id ~~~ None) * dest_not_exist dest tmp') *\n                (synth_stmt_wellformed c1 id tmp * synth_stmt_wellformed c2 dest tmp'))\n        se m =>\n      synth_stmt_cond c1 id _ (cadr wf) se m /\\\n      (forall v m1, runStateT (synth_stmt_spec_opt c1 id tmp (cadr wf) se) m = ret (v, m1) ->\n                    synth_stmt_cond c2 dest _ (cddr wf)\n                                    (SpecTree.set id (mk_hyper_type_pair tp) v se) m1)\n    | CCload tp _ e => fun wf se d =>\n      oProp1 (synth_lexpr_ocond me tmp e wf) se /\\\n      oProp1\n        ((synth_lexpr_spec me tmp e wf se).(ltype_set_ocond) /\\\n         (synth_lexpr_spec me tmp e wf se).(ltype_get_extra_ocond))%oprop1 d\n    | CCstore _ _ el er => fun wf se d =>\n      oProp1 (synth_lexpr_ocond me tmp el (car wf)) se /\\\n      oProp1 (synth_expr_ocond me tmp er (cdr wf)) se /\\\n      ht_valid_ft_cond (synth_expr_spec me tmp er (cdr wf) se) /\\\n      oProp1 (synth_lexpr_spec me tmp el (car wf) se).(ltype_set_ocond) d\n    | CCsequence _ c1 c2 =>\n      fun (wf : synth_stmt_wellformed c1 dest tmp * synth_stmt_wellformed c2 dest tmp)\n        se m =>\n      synth_stmt_cond c1 dest tmp (car wf) se m /\\\n      (forall m1, execStateT (synth_stmt_spec_opt c1 dest tmp (car wf) se) m = ret m1 ->\n        synth_stmt_cond c2 dest tmp (cdr wf) se m1)\n    | CCifthenelse _ e c_true c_false =>\n      fun (wf : synth_expr_wellformed tmp e *\n               (synth_stmt_wellformed c_true dest tmp * synth_stmt_wellformed c_false dest tmp))\n          se m =>\n      oProp1 (synth_expr_ocond me tmp e (car wf)) se /\\\n      (synth_expr_spec me tmp e (car wf) se = true ->\n        synth_stmt_cond c_true dest tmp (cadr wf) se m) /\\\n      (synth_expr_spec me tmp e (car wf) se = false ->\n        synth_stmt_cond c_false dest tmp (cddr wf) se m)\n    | CCfor id_it id_end e1 e2 c3 =>\n      fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n                let tmp'' := AList.set id_it int_Z32_pair tmp' in\n                ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n                 dest_not_exist dest tmp'')) *\n                (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n                 synth_stmt_wellformed c3 dest tmp'')))\n          se m =>\n      oProp1 (synth_expr_ocond me tmp e1 (cadr wf)) se /\\\n      oProp1 (synth_expr_ocond me tmp e2 (caddr wf)) se /\\\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       let initial_se := SpecTree.set id_end int_Z32_pair bound se in\n       forall n, start <= n < bound ->\n         forall m',\n           execStateT (Ziteri\n             (for_step_opt initial_se start (synth_stmt_spec_opt c3 dest _ (cdddr wf)))\n             (n - start)\n             (ret tt)) m = ret m' ->\n         synth_stmt_cond c3 dest _ (cdddr wf)\n           (SpecTree.set id_it int_Z32_pair n\n             (SpecTree.set id_end int_Z32_pair bound se)) m')\n    | CCfold tp _ id_it id_end id_recur id_dest e1 e2 e3 c4 =>\n      let htp := mk_hyper_type_pair tp in\n      fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n                let tmp'' := AList.set id_it int_Z32_pair tmp' in\n                let tmp''' := AList.set id_recur (mk_hyper_type_pair tp) tmp'' in\n                ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n                 ((tmp'' ! id_recur ~~~ None) * ((tmp''' ! id_dest ~~~ None) *\n                 (dest_not_exist dest tmp''' * (synth_stmt_pure c4 ~~~ true)))))) *\n                (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n                 (synth_expr_wellformed tmp e3 * synth_stmt_wellformed c4 id_dest tmp'''))))\n          se m =>\n      oProp1 (synth_expr_ocond me tmp e1 (cadr wf)) se /\\\n      oProp1 (synth_expr_ocond me tmp e2 (caddr wf)) se /\\\n      oProp1 (synth_expr_ocond me tmp e3 (cadddr wf)) se /\\\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n      let init := synth_expr_spec me tmp e3 (cadddr wf) se in\n      let initial_se := SpecTree.set id_end int_Z32_pair bound se in\n       forall n, start <= n < bound ->\n        forall recur,\n          evalStateT (oZiteri\n           (fold_step_opt initial_se start (synth_stmt_spec_opt c4 id_dest _ (cddddr wf)))\n           (n - start)\n           init) m = ret recur ->\n         synth_stmt_cond c4 id_dest _ (cddddr wf)\n           (SpecTree.set id_recur htp recur\n             (SpecTree.set id_it int_Z32_pair n initial_se))\n           m)\n    | CCcall argt ret prim args => fun wf se _ =>\n      fold_expr_constr_list_cond args wf se\n    \n    | CCyield tp _ e => fun wf se _ => oProp1 (synth_expr_ocond me tmp e wf) se\n    | CCconstr _ _ _ _ el flds _ =>\n      fun (wf : synth_lexpr_wellformed tmp el * fold_synth_expr_wellformed tmp flds)\n          se m =>\n      oProp1 (synth_lexpr_ocond me tmp el (car wf)) se /\\\n      oProp1 (synth_lexpr_spec me tmp el (car wf) se).(ltype_set_ocond) m /\\\n      fold_expr_constr_list_cond flds (cdr wf) se\n    | CCassert c => fun wf se m => synth_stmt_cond c dest tmp (cdr wf) se m\n    | CCdeny c => fun wf se m => synth_stmt_cond c dest tmp (cdr wf) se m\n    \n    | CCpanic _ _ => fun _ _ _ => True\n    | CCfirst _ id_it id_end id_dest e1 e2 c3 c4 c5 =>\n      fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n                let tmp'' := AList.set id_it int_Z32_pair tmp' in\n                ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n                 ((tmp'' ! id_dest ~~~ None) * (dest_not_exist dest tmp'' *\n                  ((synth_stmt_pure c3 ~~~ true)))))) *\n                (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n                 (synth_stmt_wellformed c3 id_dest tmp'' *\n                 (synth_stmt_wellformed c4 dest tmp'' *\n                  synth_stmt_wellformed c5 dest tmp'')))))\n          se m =>\n      oProp1 (synth_expr_ocond me tmp e1 (cadr wf)) se /\\\n      oProp1 (synth_expr_ocond me tmp e2 (caddr wf)) se /\\\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       (forall n, start <= n < bound ->\n         \n         synth_stmt_cond c3 id_dest _ (cadddr wf)\n           (SpecTree.set id_it int_Z32_pair n\n             (SpecTree.set id_end int_Z32_pair bound se)) m) /\\\n       (forall n, start <= n < bound  ->\n           synth_stmt_cond c4 dest _ (caddddr wf)\n             (SpecTree.set id_it int_Z32_pair n\n               (SpecTree.set id_end int_Z32_pair bound se)) m) /\\\n       (\n         synth_stmt_cond c5 dest _ (cdddddr wf)\n           (SpecTree.set id_it int_Z32_pair bound\n                         (SpecTree.set id_end int_Z32_pair bound se)) m))\n    | CCtransfer e1 e2 =>\n      fun (wf : synth_expr_wellformed tmp e1 *\n                 synth_expr_wellformed tmp e2)\n          se m =>\n      oProp1 (synth_expr_ocond me tmp e1 (car wf)) se /\\ oProp1 (synth_expr_ocond me tmp e2 (cdr wf)) se\n    | CCrespec _ tmp' c spec =>\n      fun (wf : ((tmp ~~~ tmp') * (synth_stmt_pure c ~~~ true)) *\n                synth_stmt_wellformed c dest tmp) =>\n      synth_stmt_cond c dest tmp (cdr wf)\n    | CCrespec_opt _ tmp' c spec =>\n      fun (wf : (tmp ~~~ tmp') * synth_stmt_wellformed c dest tmp) =>\n      synth_stmt_cond c dest tmp (cdr wf)\n    end %alist.\n  Inductive synth_stmt_CD (dest: positive) (tmp: AList.t hyper_type_pair) (se: spec_env_t tmp) (m: GetHighData):\n    forall {returns} (c: cmd_constr returns) (wf: synth_stmt_wellformed c dest tmp), Prop :=\n  | CDskip: forall wf, synth_stmt_CD dest tmp se m CCskip wf\n  | CDlet: forall r tp hti id c1 c2 wf,\n      synth_stmt_CD id tmp se m c1 (cadr wf) ->\n      (forall v m1, runStateT (synth_stmt_spec_opt c1 id tmp (cadr wf) se) m = ret (v, m1) ->\n                    synth_stmt_CD dest _ (SpecTree.set id (mk_hyper_type_pair tp) v se) m1 c2 (cddr wf)) ->\n      synth_stmt_CD dest tmp se m (@CClet _ r tp hti id c1 c2) wf\n  | CDload: forall tp hti e wf,\n      oProp1 (synth_lexpr_ocond me tmp e wf) se ->\n      oProp1\n        (ltype_set_ocond (synth_lexpr_spec me tmp e wf se) /\\\n         ltype_get_extra_ocond (synth_lexpr_spec me tmp e wf se))%oprop1 m ->\n      synth_stmt_CD dest tmp se m (@CCload _ tp hti e) wf\n  | CDstore: forall tp hti el er wf,\n      oProp1 (synth_lexpr_ocond me tmp el (car wf)) se ->\n      oProp1 (synth_expr_ocond me tmp er (cdr wf)) se ->\n      ht_valid_ft_cond (synth_expr_spec me tmp er (cdr wf) se) ->\n      oProp1 (ltype_set_ocond (synth_lexpr_spec me tmp el (car wf) se)) m ->\n      synth_stmt_CD dest tmp se m (@CCstore _ tp hti el er) wf\n  | CDsequence: forall r c1 c2 wf,\n      synth_stmt_CD dest tmp se m c1 (car wf) ->\n      (forall m1 v1, runStateT (synth_stmt_spec_opt c1 dest tmp (car wf) se) m = ret (v1, m1) ->\n                     synth_stmt_CD dest tmp se m1 c2 (cdr wf)) ->\n      synth_stmt_CD dest tmp se m (@CCsequence _ r c1 c2) wf\n  | CDifthenelse: forall r (e: @expr_constr _ tint_bool _) c_true c_false wf,\n      oProp1 (synth_expr_ocond me tmp e (car wf)) se ->\n      (synth_expr_spec me tmp e (car wf) se = true -> synth_stmt_CD dest tmp se m c_true (cadr wf)) ->\n      (synth_expr_spec me tmp e (car wf) se = false -> synth_stmt_CD dest tmp se m c_false (cddr wf)) ->\n      synth_stmt_CD dest tmp se m (@CCifthenelse _ r e c_true c_false) wf\n  | CDfor: forall id_it id_end\n                  (e1 e2: @expr_constr _ tint_Z32 _) (c3: @cmd_constr _ void_unit_pair) wf,\n      oProp1 (synth_expr_ocond me tmp e1 (cadr wf)) se ->\n      oProp1 (synth_expr_ocond me tmp e2 (caddr wf)) se ->\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       let initial_se := SpecTree.set id_end int_Z32_pair bound se in\n       forall n, start <= n < bound ->\n       forall v m',\n       runStateT\n         (Ziteri\n            (for_step_opt initial_se start\n               (synth_stmt_spec_opt c3 dest\n                  (AList.set id_it int_Z32_pair (AList.set id_end int_Z32_pair tmp)) \n                  (cdddr wf))) (n - start) (ret tt)) m = \n       ret (v, m') ->\n       synth_stmt_CD dest _\n                     (SpecTree.set id_it int_Z32_pair n (SpecTree.set id_end int_Z32_pair bound se))\n                     m' c3 (cdddr wf)) ->\n      synth_stmt_CD dest tmp se m (@CCfor _ id_it id_end e1 e2 c3) wf\n  | CDfirst: forall r id_it id_end id_dest\n                    (e1 e2: @expr_constr _ tint_Z32 _) c3 (c4 c5: @cmd_constr _ r) wf,\n      oProp1 (synth_expr_ocond me tmp e1 (cadr wf)) se ->\n      oProp1 (synth_expr_ocond me tmp e2 (caddr wf)) se ->\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       forall n,\n          start <= n < bound ->\n          synth_stmt_CD id_dest _\n                        (SpecTree.set id_it int_Z32_pair n (SpecTree.set id_end int_Z32_pair bound se))\n                        m c3 (cadddr wf)) ->\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       forall n,\n          start <= n < bound ->\n          synth_stmt_CD dest _\n                        (SpecTree.set id_it int_Z32_pair n (SpecTree.set id_end int_Z32_pair bound se))\n                        m c4 (caddddr wf)) ->\n      (let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       synth_stmt_CD dest _\n                     (SpecTree.set id_it int_Z32_pair bound (SpecTree.set id_end int_Z32_pair bound se))\n                     m c5 (cdddddr wf)) ->\n      synth_stmt_CD dest tmp se m (@CCfirst _ r id_it id_end id_dest e1 e2 c3 c4 c5) wf\n  | CDfold: forall tp hti id_it id_end id_recur id_dest\n                   (e1 e2: @expr_constr _ tint_Z32 _) e3 (c4: @cmd_constr _ (mk_hyper_type_pair tp)) wf,\n      oProp1 (synth_expr_ocond me tmp e1 (cadr wf)) se ->\n      oProp1 (synth_expr_ocond me tmp e2 (caddr wf)) se ->\n      oProp1 (synth_expr_ocond me tmp e3 (cadddr wf)) se ->\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       let init := synth_expr_spec me tmp e3 (cadddr wf) se in\n       let initial_se := SpecTree.set id_end int_Z32_pair bound se in\n       forall n : Z,\n         start <= n < bound ->\n       forall recur m',\n       runStateT\n         (oZiteri\n            (fold_step_opt initial_se start\n               (synth_stmt_spec_opt c4 id_dest\n                  (AList.set id_recur (mk_hyper_type_pair tp)\n                     (AList.set id_it int_Z32_pair (AList.set id_end int_Z32_pair tmp))) \n                  (cddddr wf))) (n - start) init) m = \n       ret (recur, m') ->\n       synth_stmt_CD id_dest _\n                     (SpecTree.set id_recur _ recur (SpecTree.set id_it int_Z32_pair n initial_se))\n                     m c4 (cddddr wf)) ->\n      synth_stmt_CD dest tmp se m (@CCfold _ tp hti id_it id_end id_recur id_dest e1 e2 e3 c4) wf\n  | CDcall: forall argts r prim args wf,\n      fold_expr_constr_list_cond args wf se ->\n      synth_stmt_CD dest tmp se m (@CCcall _ argts r prim args) wf\n  \n  | CDtransfer: forall e1 e2 wf,\n      oProp1 (synth_expr_ocond me tmp e1 (car wf)) se ->\n      oProp1 (synth_expr_ocond me tmp e2 (cdr wf)) se ->\n      synth_stmt_CD dest tmp se m (CCtransfer e1 e2) wf\n                    \n  | CDyield: forall tp hti e wf,\n      oProp1 (synth_expr_ocond me tmp e wf) se ->\n      synth_stmt_CD dest tmp se m (@CCyield _ tp hti e) wf\n  | CDconstr: forall tp hti fld_ids fld_tps el flds constr wf,\n      oProp1 (synth_lexpr_ocond me tmp el (car wf)) se ->\n      oProp1 (ltype_set_ocond (synth_lexpr_spec me tmp el (car wf) se)) m ->\n      fold_expr_constr_list_cond flds (cdr wf) se ->\n      synth_stmt_CD dest tmp se m (@CCconstr _ tp hti fld_ids fld_tps el flds constr) wf\n  | CDassert: forall c wf,\n      synth_stmt_CD dest tmp se m c (cdr wf) ->\n      synth_stmt_CD dest tmp se m (@CCassert _ c) wf\n  | CDdeny: forall c wf,\n      synth_stmt_CD dest tmp se m c (cdr wf) ->\n      synth_stmt_CD dest tmp se m (@CCdeny _ c) wf\n  \n  | CDpanic: forall tp hti wf, synth_stmt_CD dest tmp se m (@CCpanic _ tp hti) wf\n  | CDrespec: forall r tmp' (c: cmd_constr r) (spec: spec_env_t tmp' -> DS (tp_ft r)) (wf : (tmp ~~~ tmp') * (synth_stmt_pure c ~~~ true) * synth_stmt_wellformed c dest tmp),\n      synth_stmt_CD dest tmp se m c (cdr wf) ->\n      synth_stmt_CD dest tmp se m (@CCrespec _ r tmp' c spec) wf\n  | CDrespec_opt: forall r tmp' (c: cmd_constr r) (spec: machine_env GetHighData -> spec_env_t tmp' -> DS (tp_ft r)) (wf: (tmp ~~~ tmp') * synth_stmt_wellformed c dest tmp),\n      synth_stmt_CD dest tmp se m c (cdr wf) ->\n      synth_stmt_CD dest tmp se m (@CCrespec_opt _ r tmp' c spec) wf\n  .\n  Lemma synth_stmt_CD_cond r (c: cmd_constr r) dest tmp\n        (wf: synth_stmt_wellformed c dest tmp) (se: spec_env_t tmp) m:\n    synth_stmt_CD dest tmp se m c wf ->\n    synth_stmt_cond c dest tmp wf se m.\n  Proof. Admitted.\n  \n  Fixpoint synth_stmt_obligation {returns}(c : cmd_constr returns) dest tmp :\n      synth_stmt_wellformed c dest tmp -> spec_env_t tmp -> GetHighData -> Prop :=\n    match c as t return synth_stmt_wellformed t dest tmp -> _ with\n    | CCskip => fun _ _ _ => True\n    | CClet _ tp _ id c1 c2 =>\n      fun (wf : let tmp' := AList.set id (mk_hyper_type_pair tp) tmp in\n                ((tmp ! id ~~~ None) * dest_not_exist dest tmp') *\n                (synth_stmt_wellformed c1 id tmp * synth_stmt_wellformed c2 dest tmp'))\n        se m =>\n        synth_stmt_obligation c1 id _ (cadr wf) se m /\\\n        (forall v m', runStateT (synth_stmt_spec_opt c1 id tmp (cadr wf) se) m = ret (v, m') ->\n         synth_stmt_obligation c2 dest _ (cddr wf) (SpecTree.set id (mk_hyper_type_pair tp) v se) m')\n    | CCload tp _ e => fun wf se _ => True\n    | CCstore _ _ el er => fun _ _ _ => True\n    | CCsequence _ c1 c2 =>\n      fun (wf : synth_stmt_wellformed c1 dest tmp * synth_stmt_wellformed c2 dest tmp)\n        se m =>\n        synth_stmt_obligation c1 dest tmp (car wf) se m /\\\n        (forall m', execStateT (synth_stmt_spec_opt c1 dest tmp (car wf) se) m = ret m' ->\n         synth_stmt_obligation c2 dest tmp (cdr wf) se m')\n    | CCifthenelse _ e c_true c_false =>\n      fun (wf : synth_expr_wellformed tmp e *\n               (synth_stmt_wellformed c_true dest tmp * synth_stmt_wellformed c_false dest tmp))\n        se m =>\n        (synth_expr_spec me tmp e (car wf) se = true ->\n         synth_stmt_obligation c_true dest tmp (cadr wf) se m) /\\\n        (synth_expr_spec me tmp e (car wf) se = false ->\n         synth_stmt_obligation c_false dest tmp (cddr wf) se m)\n    | CCfor id_it id_end e1 e2 c3 =>\n      fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n                let tmp'' := AList.set id_it int_Z32_pair tmp' in\n                ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n                 dest_not_exist dest tmp'')) *\n                (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n                 synth_stmt_wellformed c3 dest tmp'')))\n          se m =>\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       let initial_se := SpecTree.set id_end int_Z32_pair bound se in\n       forall n, start <= n < bound ->\n         forall m', execStateT (Ziteri\n             (for_step_opt initial_se start (synth_stmt_spec_opt c3 dest _ (cdddr wf)))\n             (n - start)\n             (ret tt)) m = ret m' ->\n         synth_stmt_obligation c3 dest _ (cdddr wf)\n           (SpecTree.set id_it int_Z32_pair n\n             (SpecTree.set id_end int_Z32_pair bound se)) m')\n    | CCfold tp _ id_it id_end id_recur id_dest e1 e2 e3 c4 =>\n      let htp := mk_hyper_type_pair tp in\n      fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n                let tmp'' := AList.set id_it int_Z32_pair tmp' in\n                let tmp''' := AList.set id_recur (mk_hyper_type_pair tp) tmp'' in\n                ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n                 ((tmp'' ! id_recur ~~~ None) * ((tmp''' ! id_dest ~~~ None) *\n                 (dest_not_exist dest tmp''' * (synth_stmt_pure c4 ~~~ true)))))) *\n                (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n                 (synth_expr_wellformed tmp e3 * synth_stmt_wellformed c4 id_dest tmp'''))))\n          se m =>\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       let init := synth_expr_spec me tmp e3 (cadddr wf) se in\n       let initial_se := SpecTree.set id_end int_Z32_pair bound se in\n       forall n, start <= n < bound ->\n        forall recur,\n          evalStateT (oZiteri\n           (fold_step_opt initial_se start (synth_stmt_spec_opt c4 id_dest _ (cddddr wf)))\n           (n - start)\n           init) m = ret recur ->\n         synth_stmt_obligation c4 id_dest _ (cddddr wf)\n           (SpecTree.set id_recur htp recur\n             (SpecTree.set id_it int_Z32_pair n initial_se))\n           m)\n    | CCcall argt ret prim args => fun _ _ _ => True\n    \n    | CCtransfer _ _ => fun _ _ _ => True\n    | CCyield tp _ e => fun _ _ _ => True\n    | CCconstr _ _ _ _ el flds _ =>\n      fun (wf : synth_lexpr_wellformed tmp el * fold_synth_expr_wellformed tmp flds)\n          se m => True\n    | CCassert c =>\n      fun (wf: (synth_stmt_pure c ~~~ true) *\n             synth_stmt_wellformed c dest tmp) se m =>\n        synth_stmt_obligation c dest tmp (cdr wf) se m\n    | CCdeny c =>\n      fun (wf: (synth_stmt_pure c ~~~ true) *\n             synth_stmt_wellformed c dest tmp) se m =>\n        synth_stmt_obligation c dest tmp (cdr wf) se m\n    \n    | CCpanic _ _ => fun _ _ _ => True\n    | CCfirst _ id_it id_end id_dest e1 e2 c3 c4 c5 =>\n      fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n                let tmp'' := AList.set id_it int_Z32_pair tmp' in\n                ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n                 ((tmp'' ! id_dest ~~~ None) * (dest_not_exist dest tmp'' *\n                  ((synth_stmt_pure c3 ~~~ true)))))) *\n                (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n                 (synth_stmt_wellformed c3 id_dest tmp'' *\n                 (synth_stmt_wellformed c4 dest tmp'' *\n                  synth_stmt_wellformed c5 dest tmp'')))))\n          se m =>\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       (forall n, start <= n < bound ->\n         \n         synth_stmt_obligation c3 id_dest _ (cadddr wf)\n           (SpecTree.set id_it int_Z32_pair n\n             (SpecTree.set id_end int_Z32_pair bound se)) m) /\\\n       (forall n, start <= n < bound  ->\n           synth_stmt_obligation c4 dest _ (caddddr wf)\n             (SpecTree.set id_it int_Z32_pair n\n               (SpecTree.set id_end int_Z32_pair bound se)) m) /\\\n       (\n         synth_stmt_obligation c5 dest _ (cdddddr wf)\n           (SpecTree.set id_it int_Z32_pair bound\n             (SpecTree.set id_end int_Z32_pair bound se)) m))\n    | CCrespec _ tmp' c spec =>\n      fun (wf : ((tmp ~~~ tmp') * (synth_stmt_pure c ~~~ true)) *\n                synth_stmt_wellformed c dest tmp) se m =>\n      (forall se m, runStateT (synth_stmt_spec_opt c dest tmp (cdr wf) se) m =\n        runStateT (spec (iso_f (caar wf) se)) m) /\\\n      synth_stmt_obligation c dest _ (cdr wf) se m\n    | CCrespec_opt _ tmp' c spec =>\n      fun (wf : (tmp ~~~ tmp') * synth_stmt_wellformed c dest tmp) se m =>\n        (forall se m, runStateT (spec me (iso_f (car wf) se)) m =\n        runStateT (synth_stmt_spec_opt c dest _ (cdr wf) se) m) /\\\n      \n      synth_stmt_obligation c dest _ (cdr wf) se m\n    end %alist.\n  Inductive synth_stmt_RC (dest:positive) (tmp: AList.t hyper_type_pair) (se: spec_env_t tmp) (m: GetHighData):\n    forall {returns} (c: cmd_constr returns) (wf: synth_stmt_wellformed c dest tmp), Prop :=\n  | RCskip: forall wf,\n      synth_stmt_RC dest tmp se m CCskip wf\n  | RClet: forall r tp hti id c1 c2 wf,\n      synth_stmt_RC id _ se m c1 (cadr wf) ->\n      (forall v m',\n          runStateT (synth_stmt_spec_opt c1 id tmp (cadr wf) se) m = ret (v, m') ->\n          synth_stmt_RC dest _ (SpecTree.set id (mk_hyper_type_pair tp) v se) m' c2 (cddr wf)) ->\n      synth_stmt_RC dest tmp se m (@CClet _ r tp hti id c1 c2) wf\n  | RCload: forall tp hti e wf,\n      ht_ft_cond (ltype_get (synth_lexpr_spec me tmp e wf se) m) ->\n      synth_stmt_RC dest tmp se m (@CCload _ tp hti e) wf\n  | RCstore: forall tp hti el er wf,\n      synth_stmt_RC dest tmp se m (@CCstore _ tp hti el er) wf\n  | RCsequence: forall r c1 c2 wf,\n      (forall v' m', runStateT (synth_stmt_spec_opt c1 dest tmp (car wf) se) m = ret (v', m') ->\n      synth_stmt_RC dest tmp se m' c2 (cdr wf)) ->\n      synth_stmt_RC dest tmp se m (@CCsequence _ r c1 c2) wf\n  | RCifthenelse: forall r (e: @expr_constr _ tint_bool _) c_true c_false wf,\n      (synth_expr_spec me tmp e (car wf) se = true ->\n       synth_stmt_RC dest tmp se m c_true (cadr wf)) ->\n      (synth_expr_spec me tmp e (car wf) se = false ->\n       synth_stmt_RC dest tmp se m c_false (cddr wf)) ->\n      synth_stmt_RC dest tmp se m (@CCifthenelse _ r e c_true c_false) wf\n  | RCfor: forall id_it id_end\n                  (e1 e2: @expr_constr _ tint_Z32 _) (c3: @cmd_constr _ void_unit_pair) wf,\n      synth_stmt_RC dest tmp se m (@CCfor _ id_it id_end e1 e2 c3) wf\n  | RCfirst: forall r id_it id_end id_dest\n                    (e1 e2: @expr_constr _ tint_Z32 _) c3 (c4 c5: @cmd_constr _ r) wf,\n      oProp1 (synth_expr_ocond me tmp e1 (cadr wf)) se ->\n      oProp1 (synth_expr_ocond me tmp e2 (caddr wf)) se ->\n      let start := synth_expr_spec me tmp e1 (cadr wf) se in\n      let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n      (forall n, start <= n < bound  ->\n           synth_stmt_RC dest _\n             (SpecTree.set id_it int_Z32_pair n\n               (SpecTree.set id_end int_Z32_pair bound se))\n             m c4 (caddddr wf)) ->\n      (\n         synth_stmt_RC dest _\n           (SpecTree.set id_it int_Z32_pair bound\n             (SpecTree.set id_end int_Z32_pair bound se)) m c5 (cdddddr wf)) ->\n      synth_stmt_RC dest tmp se m (@CCfirst _ r id_it id_end id_dest e1 e2 c3 c4 c5) wf\n  | RCfold: forall tp hti id_it id_end id_recur id_dest\n                   (e1 e2: @expr_constr _ tint_Z32 _) e3 (c4: @cmd_constr _ (mk_hyper_type_pair tp)) wf,\n      oProp1 (synth_expr_ocond me tmp e1 (cadr wf)) se ->\n      oProp1 (synth_expr_ocond me tmp e2 (caddr wf)) se ->\n      oProp1 (synth_expr_ocond me tmp e3 (cadddr wf)) se ->\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       let init := synth_expr_spec me tmp e3 (cadddr wf) se in\n       let initial_se := SpecTree.set id_end int_Z32_pair bound se in\n       \n       forall n, start <= n < bound ->\n        forall recur,\n          evalStateT (oZiteri\n           (fold_step_opt initial_se start (synth_stmt_spec_opt c4 id_dest _ (cddddr wf)))\n           (n - start)\n           init) m = ret recur ->\n         synth_stmt_RC id_dest _\n           (SpecTree.set id_recur (mk_hyper_type_pair tp) recur\n             (SpecTree.set id_it int_Z32_pair n initial_se)) m c4 (cddddr wf)) ->\n      synth_stmt_RC dest tmp se m (@CCfold _ tp hti id_it id_end id_recur id_dest e1 e2 e3 c4) wf\n  | RCcall: forall argts r prim args wf,\n      ht_list_ft_cond (map2_synth_expr_spec args se wf) ->\n      ht_list_valid_ft_cond (map2_synth_expr_spec args se wf) ->\n      synth_stmt_RC dest tmp se m (@CCcall _ argts r prim args) wf\n  \n  | RCtransfer: forall (e1 e2: @expr_constr _ tint_U _) wf,\n      synth_stmt_RC dest tmp se m (CCtransfer e1 e2) wf\n                    \n  | RCyield: forall tp hti e wf,\n      oProp1 (synth_expr_ocond me tmp e wf) se ->\n      synth_stmt_RC dest tmp se m (@CCyield _ tp hti e) wf\n  | RCconstr: forall tp hti fld_ids fld_tps el flds constr wf,\n      synth_stmt_RC dest tmp se m (@CCconstr _ tp hti fld_ids fld_tps el flds constr) wf\n  | RCassert: forall c wf,\n      synth_stmt_RC dest tmp se m (@CCassert _ c) wf\n  | RCdeny: forall c wf,\n      synth_stmt_RC dest tmp se m (@CCdeny _ c) wf\n  | RCghost: forall c wf,\n      synth_stmt_RC dest tmp se m (@CCdeny _ c) wf\n  | RCpanic: forall tp hti wf,\n      synth_stmt_RC dest tmp se m (@CCpanic _ tp hti) wf\n  | RCrespec: forall r tmp' (c: cmd_constr r) (spec: spec_env_t tmp' -> DS (tp_ft r)) (wf : (tmp ~~~ tmp') * (synth_stmt_pure c ~~~ true) * synth_stmt_wellformed c dest tmp),\n      (forall v m', runStateT (spec (iso_f (caar wf) se)) m = ret (v, m') -> ht_ft_cond v) ->\n      synth_stmt_RC dest tmp se m (@CCrespec _ r tmp' c spec) wf\n  | RCrespec_opt: forall r tmp' (c: cmd_constr r) (spec: machine_env GetHighData -> spec_env_t tmp' -> DS (tp_ft r)) (wf: (tmp ~~~ tmp') * synth_stmt_wellformed c dest tmp),\n      (forall v m', runStateT (spec me (iso_f (car wf) se)) m = ret (v, m') -> ht_ft_cond v) ->\n      synth_stmt_RC dest tmp se m (@CCrespec_opt _ r tmp' c spec) wf\n  .\n  Fixpoint synth_stmt_ret_cond {returns}(c : cmd_constr returns) dest tmp :\n    synth_stmt_wellformed c dest tmp -> spec_env_t tmp -> GetHighData -> Prop :=\n    match c as t return synth_stmt_wellformed t dest tmp -> _ with\n    | CCskip => fun _ _ _ => True\n    | CClet _ tp _ id c1 c2 =>\n      fun (wf : let tmp' := AList.set id (mk_hyper_type_pair tp) tmp in\n                ((tmp ! id ~~~ None) * dest_not_exist dest tmp') *\n                (synth_stmt_wellformed c1 id tmp * synth_stmt_wellformed c2 dest tmp'))\n          se m =>\n        synth_stmt_ret_cond c1 id _ (cadr wf) se m /\\\n        forall v m', runStateT (synth_stmt_spec_opt c1 id tmp (cadr wf) se) m = ret (v, m') ->\n          synth_stmt_ret_cond c2 dest _ (cddr wf) (SpecTree.set id (mk_hyper_type_pair tp) v se) m'\n      \n    | CCload tp _ e => fun wf se m =>\n      ht_ft_cond (ltype_get (synth_lexpr_spec me tmp e wf se) m)\n    | CCstore _ _ el er => fun _ _ _ => True\n    | CCsequence _ c1 c2 =>\n      fun (wf : synth_stmt_wellformed c1 dest tmp * synth_stmt_wellformed c2 dest tmp)\n        se m =>\n        forall m', execStateT (synth_stmt_spec_opt c1 dest tmp (car wf) se) m = ret m' ->\n          synth_stmt_ret_cond c2 dest tmp (cdr wf) se m'\n      \n    | CCifthenelse _ e c_true c_false =>\n      fun (wf : synth_expr_wellformed tmp e *\n               (synth_stmt_wellformed c_true dest tmp * synth_stmt_wellformed c_false dest tmp))\n        se m =>\n      let obt := synth_stmt_ret_cond c_true dest tmp (cadr wf) se m in\n      let obf := synth_stmt_ret_cond c_false dest tmp (cddr wf) se m in\n      (synth_expr_spec me tmp e (car wf) se = true  -> obt) /\\\n      (synth_expr_spec me tmp e (car wf) se = false -> obf)\n    | CCfor id_it id_end e1 e2 c3 =>\n      fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n                let tmp'' := AList.set id_it int_Z32_pair tmp' in\n                ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n                 dest_not_exist dest tmp'')) *\n                (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n                 synth_stmt_wellformed c3 dest tmp'')))\n          se m => True\n        \n    | CCfold tp _ id_it id_end id_recur id_dest e1 e2 e3 c4 =>\n      let htp := mk_hyper_type_pair tp in\n      fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n                let tmp'' := AList.set id_it int_Z32_pair tmp' in\n                let tmp''' := AList.set id_recur (mk_hyper_type_pair tp) tmp'' in\n                ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n                 ((tmp'' ! id_recur ~~~ None) * ((tmp''' ! id_dest ~~~ None) *\n                 (dest_not_exist dest tmp''' * (synth_stmt_pure c4 ~~~ true)))))) *\n                (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n                 (synth_expr_wellformed tmp e3 * synth_stmt_wellformed c4 id_dest tmp'''))))\n          se m =>\n      oProp1 (synth_expr_ocond me tmp e1 (cadr wf)) se /\\\n      oProp1 (synth_expr_ocond me tmp e2 (caddr wf)) se /\\\n      oProp1 (synth_expr_ocond me tmp e3 (cadddr wf)) se /\\\n      (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       let init := synth_expr_spec me tmp e3 (cadddr wf) se in\n       let initial_se := SpecTree.set id_end int_Z32_pair bound se in\n       \n       forall n, start <= n < bound ->\n        forall recur,\n          evalStateT (oZiteri\n           (fold_step_opt initial_se start (synth_stmt_spec_opt c4 id_dest _ (cddddr wf)))\n           (n - start)\n           init) m = ret recur ->\n         synth_stmt_ret_cond c4 id_dest _ (cddddr wf)\n           (SpecTree.set id_recur htp recur\n             (SpecTree.set id_it int_Z32_pair n initial_se))\n           m)\n    | CCcall argt ret prim args => fun wf se _ =>\n     ht_list_ft_cond (map2_synth_expr_spec args se wf)\n    /\\ ht_list_valid_ft_cond (map2_synth_expr_spec args se wf)\n    | CCtransfer e1 e2 =>\n      fun (wf : synth_expr_wellformed tmp e1 * synth_expr_wellformed tmp e2)\n        se m =>\n        True\n    | CCyield tp _ e => fun wf se _ => oProp1 (synth_expr_ocond me tmp e wf) se\n    | CCconstr _ _ _ _ el flds _ => fun _ _ _ => True\n    | CCassert c => fun _ _ _ => True\n    | CCdeny c => fun _ _ _ => True\n    \n    | CCpanic _ _ => fun _ _ _ => True\n    | CCfirst _ id_it id_end id_dest e1 e2 c3 c4 c5 =>\n      fun (wf : let tmp' := AList.set id_end int_Z32_pair tmp in\n                let tmp'' := AList.set id_it int_Z32_pair tmp' in\n                ((tmp ! id_end ~~~ None) * ((tmp' ! id_it ~~~ None) *\n                 ((tmp'' ! id_dest ~~~ None) * (dest_not_exist dest tmp'' *\n                  ((synth_stmt_pure c3 ~~~ true)))))) *\n                (synth_expr_wellformed tmp e1 * (synth_expr_wellformed tmp e2 *\n                 (synth_stmt_wellformed c3 id_dest tmp'' *\n                 (synth_stmt_wellformed c4 dest tmp'' *\n                  synth_stmt_wellformed c5 dest tmp'')))))\n          se m =>\n       oProp1 (synth_expr_ocond me tmp e1 (cadr wf)) se /\\\n       oProp1 (synth_expr_ocond me tmp e2 (caddr wf)) se /\\ \n       (let start := synth_expr_spec me tmp e1 (cadr wf) se in\n       let bound := synth_expr_spec me tmp e2 (caddr wf) se in\n       \n       (forall n, start <= n < bound  ->\n           synth_stmt_ret_cond c4 dest _ (caddddr wf)\n             (SpecTree.set id_it int_Z32_pair n\n               (SpecTree.set id_end int_Z32_pair bound se)) m) /\\\n       (\n         synth_stmt_ret_cond c5 dest _ (cdddddr wf)\n           (SpecTree.set id_it int_Z32_pair bound\n             (SpecTree.set id_end int_Z32_pair bound se)) m))\n    \n    | CCrespec _ tmp' c spec =>\n      fun (wf : ((tmp ~~~ tmp') * (synth_stmt_pure c ~~~ true)) *\n                synth_stmt_wellformed c dest tmp) se m =>\n        (forall v m', runStateT (spec (iso_f (caar wf) se)) m = ret (v, m') -> ht_ft_cond v)\n    | CCrespec_opt _ tmp' c spec =>\n      fun (wf : (tmp ~~~ tmp') * synth_stmt_wellformed c dest tmp) se m =>\n        (forall v m', runStateT (spec me (iso_f (car wf) se)) m = ret (v, m') -> ht_ft_cond v)\n    end %alist.\n  Lemma synth_stmt_RC_ret_cond r (c: cmd_constr r) dest tmp\n        (wf: synth_stmt_wellformed c dest tmp) (se: spec_env_t tmp) m:\n      synth_stmt_RC dest tmp se m c wf ->\n      synth_stmt_ret_cond c dest tmp wf se m.\n  Proof. Admitted.\n  Lemma map2_synth_expr_spec_satisfies_ft_cond {tmp argt}\n    {arg : expr_constr_list argt}\n    (argc : expr_constr_prf_conj arg)\n    (wf : fold_synth_expr_wellformed tmp arg)\n    (se : spec_env_t tmp) :\n      fold_expr_constr_list_cond arg wf se ->\n      senv_cond se ->\n      ht_list_ft_cond (map2_synth_expr_spec arg se wf).\n  Proof. Admitted.\n  Lemma map2_synth_expr_spec_satisfies_valid_ft_cond {tmp argt}\n    {arg : expr_constr_list argt}\n    (argc : expr_constr_prf_conj arg)\n    (wf : fold_synth_expr_wellformed tmp arg)\n    (se : spec_env_t tmp) :\n      fold_expr_constr_list_cond arg wf se ->\n      senv_cond se ->\n      ht_list_valid_ft_cond (map2_synth_expr_spec arg se wf).\n  Proof. Admitted.\nLemma synth_stmt_spec_opt_pure {is_realizing returns htr}(c : cmd_constr returns) :\n    synth_stmt_pure c ~~~ true ->\n    cmd_constr_prf is_realizing returns htr c ->\n    forall dest tmp wf se d v' d',\n      runStateT (synth_stmt_spec_opt c dest tmp wf se) d = ret (v', d') ->\n      d = d'.\nProof. Admitted.\n  Lemma set_senv_cond tmp (se : SpecTree.t tmp) i htp v:\n    ht_ft_cond v ->\n    senv_cond se ->\n    senv_cond (SpecTree.set i htp v se).\n  Proof. Admitted.\n  \n  \nLemma for_mid_opt' {tmp id_it} (se : spec_env_t tmp):\n  let tmp' := AList.set id_it int_Z32_pair tmp in\n  forall f s0 start steps s,\n    steps >= 0 ->\n    runStateT (Ziteri (@for_step_opt _ id_it se start f)\n                       steps\n                       (ret tt)) s0 = ret (tt, s) ->\n    forall n, 0%Z <= n <= steps ->\n    exists s',\n      runStateT (Ziteri (@for_step_opt _ id_it se start f) n (ret tt)) s0 = ret (tt, s') /\\\n      runStateT (Ziteri (@for_step_opt _ id_it se (start+n) f) (steps-n) (ret tt)) s' = ret (tt, s).\nProof. Admitted.\n  \n  \n  \n  \n  Opaque AList.get.\n  \n  \nDefinition temp_env : Type := PTree.t val.\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  Lemma opt_bool_dec_t__f_none (x:option bool):\n    {x = Some true} + {x = Some false \\/ x = None}.\n  Proof. Admitted.\n  Lemma Z2Nat_nonpos_zero:\n    forall n, n <= 0%Z -> Z.to_nat n = 0%nat.\n  Proof. Admitted.\n  Lemma min_ex_empty P lo hi Pn:\n    lo >= hi ->\n    exists no_n, LangDef.min_ex P lo hi Pn = inright no_n.\n  Proof. Admitted.\n  Lemma min_ex_lo_satisfy (P:Z->Prop) lo hi Pdec\n        (lo_bound: lo <= lo < hi)\n        (lo_pass: P lo):\n    exists Q, LangDef.min_ex P lo hi Pdec = inleft (exist _ lo Q).\n  Proof. Admitted.\n  Lemma min_ex_skip_lo {A} {Ql: Z->A} {Qr: A} {P: Z->Prop} {lo hi Pdec}:\n    ~ P lo ->\n    match LangDef.min_ex P lo hi Pdec with\n    | inleft (exist first_n _) => Ql first_n\n    | inright _ => Qr\n    end =\n    match LangDef.min_ex P (Z.succ lo) hi Pdec with\n    | inleft (exist first_n _) => Ql first_n\n    | inright _ => Qr\n    end.\n  Proof. Admitted.\n  Definition synth_stmt_veri_cond\n      {returns}(c : cmd_constr returns) dest tmp wf se mh :=\n    \n    synth_stmt_cond c dest tmp wf se mh.\nEnd STMT_FUNC.\n"
  },
  {
    "path": "src/dune-project",
    "content": "(lang dune 2.6)\n(using menhir 2.1)\n(wrapped_executables false)\n"
  },
  {
    "path": "src/dune-workspace",
    "content": "(lang dune 2.6)\n(profile release)\n"
  },
  {
    "path": "src/lib/ArithInv.v",
    "content": "Require Import ZArith.  \nRequire Import cclib.Coqlib.\nRequire Import cclib.Integers.\n\nLemma Zgt_bool_false: forall n m : Z,  (n >? m)%Z = false -> (n <= m)%Z.\nProof.\n  intros.\n  assert (H1 := Zgt_cases n m).\n  rewrite H in H1.\n  auto.\nQed.\n\nLemma Zlt_bool_false: forall n m : Z,  (n <? m)%Z = false -> (n >= m)%Z.\nProof.\n  intros.\n  assert (H1 := Zlt_cases n m).\n  rewrite H in H1.\n  auto.\nQed.\n\nLemma zle_bool_false: forall n m : Z,  (proj_sumbool (zle n m)) = false -> (n > m)%Z.\nProof.\n  intros.\n  destruct (zle n m); [discriminate | assumption ].\nQed.\n\nLemma zle_bool_true: forall n m : Z,  (proj_sumbool (zle n m)) = true -> (n <= m)%Z.\nProof.\n  intros.\n  intros.\n  destruct (zle n m); [assumption| discriminate ].\nQed.\n\nLemma zlt_bool_false: forall n m : Z,  (proj_sumbool (zlt n m)) = false -> (n >= m)%Z.\nProof.\n  intros.\n  destruct (zlt n m); [discriminate | assumption ].\nQed.\n\nLemma zlt_bool_true: forall n m : Z,  (proj_sumbool (zlt n m)) = true -> (n < m)%Z.\nProof.\n  intros.\n  intros.\n  destruct (zlt n m); [assumption| discriminate ].\nQed.\n\nLemma Int256eq_true : forall x y, Int256.eq x y = true -> x = y.\nProof.\n  intros.\n  assert (FOO := Int256.eq_spec x y).\n  rewrite H in FOO.\n  assumption.\nQed.\n\nLemma Int256eq_false : forall x y, Int256.eq x y = false -> x <> y.\nProof.\n  intros.\n  assert (FOO := Int256.eq_spec x y).\n  rewrite H in FOO.\n  assumption.\nQed.\n\nLemma geb_ge: forall n m : Z, (n >=? m) = true -> n >= m.\nProof.\n  intros.\n  rewrite Z.geb_le in H. omega.\nQed.\n\nLemma ngeb_lt: forall n m : Z, (n >=? m) = false -> n < m.\nProof.\n  intros.\n  assert (H2:= Zge_cases n m).\n  rewrite H in H2.\n  auto.\nQed.\n\nLemma if_and : forall (a b : bool),\n    (if a then b else false) = true -> a = true /\\ b = true.\nProof.\n  destruct a, b; simpl; intros; auto.\nQed.\n\n\nLtac inv_arith :=\n  repeat match goal with\n          | [H : negb _ = true    |- _ ]  => rewrite Bool.negb_true_iff in H\n          | [H : negb _ = false   |- _ ]  => rewrite <- Bool.negb_false_iff in H\n          | [H : (andb _ _) = true  |- _ ]  => apply andb_prop in H; destruct H\n          | [H : (if _ then _ else false) = true |- _] => apply if_and in H; destruct H                                                                              \n\n          | [H : (Int256.eq _ _) = true |- _] => apply Int256eq_true in H\n          | [H : (Int256.eq _ _) = false |- _] => apply Int256eq_false in H\n\n          | [H : (_ >? _)%Z = true |- _]  =>  rewrite <- Zgt_is_gt_bool  in H\n          | [H : (_ >? _)%Z = false |- _] =>  apply Zgt_bool_false  in H\n          | [H : (_ <? _)%Z = true |- _]  =>  rewrite <- Zlt_is_lt_bool  in H\n          | [H : (_ <? _)%Z = false |- _] =>  apply Zlt_bool_false in H\n          | [H : (_ =? _)%Z = true |- _]  =>  rewrite Z.eqb_eq  in H\n          | [H : (_ =? _)%Z = false |- _] =>  rewrite Z.eqb_neq  in H\n          | [H : (_ >=? _)%Z = true |- _]  =>  apply geb_ge  in H\n          | [H : (_ >=? _)%Z = false |- _] =>  apply ngeb_lt  in H\n                                                                      \n          | [H : (proj_sumbool (zle _ _)) = true  |- _] => apply zle_bool_true in H\n          | [H : (proj_sumbool (zle _ _)) = false |- _] => apply zle_bool_false in H\n          | [H : (proj_sumbool (zlt _ _)) = true  |- _] => apply zlt_bool_true in H\n          | [H : (proj_sumbool (zlt _ _)) = false |- _] => apply zlt_bool_false in H\n          end.\n  \n"
  },
  {
    "path": "src/lib/IndexedMaps.v",
    "content": "(* *********************************************************************)\n(*                                                                     *)\n(*              The Compcert verified compiler                         *)\n(*                                                                     *)\n(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)\n(*                                                                     *)\n(*  Copyright Institut National de Recherche en Informatique et en     *)\n(*  Automatique.  All rights reserved.  This file is distributed       *)\n(*  under the terms of the GNU General Public License as published by  *)\n(*  the Free Software Foundation, either version 2 of the License, or  *)\n(*  (at your option) any later version.  This file is also distributed *)\n(*  under the terms of the INRIA Non-Commercial License Agreement.     *)\n(*                                                                     *)\n(* *********************************************************************)\n\n(** Applicative finite maps are the main data structure used in this\n  project.  A finite map associates data to keys.  The two main operations\n  are [set k d m], which returns a map identical to [m] except that [d]\n  is associated to [k], and [get k m] which returns the data associated\n  to key [k] in map [m].  In this library, we distinguish two kinds of maps:\n- Trees: the [get] operation returns an option type, either [None]\n  if no data is associated to the key, or [Some d] otherwise.\n- Maps: the [get] operation always returns a data.  If no data was explicitly\n  associated with the key, a default data provided at map initialization time\n  is returned.\n\n  In this library, we provide efficient implementations of trees and\n  maps whose keys range over the type [positive] of binary positive\n  integers or any type that can be injected into [positive].  The\n  implementation is based on radix-2 search trees (uncompressed\n  Patricia trees) and guarantees logarithmic-time operations.  An\n  inefficient implementation of maps as functions is also provided.\n*)\n\nRequire Export Coq.Program.Equality.\n\nRequire Import Coqlib.\nRequire Import Maps.\n\nRecord Isomorphism {A} (X Y : A) : Type := {\n  iso_f : forall F : A -> Type, F X -> F Y;\n  iso_g : forall F : A -> Type, F Y -> F X\n     (* := fun F => iso_f (fun x => F x -> F X) id *)\n}.\n\nArguments iso_f {_ _ _} _ [_] _.\nArguments iso_g {_ _ _} _ [_] _.\nCoercion iso_f : Isomorphism >-> Funclass.\n\nNotation \"X ~~~ Y\" := (Isomorphism X Y) (at level 70, no associativity).\n\nDefinition identity_automorphism {A X} : @Isomorphism A X X\n  := {| iso_f F fx := fx; iso_g f fx := fx |}.\n\nDefinition iso_concat {A}{X Y Z : A}(iso_xy : X ~~~ Y)(iso_yz : Y ~~~ Z) :=\n  {| iso_f F fx := iso_yz F (iso_xy F fx);\n     iso_g F fy := iso_g iso_xy (iso_g iso_yz fy) |}.\n\nDefinition iso_inverse {A}{X Y : A}(iso : X ~~~ Y) :=\n  {| iso_f := iso_g iso; iso_g := iso_f iso |}.\n\nNotation \"p @ q\" := (iso_concat p q) (at level 40, left associativity).\nNotation \"! p\" := (iso_inverse p) (at level 35, right associativity).\n\nDefinition isomorphism_compose {A}{X Y Z : A}(iso_xy : X ~~~ Y)\n  (iso_yz : Y ~~~ Z) :\n    forall F fx, iso_yz F (iso_xy F fx) = (iso_xy @ iso_yz) F fx.\nProof.\n  intros F fx; reflexivity.\nQed.\n\nLemma isomorphism_decidable_neq_absurd {A}{X Y : A}(dec : A -> bool) :\n  X ~~~ Y -> dec X = true -> dec Y = false -> False.\nProof.\n  intros iso dec_x dec_y.\n  set (F := fun Z : A => match dec Z with\n                         | true => True\n                         | false => False\n                         end).\n  assert (fx : F X).\n  { unfold F; rewrite dec_x; exact I. }\n\n  assert (fy : F Y).\n  { apply iso, fx. }\n\n  unfold F in fy.\n  rewrite dec_y in fy.\n  exact fy.\nQed.\n\n(** Defining the isomorphism using Leibniz equality means that we have to\n    rely on some properties of functors.  One of them, especially, is based\n    on paramatricity, which can't be proved inside Coq, and is axiomatized\n    as [functor_identity_paramatricity].\n\n    Hopefully it is consistent.  It implies eq_rect_eq, which is already\n    implied by proof irrelevance required by CompCert.\n*)\nAxiom functor_identity_paramatricity :\n  forall (A : Type)(X : A)(f : forall F, F X -> F X)\n    (F : A -> Type)(x : F X), x = f F x.\n\nModule AxiomImplication.\n  Lemma eq_rect_eq :\n      forall (U : Type) (p : U) (Q : U -> Type) (x : Q p) (h : p = p),\n      x = eq_rect p Q x p h.\n  Proof.\n    intros.\n    exact (functor_identity_paramatricity U p\n            (fun Q x => eq_rect p Q x p h) Q x).\n  Qed.\nEnd AxiomImplication.\n\nLemma isomorphism_identity_gf' {A}{X Y : A}(iso1 iso2 : X ~~~ Y)(F : A -> Type)\n    (x : F X) : x = iso_g iso1 (iso_f iso2 x).\nProof.\n  set (iso_comp := iso2 @ !iso1).\n  change (iso_g iso1 (iso_f iso2 x)) with (iso_f iso_comp x).\n  apply functor_identity_paramatricity.\nQed.\n\nLemma isomorphism_identity_fg' {A}{X Y : A}(iso1 iso2 : X ~~~ Y)(F : A -> Type)\n    (y : F Y) : y = iso_f iso1 (iso_g iso2 y).\nProof.\n  set (iso_comp := !iso1 @ iso2).\n  change (iso_f iso1 (iso_g iso2 y)) with (iso_g iso_comp y).\n  apply functor_identity_paramatricity.\nQed.\n\nLemma isomorphism_identity_gf {A}{X Y : A}(iso : X ~~~ Y)(F : A -> Type)\n    (x : F X) : x = iso_g iso (iso_f iso x).\nProof (isomorphism_identity_gf' iso iso F x).\n\nLemma isomorphism_identity_fg {A}{X Y : A}(iso : X ~~~ Y)(F : A -> Type)\n    (y : F Y) : y = iso_f iso (iso_g iso y).\nProof (isomorphism_identity_fg' iso iso F y).\n\nLemma isomorphism_unique {A}{X Y : A}(iso1 iso2 : X ~~~ Y)(F : A -> Type)\n    (x : F X) : iso_f iso1 x = iso_f iso2 x.\nProof.\n  transitivity (iso_f iso2 (iso_g iso2 (iso_f iso1 x))).\n    apply isomorphism_identity_fg.\n  f_equal; symmetry.\n  apply isomorphism_identity_gf'.\nQed.\n\nLemma isomorphism_injective {A}{X Y : A}(iso : X ~~~ Y) :\n    forall F x1 x2, iso F x1 = iso F x2 -> x1 = x2.\nProof.\n  intros F x1 x2 eq.\n  rewrite (isomorphism_identity_gf iso F x1).\n  rewrite eq.\n  symmetry; apply isomorphism_identity_gf.\nQed.\n\n(* To avoid useless definitions of inductors in extracted code. *)\nLocal Unset Elimination Schemes.\nLocal Unset Case Analysis Schemes.\n\n(** * An implementation of indexed trees over type [positive]\n    Element types are indexed by a tree [PTree.t A] along with a projection\n    [proj] that extract the actual [Type] from [A].  *)\nModule Type TypeProjection.\n  Variable A : Type.\n  Variable proj : A -> Type.\nEnd TypeProjection.\n\nModule IPTree(TP : TypeProjection).\n  Definition elt := positive.\n  Definition elt_eq := peq.\n\n  Definition OptionalType (a : option TP.A) : Type :=\n    match a with\n    | None => unit\n    | Some a' => TP.proj a'\n    end.\n\n  Inductive tree : PTree.t TP.A -> Type :=\n    | Leaf : tree PTree.Leaf\n    | Node : forall l r o, tree l -> OptionalType o -> tree r ->\n                           tree (PTree.Node l o r).\n\n  Arguments Node [l r].\n  Scheme tree_ind := Induction for tree Sort Prop.\n\n  Definition get_index {idx}(_ : tree idx) := idx.\n\n  Definition t := tree.\n\n  Definition empty : t (PTree.empty TP.A) := Leaf.\n\n  Fixpoint get {idx}(i : positive)(m : t idx){struct i} :\n      OptionalType (PTree.get i idx).\n  Proof.\n    destruct idx.\n    - destruct i; simpl; exact tt.\n    - set (tuple := match m in (tree t')\n                    return match t' with\n                           | PTree.Leaf => t PTree.Leaf * unit * t PTree.Leaf\n                           | PTree.Node l o r => t l * OptionalType o * t r\n                           end with\n                    | Leaf => ((Leaf, tt), Leaf)\n                    | Node _ _ _ m1 o0 m2 => ((m1, o0), m2)\n                    end).\n      destruct i; simpl; try apply get; apply tuple.\n  Defined.\n\n  Definition get_eq {idx}(i : positive){OA}(m : t idx) :\n      PTree.get i idx ~~~ OA -> OptionalType OA\n    := fun iso => iso OptionalType (get i m).\n\n  Fixpoint set {idx}(i : positive)(A : TP.A)(v : TP.proj A)(m : t idx){struct i} :\n      t (PTree.set i A idx).\n  Proof.\n    destruct idx.\n    - destruct i; simpl; apply Node; try apply (set _ i);\n        solve [ exact Leaf | exact tt | exact v ].\n    - set (tuple := match m in (tree t')\n                    return match t' with\n                           | PTree.Leaf => t PTree.Leaf * unit * t PTree.Leaf\n                           | PTree.Node l o r => t l * OptionalType o * t r\n                           end with\n                     | Leaf => ((Leaf, tt), Leaf)\n                     | Node _ _ _ m1 o0 m2 => ((m1, o0), m2)\n                     end).\n      destruct i; simpl; apply Node; try apply (set _ i);\n        solve [ apply tuple | exact v ].\n  Defined.\n\n  Fixpoint remove {idx}(i : positive)(m : t idx){struct i} :\n      t (PTree.remove i idx).\n  Proof.\n    (* Comments in between tactics roughly match cases of PTree.remove *)\n\n    destruct i; destruct idx.\n    (* match i, m with *)\n\n    (* | xI i, Leaf *)\n    - exact Leaf.\n    - set (tuple := match m in (tree t')\n                    return match t' with\n                           | PTree.Leaf => t PTree.Leaf * unit * t PTree.Leaf\n                           | PTree.Node l o r => t l * OptionalType o * t r\n                           end with\n                     | Leaf => (Leaf, tt, Leaf)\n                     | Node _ _ _ m1 o0 m2 => (m1, o0, m2)\n                     end).\n      set (m1 := fst (fst tuple)). set (o0 := snd (fst tuple)).\n      set (m2 := snd tuple).\n      simpl; destruct idx1. destruct o.\n    (* | xI i, Node (Some a) Leaf o0 m2 *)\n      + exact (Node _ m1 o0 (remove _ i m2)).\n    (* | xI i, Node None     Leaf _  m2 *)\n      + set (rm_i_r := PTree.remove i idx2).\n        (* match PTree.remove i r with *)\n        refine (match rm_i_r as t'\n                return (PTree.remove i idx2 ~~~ t' ->\n                        t match t' with\n                          | PTree.Leaf => PTree.Leaf\n                          | PTree.Node l o r => PTree.Node PTree.Leaf None\n                                                           (PTree.Node l o r)\n                          end) with\n        (* | PTree.Leaf *)\n                | PTree.Leaf => fun _ => Leaf\n                | PTree.Node l' o' r' => fun rm_iso => _ (* !!! *)\n                end identity_automorphism).\n        (* | mm *)\n        refine (Node None Leaf tt _).\n        apply rm_iso.\n        exact (remove _ i m2).\n        (* end *)\n    (* | xI i, Node o m1 o0 m2 *)\n      + exact (Node _ m1 o0 (remove _ i m2)).\n\n    (* | xO i, Leaf *)\n    - exact Leaf.\n    - set (tuple := match m in (tree t')\n                    return match t' with\n                           | PTree.Leaf => t PTree.Leaf * unit * t PTree.Leaf\n                           | PTree.Node l o r => t l * OptionalType o * t r\n                           end with\n                     | Leaf => (Leaf, tt, Leaf)\n                     | Node _ _ _ m1 o0 m2 => (m1, o0, m2)\n                     end).\n      set (m1 := fst (fst tuple)). set (o0 := snd (fst tuple)).\n      set (m2 := snd tuple).\n      simpl; destruct o. 2: destruct idx2.\n    (* | xO i, Node (Some a) m1 o0 m2 *)\n      + exact (Node _ (remove _ i m1) o0 m2).\n    (* | xO i, Node None     m1 _  m2 *)\n      + set (rm_i_l := PTree.remove i idx1).\n        (* match PTree.remove i l with *)\n        refine (match rm_i_l as t'\n                return (PTree.remove i idx1 ~~~ t' ->\n                        t match t' with\n                          | PTree.Leaf => PTree.Leaf\n                          | PTree.Node l o r => PTree.Node (PTree.Node l o r)\n                                                           None PTree.Leaf\n                          end) with\n        (* | PTree.Leaf *)\n                | PTree.Leaf => fun _ => Leaf\n                | PTree.Node l' o' r' => fun rm_iso => _ (* !!! *)\n                end identity_automorphism).\n        (* | mm *)\n        refine (Node None _ tt m2).\n        apply rm_iso.\n        exact (remove _ i m1).\n        (* end *)\n    (* | xO i, Node None m1 o0 m2 *)\n      + exact (Node None (remove _ i m1) tt m2).\n\n    (* | xH, Leaf *)\n    - exact Leaf.\n    - set (tuple := match m in (tree t')\n                    return match t' with\n                           | PTree.Leaf => t PTree.Leaf * unit * t PTree.Leaf\n                           | PTree.Node l o r => t l * OptionalType o * t r\n                           end with\n                     | Leaf => (Leaf, tt, Leaf)\n                     | Node _ _ _ m1 o0 m2 => (m1, o0, m2)\n                     end).\n      set (m1 := fst (fst tuple)). set (o0 := snd (fst tuple)).\n      set (m2 := snd tuple).\n      simpl; destruct idx1. destruct idx2.\n    (* | xH, Node o Leaf o0 Leaf *)\n      + exact Leaf.\n    (* | xH, Node o Leaf o0 m2 *)\n      + exact (Node None Leaf tt m2).\n    (* | xH, Node o m1   o0 m2 *)\n      + exact (Node None m1   tt m2).\n    (* end *)\n  Defined.\n\n  Fixpoint remove_eq {idx}(i : positive) A (m : t (PTree.set i A idx)){struct i} :\n      PTree.get i idx ~~~ None -> t idx.\n  Proof.\n    destruct i; simpl in m; unfold PTree.get; try fold (@PTree.get TP.A i);\n      destruct idx; try (intros _; exact Leaf).\n\n    (* xI i *)\n    - intros idx2_i_iso_none.\n      set (tuple := match m in (tree t')\n                    return match t' with\n                           | PTree.Leaf => t PTree.Leaf * unit * t PTree.Leaf\n                           | PTree.Node l o r => t l * OptionalType o * t r\n                           end with\n                     | Leaf => (Leaf, tt, Leaf)\n                     | Node _ _ _ m1 o0 m2 => (m1, o0, m2)\n                     end).\n      set (m1 := fst (fst tuple)). set (o0 := snd (fst tuple)).\n      set (m2 := snd tuple).\n      refine (Node _ m1 o0 _).\n      apply remove_eq with i A; assumption.\n    (* xO i *)\n    - intros idx1_i_iso_none.\n      set (tuple := match m in (tree t')\n                    return match t' with\n                           | PTree.Leaf => t PTree.Leaf * unit * t PTree.Leaf\n                           | PTree.Node l o r => t l * OptionalType o * t r\n                           end with\n                     | Leaf => (Leaf, tt, Leaf)\n                     | Node _ _ _ m1 o0 m2 => (m1, o0, m2)\n                     end).\n      set (m1 := fst (fst tuple)). set (o0 := snd (fst tuple)).\n      set (m2 := snd tuple).\n      refine (Node _ _ o0 m2).\n      apply remove_eq with i A; assumption.\n    (* xH *)\n    - intros o_iso_none.\n      set (tuple := match m in (tree t')\n                    return match t' with\n                           | PTree.Leaf => t PTree.Leaf * unit * t PTree.Leaf\n                           | PTree.Node l o r => t l * OptionalType o * t r\n                           end with\n                     | Leaf => (Leaf, tt, Leaf)\n                     | Node _ _ _ m1 o0 m2 => (m1, o0, m2)\n                     end).\n      set (m1 := fst (fst tuple)). set (m2 := snd tuple).\n      refine (Node _ m1 _ m2).\n      apply o_iso_none, tt.\n  Defined.\n  Global Arguments remove_eq {_} _ {_} _ _.\n\n  Theorem gempty (i : positive)(iso : PTree.Leaf ! i ~~~ None) :\n      iso OptionalType (get i empty) = tt.\n  Proof.\n    induction i; symmetry;\n      apply (functor_identity_paramatricity _ _ (iso_f iso) OptionalType).\n  Qed.\n\n  Lemma gleaf (i : positive)(iso : PTree.Leaf ! i ~~~ None) :\n      iso OptionalType (get i Leaf) = tt.\n  Proof (gempty i iso).\n\n  Theorem get_eq_fusion {idx OA OA'}(i : positive)(m : t idx)\n    (iso : PTree.get i idx ~~~ OA)(iso' : OA ~~~ OA') :\n      iso' OptionalType (get_eq i m iso) = get_eq i m (iso @ iso').\n  Proof.\n    unfold get_eq.\n    rewrite isomorphism_compose.\n    reflexivity.\n  Qed.\n\n  Theorem gss {idx A}(i : positive)(x : TP.proj A)(m : t idx)\n    (iso : (PTree.set i A idx) ! i ~~~ Some A) :\n      get i (set i A x m) = iso_g iso (F := OptionalType) x.\n  Proof.\n    generalize dependent idx; induction i.\n    - destruct m; simpl; auto.\n    - destruct m; simpl; auto.\n    - destruct m; simpl; intro iso;\n        apply (functor_identity_paramatricity _ _ (iso_g iso) OptionalType).\n  Qed.\n\n  Theorem gess' {idx A OA}(i : positive)(x : TP.proj A)(m : t idx)\n    iso (iso' : Some A ~~~ OA) :\n      get_eq i (OA := OA) (set i A x m) iso = iso' OptionalType x.\n  Proof.\n    unfold get_eq.\n    set (iso_comp := iso @ !iso').\n    rewrite (gss _ _ _ iso_comp).\n    symmetry.\n    apply (isomorphism_identity_fg iso _ (iso' OptionalType x)).\n  Qed.\n\n  Theorem gess {idx A}(i : positive)(x : TP.proj A)(m : t idx) iso :\n      get_eq i (OA := Some A) (set i A x m) iso = x.\n  Proof (gess' i x m iso identity_automorphism).\n\n  Definition gleaf_iso {i} : (@PTree.Leaf TP.A) ! i ~~~ None.\n  Proof. destruct i; exact identity_automorphism. Defined.\n\n  Theorem gso {idx A}(i j : positive)(x : TP.proj A)(m : t idx)\n      iso : i <> j -> get i (set j A x m) = iso_f iso (get i m).\n  Proof.\n    generalize dependent idx; generalize dependent j.\n    induction i.\n    - intros j idx m iso neq.\n      destruct idx.\n      + destruct j; simpl in * |- *.\n        * rewrite <- (gleaf i gleaf_iso).\n          set (iso_comp := (@gleaf_iso i) @ iso).\n          change (iso_f iso (iso_f gleaf_iso (get i Leaf))) with\n                 (iso_f iso_comp (get i Leaf)).\n          apply IHi; congruence.\n        * destruct i; apply functor_identity_paramatricity.\n        * destruct i; apply functor_identity_paramatricity.\n      + destruct j; simpl in * |- *.\n        * apply IHi; congruence.\n        * apply functor_identity_paramatricity.\n        * apply functor_identity_paramatricity.\n    - intros j idx m iso neq.\n      destruct m.\n      + destruct j; simpl in * |- *.\n        * destruct i; apply functor_identity_paramatricity.\n        * rewrite <- (gleaf i gleaf_iso).\n          set (iso_comp := (@gleaf_iso i) @ iso).\n          change (iso_f iso (iso_f gleaf_iso (get i Leaf))) with\n                 (iso_f iso_comp (get i Leaf)).\n          apply IHi; congruence.\n        * destruct i; apply functor_identity_paramatricity.\n      + destruct j; simpl in * |- *.\n        * apply functor_identity_paramatricity.\n        * apply IHi; congruence.\n        * apply functor_identity_paramatricity.\n    - intros j idx m iso neq.\n      destruct m.\n      + destruct j; simpl in * |- *.\n        * apply (functor_identity_paramatricity _ None _ OptionalType).\n        * apply (functor_identity_paramatricity _ None _ OptionalType).\n        * congruence.\n      + destruct j; simpl in * |- *.\n        * apply functor_identity_paramatricity.\n        * apply functor_identity_paramatricity.\n        * congruence.\n  Qed.\n\n  Theorem geso {idx A OA}(i j : positive)(x : TP.proj A)(m : t idx) iso iso' :\n      i <> j -> get_eq i (set j A x m) iso = @get_eq _ i OA m iso'.\n  Proof.\n    unfold get_eq.\n    intros neq.\n    rewrite (gso _ _ x m (iso' @ !iso) neq).\n    set (iso_comp := (iso' @ !iso) @ iso).\n    change (iso_f iso (iso_f (iso' @ !iso) (get i m))) with\n           (iso_f iso_comp (get i m)).\n    apply isomorphism_unique.\n  Qed.\n\n  Theorem gres {idx A}(i : positive)(m : t (PTree.set i A idx)) iso :\n      get i (remove_eq i m iso) = iso_g iso (F := OptionalType) tt.\n  Proof.\n    generalize dependent idx; induction i; destruct idx.\n    (* xI i, PTree.Leaf *)\n    - intros m iso.\n      apply (functor_identity_paramatricity _ _ (iso_g iso) OptionalType).\n    (* xI i, PTree.Node *)\n    - intros m; apply IHi.\n    (* xO i, PTree.Leaf *)\n    - intros m iso.\n      apply (functor_identity_paramatricity _ _ (iso_g iso) OptionalType).\n    (* xO i, PTree.Node *)\n    - intros m; apply IHi.\n    (* xH, PTree.Leaf *)\n    - intros m iso.\n      apply (functor_identity_paramatricity _ _ (iso_g iso) OptionalType).\n    (* xH, PTree.None *)\n    - intros m iso.\n      reflexivity.\n  Qed.\n\n  Theorem geres' {idx A OA}(i : positive)(m : t (PTree.set i A idx)) iso iso' :\n      get_eq i (OA := OA) (remove_eq i m iso) iso' = iso_g (!iso' @ iso) tt.\n  Proof.\n    unfold get_eq, iso_concat, iso_inverse, iso_g at 1, iso_g at 1.\n    f_equal.\n    apply gres.\n  Qed.\n\n  Theorem geres {idx A}(i : positive)(m : t (PTree.set i A idx)) iso :\n      get_eq i (OA := None) (remove_eq i m iso) iso = tt.\n  Proof.\n    rewrite (isomorphism_identity_fg iso OptionalType tt).\n    apply geres'.\n  Qed.\n\n  Lemma rleaf {A}(i : positive)(m : t (PTree.set i A PTree.Leaf)) iso :\n      remove_eq i m iso = Leaf.\n  Proof. destruct i; reflexivity. Qed.\n\n  Theorem greo {idx A}(i j : positive)(m : t (PTree.set j A idx)) iso iso' :\n      i <> j -> get i (remove_eq j m iso) = iso_f iso' (get i m).\n  Proof.\n    generalize dependent idx; generalize dependent j.\n    induction i; destruct idx.\n    (* xI i, PTree.Leaf *)\n    - intros m iso iso' neq.\n      destruct j; simpl.\n      + set (m2 := let (_, H) :=\n          match m in (tree t')\n          return match t' with\n                 | PTree.Leaf => t PTree.Leaf * unit * t PTree.Leaf\n                 | PTree.Node l o r => t l * OptionalType o * t r\n                 end with\n          | Leaf => (Leaf, tt, Leaf)\n          | Node l r o1 m1 o0 m2 => (m1, o0, m2)\n          end\n        in H).\n        assert (gleaf_iso OptionalType (get i (remove_eq j m2 gleaf_iso)) = tt).\n          destruct i; destruct j; simpl; reflexivity.\n        rewrite <- H at 1.\n        apply (isomorphism_injective (iso_inverse (@gleaf_iso i)) _\n                 (gleaf_iso OptionalType (get i (remove_eq j m2 gleaf_iso)))).\n        (* iso_f (!gleaf_iso) (iso_f gleaf_iso (get i ...)) => get i ... *)\n        unfold iso_inverse at 1, iso_f at 1;\n          rewrite <- (isomorphism_identity_gf (@gleaf_iso i)).\n        rewrite isomorphism_compose.\n        apply IHi; congruence.\n      + destruct i; apply (functor_identity_paramatricity _ _ iso' OptionalType).\n      + destruct i; apply (functor_identity_paramatricity _ _ iso' OptionalType).\n    (* xI i, PTree.Node *)\n    - intros m iso iso' neq.\n      destruct j; simpl.\n      + apply IHi; congruence.\n      + apply functor_identity_paramatricity.\n      + apply functor_identity_paramatricity.\n    (* xO i, PTree.Leaf *)\n    - intros m iso iso' neq.\n      destruct j; simpl.\n      + destruct i; apply (functor_identity_paramatricity _ _ iso' OptionalType).\n      + set (m1 := let (H, _) := let (H, _) :=\n          match m in (tree t')\n          return match t' with\n                 | PTree.Leaf => t PTree.Leaf * unit * t PTree.Leaf\n                 | PTree.Node l o r => t l * OptionalType o * t r\n                 end with\n          | Leaf => (Leaf, tt, Leaf)\n          | Node l r o1 m1 o0 m2 => (m1, o0, m2)\n          end\n        in H in H).\n        assert (gleaf_iso OptionalType (get i (remove_eq j m1 gleaf_iso)) = tt).\n          destruct i; destruct j; simpl; reflexivity.\n        rewrite <- H at 1.\n        apply (isomorphism_injective (iso_inverse (@gleaf_iso i)) _\n                 (gleaf_iso OptionalType (get i (remove_eq j m1 gleaf_iso)))).\n        (* iso_f (!gleaf_iso) (iso_f gleaf_iso (get i ...)) => get i ... *)\n        unfold iso_inverse at 1, iso_f at 1;\n          rewrite <- (isomorphism_identity_gf (@gleaf_iso i)).\n        rewrite isomorphism_compose.\n        apply IHi; congruence.\n      + destruct i; apply (functor_identity_paramatricity _ _ iso' OptionalType).\n    (* xO i, PTree.Node *)\n    - intros m iso iso' neq.\n      destruct j; simpl.\n      + apply functor_identity_paramatricity.\n      + apply IHi; congruence.\n      + apply functor_identity_paramatricity.\n    (* xH, PTree.Leaf *)\n    - intros m iso iso' neq.\n      destruct j; try congruence; simpl in m |- *;\n        dependent destruction m; destruct o0;\n        apply (functor_identity_paramatricity _ _ (iso_f iso') OptionalType).\n    (* xH, PTree.Node *)\n    - intros m iso iso' neq.\n      destruct j; simpl.\n      + apply (functor_identity_paramatricity _ _ (iso_f iso') OptionalType).\n      + apply (functor_identity_paramatricity _ _ (iso_f iso') OptionalType).\n      + congruence.\n  (* TODO: solve universe inconsistency *)\n  Admitted.\n\n  Theorem gereo {idx A OA}(i j : positive)(m : t (PTree.set j A idx))\n    iso iso' iso'' :\n      i <> j -> get_eq i (OA := OA) (remove_eq j m iso) iso'\n              = iso_f iso' (get_eq i m iso'').\n  Proof.\n    intros neq; unfold get_eq.\n    f_equal; apply greo; assumption.\n  Qed.\n\nEnd IPTree.\n\nModule PTreeAux.\n  Theorem smap1:\n    forall (A B: Type) (f: A -> B) (a: A) (i: PTree.elt) (m: PTree.t A),\n    PTree.set i (f a) (PTree.map1 f m) = PTree.map1 f (PTree.set i a m).\n  Proof.\n    induction i; destruct m; simpl; try rewrite <- IHi; reflexivity.\n  Qed.\nEnd PTreeAux.\n\nModule PMapAux.\n  Theorem smap:\n    forall (A B: Type) (f: A -> B) (a: A) (i: PMap.elt) (m: PMap.t A),\n    PMap.set i (f a) (PMap.map f m) = PMap.map f (PMap.set i a m).\n  Proof.\n    intros.\n    unfold PMap.map, PMap.set; simpl.\n    f_equal; apply PTreeAux.smap1.\n  Qed.\nEnd PMapAux.\n\nModule ZMapAux.\n  Theorem smap:\n    forall (A B: Type) (f: A -> B) (a: A) (i: ZMap.elt) (m: ZMap.t A),\n    ZMap.set i (f a) (ZMap.map f m) = ZMap.map f (ZMap.set i a m).\n  Proof.\n    intros.\n    apply PMapAux.smap.\n  Qed.\nEnd ZMapAux.\n"
  },
  {
    "path": "src/lib/LangDef.v",
    "content": "(* *********************************************************************)\n(*    DeepSpec, the language of certified softwares                    *)\n(*                                                                     *)\n(*      Shu-Chun Weng, Yale University                                 *)\n(*                                                                     *)\n(*  Copyright (c) 2013-2015 Shu-Chun Weng <shu-chun.weng@yale.edu>.    *)\n(*                                                                     *)\n(*  This program is free software; you can redistribute it and/or      *)\n(*  modify it under the terms of the GNU General Public License        *)\n(*  version 2 as published by the Free Software Foundation.  Note that *)\n(*  the only valid version of the GPL for this work is version 2, not  *)\n(*  v2.2 or v3.x or whatever.                                          *)\n(*                                                                     *)\n(*  This program is distributed in the hope that it will be useful,    *)\n(*  but WITHOUT ANY WARRANTY; without even the implied warranty of     *)\n(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)\n(*  GNU General Public License for more details.                       *)\n(*                                                                     *)\n(*  You should have received a copy of the GNU General Public License  *)\n(*  along with this program; if not, write to the Free Software        *)\n(*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,         *)\n(*  MA 02110-1301 USA.                                                 *)\n(* *********************************************************************)\n\n(* Standard library modules *)\nRequire Import BinInt.\nRequire        Omega.\n\n(* CompCert modules *)\n(*Require Import compcert.common.Events.*)\nRequire Import cclib.Coqlib.\n(*Require Import compcert.cfrontend.Clight.\nRequire Import compcert.cfrontend.ClightBigstep. *)\n\n(* CompCertX modules *)\n(* Require        compcertx.common.EventsX. *)\n\nLocal Open Scope Z_scope.\n\n\n(* TODO: figure out a better statement of these, and move them to the backend directory. *)\n\n(*\nDefinition exec_stmt `{compiler_config_ops : CompilerConfigOps}\n      m0 ge env le (m : mem) s t le' m' out\n  := let wbwim := EventsX.writable_block_with_init_mem_ops in\n     let wb := Events.writable_block_with_init_mem_writable_block_ops m0 in\n     ClightBigstep.exec_stmt ge (fun _ => function_entry2) env le m s t le' m' out.\n\nDefinition eval_funcall {mem}`{compiler_config_ops : CompilerConfigOps mem}\n      m0 ge (m : mem) f vargs t m' vres\n  := let wbwim := EventsX.writable_block_with_init_mem_ops in\n     let wb := Events.writable_block_with_init_mem_writable_block_ops m0 in\n     ClightBigstep.eval_funcall ge (fun _ => Clight.function_entry2)\n                                m f vargs t m' vres.\n*)\n\nLemma min_ex: forall (P: Z -> Prop) lo hi,\n    (forall n, {P n} + {~ P n}) ->\n    {n : Z | lo <= n < hi /\\ P n /\\ forall n', lo <= n' < n -> ~ P n'} +\n    {forall n, lo <= n < hi -> ~ P n}.\nProof.\n  intros.\n  assert(HP: forall k, 0 <= k ->\n      {n : Z | lo <= n < lo + k /\\ P n /\\ forall n' : Z, lo <= n' < n -> ~ P n'} +\n      {forall n : Z, lo <= n < lo + k -> ~ P n}).\n  apply natlike_rec2.\n  right.\n  intros.\n  omega.\n\n  intros z HR HT.\n  destruct HT.\n  left.\n  destruct s as [n[HT HM]].\n  exists n.\n  split; trivial.\n  omega.\n\n  specialize (H (lo + z)).\n  destruct H.\n  left.\n  exists (lo + z).\n  split; auto.\n  omega.\n\n  right.\n  intros.\n  destruct (zeq n1 (lo + z)).\n  subst.\n  trivial.\n  apply n.\n  omega.\n\n  destruct (zlt lo hi).\n  replace hi with (lo + (hi - lo)) by omega. apply HP. omega.\n  right; intros. omegaContradiction.\n\nQed.\n\nLemma min_ex_found_same:\n  forall (P: Z -> Prop) lo hi n1 n2,\n    (lo <= n1 < hi /\\ P n1 /\\ forall n', lo <= n' < n1 -> ~ P n') ->\n    (lo <= n2 < hi /\\ P n2 /\\ forall n', lo <= n' < n2 -> ~ P n') ->\n    n1 = n2.\nProof.\n  intros ? ? ? ? ? (n1_range & Pn1 & n1_first) (n2_range & Pn2 & n2_first).\n  destruct (Z.lt_total n1 n2) as [ ne | [ n_eq | ne ]]; try exact n_eq.\n  - exfalso.\n    refine (n2_first _ _ Pn1).\n    split; [ apply n1_range | apply ne ].\n  - exfalso.\n    refine (n1_first _ _ Pn2).\n    split; [ apply n2_range | apply ne ].\nQed.\n\nLemma min_ex_found_not_found_contradict:\n  forall (P: Z -> Prop) lo hi n,\n    (lo <= n < hi /\\ P n /\\ forall n', lo <= n' < n -> ~ P n') ->\n    (forall n, lo <= n < hi -> ~ P n) ->\n    False.\nProof.\n  intros ? ? ? ? (n_range & Pn & _) not_found.\n  eapply not_found; eassumption.\nQed.\n"
  },
  {
    "path": "src/lib/Lens.v",
    "content": "Require Import Coq.Program.Basics.\nRequire Import Coq.Classes.Morphisms.\nRequire Import Coq.Classes.RelationClasses.\nRequire Export Coq.Classes.RelationPairs.\nRequire Import Coq.Setoids.Setoid.\n\n(** * Interface *)\n\n(** Lenses are identified by the corresponding projection, which is\n  also used to define the [get] operation. Note that because we use\n  the letter [S] to denote the source type, which conflicts with the\n  successor function on [nat] from the standard library, we need to\n  use a verbose style below to avoid arguments being named [S0] or\n  something such. (This is an obvious software engineering quirk\n  with the way Coq generates identifier.) *)\n\nClass LensOps {S V: Type} (π: S -> V) := {\n  set: V -> S -> S\n}.\n\nArguments set {S V} π {_} _ _ : simpl never.\n\nClass LensSetGet {S V} π\n  `{lens_ops: LensOps S V π} :=\n{\n  lens_set_get s:\n    set π (π s) s = s\n}.\n\nClass LensGetSet {S V} π\n  `{lens_ops: LensOps S V π} :=\n{\n  lens_get_set v s:\n    π (set π v s) = v\n}.\n\nClass LensSetSet {S V} π\n  `{lens_set: LensOps S V π} :=\n{\n  lens_set_set u v s:\n    set π u (set π v s) = set π u s\n}.\n\nClass Lens {S V} π `{lens_ops: LensOps S V π} := {\n  lens_lens_set_get :> LensSetGet π;\n  lens_lens_get_set :> LensGetSet π;\n  lens_lens_set_set :> LensSetSet π\n}.\n\n\n(** * Theory *)\n\n(** ** Getters are measures, cf. [Coq.Classes.RelationPairs] *)\n\nInstance lens_get_measure {S V} `{LensOps S V}:\n  Measure (π).\n\n(** ** The [modify] operation *)\n\nSection MODIFY.\n  Context {S V π} `{HSV: Lens S V π}.\n\n  Definition modify (f: V -> V) (s: S) :=\n    set π (f (π s)) s.\n\n  Lemma lens_unfold_modify f s:\n    modify f s = set π (f (π s)) s.\n  Proof.\n    reflexivity.\n  Qed.\nEnd MODIFY.\n\nArguments modify {S V} π {_} _ _.\n\n(** ** The [same_context] relation *)\n\nSection SAMECONTEXT.\n  Context {S V π} `{lens_ops: LensOps S V π} `{HSV: LensSetSet S V π}.\n\n  Definition same_context: relation S :=\n    fun s t => forall v, set π v s = set π v t.\n\n  Lemma lens_set_same_context v s:\n    same_context (set π v s) s.\n  Proof.\n    intro u.\n    apply lens_set_set.\n  Qed.\n\n  Lemma lens_modify_same_context f s:\n    same_context (modify π f s) s.\n  Proof.\n    intro u.\n    unfold modify.\n    apply lens_set_set.\n  Qed.\n\n  Global Instance same_context_equiv: Equivalence same_context.\n  Proof.\n    split.\n    * intros s v.\n      reflexivity.\n    * intros s t Hst u.\n      symmetry; now auto.\n    * intros s1 s2 s3 H12 H23 u.\n      transitivity (set π u s2); now auto.\n  Qed.\n\n  Global Instance same_context_set_mor:\n    Proper (eq ==> same_context ==> eq) (set π).\n  Proof.\n    intros u v Huv s t Hst.\n    subst.\n    apply Hst.\n  Qed.\n\n  Global Instance same_context_modify_mor f:\n    Proper (same_context ==> same_context) (modify π f).\n  Proof.\n    intros s t Hst u.\n    unfold modify.\n    rewrite !lens_set_set.\n    apply Hst.\n  Qed.\nEnd SAMECONTEXT.\n\nArguments same_context {S V} π {_} _ _.\n\n(** ** Consequences of [LensGetSet] *)\n\nSection GETSET.\n  Context {S V} `{Hgs: LensGetSet S V}.\n\n  Lemma lens_get_modify f s:\n    π (modify π f s) = f (π s).\n  Proof.\n    apply lens_get_set.\n  Qed.\n\n  Theorem lens_eq_set (s: S) (u v: V):\n    set π u s = set π v s <-> u = v.\n  Proof.\n    split; intros.\n    * rewrite <- (lens_get_set u s).\n      rewrite <- (lens_get_set v s).\n      apply f_equal.\n      assumption.\n    * apply (f_equal (fun x => set π x s)).\n      assumption.\n  Qed.\nEnd GETSET.\n\n(** ** Consequences of [LensSetGet] *)\n\nSection SETGET.\n  Context {S V} `{HSV: LensSetGet S V}.\n\n  (* same_context ∧ (eq @@ π) ⇔ eq *)\n  Lemma lens_same_context_eq s1 s2:\n    same_context π s1 s2 ->\n    π s1 = π s2 ->\n    s1 = s2.\n  Proof.\n    intros Hc Hv.\n    rewrite <- (lens_set_get s1).\n    rewrite <- (lens_set_get s2).\n    rewrite Hv.\n    apply Hc.\n  Qed.\nEnd SETGET.\n\n(** ** Orthogonal lenses *)\n\n(** We say that two lenses on [S] are orthogonal when they give us\n  access to two independent parts of the larger structure [S],\n  ie. modifying one will not affect the other. The property\n  [lens_ortho_setr_setl] below is sufficient to express this.\n\n  Note that for any two orthogonal lenses [π] and [ρ], you should\n  never declare instances of both [OrthogonalLenses π ρ] and\n  [OrthogonalLenses ρ π], since that would produce a loop in the\n  [autorewrite] rules, which use [ortho_lenses_set_set]. *)\n\nClass Orthogonal {S U V} (π: S -> U) (ρ: S -> V)\n  `{πs: !LensOps π}\n  `{ρs: !LensOps ρ}: Prop :=\n{\n  lens_ortho_setr_setl u v s:\n    set ρ v (set π u s) = set π u (set ρ v s)\n}.\n\nSection ORTHOGONAL_LENSES.\n  Context {S U V} (π: S -> U) (ρ: S -> V).\n  Context `{πops: !LensOps π}.\n  Context `{ρops: !LensOps ρ}.\n  Context `{Hπρ: !Orthogonal π ρ}.\n\n  Lemma lens_ortho_getl_setr `{Hπgs: !LensGetSet π} `{Hπsg: !LensSetGet π} s v:\n    π (set ρ v s) = π s.\n  Proof.\n    rewrite <- (lens_set_get (π := π) s) at 1.\n    rewrite lens_ortho_setr_setl.\n    rewrite lens_get_set.\n    reflexivity.\n  Qed.\n\n  Lemma lens_ortho_getr_setl `{Hρgs: !LensGetSet ρ} `{Hρsg: !LensSetGet ρ} s u:\n    ρ (set π u s) = ρ s.\n  Proof.\n    rewrite <- (lens_set_get (π := ρ) s) at 1.\n    rewrite <- lens_ortho_setr_setl.\n    rewrite lens_get_set.\n    reflexivity.\n  Qed.\nEnd ORTHOGONAL_LENSES.\n\nHint Rewrite\n    @lens_get_set\n    @lens_set_get\n    @lens_set_set\n    @lens_unfold_modify\n    @lens_eq_set\n    @lens_set_same_context\n    @lens_modify_same_context\n  using typeclasses eauto : lens.\n\n\n(** * Tactics *)\n\n(** The [autorewrite] base above can be used for normalization,\n  however it is unable to handle some of the theorems related to\n  orthogonal lenses.\n\n  For example, we want to use [lens_ortho_getl_setr] to rewrite\n  occurences of [α (set β v s)], where [α] and [β] are orthogonal\n  lenses, into simply [α s]. However, our usual trick for combining\n  [autorewrite] and typeclass resolution does not work, because the\n  instance of [LensOps α] cannot be obtained by unification when using\n  [@lens_ortho_getl_setr], which means the premises contain\n  existentials and we would need [erewrite].\n\n  Furthermore, we wish to normalize series of nested [set] so that\n  their order matches the declared instances of [Orthogonal]. However,\n  rewriting with [@lens_ortho_setr_setl] will only match the first\n  pair, and fail if they are already in the right order (because a\n  corresponding instance of [Orthogonal] won't be found).\n\n  So we use the tactic below to apply those explicitely in addition\n  to using [autorewrite]. *)\n\nLtac lens_norm_ortho :=\n  repeat progress\n    match goal with\n      | H: context [set ?β ?v (set ?α ?u ?s)] |- _ =>\n        rewrite (lens_ortho_setr_setl u v s) in H\n      | |- context [set ?β ?v (set ?α ?u ?s)] =>\n        rewrite (lens_ortho_setr_setl u v s)\n      | H: context [?α (set ?β ?v ?s)] |- _ =>\n        rewrite (lens_ortho_getl_setr α β s v) in H\n      | |- context [?α (set ?β ?v ?s)] =>\n        rewrite (lens_ortho_getl_setr α β s v)\n      | H: context [?β (set ?α ?u ?s)] |- _ =>\n        rewrite (lens_ortho_getr_setl α β s u) in H\n      | |- context [?β (set ?α ?u ?s)] =>\n        rewrite (lens_ortho_getr_setl α β s u)\n    end.\n\nLtac lens_norm :=\n  repeat progress (simpl in *;\n                   lens_norm_ortho;\n                   autorewrite with lens in *).\n\nLtac lens_simpl :=\n  repeat progress (lens_norm; autorewrite with lens_simpl in *).\n\nLtac lens_unfold :=\n  repeat progress (lens_simpl; unfold set in *).\n\n\n(** * Instances *)\n\n(** ** Pairs *)\n\nSection PAIR.\n  Global Instance fst_lensops A B: LensOps (@fst A B) := {\n    set a x := (a, snd x)\n  }.\n\n  Global Instance fst_lens A B: Lens (@fst A B).\n  Proof.\n    split; split; intuition.\n  Qed.\n\n  Global Instance snd_lensops A B: LensOps (@snd A B) := {\n    set b x := (fst x, b)\n  }.\n\n  Global Instance snd_lens A B: Lens (@snd A B).\n  Proof.\n    split; split; intuition.\n  Qed.\n\n  (** Here are some product-specific theorems. *)\n\n  Lemma fst_same_context_eq_snd {A B} (x y: A * B):\n    same_context (@fst A B) x y <-> snd x = snd y.\n  Proof.\n    destruct x as [a1 b1].\n    destruct y as [a2 b2].\n    split; intro H.\n    * specialize (H a1).\n      inversion H.\n      reflexivity.\n    * intro a.\n      compute in *.\n      congruence.\n  Qed.\n\n  Lemma snd_same_context_eq_fst {A B} (x y: A * B):\n    same_context (@snd A B) x y <-> fst x = fst y.\n  Proof.\n    destruct x as [a1 b1].\n    destruct y as [a2 b2].\n    split; intro H.\n    * specialize (H b1).\n      inversion H.\n      reflexivity.\n    * intro b.\n      compute in *.\n      congruence.\n  Qed.\nEnd PAIR.\n\nHint Rewrite\n  @fst_same_context_eq_snd\n  @snd_same_context_eq_fst\n  : lens_simpl.\n\n(** ** Composing lens *)\n\nSection COMPOSE.\n  Context {A B C} (π: A -> B) (ρ: B -> C) `{Hπ: Lens _ _ π} `{Hρ: Lens _ _ ρ}.\n\n  Instance compose_lensops: LensOps (compose ρ π) := {\n    set c a := modify π (set ρ c) a\n  }.\n\n  Lemma lens_compose_get_simpl a:\n    compose ρ π a = ρ (π a).\n  Proof.\n    reflexivity.\n  Qed.\n\n  Lemma lens_compose_set_simpl c a:\n    set (compose ρ π) c a = modify π (set ρ c) a.\n  Proof.\n    reflexivity.\n  Qed.\n\n  Instance lens_compose_get_set: LensGetSet (compose ρ π).\n  Proof.\n    constructor; simpl; intros.\n    rewrite lens_compose_get_simpl.\n    rewrite lens_compose_set_simpl.\n    autorewrite with lens.\n    reflexivity.\n  Qed.\n\n  Instance lens_compose_set_get: LensSetGet (compose ρ π).\n  Proof.\n    constructor; simpl; intros.\n    rewrite lens_compose_get_simpl.\n    rewrite lens_compose_set_simpl.\n    autorewrite with lens.\n    reflexivity.\n  Qed.\n\n  Instance lens_compose_set_set: LensSetSet (compose ρ π).\n  Proof.\n    constructor; simpl; intros.\n    rewrite !lens_compose_set_simpl.\n    autorewrite with lens.\n    reflexivity.\n  Qed.\n\n  Instance lens_compose: Lens (compose ρ π) := {}.\nEnd COMPOSE.\n\nHint Rewrite\n    @lens_compose_get_simpl\n    @lens_compose_set_simpl\n  using typeclasses eauto : lens_simpl.\n\n(** ** Initial and terminal objects *)\n\nSection INITIAL.\n  Context {V: Type} (π: Empty_set -> V).\n\n  Global Instance lens_empty_ops: LensOps π := {\n    set a := Empty_set_rect _\n  }.\n\n  Global Instance lens_empty: Lens π.\n  Proof.\n    split; split; tauto.\n  Qed.\nEnd INITIAL.\n\nSection COPRODUCT.\n  Context {A B V} {α: A -> V} {β: B -> V}.\n  Context `{αops: LensOps A V α}.\n  Context `{βops: LensOps B V β}.\n\n  Definition fcoprod (f: A -> V) (g: B -> V): A + B -> V :=\n    fun s => match s with\n               | inl a => f a\n               | inr b => g b\n             end.\n\n  Notation \"[ f , g ]\" := (fcoprod f g).\n\n  Instance lens_coprod_ops: LensOps [α, β] := {\n    set v ab :=\n      match ab with\n        | inl a => inl (set α v a)\n        | inr b => inr (set β v b)\n      end\n  }.\n\n  Instance lens_coprod_get_set:\n    LensGetSet α ->\n    LensGetSet β ->\n    LensGetSet [α,β].\n  Proof.\n    constructor.\n    intros v [a|b];\n    unfold set; simpl.\n    * lens_norm; reflexivity.\n    * lens_norm; reflexivity.\n  Qed.\n\n  Instance lens_coprod_set_get:\n    LensSetGet α ->\n    LensSetGet β ->\n    LensSetGet [α,β].\n  Proof.\n    constructor.\n    intros [a|b];\n    unfold set; simpl.\n    * lens_norm; reflexivity.\n    * lens_norm; reflexivity.\n  Qed.\n\n  Instance lens_coprod_set_set:\n    LensSetSet α ->\n    LensSetSet β ->\n    LensSetSet [α,β].\n  Proof.\n    constructor.\n    intros u v [a|b];\n    unfold set; simpl;\n    f_equal.\n    * lens_norm; reflexivity.\n    * lens_norm; reflexivity.\n  Qed.\n\n  Global Instance lens_coprod:\n    Lens α ->\n    Lens β ->\n    Lens [α,β].\n  Proof.\n    constructor;\n    typeclasses eauto.\n  Qed.\nEnd COPRODUCT.\n\nSection TERMINAL.\n  Context {S: Type} (π: S -> unit).\n\n  Instance lens_unit_ops: LensOps (S := S) π := {\n    set u s := s\n  }.\n\n  Instance lens_unit: Lens π.\n  Proof.\n    assert (forall u v: unit, u = v) by (intros [] []; reflexivity).\n    firstorder.\n  Qed.\nEnd TERMINAL.\n\n(** Interestingly, the product only works for orthogonal lenses. *)\n\nSection PRODUCT.\n  Context {S A B} {α: S -> A} {β: S -> B}.\n  Context `{αops: LensOps S A α}.\n  Context `{βops: LensOps S B β}.\n\n  Definition fprod (f: S -> A) (g: S -> B): S -> A * B :=\n    fun s => (f s, g s).\n\n  Notation \"〈  f , g 〉\" := (fprod f g).\n\n  Instance lens_prod_ops: LensOps 〈α, β〉 := {\n    set ab s := set α (fst ab) (set β (snd ab) s)\n  }.\n\n  Ltac go :=\n    unfold set, fprod;\n    simpl;\n    lens_norm;\n    try reflexivity.\n\n  Instance lens_prod_get_set:\n    Orthogonal α β ->\n    LensSetGet β ->\n    LensGetSet α ->\n    LensGetSet β ->\n    LensGetSet 〈α,β〉.\n  Proof.\n    constructor.\n    intros [a b] s.\n    go.\n  Qed.\n\n  Instance lens_prod_set_get:\n    LensSetGet α ->\n    LensSetGet β ->\n    LensSetGet 〈α,β〉.\n  Proof.\n    constructor.\n    intros s.\n    go.\n  Qed.\n\n  Instance lens_prod_set_set:\n    Orthogonal α β ->\n    LensSetSet α ->\n    LensSetSet β ->\n    LensSetSet 〈α,β〉.\n  Proof.\n    constructor.\n    intros [a1 b1] [a2 b2] s.\n    go.\n  Qed.\n\n  Global Instance lens_prod:\n    Orthogonal α β ->\n    Lens α ->\n    Lens β ->\n    Lens 〈α,β〉.\n  Proof.\n    constructor;\n    typeclasses eauto.\n  Qed.\nEnd PRODUCT.\n"
  },
  {
    "path": "src/lib/Monad/Applicative.v",
    "content": "Set Implicit Arguments.\nSet Maximal Implicit Insertion.\n\nClass Applicative T :=\n{ pure : forall {A}, A -> T A\n; ap : forall {A B}, T (A -> B) -> T A -> T B\n}.\n\nModule ApplicativeNotation.\n  Notation \"f <*> x\" := (ap f x) (at level 51, right associativity).\nEnd ApplicativeNotation.\nImport ApplicativeNotation.\n\nSection applicative.\n  Context {T} {AT:Applicative T}.\n\n  Definition liftA {A B} (f:A -> B) (aT:T A) : T B := pure f <*> aT.\n  Definition liftA2 {A B C} (f:A -> B -> C) (aT:T A) (bT:T B) : T C := liftA f aT <*> bT.\nEnd applicative."
  },
  {
    "path": "src/lib/Monad/ContOptionMonad.v",
    "content": "(* *********************************************************************)\n(*    DeepSpec, the language of certified softwares                    *)\n(*                                                                     *)\n(*      Shu-Chun Weng, Yale University                                 *)\n(*                                                                     *)\n(*  Copyright (c) 2013-2015 Shu-Chun Weng <shu-chun.weng@yale.edu>.    *)\n(*                                                                     *)\n(*  This program is free software; you can redistribute it and/or      *)\n(*  modify it under the terms of the GNU General Public License        *)\n(*  version 2 as published by the Free Software Foundation.  Note that *)\n(*  the only valid version of the GPL for this work is version 2, not  *)\n(*  v2.2 or v3.x or whatever.                                          *)\n(*                                                                     *)\n(*  This program is distributed in the hope that it will be useful,    *)\n(*  but WITHOUT ANY WARRANTY; without even the implied warranty of     *)\n(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)\n(*  GNU General Public License for more details.                       *)\n(*                                                                     *)\n(*  You should have received a copy of the GNU General Public License  *)\n(*  along with this program; if not, write to the Free Software        *)\n(*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,         *)\n(*  MA 02110-1301 USA.                                                 *)\n(* *********************************************************************)\n\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadZero.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\nImport MonadNotation.\nOpen Scope monad_scope.\n\n(*****************************************)\n\n\n(** * The continuation-option monad\n    Equivalent to [ContT (Maybe a)] in Haskell *)\nDefinition ContOpt a := forall r, (a -> option r) -> option r.\n\n\nGlobal Instance Monad_ContOpt : Monad ContOpt :=\n  { ret A a := fun r k => k a\n  ; bind A B ma f  := fun r k => ma r (fun a => f a r k)\n  }.\n\nGlobal Instance Zero_ContOpt : MonadZero ContOpt :=\n  { mzero _A := fun r k => None }.\n\n(* Todo: replace uses of these functions with the typeclass ones. *)\nDefinition Csome {A}(a : A) : ContOpt A := fun r k => k a.\nDefinition Cnone {A}        : ContOpt A := fun r k => None.\n\nDefinition Cguard_sum {P Q}(b : {P} + {Q}) : ContOpt unit :=\n  fun r k => if b then k tt else None.\n\nDefinition Cbind {A B}(ma : ContOpt A)(f : A -> ContOpt B) : ContOpt B :=\n  fun r k => ma r (fun a => f a r k).\nDefinition Clift {A B}(f : A -> B) : ContOpt A -> ContOpt B :=\n  fun m => Cbind m (fun a => Csome (f a)).\n\nDefinition runContOpt {A}(m : ContOpt A) : option A := m A (@Some A).\nDefinition optContOpt {A}(a' : option A) : ContOpt A :=\n  fun r k =>\n    match a' with\n    | Some a => k a\n    | None   => None\n    end.\n\n(** - [Csome] is also known as [return] or [unit]\n    - [Cnone] is also known as [mzero]\n    - [Cbind] is also known as [bind]\n    - [optContOpt] is the left and right inverse of [runContOpt].\n*)\n\nLemma run_opt_ContOpt_ident {A}(a' : option A)\n    : runContOpt (optContOpt a') = a'.\nProof.\n  destruct a'; reflexivity.\nQed.\n\n(** How to represent that a [ContOpt] computation ruturns a certain value?\n    [ContOpt_Some_eq m a] is a proposition that [m] will never fail to produce\n    a result and the return value is [a].  This definition is not used, but the\n    body can be seen inlined in various places.\n\n    The other direction, with the equality on functions expressed extensionally,\n    [opt_run_ContOpt_ident_ext : forall A (m : ContOpt A) r k,\n    optContOpt (runContOpt m) r k = m r k], requires parametricity to prove. *)\nDefinition ContOpt_Some_eq {A}(m : ContOpt A)(a : A) : Prop :=\n  forall r k, m r k = k a.\n"
  },
  {
    "path": "src/lib/Monad/Functor.v",
    "content": "Set Implicit Arguments.\nSet Strict Implicit.\n\nSection functor.\n  Variable F : Type -> Type.\n\n  Class Functor : Type :=\n  { fmap : forall A B, (A -> B) -> F A -> F B }.\n\n  Definition ID {T : Type} (f : T -> T) : Prop :=\n    forall x, f x = x.\nEnd functor.\n\nModule FunctorNotation.\n  Notation \"f <$> x\" := (@fmap _ _ f x) (at level 51, right associativity).\nEnd FunctorNotation.\n"
  },
  {
    "path": "src/lib/Monad/Monad.v",
    "content": "Require Import DeepSpec.lib.Monad.Functor.\nRequire Import DeepSpec.lib.Monad.Applicative.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\nClass Monad (m : Type -> Type) : Type :=\n{ ret : forall {t}, t -> m t\n; bind : forall {t u}, m t -> (t -> m u) -> m u\n}.\n\nSection monadic.\n  Variable m : Type -> Type.\n  Context {M : Monad m}.\n\n  Definition liftM T U (f : T -> U) : m T -> m U :=\n    fun x => bind x (fun x => ret (f x)).\n\n  Definition liftM2 T U V (f : T -> U -> V) : m T -> m U -> m V :=\n    Eval cbv beta iota zeta delta [ liftM ] in\n      fun x y => bind x (fun x => liftM (f x) y).\n\n  Definition liftM3 T U V W (f : T -> U -> V -> W) : m T -> m U -> m V -> m W :=\n    Eval cbv beta iota zeta delta [ liftM2 ] in\n      fun x y z => bind x (fun x => liftM2 (f x) y z).\n\n  Definition apM {A B} (fM:m (A -> B)) (aM:m A) : m B :=\n    bind fM (fun f => liftM f aM).\n\n  Definition bind2 {A B C : Type} (ma : m (A * B)) (f : A -> B -> m C) : m C :=\n    bind ma (fun a => match a with | (x, y) => f x y end).\n\nEnd monadic.\n\nArguments bind2 {m M A B C} ma f.\n\nModule MonadNotation.\n\n  Delimit Scope monad_scope with monad.\n\n  Notation \"c >>= f\" := (@bind _ _ _ _ c f) (at level 50, left associativity) : monad_scope.\n  Notation \"f =<< c\" := (@bind _ _ _ _ c f) (at level 51, right associativity) : monad_scope.\n\n  Notation \"x <- c1 ;; c2\" := (@bind _ _ _ _  c1 (fun x => c2))\n    (at level 100, c1 at next level, right associativity) : monad_scope.\n\n  Notation \"e1 ;; e2\" := (_ <- e1%monad ;; e2%monad)%monad\n    (at level 100, right associativity) : monad_scope.\n\n  Notation \"'unpack' A , B <- y ;; z\" := (bind2 y (fun A => (fun B => z)))\n    (at level 100, A ident, B ident, y at next level, only parsing, right associativity) : monad_scope.\n\nEnd MonadNotation.\n\nInstance Functor_Monad {m} {M:Monad m} : Functor m :=\n  { fmap := @liftM _ _ }.\n\nInstance Applicative_Monad {m} {M:Monad m} : Applicative m :=\n{ pure := @ret _ _\n; ap := @apM _ _\n}.\n"
  },
  {
    "path": "src/lib/Monad/MonadExc.v",
    "content": "Require Import Monad.\n\nSet Implicit Arguments.\nSet Maximal Implicit Arguments.\n\nClass MonadExc E (m : Type -> Type) : Type :=\n{ raise : forall {T}, E -> m T\n; catch : forall {T}, m T -> (E -> m T) -> m T\n}.\n"
  },
  {
    "path": "src/lib/Monad/MonadInv.v",
    "content": "Require Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadLaws.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\nSection MonadInvDef.\n  Variable m : Type -> Type.\n  Variable M : Monad m.\n  Class MonadInvRet :=\n    monad_inv_ret:\n      forall {A} (x y: A),\n        ret x = ret y -> x = y.\n\n  Class MonadInvBind :=\n    monad_inv_bind_extract:\n      forall {A B} (f: A -> m B) (ma: m A) (b: B),\n        bind ma f = ret b -> {a | ma = ret a}.\n\n  Class MonadInvBindWeak :=\n    monad_inv_bind_weak:\n      forall {A B} (f: A -> m B) (ma: m A) (b: B),\n        bind ma f = ret b -> exists a, f a = ret b.\nEnd MonadInvDef.\n\nSection MonadInv.\n  Context `{HM: Monad}.\n  Context `{HMLaws: !MonadLaws HM}.\n  Context `{HMbind: !MonadInvBind HM}.\n  Context `{HMret: !MonadInvRet HM}.\n\n  Global Instance mond_inv_bind_inv_bind_weak:\n    MonadInvBindWeak HM.\n  Proof.\n    intros A B f ma b H.\n    destruct (monad_inv_bind_extract f ma b H) as [a Ha].\n    exists a. subst.\n    rewrite bind_of_return in H; tauto.\n  Qed.\n\n  Lemma monad_inv_bind {A B} (f: A -> m B) (ma: m A) (b: B):\n    bind ma f = ret b ->\n    {a | ma = ret a /\\ f a = ret b}.\n  Proof.\n    intros H.\n    destruct (monad_inv_bind_extract f ma b H) as [a Ha].\n    exists a.\n    split.\n    * assumption.\n    * subst.\n      rewrite bind_of_return in H; tauto.\n  Qed.\n\n  Lemma monad_inv_bind_iff {A B} (f: A -> m B) (ma: m A) (b: B):\n    bind ma f = ret b <->\n    exists a, ma = ret a /\\ f a = ret b.\n  Proof.\n    split.\n    * intros H.\n      apply monad_inv_bind in H.\n      destruct H; eauto.\n    * intros [a [Hma Hfa]].\n      subst.\n      rewrite bind_of_return; tauto.\n  Qed.\n  \n  Lemma monad_inv_bind_inv {A B} {f: A -> m B} {ma: m A} {a: A} {b: B}:\n    ma = ret a ->\n    f a = ret b ->\n    bind ma f = ret b.\n  Proof.\n    intros.\n    apply monad_inv_bind_iff.\n    exists a; tauto.\n  Qed.\n\n  Lemma monad_inv_ret_iff {A} (x y: A):\n    ret x = ret y <-> x = y.\n  Proof.\n    split.\n    apply monad_inv_ret; auto.\n    apply f_equal.\n  Qed.\n\n  (* this version is used in the backend part. *)\n  Lemma bind_some: forall A B (a: m A) (f: A -> m B) (b: B),\n      bind a f = ret b ->\n      exists a0, a = ret a0 /\\ f a0 = ret b.\n  Proof.\n    intros.\n    destruct (monad_inv_bind_extract _ _ _ H).\n    eexists.\n    split.\n    - eassumption.\n    - rewrite e in H.\n      rewrite (@bind_of_return _ _ HMLaws) in H.\n      assumption.\n  Qed. \n  \nEnd MonadInv.\n\n"
  },
  {
    "path": "src/lib/Monad/MonadLaws.v",
    "content": "Require Import FunctionalExtensionality.\n\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadTrans.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.MonadReader.\nRequire Import DeepSpec.lib.Monad.MonadZero.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\nSection MonadLaws.\n  Variable m : Type -> Type.\n  Variable M : Monad m.\n\n  Class MonadLaws : Type :=\n    { bind_of_return : forall A B,\n    forall (a:A) (f:A -> m B),\n     (bind (ret a) f) = (f a)\n  ; return_of_bind : forall A, \n    forall (aM:m A) (f:A -> m A),\n    (forall x, (f x) = (ret x)) ->\n    (bind aM f) = aM\n  ; bind_associativity :\n    forall A B C,\n      forall (aM:m A) (f:A -> m B) (g:B -> m C),\n      (bind (bind aM f) g) = (bind aM (fun a => bind (f a) g))\n  }.\n\n  (*\n  Add Parametric Morphism T U  (ML : MonadLaws) : (@bind _ _ T U)\n    with signature (eq ==> (eq ==> eq) ==> eq)\n      as bind_morph.\n  Proof. intros.\n         red in H.\n         firstorder.\n    eapply bind_proper; auto. Qed.\n\n  Add Parametric Morphism T U (tT : type T) (tU : type U) (tokT : typeOk tT) (tokU : typeOk tU) (ML : MonadLaws) (c : m T) (Pc : proper c) : (@bind _ _ T U c)\n    with signature ((equal ==> equal) ==> equal)\n      as bind_1_morph.\n  Proof.\n    eapply bind_proper; auto. eapply preflexive; [ | eapply Pc ].\n    eapply equiv_prefl; auto.\n  Qed.\n\n  Add Parametric Morphism T (tT : type T) (tokT : typeOk tT) (ML : MonadLaws) : (@ret _ _ T)\n    with signature (equal ==> equal)\n      as ret_morph.\n  Proof. eapply ret_proper; auto. Qed.\n\n   *)\n  \n  Class MonadTLaws (n : Type -> Type)  (nM : Monad n) (MT : MonadT m n) : Type :=\n  { lift_ret  : forall T,\n    forall x : T,\n    (lift (ret x)) = (ret x)\n  ; lift_bind : forall T U,\n    forall (c : n T) (f : T -> n U),\n    (lift (bind c f)) = (bind (lift c) (fun x => lift (f x)))\n  }.\n\n  \n  Section with_state.\n    Context {S : Type}.\n\n    Class MonadStateLaws  (MS : MonadState S m) : Type :=\n    { get_put : (bind get put) = (ret tt)\n    ; put_get : forall x,\n      (bind (put x) (fun _ => get)) = (bind (put x) (fun _ => ret x))\n    ; put_put : forall A,\n      forall (x y : S) (f : unit -> m A), \n      (bind (put x) (fun _ => bind (put y) f)) =  (bind (put y) f)\n    ; get_get : forall A,\n      forall (f : S -> S -> m A),\n      (bind get (fun s => bind get (f s))) = (bind get (fun s => f s s))\n    ; get_ignore : forall A,\n      forall (aM : m A), \n      (bind get (fun _ => aM)) = aM\n    }.\n    \n    Class MonadReaderLaws (MR : MonadReader S m) : Type :=\n    { ask_local : forall f,\n      (local f ask) = (bind ask (fun x => ret (f x)))\n    ; local_bind : forall A B,\n        forall aM f (g : A -> m B), \n          (local f (bind aM g)) = (bind (local f aM) (fun x => local f (g x)))\n    ; local_ret : forall A,\n        forall (x : A) f,\n          (local f (ret x)) = (ret x)\n    ; local_local : forall T,\n      forall (s s' : S -> S) (c : m T),\n        (local s (local s' c)) = (local (fun x => s' (s x)) c)\n    }.\n\n  End with_state.\n\n  Class MonadZeroLaws (MZ : MonadZero m) : Type :=\n  { bind_zero : forall A B,\n    forall (f : A -> m B),\n    (bind mzero f) = mzero\n  }.\n\nEnd MonadLaws.\n\n\n\nHint Rewrite bind_of_return using assumption : monads.\nHint Rewrite bind_associativity using assumption : monads.\nHint Rewrite lift_ret using assumption : monads.\nHint Rewrite lift_bind using assumption : monads.\nHint Rewrite get_put using assumption : monads.\nHint Rewrite put_get using assumption : monads.\nHint Rewrite get_get using assumption : monads.\nHint Rewrite bind_zero using assumption : monads.\n\nLtac monad_simpl := \nrepeat (autorewrite with monads;\ntry match goal with\n  | |- context[@bind ?m ?mLaws ?A ?B ?a ?b] =>\n    match b with\n        | (fun x =>  _) =>\n          let E := fresh \"E\" in\n          let Heq := fresh \"H\" in\n          let x := fresh \"x\" in\n          evar(E : A -> m B);\n          assert (b = E) by (unfold E; extensionality x; autorewrite with monads; reflexivity);\n          unfold E in *;\n          rewrite Heq; clear Heq\n    end\nend).\n"
  },
  {
    "path": "src/lib/Monad/MonadPlus.v",
    "content": "Require Import DeepSpec.lib.Monad.Monad.\n\nSet Implicit Arguments.\nSet Maximal Implicit Arguments.\n\nClass MonadPlus (m : Type -> Type) : Type :=\n{ mplus : forall {A B:Type}, m A -> m B -> m (A + B)%type }.\n\nDefinition mjoin {m : Type -> Type} {M : Monad m} {MP : MonadPlus m} {T} (a b : m T) : m T :=\n  bind (mplus a b) (fun x =>\n    match x with\n      | inl x | inr x => ret x\n    end).\n\nModule MonadPlusNotation.\n  Notation \"x <+> y\" := (@mplus _ _ _ _ x y) (at level 49, right associativity) : monad_scope.\nEnd MonadPlusNotation.\n"
  },
  {
    "path": "src/lib/Monad/MonadReader.v",
    "content": "Require Import DeepSpec.lib.Monad.Monad.\n\nSet Implicit Arguments.\nSet Maximal Implicit Arguments.\n\nClass MonadReader (T : Type) (m : Type -> Type) : Type :=\n{ local : forall {t}, (T -> T) -> m t -> m t\n; ask : m T\n}.\n\nSection monadic.\n  Variable m : Type -> Type.\n  Context {M : Monad m}.\n  Variable T : Type.\n  Context {MR : MonadReader T m}.\n\n  Definition asks {U} (f : T -> U) : m U :=\n    bind ask (fun x => ret (f x)).\n\nEnd monadic.\n\nSection SubReader.\n  Variable m : Type -> Type.\n  Context {M : Monad m}.\n  Variable T S : Type.\n  Context {MR : MonadReader T m}.\n\n  Definition ReaderProd (f : T -> S) (g : S -> T -> T) \n    : MonadReader S m :=\n  {| ask := @asks m M T MR S f\n   ; local := fun _T up (c : m _T)  => @local T m MR _ (fun s => g (up (f s)) s) c\n   |}.\nEnd SubReader.\n"
  },
  {
    "path": "src/lib/Monad/MonadState.v",
    "content": "Require Import DeepSpec.lib.Monad.Monad.\n\nSet Implicit Arguments.\nSet Maximal Implicit Arguments.\n\nClass MonadState (T : Type) (m : Type -> Type) : Type :=\n{ get : m T\n; put : T -> m unit\n}.\n\nSection monadic.\n  Variable m : Type -> Type.\n  Context {M : Monad m}.\n  Variable T : Type.\n  Context {MS : MonadState T m}.\n\n  Definition modify (f : T -> T) : m unit :=\n    bind get (fun x => put (f x)).\n  Definition gets {U} (f : T -> U) : m U :=\n    bind get (fun x => ret (f x)).\n\nEnd monadic.\n\nSection SubState.\n  Variable m : Type -> Type.\n  Context {M : Monad m}.\n  Variable T S : Type.\n  Context {MS : MonadState T m}.\n\n  Definition StateProd (f : T -> S) (g : S -> T -> T) \n    : MonadState S m :=\n  {| get := @gets m M T MS S f\n   ; put := fun x => bind get (fun s => put (g x s))\n   |}.\nEnd SubState.\n"
  },
  {
    "path": "src/lib/Monad/MonadTrans.v",
    "content": "Require Import DeepSpec.lib.Monad.Monad.\n\nSet Implicit Arguments.\nSet Maximal Implicit Arguments.\n\nClass MonadT (m : Type -> Type) (mt : Type -> Type) : Type :=\n{ lift : forall {t}, mt t -> m t }.\n\n"
  },
  {
    "path": "src/lib/Monad/MonadZero.v",
    "content": "Require Import DeepSpec.lib.Monad.Monad.\n\nSet Implicit Arguments.\nSet Maximal Implicit Arguments.\n\nClass MonadZero (m : Type -> Type) : Type :=\n{ mzero : forall {T}, m T }.\n\nSection ZeroFuncs.\n  Context {m : Type -> Type}.\n  Context {Monad_m : Monad m}.\n  Context {Zero_m : MonadZero m}.\n\n  Definition guard (b : bool) : m unit :=\n    if b then ret tt else mzero.\n\nEnd ZeroFuncs."
  },
  {
    "path": "src/lib/Monad/OptErrMonad.v",
    "content": "(* This is basically the same thing as in the file EitherMonad.v, \n   but I wanted to use more explicit constructor names to keep things simple. *)\n\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadExc.\nRequire Import DeepSpec.lib.Monad.MonadInv.\nRequire Import Coq.Strings.String.\n\n\nInductive optErr (A:Type) :=\n| Success : A -> optErr A\n| Error : string -> optErr A.\n\nArguments Success {A} a.\nArguments Error {A} msg.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\nImport MonadNotation.\nOpen Scope monad_scope.\n\nGlobal Instance Monad_optErr : Monad optErr :=\n  { ret  := fun _ v => Success v\n  ; bind := fun _ _ c1 c2 => match c1 with\n                               | Error msg => Error msg\n                               | Success v => c2 v\n                             end\n  }.\n\nGlobal Instance Exception_optErr : MonadExc string optErr :=\n  { raise := fun _ v => Error v\n  ; catch := fun _ c h => match c with\n                            | Error v => h v\n                            | x => x\n                          end\n  }.\n\nGlobal Instance MonadInvBind_optErr: MonadInvBind Monad_optErr.\nProof.\n  unfold MonadInvBind. intros.\n  destruct ma.\n  - exists a. reflexivity.\n  - discriminate H.\nDefined.\n\nGlobal Instance MonadInvRet_optErr: MonadInvRet Monad_optErr.\nProof.\n  unfold MonadInvRet. simpl. intros.\n  injection H; auto.\nDefined.\n"
  },
  {
    "path": "src/lib/Monad/OptErrMonadLaws.v",
    "content": "Require Import FunctionalExtensionality.\n\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadTrans.\nRequire Import DeepSpec.lib.Monad.MonadLaws.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.lib.Monad.MonadPlus.\n\nRequire Import DeepSpec.lib.Monad.OptErrMonad.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\n\nSection Laws.\n  Variable m : Type -> Type.\n  Variable Monad_m : Monad m.\n  Variable ML_m : MonadLaws Monad_m.\n\n  Theorem equal_match : forall (A B : Type),\n    forall (x y : optErr A) (a b : B) (f g : A -> B),\n      x = y ->\n      a = b ->\n      f = g ->\n      match x with\n        | Success a => f a\n        | Error _ => a\n      end\n        =\n        match y with\n          | Success a => g a\n          | Error _ => b\n        end.\n  Proof.\n    destruct x; destruct y; simpl; intros; congruence.\n  Qed.\n\n  Global Instance MonadLaws_optErr : MonadLaws Monad_optErr.\n  Proof.\n    constructor.\n    { (* bind_of_return *)\n      intros. simpl. reflexivity. }\n    { (* return_of_bind *)\n      simpl; intros.\n      destruct aM; congruence. }\n    { (* bind_associativity *)\n      simpl; intros.\n      destruct aM; [destruct (f a)|]; congruence. }\n  Qed.\n  \nEnd Laws.\n"
  },
  {
    "path": "src/lib/Monad/OptionMonad.v",
    "content": "Require Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.lib.Monad.MonadPlus.\nRequire Import DeepSpec.lib.Monad.MonadInv.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\nImport MonadNotation.\nOpen Scope monad_scope.\n\nGlobal Instance Monad_option : Monad option :=\n{ ret  := @Some\n; bind := fun _ _ c1 c2 => match c1 with\n                             | None => None\n                             | Some v => c2 v\n                           end\n}.\n\nGlobal Instance Zero_option : MonadZero option :=\n{ mzero := @None }.\n\nGlobal Instance Plus_option : MonadPlus option :=\n{ mplus _A _B aM bM :=\n    match aM with\n    | None => liftM inr bM\n    | Some a => Some (inl a)\n    end\n}.\n\nGlobal Instance MonadInvBind_option: MonadInvBind Monad_option.\nProof.\n  unfold MonadInvBind. intros.\n  destruct ma.\n  - exists a. reflexivity.\n  - discriminate H.\nDefined.\n\nGlobal Instance MonadInvRet_option: MonadInvRet Monad_option.\nProof.\n  unfold MonadInvRet. simpl. intros.\n  injection H; auto.\nDefined.\n"
  },
  {
    "path": "src/lib/Monad/OptionMonadLaws.v",
    "content": "Require Import FunctionalExtensionality.\n\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadTrans.\nRequire Import DeepSpec.lib.Monad.MonadLaws.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.MonadZero.\nRequire Import DeepSpec.lib.Monad.MonadPlus.\n\nRequire Import DeepSpec.lib.Monad.OptionMonad.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\n\nSection Laws.\n  Variable m : Type -> Type.\n  Variable Monad_m : Monad m.\n  Variable ML_m : MonadLaws Monad_m.\n\n  Theorem equal_match : forall (A B : Type),\n    forall (x y : option A) (a b : B) (f g : A -> B),\n      x = y ->\n      a = b ->\n      f = g ->\n      match x with\n        | Some a => f a\n        | None => a\n      end\n        =\n        match y with\n          | Some a => g a\n          | None => b\n        end.\n  Proof.\n    destruct x; destruct y; simpl; intros; congruence.\n  Qed.\n\n  Global Instance MonadLaws_option : MonadLaws Monad_option.\n  Proof.\n    constructor.\n    { (* bind_of_return *)\n      intros. simpl. reflexivity. }\n    { (* return_of_bind *)\n      simpl; intros.\n      destruct aM; congruence. }\n    { (* bind_associativity *)\n      simpl; intros.\n      destruct aM; [destruct (f a)|]; congruence. }\n  Qed.\n\n  Global Instance MonadZeroLaws_option : MonadZeroLaws Monad_option _.\n  Proof.\n    constructor.\n    { (* bind_zero *)\n      simpl; intros; reflexivity. }\n  Qed.  \n  \nEnd Laws.\n"
  },
  {
    "path": "src/lib/Monad/RunStateTInv.v",
    "content": "Require Import DeepSpec.lib.Monad.StateMonadOption.\nImport DeepSpec.lib.Monad.Monad.MonadNotation.\n\nRequire Import MonadInv.\nRequire Import StateMonadOption.\n\nSection StateMonadOption.\n  Context {D : Type}.\n  Instance MosT : Monad (osT D) := Monad_stateT D Monad_option.\n  \n  Lemma gets_osT2 {A} {f: D -> A} {d s: D} {v: A}:\n    runStateT (gets f) d = ret (v, s) ->\n    f d = v /\\ d = s.\n  Proof.\n    intros H.\n    simpl in H.\n    injection H. auto.\n  Qed.\n\n  Lemma get_osT2 {d s v: D}:\n    runStateT (get) d = (ret (v, s) : option (D*D)) ->\n    d = v /\\ d = s.\n  Proof.\n    intros H.\n    simpl in H.\n    injection H. auto.\n  Qed.\n  \n  Lemma modify_osT {f: D -> D} {d s: D} {v: unit}:\n    runStateT (modify f) d = ret (v, s) ->\n    v = tt /\\ f d = s.\n  Proof.\n    intros H.\n    simpl in H.\n    injection H. auto.\n  Qed.\n\n  Lemma put_osT {f d s: D} {v: unit}:\n    runStateT (put f) d = (ret (v, s) : option (unit * D)) ->\n    v = tt /\\ f = s.\n  Proof.\n    intros H.\n    compute in H.\n    simpl in H.\n    injection H. auto.\n  Qed.\n \n  Lemma ret_osT  {A}  {d s: D} {v u: A}:\n    runStateT (ret v) d = ret (u, s) ->\n      v = u /\\ d = s.\n  Proof.\n    intros H.\n    simpl in H.\n    injection H.\n    auto.\n  Qed.\n\n  Lemma guard_pure_osT2 {b: bool} {d s: D} {v:unit}:\n    runStateT (guard b) d = ret (v, s) ->\n    b = true /\\ d = s.\n  Proof.\n    intros H.\n    unfold guard in H. simpl in H.\n    destruct b; simpl in H.\n    - injection H; auto.\n    - discriminate H.\n  Qed.\n\n  Import MonadNotation.\n\n\nLemma bind_runStateT : forall {A B} (m1 : osT D A) (m2 : A -> osT D B) d d' v,\n    runStateT m1 d = Some (v, d') ->\n    (runStateT (m1 >>= m2) d = runStateT (ret v >>= m2) d')  %monad.\nProof.\n  simpl.\n  intros.\n  rewrite H.\n  reflexivity.\nQed.\n  \nLemma bind_of_guard_true : forall A (m : unit -> osT D A),\n    (MonadZero.guard true >>= m)%monad = (m tt).\nProof.\nProof.\n  simpl.\n  intros.\n  destruct (m tt) as [f].\n  reflexivity.\nQed.\n\nLemma bind_gets_runStateT : forall A B (f : D -> A) (m : A -> osT D B) d,\n    runStateT (gets f >>= m)%monad d = runStateT (m (f d)) d.\nProof.\n  reflexivity.\nQed.\n\nLemma bind_modify_runStateT : forall B (f : D -> D) (m : unit -> osT D B) d,\n    runStateT (modify f >>= m)%monad d = runStateT (m tt) (f d).\nProof.\n  reflexivity.\nQed.\n\nEnd StateMonadOption.\n\n  (* For some reason, doing many \"destructs\" in ltac very slow. (I\n     guess maybe the type checking algorithm for \"match\" is trying do\n     something sophisticated? The runtime seems at least quadratic in\n     the size of the term.) So instead we provide each lemma as a\n     function you can \"apply\", this turns out to be much faster. *)\n  Lemma split_runStateT_curried :\n    forall {P : Prop} {D A B : Type} {c1 : osT D A} {c2 : A -> osT D B} {d s : D} {b : B},\n      runStateT (x <- c1;; c2 x) d = Some (b, s) ->\n      (forall (a : A) (m : D),\n          runStateT c1 d = ret (a, m) -> runStateT (c2 a) m = ret (b, s) -> P) ->\n      P.\n    Proof.\n      intros.\n      destruct (split_runStateT H) as [? [? [? ?]]].\n      eauto.\n    Qed.\n\n    Lemma get_osT2_curried :\n     forall {P  : Prop} {D : Type} {d s v : D},\n       runStateT (get (m:=osT D)) d = ret (v, s) ->\n                  (d = v -> d = s -> P) ->\n                  P.\n    Proof.\n      intros.\n      destruct (get_osT2 H).\n      eauto.\n    Qed.\n\n\n    Lemma put_osT_curried : forall {P:Prop} {D : Type} {f d s : D} {v : unit},\n        runStateT (put (m:=osT D) f) d = ret (v, s) ->\n        (v = tt -> f = s -> P) ->\n        P.\n    Proof.\n      intros.\n      destruct (put_osT H).\n      auto.\n    Qed.\n\n    Lemma guard_pure_osT2_curried : forall {P:Prop} {D : Type} {b : bool} {d s : D} {v : unit},\n        runStateT (guard (m:=osT D) b) d = ret (v, s) ->\n        (b = true -> d = s -> P) ->\n        P.\n    Proof.\n      intros.\n      destruct (guard_pure_osT2 H).\n      auto.\n    Qed.\n\n  Lemma gets_osT2_curried :\n     forall {P : Prop} {D A : Type} {f : D -> A} {d s : D} {v : A},\n      runStateT (gets (m:=osT D) f) d = ret (v, s) ->\n      (f d = v -> d = s -> P) -> P.\n    intros.\n    destruct (gets_osT2 H).\n    auto.\n  Qed.\n\n  Lemma modify_osT_curried : forall {P:Prop} {D : Type} {f : D -> D} {d s : D} {v : unit},\n      runStateT (modify (m:=osT D) f) d = ret (v, s) ->\n      (v = tt -> f d = s -> P) ->\n      P.\n  Proof.\n    intros.\n    destruct (modify_osT H).\n    auto.\n  Qed.\n\n  Lemma ret_osT_curried : forall {P:Prop} {D A : Type} {d s : D} {v u : A},\n      runStateT (ret (m:=osT D) v) d = Some (u, s)\n      -> (v = u -> d = s -> P) -> P.\n  Proof.\n    intros.\n    destruct (ret_osT H).\n    auto.\n  Qed.\n\n\n  (* The inv_runStateT1 version deals with a single hypothesis from the context,\n     without re-scanning all of them. *)\n  Ltac inv_runStateT1 H  :=\n    lazymatch type of H with\n      | (runStateT (bind _ _) _ = ret (_, _))    =>\n        let H1 := fresh H in\n        let H2 := fresh H in\n        apply (split_runStateT_curried H); intros ? ? H1 H2; clear H;\n        inv_runStateT1 H1;\n        inv_runStateT1 H2\n\n      | (runStateT (gets _) _   = ret (_, _))     =>\n        apply (gets_osT2_curried H); intros; clear H\n      | (runStateT get _        = ret (_, _))     =>\n        apply (get_osT2_curried H); intros; clear H\n      | (runStateT (ret _) _    = ret (_, _))     =>\n        apply (ret_osT_curried H); intros; clear H\n      | (runStateT (modify _) _ = ret (_, _))     =>\n        apply (modify_osT_curried H); intros; clear H\n      | (runStateT (put _) _    = ret (_, _))     =>\n        apply (put_osT_curried H); intros; clear H\n      | (runStateT (guard _) _  = ret (_, _))     =>\n        apply (guard_pure_osT2_curried H); intros; clear H\n\n      (* And the same for Some instead of ret. They are definitionally\n         equal, but match differently, so we include patterns for  both.*)\n      | (runStateT (bind _ _) _ = Some (_, _))    =>\n        let H1 := fresh H in\n        let H2 := fresh H in\n        apply (split_runStateT_curried H); intros ? ? H1 H2; clear H;\n        inv_runStateT1 H1;\n        inv_runStateT1 H2\n\n      | (runStateT (gets _) _   = Some (_, _))     =>\n        apply (gets_osT2_curried H); intros; clear H\n      | (runStateT get _        = Some (_, _))     =>\n        apply (get_osT2_curried H); intros; clear H\n      | (runStateT (ret _) _    = Some (_, _))     =>\n        apply (ret_osT_curried H); intros; clear H\n      | (runStateT (modify _) _ = Some (_, _))     =>\n        apply (modify_osT_curried H); intros; clear H\n      | (runStateT (put _) _    = Some (_, _))     =>\n        apply (put_osT_curried H); intros; clear H\n      | (runStateT (guard _) _  = Some (_, _))     =>\n        apply (guard_pure_osT2_curried H); intros; clear H\n    | _ => idtac\n    end.\n\n  (* The _branching variant also destruct if-statements. *)\n  Ltac inv_runStateT1_branching H  :=\n    lazymatch type of H with\n      | (runStateT (bind _ _) _ = ret (_, _))    =>\n        let H1 := fresh H in\n        let H2 := fresh H in\n        apply (split_runStateT_curried H); intros ? ? H1 H2; clear H;\n        inv_runStateT1_branching H1;\n        inv_runStateT1_branching H2\n      | (runStateT (gets _) _   = ret (_, _))     =>\n        apply (gets_osT2_curried H); intros; clear H\n      | (runStateT get _        = ret (_, _))     =>\n        apply (get_osT2_curried H); intros; clear H\n      | (runStateT (ret _) _    = ret (_, _))     =>\n        apply (ret_osT_curried H); intros; clear H\n      | (runStateT (modify _) _ = ret (_, _))     =>\n        apply (modify_osT_curried H); intros; clear H\n      | (runStateT (put _) _    = ret (_, _))     =>\n        apply (put_osT_curried H); intros; clear H\n      | (runStateT (guard _) _  = ret (_, _))     =>\n        apply (guard_pure_osT2_curried H); intros; clear H\n      | (runStateT (if ?b then _ else _) _ = ret _) =>\n        destruct b eqn:?;\n        inv_runStateT1_branching H\n\n      (* And the same for Some instead of ret. They are definitionally\n         equal, but match differently, so we include patterns for  both.*)\n      | (runStateT (bind _ _) _ = Some (_, _))    =>\n        let H1 := fresh H in\n        let H2 := fresh H in\n        apply (split_runStateT_curried H); intros ? ? H1 H2; clear H;\n        inv_runStateT1_branching H1;\n        inv_runStateT1_branching H2\n      | (runStateT (gets _) _   = Some (_, _))     =>\n        apply (gets_osT2_curried H); intros; clear H\n      | (runStateT get _        = Some (_, _))     =>\n        apply (get_osT2_curried H); intros; clear H\n      | (runStateT (ret _) _    = Some (_, _))     =>\n        apply (ret_osT_curried H); intros; clear H\n      | (runStateT (modify _) _ = Some (_, _))     =>\n        apply (modify_osT_curried H); intros; clear H\n      | (runStateT (put _) _    = Some (_, _))     =>\n        apply (put_osT_curried H); intros; clear H\n      | (runStateT (guard _) _  = Some (_, _))     =>\n        apply (guard_pure_osT2_curried H); intros; clear H\n      | (runStateT (if ?b then _ else _) _ = Some  _) =>\n        destruct b eqn:?;\n        inv_runStateT1_branching H\n    | _ => idtac        \n    end.\n\n\n(* strictly speaking the option monad is not really realated to RunStateT, \n   but it is used in the stmt_vc, so it is helpful to make invRunStateT \n   invert it also. *)\n\nLemma split_bind_option {A B} {c1: option A} {c2: A -> option B} {b: B}:\n    (@bind option OptionMonad.Monad_option _ _ c1 c2) = ret b ->\n    exists a, c1 = ret a /\\ (c2 a) = ret b.\nProof.\n  destruct c1.\n  + simpl.\n    eexists; split; auto.\n  + simpl. inversion 1.\nQed.\n\n  Ltac inv_runStateT :=\n    repeat match goal with\n           | [ H: (@bind option OptionMonad.Monad_option (_ * _) _ _ _) = ret _ |- _] => destruct (split_bind_option H) as [[? ?] [? ?]]; clear H\n\n           | [ H: (@bind option OptionMonad.Monad_option _ _ _ _) = ret _ |- _] => destruct (split_bind_option H) as [? [? ?]]; clear H\n\n           | [ H : runStateT _ _      = ret (_, _) |- _]         => inv_runStateT1 H\n           | [ H : execStateT _  _        = ret _ |- _]          => apply execStateT_runStateT in H; destruct H as [? ?]\n           | [ H : evalStateT _  _        = ret _ |- _]          => apply evalStateT_runStateT in H; destruct H as [? ?]\n           | [ H : evalStateT mzero  _    = ret _ |- _]          => discriminate H\n\n           (* The Some and ret constructors are definitionally equal, let's just match both.. *)\n           | [ H : runStateT  _  _        = Some (_, _) |- _]    => inv_runStateT1 H\n           | [ H : execStateT _  _        = Some _ |- _]         => apply execStateT_runStateT in H; destruct H as [? ?]\n           | [ H : evalStateT _  _        = Some _ |- _]         => apply evalStateT_runStateT in H; destruct H as [? ?]\n           | [ H : evalStateT mzero  _    = Some _ |- _]         => discriminate H\n\n           end.\n\n  Ltac inv_runStateT_branching :=\n    repeat match goal with\n           | [ H: (@bind option OptionMonad.Monad_option (_ * _) _ _ _) = ret _ |- _] => destruct (split_bind_option H) as [[? ?] [? ?]]; clear H\n\n           | [ H: (@bind option OptionMonad.Monad_option _ _ _ _) = ret _ |- _] => destruct (split_bind_option H) as [? [? ?]]; clear H\n\n           | [ H : runStateT _ _      = ret (_, _) |- _]         => inv_runStateT1_branching H\n           | [ H : execStateT _  _        = ret _ |- _]          => apply execStateT_runStateT in H; destruct H as [? ?]\n           | [ H : evalStateT _  _        = ret _ |- _]          => apply evalStateT_runStateT in H; destruct H as [? ?]\n           | [ H : evalStateT mzero  _    = ret _ |- _]          => discriminate H\n\n           (* The Some and ret constructors are definitionally equal, let's just match both.. *)\n           | [ H : runStateT  _  _        = Some (_, _) |- _]    => inv_runStateT1_branching H\n           | [ H : execStateT _  _        = Some _ |- _]         => apply execStateT_runStateT in H; destruct H as [? ?]\n           | [ H : evalStateT _  _        = Some _ |- _]         => apply evalStateT_runStateT in H; destruct H as [? ?]\n           | [ H : evalStateT mzero  _    = Some _ |- _]         => discriminate H\n\n           end.\n"
  },
  {
    "path": "src/lib/Monad/StateMonad.v",
    "content": "Require Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadTrans.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.MonadZero.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\nSection StateType.\n  Variable S : Type.\n\n  Record state (t : Type) : Type := mkState\n  { runState : S -> t * S }.\n\n  Definition evalState {t} (c : state t) (s : S) : t :=\n    fst (runState c s).\n\n  Definition execState {t} (c : state t) (s : S) : S :=\n    snd (runState c s).\n\n\n  Global Instance Monad_state : Monad state :=\n  { ret  := fun _ v => mkState (fun s => (v, s))\n  ; bind := fun _ _ c1 c2 =>\n    mkState (fun s =>\n      let (v,s) := runState c1 s in\n      runState (c2 v) s)\n  }.\n\n  Global Instance MonadState_state : MonadState S state :=\n  { get := mkState (fun x => (x,x))\n  ; put := fun v => mkState (fun _ => (tt, v))\n  }.\n\n  Variable m : Type -> Type.\n\n  Record stateT (t : Type) : Type := mkStateT\n  { runStateT : S -> m (t * S)%type }.\n\n  Variable M : Monad m.\n\n  Definition evalStateT {t} (c : stateT t) (s : S) : m t :=\n    bind (runStateT c s) (fun x => ret (fst x)).\n\n  Definition execStateT {t} (c : stateT t) (s : S) : m S :=\n    bind (runStateT c s) (fun x => ret (snd x)).\n\n\n  Global Instance Monad_stateT : Monad stateT :=\n  { ret := fun _ x => mkStateT (fun s => @ret _ M _ (x,s))\n  ; bind := fun _ _ c1 c2 =>\n    mkStateT (fun s =>\n      @bind _ M _ _ (runStateT c1 s) (fun vs =>\n        let (v,s) := vs in\n        runStateT (c2 v) s))\n  }.\n\n  Global Instance MonadState_stateT : MonadState S stateT :=\n  { get := mkStateT (fun x => ret (x,x))\n  ; put := fun v => mkStateT (fun _ => ret (tt, v))\n  }.\n\n  Global Instance MonadT_stateT : MonadT stateT m :=\n  { lift := fun _ c => mkStateT (fun s => bind c (fun t => ret (t, s)))\n  }.\n\n  Global Instance State_State_stateT T (MS : MonadState T m) : MonadState T stateT :=\n  { get := lift get\n  ; put := fun x => lift (put x)\n  }.\n\n  Global Instance MonadZero_stateT (MR : MonadZero m) : MonadZero stateT :=\n  { mzero _A := lift mzero\n  }.\n\n  \n  (* Todo later. *)\n  (*\n  Global Instance MonadReader_stateT T (MR : MonadReader T m) : MonadReader T stateT :=\n  { ask := mkStateT (fun s => bind ask (fun t => ret (t, s)))\n  ; local := fun _ f c => mkStateT (fun s => local f (runStateT c s))\n  }.\n\n  Global Instance MonadWriter_stateT T (Mon : Monoid T) (MR : MonadWriter Mon m) : MonadWriter Mon stateT :=\n  { tell := fun x => mkStateT (fun s => bind (tell x) (fun v => ret (v, s)))\n  ; listen := fun _ c => mkStateT (fun s => bind (listen (runStateT c s))\n    (fun x => let '(a,s,t) := x in\n    ret (a,t,s)))\n  ; pass := fun _ c => mkStateT (fun s => bind (runStateT c s) (fun x =>\n    let '(a,t,s) := x in ret (a, s)))\n  }.\n\n  Global Instance Exc_stateT T (MR : MonadExc T m) : MonadExc T stateT :=\n  { raise := fun _ e => lift (raise e)\n  ; catch := fun _ body hnd =>\n    mkStateT (fun s => catch (runStateT body s) (fun e => runStateT (hnd e) s))\n  }.\n\n\n  Global Instance MonadFix_stateT (MF : MonadFix m) : MonadFix stateT :=\n  { mfix := fun _ _ r v =>\n    mkStateT (fun s => mfix2 _ (fun r v s => runStateT (mkStateT (r v)) s) v s)\n  }.\n\n  Global Instance MonadPlus_stateT (MP : MonadPlus m) : MonadPlus stateT :=\n  { mplus _A _B a b :=\n      mkStateT (fun s => bind (mplus (runStateT a s) (runStateT b s))\n               (fun res => match res with\n                             | inl (a,s) => ret (inl a, s)\n                             | inr (b,s) => ret (inr b, s)\n                           end))\n  }.\n*)\n\nEnd StateType.\n\nArguments evalState {S} {t} (c) (s).\nArguments execState {S} {t} (c) (s).\nArguments evalStateT {S} {m} {M} {t} (c) (s).\nArguments execStateT {S} {m} {M} {t} (c) (s).\n(*\nArguments MonadWriter_stateT {S} {m} {_} {T} {Mon} (_).\n*)\n"
  },
  {
    "path": "src/lib/Monad/StateMonadLaws.v",
    "content": "Require Import FunctionalExtensionality.\n\nRequire Import DeepSpec.lib.Monad.Monad.\nRequire Import DeepSpec.lib.Monad.MonadTrans.\nRequire Import DeepSpec.lib.Monad.MonadLaws.\nRequire Import DeepSpec.lib.Monad.MonadState.\nRequire Import DeepSpec.lib.Monad.MonadZero.\n\nRequire Import StateMonad.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\nSection Laws.\n  Variable S : Type.\n  Variable m : Type -> Type.\n  Variable Monad_m : Monad m.\n  Variable ML_m : MonadLaws Monad_m.\n\n\n  Lemma equal_runStateT : forall t (m1 m2 : stateT S m t) ,\n                            (forall s, runStateT m1 s = runStateT m2 s) -> m1 = m2.\n  Proof.\n    intros.\n    destruct m1.  destruct m2.\n    simpl in H.\n    f_equal.\n    extensionality s.\n    auto.\n  Qed.\n\n  Global Instance MonadLaws_stateT : MonadLaws (@Monad_stateT S _ Monad_m).\n  Proof.\n    constructor.\n    {(* bind_of_return *)\n      intros.\n      apply equal_runStateT.\n      intros.\n      simpl.\n      rewrite bind_of_return by auto.\n      reflexivity. }\n    { (* return_of_bind *)\n      simpl; intros.\n      apply equal_runStateT.\n      simpl; intros.\n      rewrite return_of_bind.\n      - reflexivity.\n      - auto.\n      - intros x.\n        destruct x.\n        rewrite H.\n        reflexivity. }\n    { (* bind_associativity *)\n      simpl; intros.\n      apply equal_runStateT.\n      intros; simpl.\n      repeat rewrite bind_associativity by auto.\n      f_equal.\n      extensionality a.\n      destruct a.\n      reflexivity. }\n  Qed.\n\n  Global Instance MonadTLaws_stateT : MonadTLaws _ _ (@MonadT_stateT S _ Monad_m).\n  Proof.\n    constructor.\n    { simpl. intros.\n      apply equal_runStateT.\n      intros; simpl.\n      rewrite bind_of_return; auto. }\n    { simpl. intros.\n      apply equal_runStateT.\n      intros; simpl.\n      rewrite bind_associativity by auto.\n      rewrite bind_associativity by auto.\n      f_equal.\n      extensionality a.\n      rewrite bind_of_return by auto.\n      reflexivity. }\n  Qed.\n\n\nGlobal Instance MoandStateLaws_stateT : MonadStateLaws (@Monad_stateT S _ Monad_m) (@MonadState_stateT S _ Monad_m).\n  Proof.\n    constructor.\n    { (* get_put *)\n      simpl. apply equal_runStateT; intros; simpl.\n      rewrite bind_of_return by auto.\n      reflexivity. }\n    { (* put_get *)\n      simpl; intros; apply equal_runStateT; intros; simpl.\n      repeat rewrite bind_of_return by auto.\n      reflexivity. }\n    { (* put_put *)\n      simpl; intros; apply equal_runStateT; intros; simpl.\n      repeat rewrite bind_of_return by auto.\n      reflexivity. }\n    { (* get_get *)\n      simpl; intros; apply equal_runStateT; intros; simpl.\n      repeat rewrite bind_of_return by auto.\n      reflexivity. }\n    {(* get_ignore*)\n      simpl; intros; apply equal_runStateT; intros; simpl.\n      repeat rewrite bind_of_return by auto.\n      reflexivity. }\n  Qed.\n  \n    (*\n  Global Instance MonadReaderLaws_optionT (s : Type) (t : type s) (tT : typeOk t) (Mr : MonadReader s m) (MLr : MonadReaderLaws Monad_m _ _ Mr) : MonadReaderLaws _ _ _ (@Reader_optionT _ _ _ Mr).\n  Proof.\n    constructor.\n    { simpl. unfold optionT_eq; simpl; intros; unfold liftM.\n      rewrite local_bind; eauto with typeclass_instances.\n      (erewrite bind_proper; [ | | | | eapply ask_local | ]); eauto with typeclass_instances.\n      rewrite bind_associativity; eauto with typeclass_instances.\n      rewrite bind_associativity; eauto with typeclass_instances.\n      type_tac. 6: eapply preflexive.\n      repeat rewrite bind_of_return; eauto with typeclass_instances.\n      rewrite local_ret; eauto with typeclass_instances. type_tac.\n      type_tac. eapply equal_match; eauto with typeclass_instances; type_tac.\n      apply proper_fun; intros. repeat rewrite local_ret; eauto with typeclass_instances.\n      type_tac; eauto with typeclass_instances. type_tac.\n      type_tac. eapply equal_match; eauto with typeclass_instances; type_tac.\n      type_tac.\n      apply proper_fun; intros. repeat rewrite local_ret; eauto with typeclass_instances.\n      type_tac. eauto with typeclass_instances.\n      type_tac. type_tac. }\n    { simpl. unfold optionT_eq; simpl; intros; unfold liftM.\n      rewrite local_bind; eauto with typeclass_instances.\n      type_tac.\n      destruct x; destruct y; try solve [ inversion H4 ]; type_tac.\n      inversion H4; assumption.\n      rewrite local_ret; eauto with typeclass_instances; type_tac.\n      type_tac. eapply equal_match; eauto with typeclass_instances; type_tac. }\n    { simpl. unfold optionT_eq; simpl; intros; unfold liftM.\n      rewrite local_ret; eauto with typeclass_instances; type_tac. }\n    { simpl. unfold optionT_eq; simpl; intros; unfold liftM.\n      rewrite local_local; eauto with typeclass_instances; type_tac. }\n    { unfold local; simpl; intros. red. red. intros. red in H0.\n      red; simpl. type_tac. }\n    { Opaque lift. unfold ask; simpl; intros. red. type_tac.\n      eapply lift_proper; eauto with typeclass_instances. Transparent lift. }\n  Qed.\n  *)\n\n  Global Instance MonadZeroLaws_optionT (MZ: MonadZero m) (MZL: MonadZeroLaws _ MZ) : MonadZeroLaws (@Monad_stateT S _ Monad_m) _.\n  Proof.\n    constructor.\n    { simpl; intros; apply equal_runStateT; intros; simpl.\n      repeat rewrite bind_zero by auto.\n      reflexivity. }\n  Qed.\n\nEnd Laws.\n"
  },
  {
    "path": "src/lib/Monad/StateMonadOption.v",
    "content": "Require Export DeepSpec.lib.Monad.Monad.\nRequire Export DeepSpec.lib.Monad.MonadLaws.\nRequire Export DeepSpec.lib.Monad.MonadInv.\nRequire Export DeepSpec.lib.Monad.StateMonad.\nRequire Export DeepSpec.lib.Monad.OptionMonad.\nRequire Export DeepSpec.lib.Monad.OptionMonadLaws.\nRequire Export DeepSpec.lib.Monad.MonadZero.\nRequire Export DeepSpec.lib.Monad.MonadState.\nRequire Export DeepSpec.lib.Monad.StateMonadLaws.\n\nSet Implicit Arguments.\nSet Strict Implicit.\n\nImport MonadNotation.\nOpen Scope monad_scope.\n\n\nLtac dest_opt opt opt_new l :=\n  let p := fresh \"p\" in\n  let opt1 := fresh opt in\n  destruct (monad_inv_bind _ _ _ opt) as (p & opt1 & opt_new);\n  clear opt;\n  rename opt1 into opt;\n  destruct p as l.\n\nTactic Notation \"dest_opt\" hyp(opt) \"as\"\n       ident(opt_new) simple_intropattern(l) :=\n  dest_opt opt opt_new l.\n(*\nLtac inj_state H :=\n  match type of H with\n  | runStateT _ _ = _ => injection H as <- <-\n  | execStateT _ _ = _ => injection H as <-\n  | evalStateT _ _ = _ => injection H as <-\n  | ret (fst _) = _ => injection H as <-\n  | Some (fst _) = _ => injection H as <-\n  | ret (snd _) = _ => injection H as <-\n  | Some (snd _) = _ => injection H as <-\n  | _ = ret (_,_) => injection H as <- <-\n  | _ = Some (_,_) => injection H as <- <-\n  end;\n  clear H.\n*)\nSection StateMonadOption.\n  Variable D : Type.\n  Definition osT := @stateT D option.\n  Instance MosT : Monad osT := Monad_stateT D Monad_option.\n  \n  Instance MonadState_osT : MonadState D osT.\n  Proof.\n    apply MonadState_stateT.\n    apply Monad_option.\n  Defined.\n\n  Instance MonadZero_osT : MonadZero osT.\n  Proof.\n    apply MonadZero_stateT.\n    apply Monad_option.\n    apply Zero_option.\n  Defined.\n\n  Instance MonadLaws_MosT : MonadLaws MosT.\n  Proof.\n    apply MonadLaws_stateT.\n    apply MonadLaws_option.\n  Defined.\n\n  Lemma ret_inj {A} {v1 v2:A}:\n    @ret _ Monad_option _ v1 = ret v2 ->\n    v1 = v2.\n  Proof.\n    intro H. injection H as <-.\n    reflexivity.\n  Qed.\n\n  Lemma ret_Some {A} {v1 v2:A}:\n    @ret _ Monad_option _ v1 = Some v2 ->\n    v1 = v2.\n  Proof.\n    apply ret_inj.\n  Qed.\n\n  Lemma Some_ret {A} {v1 v2:A}:\n    Some v1 = @ret _ Monad_option _ v2 ->\n    v1 = v2.\n  Proof.\n    apply ret_inj.\n  Qed.\n\n  Lemma runStateT_execStateT {A} {c: osT A} {d v s}:\n    runStateT c d = ret (v, s) ->\n    execStateT c d = ret s.\n  Proof.\n    intros.\n    simpl; rewrite H; reflexivity.\n  Qed.\n\n  Lemma runStateT_execStateT' {A} {c: osT A} {d s}:\n    (exists v, runStateT c d = ret (v, s)) ->\n    execStateT c d = ret s.\n  Proof.\n    intros [v H].\n    apply (runStateT_execStateT H).\n  Qed.\n\n  Lemma runStateT_evalStateT {A} {c: osT A} {d v s}:\n    runStateT c d = ret (v, s) ->\n    evalStateT c d = ret v.\n  Proof.\n    intros.\n    simpl; rewrite H; reflexivity.\n  Qed.\n\n  Lemma runStateT_evalStateT' {A} {c: osT A} {d v}:\n    (exists s, runStateT c d = ret (v, s)) ->\n    evalStateT c d = ret v.\n  Proof.\n    intros [s H].\n    apply (runStateT_evalStateT H).\n  Qed.\n\n  Lemma execStateT_runStateT {A} {c: osT A} {d s}:\n    execStateT c d = ret s ->\n    exists v, runStateT c d = ret (v, s).\n  Proof.\n    intros opt.\n    dest_opt opt as opt' [v' s'].\n    apply ret_inj in opt'. cbv in opt'. subst s'.\n    exists v'. assumption.\n  Qed.\n\n  Lemma evalStateT_runStateT {A} {c: osT A} {d v}:\n    evalStateT c d = ret v ->\n    exists s, runStateT c d = ret (v, s).\n  Proof.\n    intros opt.\n    dest_opt opt as opt' [v' s'].\n    apply ret_inj in opt'. cbv in opt'. subst v'.\n    exists s'. assumption.\n  Qed.\n\n  (** pure *)\n\n  Lemma gets_pure_osT {A} {f: D -> A} {d s: D} {v: A}:\n    runStateT (@gets osT _ _ _ _ f) d = ret (v, s) ->\n    d = s.\n  Proof.\n    intros H.\n    simpl in H.\n    injection H. auto.\n  Qed.\n\n  Lemma guard_pure_osT {b: bool} {d s: D} {v:unit}:\n    runStateT (guard b) d = ret (v, s) ->\n    d = s.\n  Proof.\n    intros H.\n    unfold guard in H. simpl in H.\n    destruct b; simpl in H.\n    - injection H; auto.\n    - discriminate H.\n  Qed.\n\n  (** bind *)\n\n  Lemma bind_osT {A B} {ma: osT A} {f: A -> osT B} {a: A} {b: B} {d s m: D}:\n    runStateT ma d = ret (a, s) ->\n    runStateT (f a) s = ret (b, m) ->\n    runStateT (x <- ma;; f x) d = ret (b, m).\n  Proof.\n    intros opta optb.\n    apply (monad_inv_bind_inv opta optb).\n  Qed.\n\n  Lemma bind_osT' {A B} {ma: osT A}  {f: A -> osT B} {a: A} {b: B} {d s m: D}:\n    runStateT ma d = ret (a, s) /\\\n    ( runStateT ma d = ret (a, s) -> runStateT (f a) s = ret (b, m)) ->\n    runStateT (x <- ma;; f x) d = ret (b, m).\n  Proof.\n    intros [opta optb].\n    specialize (optb opta).\n    apply (bind_osT opta optb).\n  Qed.\n  \n  Lemma bind_rewrite_osT_mzero {A B} {c: osT A} {d: D} {f: A -> osT B}:\n    runStateT c d = mzero ->\n    runStateT (x<-c;;f x) d = mzero.\n  Proof.\n    intros opt.\n    simpl. rewrite opt.\n    reflexivity.\n  Qed.\n\n  Lemma bind_to_none_osT {A B} {c: osT A} {d: D} {f: A -> osT B}:\n    runStateT (c >>= f) d = mzero ->\n    {runStateT c d = mzero} +\n    {exists v s, runStateT c d = ret (v, s) /\\ runStateT (f v) s = mzero}.\n  Proof.\n    intros opt.\n    simpl in opt.\n    destruct (runStateT c d); [right|left].\n    - destruct p as [v s].\n      exists v, s. auto.\n    - reflexivity.\n  Qed.\n\n  Lemma bind_rewrite_osT_runStateT {A B} {d1 d2: D}\n        {c1 c2: osT A} {c3: A -> osT B}:\n    runStateT c1 d1 = runStateT c2 d2 ->\n    runStateT (x<-c1;;c3 x) d1 = runStateT (x<-c2;;c3 x) d2.\n  Proof.\n    intros opt.\n    simpl.\n    rewrite opt. reflexivity.\n  Qed.\n\n  Lemma bind_rewrite_osT_ret {A B} {d1 d2: D} {v:A}\n        {c1: osT A} {c3: A -> osT B}:\n    runStateT c1 d1 = ret (v, d2) ->\n    runStateT (x<-c1;;c3 x) d1 = runStateT (c3 v) d2.\n  Proof.\n    intros opt.\n    simpl.\n    rewrite opt. reflexivity.\n  Qed.\n\n  Lemma split_runStateT {A B} {c1: osT A} {c2: A -> osT B} {d s: D} {b: B}:\n    runStateT (x<-c1;; c2 x) d = ret (b, s) ->\n    exists a m, runStateT c1 d = ret (a, m) /\\ runStateT (c2 a) m = ret (b, s).\n  Proof.\n    intros H.\n    destruct (monad_inv_bind _ _ _ H) as [[a m] [H1 H2]].\n    exists a, m.\n    auto.\n  Qed.\n  \n  Lemma split_execStateT {A B} {c1: osT A} {c2: osT B} {d s: D}:\n    execStateT (c1;; c2) d = ret s ->\n    exists m, execStateT c1 d = ret m /\\ execStateT c2 m = ret s.\n  Proof.\n    intros H.\n    destruct (execStateT_runStateT H) as [b H']; clear H; rename H' into H.\n    destruct (split_runStateT H) as (a & m & H1 & H2).\n    exists m.\n    split.\n    - apply (runStateT_execStateT H1).\n    - apply (runStateT_execStateT H2).\n  Qed.\n\n  (** get *)\n  Lemma get_osT {d v s: D}:\n    runStateT get d = ret (v, s) <->\n    v = d /\\ d = s.\n  Proof.\n    simpl.\n    split.\n    - intros H. injection H as <- <-. tauto.\n    - intros [? ?]. subst. reflexivity.\n  Qed.\n\n  (** put *)\n  Lemma put_osT {d d' s: D} {v: unit}:\n    runStateT (put d') d = ret (v, s) <->\n    v = tt /\\ d' = s.\n  Proof.\n    simpl.\n    split.\n    - intros opt. injection opt as <- <-. tauto.\n    - intros [H1 H2]. subst. reflexivity.\n  Qed.\n\n  (** gets *)\n  Lemma gets_osT {A} {f: D -> A} {d s: D} {v: A}:\n    runStateT (@gets osT _ _ _ _ f) d = ret (v, s) <->\n    f d = v /\\ d = s.\n  Proof.\n    simpl.\n    split.\n    - intros opt. injection opt as <- <-.\n      tauto.\n    - intros [H1 H2]. subst. reflexivity.\n  Qed.\n  \n  Lemma gets_osT_eval {A} {f: D -> A} {d: D} {v: A}:\n    evalStateT (@gets osT _ _ _ _ f) d = ret v <->\n    f d = v.\n  Proof.\n    split.\n    - intros opt.\n      simpl in opt.\n      injection opt.\n      intro Hfeq.\n      cut (Some (f d, d) = Some (v, d)).\n      + intro H. injection H. auto.\n      + injection opt as <-. reflexivity.\n    - intros Hf.\n      simpl. rewrite Hf. reflexivity.\n  Qed.\n\n  (** modify *)\n  Lemma modify_osT {f : D -> D} {d s: D} {v: unit}:\n    runStateT (@modify osT _ _ _ f) d = ret (v, s) <->\n    v = tt /\\ f d = s.\n  Proof.\n    simpl.\n    split.\n    - intros opt. injection opt as <- <-. auto.\n    - intros [H1 H2]. subst. reflexivity.\n  Qed.\n\n  (** guard *)\n  Lemma guard_osT {b: bool} {m v s}:\n    runStateT (guard b) m = ret (v, s) <->\n    b = true /\\ v = tt /\\ m = s.\n  Proof.\n    unfold guard.\n    destruct b.\n    - (* b = true *)\n      simpl.\n      split.\n      + intros opt. injection opt as <- <-. tauto.\n      + intros (? & ? & ?). subst. reflexivity.\n    - (* b = false *)\n      simpl.\n      split.\n      + discriminate.\n      + intros (? & ? & ?). discriminate.\n  Qed.\n(*\n  Lemma gets_guard_osT' {A} {f: D -> A} {g: A -> bool} {d s: D} {v: unit}:\n    runStateT (x <- gets f;; guard (g x)) d = ret (v, s) ->\n    g (f d) = true.\n  Proof.\n    unfold guard.\n    simpl.\n    destruct (g (f d)).\n    - reflexivity.\n    - simpl. discriminate.\n  Qed.\n\n  Lemma gets_guard_pure_osT {A} {f: D -> A} {g: A -> bool} {d s: D} {v: unit}:\n    runStateT (x <- gets f;; guard (g x)) d = ret (v, s) ->\n    d = s.\n  Proof.\n    intro H.\n    destruct (split_runStateT H) as (v' & s' & H1 & H2).\n    apply gets_pure_osT in H1.\n    apply guard_pure_osT in H2.\n    subst. reflexivity.\n  Qed.\n\n  Lemma gets_guard_osT {A} {f: D -> A} {g: A -> bool} {d s: D} {v: unit}:\n    runStateT (x <- gets f;; guard (g x)) d = ret (v, s) ->\n    g (f s) = true.\n  Proof.\n    intro H.\n    assert (d = s).\n    { apply (gets_guard_pure_osT H). }\n    rewrite <- H0.\n    apply (gets_guard_osT' H).\n  Qed.\n*)\n\n  Lemma ret_osT {A} {a: A} {m s: D} {v}:\n    runStateT (ret a) m = ret (v, s) <->\n    a = v /\\ m = s.\n  Proof.\n    simpl.\n    split.\n    - intros H. injection H as <- <-. tauto.\n    - intros [? ?]. subst. reflexivity.\n  Qed.\n\n  Lemma match_osT {A} {e: option A} {d s : D} {v: A}:\n    runStateT\n      match e with\n      | Some a => ret a\n      | None => mzero\n      end d = ret (v, s) <->\n    e = Some v /\\ d = s.\n  Proof.\n    destruct e; simpl.\n    - (* e = Some a *)\n      split.\n      + intros opt. injection opt as <- <-. tauto.\n      + intros [H1 H2]. injection H1 as <-. subst. reflexivity.\n    - (* e = None *)\n      split.\n      + discriminate.\n      + intros [? ?]. discriminate.\n  Qed.\n(*\n  Lemma eval_ret_osT {A} {a: A} {m:D} {v}:\n    @evalStateT D option Monad_option A (ret a) m = ret v ->\n    a = v.\n  Proof.\n    intro H.\n    destruct (evalStateT_runStateT H) as [s Hrun].\n    apply run_ret_osT in Hrun.\n    tauto.\n  Qed.\n*)\nEnd StateMonadOption.\n\nLtac exec2run_util H l :=\n  let H' := fresh in\n  destruct (execStateT_runStateT H) as [l H'];\n  clear H; rename H' into H.\n\nTactic Notation \"exec2run\" hyp(H) \"as\" simple_intropattern(l) :=\n  exec2run_util H l.\n\nTactic Notation \"exec2run\" :=\n  apply runStateT_execStateT'.\n\nLtac eval2run_util H l :=\n  let H' := fresh in\n  destruct (evalStateT_runStateT H) as [l H'];\n  clear H; rename H' into H.\n\nTactic Notation \"eval2run\" hyp(H) \"as\" simple_intropattern(l) :=\n  eval2run_util H l.\n\nTactic Notation \"eval2run\" :=\n  apply runStateT_evalStateT'.\n\nTactic Notation \"run2exec\" hyp(H) :=\n  apply runStateT_execStateT in H.\n\nTactic Notation \"run2eval\" hyp(H) :=\n  apply runStateT_evalStateT in H.\n\n(** rewrite runStateT c1 d = _ in\n   runStateT (x<-c1;;c2 x) d\n*)\nLtac bind_rewrite_osT H :=\n  match type of H with\n  | runStateT _ _ = ret (_, _) => erewrite (bind_rewrite_osT_ret H)\n  | runStateT _ _ = mzero => erewrite (bind_rewrite_osT_mzero H)\n  | runStateT _ _ = runStateT _ _ => erewrite (bind_rewrite_osT_runStateT H)\n  end.\n\nLtac split_run_util H l :=\n  apply split_runStateT in H;\n  destruct H as l.\n\nTactic Notation \"split_run\" hyp(H) \"as\" simple_intropattern(l) :=\n  split_run_util H l.\n\nLemma extract_if_rev {b : bool}:\n  (if b then false else true) = true <->\n  b = false.\nProof.\n  destruct b.\n  - (* b = true *) split; auto.\n  - (* b = false *) tauto.\nQed.\n"
  },
  {
    "path": "src/lib/OProp.v",
    "content": "(* *********************************************************************)\n(*    DeepSpec, the language of certified softwares                    *)\n(*                                                                     *)\n(*      Shu-Chun Weng, Yale University                                 *)\n(*                                                                     *)\n(*  Copyright (c) 2013-2015 Shu-Chun Weng <shu-chun.weng@yale.edu>.    *)\n(*                                                                     *)\n(*  This program is free software; you can redistribute it and/or      *)\n(*  modify it under the terms of the GNU General Public License        *)\n(*  version 2 as published by the Free Software Foundation.  Note that *)\n(*  the only valid version of the GPL for this work is version 2, not  *)\n(*  v2.2 or v3.x or whatever.                                          *)\n(*                                                                     *)\n(*  This program is distributed in the hope that it will be useful,    *)\n(*  but WITHOUT ANY WARRANTY; without even the implied warranty of     *)\n(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)\n(*  GNU General Public License for more details.                       *)\n(*                                                                     *)\n(*  You should have received a copy of the GNU General Public License  *)\n(*  along with this program; if not, write to the Free Software        *)\n(*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,         *)\n(*  MA 02110-1301 USA.                                                 *)\n(* *********************************************************************)\n\n(** * Optional proposition\n    Many constructs do not need extra side conditions, but [True] polutes the\n    final result regardless.  [OProp] replaces [Prop] and, along with [oand],\n    only inject to Coq [Prop] at the end, without redundent [True]s. *)\nDefinition OProp := option Prop.\nDefinition otrue : OProp := None.\nDefinition ofalse : OProp := Some False.\nDefinition oprop : Prop -> OProp := @Some Prop.\n\nDefinition oProp (op : OProp) := match op with\n  | None => True\n  | Some p => p\n  end.\n\nDefinition oand (op1 op2 : OProp) := match op1, op2 with\n  | None, _ => op2\n  | _, None => op1\n  | Some p1, Some p2 => Some (p1 /\\ p2)\n  end.\n\nLemma oand_distr op1 op2 : oProp (oand op1 op2) <-> oProp op1 /\\ oProp op2.\nProof.\n  destruct op1 as [ pp1 |], op2 as [ pp2 |]; simpl;\n    split; try intros [ p1 p2 ]; auto.\nQed.\n\nLemma oconj op1 op2 (p1 : oProp op1)(p2 : oProp op2) : oProp (oand op1 op2).\nProof (proj2 (oand_distr _ _) (conj p1 p2)).\n\nDefinition OProp1 A := option (A -> Prop).\nDefinition otrue1 {A} : OProp1 A := None.\nDefinition ofalse1 {A} : OProp1 A := Some (fun _ => False).\nDefinition oprop1 {A} : (A -> Prop) -> OProp1 A := @Some (A -> Prop).\n\nDefinition oProp1 {A}(op : OProp1 A) := match op with\n  | None => fun _ => True\n  | Some p => p\n  end.\n\nDefinition omap1 {A A'} f (op : OProp1 A) : OProp1 A' :=\n  match op with\n  | None => None\n  | Some p => Some (fun a => f p a)\n  end.\n\nDefinition oand1 {A}(op1 op2 : OProp1 A) := match op1, op2 with\n  | None, _ => op2\n  | _, None => op1\n  | Some p1, Some p2 => Some (fun a => p1 a /\\ p2 a)\n  end.\n\nLemma oand1_distr {A}(op1 op2 : OProp1 A) a :\n    oProp1 (oand1 op1 op2) a <-> oProp1 op1 a /\\ oProp1 op2 a.\nProof.\n  destruct op1 as [ pp1 |], op2 as [ pp2 |]; simpl;\n    split; try intros [ p1 p2 ]; auto.\nQed.\n\nLemma oconj1 {A}(op1 op2 : OProp1 A) a (p1 : oProp1 op1 a)(p2 : oProp1 op2 a) :\n    oProp1 (oand1 op1 op2) a.\nProof (proj2 (oand1_distr _ _ _) (conj p1 p2)).\n\nDefinition OProp2 A B := option (A -> B -> Prop).\nDefinition otrue2 {A B} : OProp2 A B := None.\nDefinition ofalse2 {A B} : OProp2 A B := Some (fun _ _ => False).\nDefinition oprop2 {A B} : (A -> B -> Prop) -> OProp2 A B := @Some (A -> B -> Prop).\n\nDefinition oProp2 {A B}(op : OProp2 A B) := match op with\n  | None => fun _ _ => True\n  | Some p => p\n  end.\n\nDefinition omap2 {A B A' B'} f (op : OProp2 A B) : OProp2 A' B' :=\n  match op with\n  | None => None\n  | Some p => Some (fun a b => f p a b)\n  end.\n\nDefinition omap21 {A B C} f (op : OProp2 A B) : OProp1 C :=\n  match op with\n  | None => None\n  | Some p => Some (fun c => f p c)\n  end.\n\nDefinition oimply2 {A B}(op1 op2 : OProp2 A B) := match op1, op2 with\n  | None, _ => op2\n  | _, None => None\n  | Some p1, Some p2 => Some (fun a b => p1 a b -> p2 a b)\n  end.\n\nLemma oimply2_distr {A B}(op1 op2 : OProp2 A B) a b :\n    oProp2 (oimply2 op1 op2) a b <-> (oProp2 op1 a b -> oProp2 op2 a b).\nProof.\n  destruct op1 as [ pp1 |], op2 as [ pp2 |]; simpl; split; auto.\nQed.\n\nDefinition oimply2b {A B} p (op : OProp2 A B) := match op with\n  | None => None\n  | Some p' => Some (fun a b => p a b -> p' a b)\n  end.\n\nLemma oimply2b_distr {A B} p (op : OProp2 A B) a b :\n    oProp2 (oimply2b p op) a b <-> (p a b -> oProp2 op a b).\nProof.\n  destruct op as [ pp |]; simpl; split; auto.\nQed.\n\nDefinition oand2 {A B}(op1 op2 : OProp2 A B) := match op1, op2 with\n  | None, _ => op2\n  | _, None => op1\n  | Some p1, Some p2 => Some (fun a b => p1 a b /\\ p2 a b)\n  end.\n\nLemma oand2_distr {A B}(op1 op2 : OProp2 A B) a b :\n    oProp2 (oand2 op1 op2) a b <-> oProp2 op1 a b /\\ oProp2 op2 a b.\nProof.\n  destruct op1 as [ pp1 |], op2 as [ pp2 |]; simpl;\n    split; try intros [ p1 p2 ]; auto.\nQed.\n\nDefinition oabsorption2 {A B}(op1 op2 : OProp2 A B) := match op1, op2 with\n  | None, _ => op2\n  | _, None => op1\n  | Some p1, Some p2 => Some (fun a b => p1 a b /\\ (p1 a b -> p2 a b))\n  end.\n\nLemma oabsorption2_distr {A B}(op1 op2 : OProp2 A B) a b :\n    oProp2 (oabsorption2 op1 op2) a b <->\n      (oProp2 op1 a b /\\ (oProp2 op1 a b -> oProp2 op2 a b)).\nProof.\n  destruct op1 as [ pp1 |], op2 as [ pp2 |]; simpl;\n    split; try intros [ p1 p2 ]; auto.\nQed.\n\nLemma oconj2 {A B}(op1 op2 : OProp2 A B) a b\n    (p1 : oProp2 op1 a b)(p2 : oProp2 op2 a b) : oProp2 (oand2 op1 op2) a b.\nProof (proj2 (oand2_distr _ _ _ _) (conj p1 p2)).\n\nDefinition olift12a {A B}(op : OProp1 A) : OProp2 A B :=\n  option_map (fun p a b => p a) op.\nDefinition olift12b {A B}(op : OProp1 B) : OProp2 A B :=\n  option_map (fun p a b => p b) op.\n\nDefinition ounlift21a {A B} a (op : OProp2 A B) : OProp1 B :=\n  option_map (fun p b => p a b) op.\nDefinition ounlift21b {A B} b (op : OProp2 A B) : OProp1 A :=\n  option_map (fun p a => p a b) op.\n\nDefinition OProp3 A B C := option (A -> B -> C -> Prop).\nDefinition otrue3 {A B C} : OProp3 A B C := None.\nDefinition ofalse3 {A B C} : OProp3 A B C := Some (fun _ _ _ => False).\nDefinition oprop3 {A B C} : (A -> B -> C -> Prop) -> OProp3 A B C\n  := @Some (A -> B -> C -> Prop).\n\nDefinition oProp3 {A B C}(op : OProp3 A B C) := match op with\n  | None => fun _ _ _ => True\n  | Some p => p\n  end.\n\nDefinition omap3 {A B C A' B' C'} f (op : OProp3 A B C) : OProp3 A' B' C' :=\n  match op with\n  | None => None\n  | Some p => Some (fun a b c => f p a b c)\n  end.\n\nDefinition oand3 {A B C}(op1 op2 : OProp3 A B C) := match op1, op2 with\n  | None, _ => op2\n  | _, None => op1\n  | Some p1, Some p2 => Some (fun a b c => p1 a b c /\\ p2 a b c)\n  end.\n\nLemma oand3_distr {A B C}(op1 op2 : OProp3 A B C) a b c :\n    oProp3 (oand3 op1 op2) a b c <-> oProp3 op1 a b c /\\ oProp3 op2 a b c.\nProof.\n  destruct op1 as [ pp1 |], op2 as [ pp2 |]; simpl;\n    split; try intros [ p1 p2 ]; auto.\nQed.\n\nLemma oconj3 {A B C}(op1 op2 : OProp3 A B C) a b c\n      (p1 : oProp3 op1 a b c)(p2 : oProp3 op2 a b c) :\n    oProp3 (oand3 op1 op2) a b c.\nProof (proj2 (oand3_distr _ _ _ _ _) (conj p1 p2)).\n\nDefinition olift23ab {A B C}(op : OProp2 A B) : OProp3 A B C :=\n  option_map (fun p a b c => p a b) op.\nDefinition olift23ac {A B C}(op : OProp2 A C) : OProp3 A B C :=\n  option_map (fun p a b c => p a c) op.\nDefinition olift23bc {A B C}(op : OProp2 B C) : OProp3 A B C :=\n  option_map (fun p a b c => p b c) op.\n\nDefinition ounlift32a {A B C} a (op : OProp3 A B C) : OProp2 B C :=\n  option_map (fun p b c => p a b c) op.\nDefinition ounlift32b {A B C} b (op : OProp3 A B C) : OProp2 A C :=\n  option_map (fun p a c => p a b c) op.\nDefinition ounlift32c {A B C} c (op : OProp3 A B C) : OProp2 A B :=\n  option_map (fun p a b => p a b c) op.\n\nLemma OProp1map1 {A A'}(f : _ -> A' -> Prop)(op : OProp1 A) a :\n    f (fun _ => True) a ->\n    (oProp1 (omap1 f op) a <-> f (oProp1 op) a).\nProof.\n  intros fbase; destruct op; simpl; tauto.\nQed.\n\n(*\nLemma OProp1map2 {A A' B'}(f : _ -> A' -> B' -> Prop)(op : OProp1 A) a b :\n    f (fun _ => True) a b ->\n    (oProp2 (option_map f op) a b <-> f (oProp1 op) a b).\nProof.\n  intros fbase; destruct op; simpl; tauto.\nQed.\n*)\n\nLemma OProp2map1 {A B A'}(f : _ -> A' -> Prop)(op : OProp2 A B) a :\n    f (fun _ _ => True) a ->\n    (oProp1 (omap21 f op) a <-> f (oProp2 op) a).\nProof.\n  intros fbase; destruct op; simpl; tauto.\nQed.\n\nLemma OProp2map2 {A B A' B'}(f : _ -> A' -> B' -> Prop)(op : OProp2 A B) a b :\n    f (fun _ _ => True) a b ->\n    (oProp2 (omap2 f op) a b <-> f (oProp2 op) a b).\nProof.\n  intros fbase; destruct op; simpl; tauto.\nQed.\n\nLemma OProp2lift12a {A B} op a b :\n    @oProp2 A B (olift12a op) a b <-> oProp1 op a.\nProof.\n  destruct op; simpl; tauto.\nQed.\n\nDelimit Scope oprop_scope with oprop.\nNotation \"{{ x  }}\" := (oprop x%type)\n         (at level 0, x at level 99) : oprop_scope.\nNotation \"x /\\ y\" := (oand x%oprop y%oprop)\n         (at level 80, right associativity) : oprop_scope.\n\nDelimit Scope oprop1_scope with oprop1.\nNotation \"{{ x  }}\" := (oprop1 x%type)\n         (at level 0, x at level 99) : oprop1_scope.\nNotation \"x /\\ y\" := (oand1 x%oprop1 y%oprop1)\n         (at level 80, right associativity) : oprop1_scope.\nNotation \"x m{ f  }\" := (omap1 (fun p y => p (f y)) x%oprop1)\n         (at level 25, left associativity) : oprop1_scope.\n\nDelimit Scope oprop2_scope with oprop2.\nNotation \"{{ x  }}\" := (oprop2 x%type)\n         (at level 0, x at level 99) : oprop2_scope.\nNotation \"x /\\ y\" := (oand2 x%oprop2 y%oprop2)\n         (at level 80, right associativity) : oprop2_scope.\nNotation \"x m{ f  } m{ g  }\" := (omap2 (fun p y z => p (f y) (g z)) x%oprop2)\n         (at level 25, left associativity) : oprop2_scope.\nNotation \"x m{ f  } m{ g  }\" := (omap21 (fun p y => p (f y) (g y)) x%oprop2)\n         (at level 25, left associativity) : oprop1_scope.\n\nDelimit Scope oprop3_scope with oprop3.\nNotation \"{{ x  }}\" := (oprop3 x%type)\n         (at level 0, x at level 99) : oprop3_scope.\nNotation \"x /\\ y\" := (oand3 x%oprop3 y%oprop3)\n         (at level 80, right associativity) : oprop3_scope.\nNotation \"x m{ f  } m{ g  } m{ h  }\" := (omap3 (fun p y z w => p (f y) (g z) (h w)) x%oprop3)\n         (at level 25, left associativity) : oprop3_scope.\n"
  },
  {
    "path": "src/lib/SimpleIndexedMaps.v",
    "content": "(* A simpler version of Shu-chun's \"indexed map\" data structure.\n   This one  just stores things in an association list instead of a tree. *)\n\nRequire Export Coq.Program.Equality.\n\nRequire Import Coqlib.\nRequire Import Maps.\nRequire Import DeepSpec.lib.SimpleMaps.\n\nRecord Isomorphism {A} (X Y : A) : Type := {\n  iso_f : forall F : A -> Type, F X -> F Y;\n  iso_g : forall F : A -> Type, F Y -> F X\n     (* := fun F => iso_f (fun x => F x -> F X) id *)\n}.\n\nArguments iso_f {_ _ _} _ [_] _.\nArguments iso_g {_ _ _} _ [_] _.\nCoercion iso_f : Isomorphism >-> Funclass.\n\nNotation \"X ~~~ Y\" := (Isomorphism X Y) (at level 70, no associativity).\n\nDefinition identity_automorphism {A X} : @Isomorphism A X X\n  := {| iso_f F fx := fx; iso_g f fx := fx |}.\n\nDefinition iso_concat {A}{X Y Z : A}(iso_xy : X ~~~ Y)(iso_yz : Y ~~~ Z) :=\n  {| iso_f F fx := iso_yz F (iso_xy F fx);\n     iso_g F fy := iso_g iso_xy (iso_g iso_yz fy) |}.\n\nDefinition iso_inverse {A}{X Y : A}(iso : X ~~~ Y) :=\n  {| iso_f := iso_g iso; iso_g := iso_f iso |}.\n\nNotation \"p @ q\" := (iso_concat p q) (at level 40, left associativity).\nNotation \"! p\" := (iso_inverse p) (at level 35, right associativity).\n\nDefinition isomorphism_compose {A}{X Y Z : A}(iso_xy : X ~~~ Y)\n  (iso_yz : Y ~~~ Z) :\n    forall F fx, iso_yz F (iso_xy F fx) = (iso_xy @ iso_yz) F fx.\nProof.\n  intros F fx; reflexivity.\nQed.\n\nLemma isomorphism_decidable_neq_absurd {A}{X Y : A}(dec : A -> bool) :\n  X ~~~ Y -> dec X = true -> dec Y = false -> False.\nProof.\n  intros iso dec_x dec_y.\n  set (F := fun Z : A => match dec Z with\n                         | true => True\n                         | false => False\n                         end).\n  assert (fx : F X).\n  { unfold F; rewrite dec_x; exact I. }\n\n  assert (fy : F Y).\n  { apply iso, fx. }\n\n  unfold F in fy.\n  rewrite dec_y in fy.\n  exact fy.\nQed.\n\n(** Defining the isomorphism using Leibniz equality means that we have to\n    rely on some properties of functors.  One of them, especially, is based\n    on paramatricity, which can't be proved inside Coq, and is axiomatized\n    as [functor_identity_paramatricity].\n\n    Hopefully it is consistent.  It implies eq_rect_eq, which is already\n    implied by proof irrelevance required by CompCert.\n*)\nAxiom functor_identity_paramatricity :\n  forall (A : Type)(X : A)(f : forall F, F X -> F X)\n    (F : A -> Type)(x : F X), x = f F x.\n\nModule AxiomImplication.\n  Lemma eq_rect_eq :\n      forall (U : Type) (p : U) (Q : U -> Type) (x : Q p) (h : p = p),\n      x = eq_rect p Q x p h.\n  Proof.\n    intros.\n    exact (functor_identity_paramatricity U p\n            (fun Q x => eq_rect p Q x p h) Q x).\n  Qed.\nEnd AxiomImplication.\n\nLemma isomorphism_identity_gf' {A}{X Y : A}(iso1 iso2 : X ~~~ Y)(F : A -> Type)\n    (x : F X) : x = iso_g iso1 (iso_f iso2 x).\nProof.\n  set (iso_comp := iso2 @ !iso1).\n  change (iso_g iso1 (iso_f iso2 x)) with (iso_f iso_comp x).\n  apply functor_identity_paramatricity.\nQed.\n\nLemma isomorphism_identity_fg' {A}{X Y : A}(iso1 iso2 : X ~~~ Y)(F : A -> Type)\n    (y : F Y) : y = iso_f iso1 (iso_g iso2 y).\nProof.\n  set (iso_comp := !iso1 @ iso2).\n  change (iso_f iso1 (iso_g iso2 y)) with (iso_g iso_comp y).\n  apply functor_identity_paramatricity.\nQed.\n\nLemma isomorphism_identity_gf {A}{X Y : A}(iso : X ~~~ Y)(F : A -> Type)\n    (x : F X) : x = iso_g iso (iso_f iso x).\nProof (isomorphism_identity_gf' iso iso F x).\n\nLemma isomorphism_identity_fg {A}{X Y : A}(iso : X ~~~ Y)(F : A -> Type)\n    (y : F Y) : y = iso_f iso (iso_g iso y).\nProof (isomorphism_identity_fg' iso iso F y).\n\nLemma isomorphism_unique {A}{X Y : A}(iso1 iso2 : X ~~~ Y)(F : A -> Type)\n    (x : F X) : iso_f iso1 x = iso_f iso2 x.\nProof.\n  transitivity (iso_f iso2 (iso_g iso2 (iso_f iso1 x))).\n    apply isomorphism_identity_fg.\n  f_equal; symmetry.\n  apply isomorphism_identity_gf'.\nQed.\n\nLemma isomorphism_injective {A}{X Y : A}(iso : X ~~~ Y) :\n    forall F x1 x2, iso F x1 = iso F x2 -> x1 = x2.\nProof.\n  intros F x1 x2 eq.\n  rewrite (isomorphism_identity_gf iso F x1).\n  rewrite eq.\n  symmetry; apply isomorphism_identity_gf.\nQed.\n\n(* To avoid useless definitions of inductors in extracted code. *)\nLocal Unset Elimination Schemes.\nLocal Unset Case Analysis Schemes.\n\nOpen Scope positive.\n\n(** * An implementation of indexed trees over type [positive]\n    Element types are indexed by a tree [PTree.t A] along with a projection\n    [proj] that extract the actual [Type] from [A].  *)\nModule Type TypeProjection.\n  Variable A : Type.\n  Variable proj : A -> Type.\nEnd TypeProjection.\n\nModule IPList(TP : TypeProjection).\n  Definition elt := positive.\n  Definition elt_eq := peq.\n\n  Definition OptionalType (a : option TP.A) : Type :=\n    match a with\n    | None => unit\n    | Some a' => TP.proj a'\n    end.\n\n  Inductive ilist : AList.t TP.A -> Type :=\n  | empty  : ilist AList.empty\n  | set : forall {tps : AList.t TP.A}  i tp (x : TP.proj tp) (xs : ilist tps), ilist (AList.set i tp tps).\n\n  Definition get_index {idx}(_ : ilist idx) := idx.\n\n  Definition t := ilist.\n\n  \n  (* Todo: add this to the AList interface. *)\n  Lemma AList_get_unfold : forall (A:Type) i j (x:A) l,\n      AList.get i ((j,x)::l) = if (i =? j) then Some x else AList.get i l.\n  Proof.\n    reflexivity.\n  Qed.\n     \n  Fixpoint get {idx}(i : positive)(m : t idx){struct m} :\n      OptionalType (AList.get i idx) :=\n    match m with\n      | empty => tt\n      | set tps j tp x xs =>\n        if (i =? j) as b\n           return (OptionalType (if b then Some tp else AList.get i tps))\n        then x\n        else get i xs                                              \n    end.\n  \n  Definition get_eq {idx}(i : positive){OA}(m : t idx) :\n      AList.get i idx ~~~ OA -> OptionalType OA\n    := fun iso => iso OptionalType (get i m).\n\n  (* Fixpoint remove {idx}(i : positive)(m : t idx){struct i} : t (PTree.remove i idx). *)\n  (* Fixpoint remove_eq {idx}(i : positive) A (m : t (PTree.set i A idx)){struct i} :\n       PTree.get i idx ~~~ None -> t idx. *)\n\n  (* TODO: move this to the other file. *)\n  Notation \"a ! b\" := (AList.get b a) (at level 1).\n \n  Theorem gempty (i : positive)(iso : AList.empty ! i ~~~ None) :\n      iso OptionalType (get i empty) = tt.\n  Proof.\n    simpl.\n    symmetry.\n    apply (functor_identity_paramatricity _ _ (iso_f iso) OptionalType).\n  Qed.\n\n  Lemma gleaf (i : positive)(iso : AList.empty ! i ~~~ None) :\n      iso OptionalType (get i empty) = tt.\n  Proof (gempty i iso).\n\n  Theorem get_eq_fusion {idx OA OA'}(i : positive)(m : t idx)\n    (iso : AList.get i idx ~~~ OA)(iso' : OA ~~~ OA') :\n      iso' OptionalType (get_eq i m iso) = get_eq i m (iso @ iso').\n  Proof.\n    unfold get_eq.\n    rewrite isomorphism_compose.\n    reflexivity.\n  Qed.\n\n  Theorem gss {idx A}(i : positive)(x : TP.proj A)(m : t idx)\n    (iso : (AList.set i A idx) ! i ~~~ Some A) :\n      get i (set i A x m) = iso_g iso (F := OptionalType) x.\n  Proof.\n    revert iso.\n    simpl.\n    rewrite Pos.eqb_refl.\n    intros iso.\n    rewrite <- (functor_identity_paramatricity _ _ (iso_g iso)).\n    reflexivity.\n  Qed.\n\n  Theorem gess' {idx A OA}(i : positive)(x : TP.proj A)(m : t idx)\n    iso (iso' : Some A ~~~ OA) :\n      get_eq i (OA := OA) (set i A x m) iso = iso' OptionalType x.\n  Proof.\n    unfold get_eq.\n    set (iso_comp := iso @ !iso').\n    rewrite (gss _ _ _ iso_comp).\n    symmetry.\n    apply (isomorphism_identity_fg iso _ (iso' OptionalType x)).\n  Qed.\n\n  Theorem gess {idx A}(i : positive)(x : TP.proj A)(m : t idx) iso :\n      get_eq i (OA := Some A) (set i A x m) iso = x.\n  Proof (gess' i x m iso identity_automorphism).\n\n  Definition gleaf_iso {i} : (@AList.empty TP.A) ! i ~~~ None.\n  Proof. destruct i; exact identity_automorphism. Defined.\n\nLemma eqb_neq' : forall x y, x<>y -> (x =? y) = false.\n  Proof.\n    intros.\n    rewrite <- Pos.eqb_neq in H.\n    auto.\n  Qed.\n    \n  Theorem gso {idx A}(i j : positive)(x : TP.proj A)(m : t idx) iso :\n      i <> j -> get i (set j A x m) = iso_f iso (get i m).\n  Proof.\n    intros Hij.\n    generalize dependent idx.\n    simpl.\n    rewrite (eqb_neq' _ _ Hij).\n    intros.\n    apply functor_identity_paramatricity.\n  Qed.\n\n  Theorem geso {idx A OA}(i j : positive)(x : TP.proj A)(m : t idx) iso iso' :\n      i <> j -> get_eq i (set j A x m) iso = @get_eq _ i OA m iso'.\n  Proof.\n    unfold get_eq.\n    intros neq.\n    rewrite (gso _ _ x m (iso' @ !iso) neq).\n    set (iso_comp := (iso' @ !iso) @ iso).\n    change (iso_f iso (iso_f (iso' @ !iso) (get i m))) with\n           (iso_f iso_comp (get i m)).\n    apply isomorphism_unique.\n  Qed.\n\n  (*\n  Theorem gres {idx A}(i : positive)(m : t (PTree.set i A idx)) iso :\n      get i (remove_eq i m iso) = iso_g iso (F := OptionalType) tt.\n  Proof.\n  Theorem geres' {idx A OA}(i : positive)(m : t (PTree.set i A idx)) iso iso' :\n      get_eq i (OA := OA) (remove_eq i m iso) iso' = iso_g (!iso' @ iso) tt.\n\n  Theorem geres {idx A}(i : positive)(m : t (PTree.set i A idx)) iso :\n      get_eq i (OA := None) (remove_eq i m iso) iso = tt.\n\n  Lemma rleaf {A}(i : positive)(m : t (PTree.set i A PTree.Leaf)) iso :\n      remove_eq i m iso = Leaf.\n\n  Theorem greo {idx A}(i j : positive)(m : t (PTree.set j A idx)) iso iso' :\n      i <> j -> get i (remove_eq j m iso) = iso_f iso' (get i m).\n\n  Theorem gereo {idx A OA}(i j : positive)(m : t (PTree.set j A idx))\n    iso iso' iso'' :\n      i <> j -> get_eq i (OA := OA) (remove_eq j m iso) iso'\n              = iso_f iso' (get_eq i m iso'').\n   *)\nEnd IPList.\n\n(*\nModule PTreeAux.\n  Theorem smap1:\n    forall (A B: Type) (f: A -> B) (a: A) (i: PTree.elt) (m: PTree.t A),\n    PTree.set i (f a) (PTree.map1 f m) = PTree.map1 f (PTree.set i a m).\n  Proof.\n    induction i; destruct m; simpl; try rewrite <- IHi; reflexivity.\n  Qed.\nEnd PTreeAux.\n\nModule PMapAux.\n  Theorem smap:\n    forall (A B: Type) (f: A -> B) (a: A) (i: PMap.elt) (m: PMap.t A),\n    PMap.set i (f a) (PMap.map f m) = PMap.map f (PMap.set i a m).\n  Proof.\n    intros.\n    unfold PMap.map, PMap.set; simpl.\n    f_equal; apply PTreeAux.smap1.\n  Qed.\nEnd PMapAux.\n\nModule ZMapAux.\n  Theorem smap:\n    forall (A B: Type) (f: A -> B) (a: A) (i: ZMap.elt) (m: ZMap.t A),\n    ZMap.set i (f a) (ZMap.map f m) = ZMap.map f (ZMap.set i a m).\n  Proof.\n    intros.\n    apply PMapAux.smap.\n  Qed.\nEnd ZMapAux.\n*)\n"
  },
  {
    "path": "src/lib/SimpleMaps.v",
    "content": "\n(* Compcert comes with a TREE interface for finite maps, but the Compcert\n   implementation of it is in terms of balanced trees, which generally does not \n   reduce well at typechecking-time. \n\n   Here we provide a simple (and slow) implementation of the same\n   interface in terms just functions. *)\n\nRequire Import Equivalence EquivDec.\nRequire Import Coqlib.\nRequire Import Maps.\nRequire Import Coq.Logic.FunctionalExtensionality.\n\n(* To avoid useless definitions of inductors in extracted code. *)\nLocal Unset Elimination Schemes.\nLocal Unset Case Analysis Schemes.\n\nSet Implicit Arguments.\n\n\n(* This is a reduced version of Compcert's TREE interface, omitting \n   things that can't be supported by the simple association-list implementation below. *)\nModule Type ALIST.\n  Variable elt: Type.\n  Variable elt_eq: forall (a b: elt), {a = b} + {a <> b}.\n  Variable t: Type -> Type.\n  Variable empty: forall (A: Type), t A.\n  Variable get: forall (A: Type), elt -> t A -> option A.\n  Variable set: forall (A: Type), elt -> A -> t A -> t A.\n\n  Hypothesis gempty:\n    forall (A: Type) (i: elt), get i (empty A) = None.\n  Hypothesis gss:\n    forall (A: Type) (i: elt) (x: A) (m: t A), get i (set i x m) = Some x.\n  Hypothesis gso:\n    forall (A: Type) (i j: elt) (x: A) (m: t A),\n    i <> j -> get i (set j x m) = get i m.\n  Hypothesis gsspec:\n    forall (A: Type) (i j: elt) (x: A) (m: t A),\n      get i (set j x m) = if elt_eq i j then Some x else get i m.\n  (*\n  Hypothesis gsident:\n    forall (A: Type) (i: elt) (m: t A) (v: A),\n    get i m = Some v -> set i v m = m.\n  *)\n\n  (** Applying a function to all data of a tree. *)\n  Variable map:\n    forall (A B: Type), (elt -> A -> B) -> t A -> t B.\n  Hypothesis gmap:\n    forall (A B: Type) (f: elt -> A -> B) (i: elt) (m: t A),\n    get i (map f m) = option_map (f i) (get i m).\n\n  (** Same as [map], but the function does not receive the [elt] argument. *)\n  Variable map1:\n    forall (A B: Type), (A -> B) -> t A -> t B.\n  Hypothesis gmap1:\n    forall (A B: Type) (f: A -> B) (i: elt) (m: t A),\n    get i (map1 f m) = option_map f (get i m).\n\n\n  (** Enumerating the bindings of a tree. *)\n  Variable elements:\n    forall (A: Type), t A -> list (elt * A).\n  Hypothesis elements_correct:\n    forall (A: Type) (m: t A) (i: elt) (v: A),\n      get i m = Some v -> In (i, v) (elements m).\n  (*\n  Hypothesis elements_complete:\n    forall (A: Type) (m: t A) (i: elt) (v: A),\n    In (i, v) (elements m) -> get i m = Some v.\n  Hypothesis elements_keys_norepet:\n    forall (A: Type) (m: t A), \n    list_norepet (List.map (@fst elt A) (elements m)).\n  *)\nEnd ALIST.\n\nOpen Scope positive.\n\n\n(* Maps as association lists. \n   This does not quite fit the interface, because we don't have that extensional \n   equality implies exact equality, but we don't need that for the DeepSpec development. *)\nModule AList <: ALIST.\n  Definition elt := positive.\n  Definition elt_eq := peq.\n\n  Definition t (A:Type) := list (positive * A).\n\n  Definition empty {A : Type} : t A := nil.\n\n  \n  Fixpoint get {A : Type} (i : positive) (m : t A) : option A :=\n    match m with\n      | (j, a) :: m' => if (i =? j) then Some a else get i m'\n      | nil => None\n    end.\n                 \n  Definition set (A : Type) (i : positive) (v : A) (m : t A)  : t A :=\n    (i,v) :: m.\n\n\n  (* We don't need remove.\n  Definition remove (A : Type) (i : positive) (m : t A) {struct i} : t A :=\n  *)\n\n  Theorem gempty:\n    forall (A: Type) (i: positive), get i empty = (@None A).\n  Proof.\n    reflexivity.\n  Qed.\n\n  Theorem gss:\n    forall (A: Type) (i: positive) (x: A) (m: t A), get i (set i x m) = Some x.\n  Proof.\n    intros.\n    unfold get,set.\n    simpl.\n    rewrite Pos.eqb_refl.\n    reflexivity.\n  Qed.\n\n  Theorem gso:\n    forall (A: Type) (i j: positive) (x: A) (m: t A),\n    i <> j -> get i (set j x m) = get i m.\n  Proof.\n    unfold get, set.\n    intros.\n    simpl.\n    replace (i =? j) with false.\n      reflexivity.\n      symmetry; rewrite Pos.eqb_neq; assumption.\n  Qed.\n\n  Theorem gsspec:\n    forall (A: Type) (i j: positive) (x: A) (m: t A),\n    get i (set j x m) = if peq i j then Some x else get i m.\n  Proof.\n    intros.\n    destruct (peq i j);\n      [ rewrite e; apply gss | apply gso; auto ].\n  Qed.\n\n\n  (* not true with this representation. *)\n  (*\n  Theorem gsident:\n    forall (A: Type) (i: positive) (m: t A) (v: A),\n    get i m = Some v -> set i v m = m.\n  Proof.    \n    induction i; intros; destruct m; simpl; simpl in H; try congruence.\n     rewrite (IHi m2 v H); congruence.\n     rewrite (IHi m1 v H); congruence.\n  Qed.\n  *)\n\n  (* This is used at one point in the development, in SynthesisStmt.v.\n     However, that part deals directly with compcert operational semantics, \n     so we will have had to insert some kind of conversion to PTrees in any case. *)\n  (*  \n  Theorem set2:\n    forall (A: Type) (i: elt) (m: t A) (v1 v2: A),\n    set i v2 (set i v1 m) = set i v2 m. *)\n\n  (* We don't use remove. *)\n  (*\n  Theorem grs:\n    forall (A: Type) (i: positive) (m: t A), get i (remove i m) = None.\n  Theorem gro:\n    forall (A: Type) (i j: positive) (m: t A),\n    i <> j -> get i (remove j m) = get i m.\n  Theorem grspec:\n    forall (A: Type) (i j: elt) (m: t A),\n    get i (remove j m) = if elt_eq i j then None else get i m.\n   *)\n  \n  (* We could prove these, but they are not used in the development. *)\n  (*\n  Section BOOLEAN_EQUALITY.\n    Variable A: Type.\n    Variable beqA: A -> A -> bool.\n\n    Fixpoint bempty (m: t A) : bool := \n\n    Fixpoint beq (m1 m2: t A) {struct m1} : bool :=\n\n    Lemma bempty_correct:\n      forall m, bempty m = true <-> (forall x, get x m = None).\n\n    Lemma beq_correct:\n      forall m1 m2,\n      beq m1 m2 = true <->\n      (forall (x: elt),\n       match get x m1, get x m2 with\n       | None, None => True\n       | Some y1, Some y2 => beqA y1 y2 = true\n       | _, _ => False\n       end).\n  End BOOLEAN_EQUALITY.\n   *)\n\n\n  \n  Definition map (A B : Type) (f : positive -> A -> B) m := List.map (fun p => (fst p, f (fst p) (snd p))) m.\n\n  Theorem gmap:\n    forall (A B: Type) (f: positive -> A -> B) (i: positive) (m: t A),\n    get i (map f m) = option_map (f i) (get i m).\n  Proof.\n    induction m.\n    + reflexivity.\n    + destruct a as [j a].\n      unfold get.\n      simpl.\n      destruct (i =? j) eqn:Heq.\n      * rewrite Peqb_eq in Heq.\n        subst.\n        reflexivity.\n      * unfold get in IHm.\n        rewrite IHm.\n        reflexivity.\n  Qed.\n\n  Definition map1 (A B: Type) (f: A -> B) (m: t A) : t B :=\n    List.map (fun p => (fst p, f (snd p))) m.\n\n  Theorem gmap1:\n    forall (A B: Type) (f: A -> B) (i: elt) (m: t A),\n    get i (map1 f m) = option_map f (get i m).\n  Proof.\n    induction m.\n    + reflexivity.\n    + destruct a as [j a]. \n      simpl.\n      unfold get.\n      simpl.\n      destruct (i =? j)%positive eqn:Heq.\n      * rewrite Peqb_eq in Heq.\n        subst.\n        reflexivity.\n      * unfold get in IHm.\n        rewrite IHm.\n        reflexivity.\n  Qed.\n\n  (* not used. \n  Fixpoint filter1 (A: Type) (pred: A -> bool) (m: t A) {struct m} : t A := \n\n  Theorem gfilter1:\n    forall (A: Type) (pred: A -> bool) (i: elt) (m: t A),\n    get i (filter1 pred m) =\n    match get i m with None => None | Some x => if pred x then Some x else None end.\n  Proof.\n   *)\n  \n  Definition elements (A: Type) (m: t A) := m.\n  \n  Theorem elements_correct:\n    forall (A: Type) (m: t A) (i: positive) (v: A),\n    get i m = Some v -> In (i, v) (elements m).\n  Proof.\n    induction m.\n    + compute.\n      intros; congruence.\n    + destruct a as [j a]. \n      simpl.\n      unfold get.\n      simpl.\n      intros.\n      destruct (i =? j)%positive eqn:Heq.\n      * rewrite Peqb_eq in Heq.\n        subst.\n        left.\n        congruence.\n      * unfold get in IHm.\n        specialize IHm with i v.\n        rewrite H in IHm.\n        right; auto.\n  Qed.\n\n  (* This *was* used, a lot, but it's not true using this representation. *)\n  (*\n  Theorem elements_complete:\n    forall (A: Type) (m: t A) (i: positive) (v: A),\n    In (i, v) (elements m) -> get i m = Some v.\n  Proof.\n  *)\n\n  (* Happily, the following is good enough for our purposes. *)\n    Theorem elements_domain_complete:\n    forall (A: Type) (m: t A) (i: positive),\n      In i (List.map fst (elements m)) -> exists v, get i m = Some v.\n    Proof.\n      intros A m i H.\n      induction m.\n      - destruct H.\n      - idtac.\n        destruct a as [j u].\n        destruct (Pos.eq_dec j i)%positive as [Heq | Hneq].\n        + exists u.\n          rewrite Heq.\n          unfold AList.get.\n          rewrite Pos.eqb_refl.\n          reflexivity.\n       + idtac.\n          change ((j,u)::m) with (AList.set j u m).            \n          rewrite AList.gso by auto.\n          apply IHm.\n          destruct H.\n          * simpl in H.\n            tauto.\n          * exact H.\n    Qed.\n\n\n  Lemma elements_set_monotone {A} x i a (m : AList.t A) :\n      In x (List.map fst (elements m)) ->\n      In x (List.map fst (elements (set i a m))).\n  Proof.\n    destruct (peq x i) as [ i_eq | i_ne ]; subst.\n    - unfold AList.set, AList.elements.\n      simpl.\n      auto.\n    - unfold AList.set, AList.elements.\n      simpl; right; auto. \n  Qed.\n    \n  (* Ditto. *)\n  (*\n  Theorem elements_keys_norepet:\n    forall (A: Type) (m: t A), \n      list_norepet (List.map (@fst elt A) (elements m)).\n\n  Theorem elements_canonical_order:\n    forall (A B: Type) (R: A -> B -> Prop) (m: t A) (n: t B),\n    (forall i x, get i m = Some x -> exists y, get i n = Some y /\\ R x y) ->\n    (forall i y, get i n = Some y -> exists x, get i m = Some x /\\ R x y) ->\n    list_forall2\n      (fun i_x i_y => fst i_x = fst i_y /\\ R (snd i_x) (snd i_y))\n      (elements m) (elements n).\n  *)\n\n  (* Not true, not used. *)\n  (*\n  Theorem elements_extensional:\n    forall (A: Type) (m n: t A),\n    (forall i, get i m = get i n) ->\n    elements m = elements n.\n   *)\n\n  (*\n  Definition fold (A B : Type) (f: B -> positive -> A -> B) (m: t A) (v: B) :=\n    xfold f xH m v.\n\n  Theorem fold_spec:\n    forall (A B: Type) (f: B -> positive -> A -> B) (v: B) (m: t A),\n    fold f m v =\n    List.fold_left (fun a p => f a (fst p) (snd p)) (elements m) v.\n  *)\n\n  (*\n  Fixpoint fold1 (A B: Type) (f: B -> A -> B) (m: t A) (v: B) {struct m} : B := \n\n  Theorem fold1_spec:\n    forall (A B: Type) (f: B -> A -> B) (v: B) (m: t A),\n    fold1 f m v =\n    List.fold_left (fun a p => f a (snd p)) (elements m) v.\n  Proof.\n  *)\n\nEnd AList.\n\n\nDefinition dummy : nat := (42%nat).\n\nFixpoint PTree_of_AList {A:Type} (m: AList.t A)  : PTree.t A :=\n  match m with\n    | nil => PTree.empty A\n    | (i,a)::m => PTree.set i a (PTree_of_AList m)\n  end.\n\n\nClose Scope positive.\n\nNotation \"a ! b\" := (AList.get b a) (at level 1) : alist_scope.\nDelimit Scope alist_scope with alist.\n"
  },
  {
    "path": "src/minic/dune",
    "content": "(executable\n (name minicc)\n (modes byte exe)\n (libraries minic)\n; (preprocess (action (run %{bin:cppo} -V OCAML:%{ocaml_version} %{input-file})))\n)\n"
  },
  {
    "path": "src/minic/minicc.ml",
    "content": "open Minic\nopen Backend.BytecodeExt\n\nlet usage () = print_endline\n    \"usage: minicc file (print(-verbose)? | assembly(-runtime)? | (bytecode | ewasm)(-runtime)?)?\";\n    ignore (exit 1);\n\ntype modes = PRINT | VERBOSE | ASSEMBLY | ASSEMBLY_RUNTIME | BYTECODE | BYTECODE_RUNTIME | EWASM | EWASM_RUNTIME\n\nlet mode_of_string = function\n  | \"print\" -> PRINT\n  | \"print-verbose\" -> VERBOSE\n  | \"assembly\" -> ASSEMBLY\n  | \"assembly-runtime\" -> ASSEMBLY_RUNTIME\n  | \"bytecode\" -> BYTECODE\n  | \"bytecode-runtime\" -> BYTECODE_RUNTIME\n  | \"ewasm\" -> EWASM\n  | \"ewasm-runtime\" -> EWASM_RUNTIME\n  | _ -> usage (); exit 1\n\nlet minic mode filename =\n  let chan = open_in filename in\n  let lexbuf = Lexing.from_channel chan in\n  let parsed = try\n    Parser.file Lexer.token lexbuf\n  with Failure _ | Parser.Error ->\n    let curr = lexbuf.Lexing.lex_curr_p in\n    let line = curr.Lexing.pos_lnum in\n    let cnum = curr.Lexing.pos_cnum - curr.Lexing.pos_bol in\n    let tok = Lexing.lexeme lexbuf in\n    print_endline (String.concat \"\"\n      [ filename; \":\"; string_of_int line; \":\"; string_of_int cnum;\n      \": Syntax error at token \\\"\"; tok; \"\\\".\" ]);\n    exit 1\n  in\n  let name_tbls, genv = Typecheck.typecheck parsed in\n  match mode with\n  | PRINT ->\n    print_endline (Backend.LanguageExt.show_genv false name_tbls genv)\n  | VERBOSE ->\n    print_endline (Backend.LanguageExt.show_genv true name_tbls genv)\n  | ASSEMBLY -> print_endline (assembly false genv)\n  | ASSEMBLY_RUNTIME -> print_endline (assembly true genv)\n  | BYTECODE -> print_endline (bytecode false genv)\n  | BYTECODE_RUNTIME -> print_endline (bytecode true genv)\n  | EWASM -> print_endline (ewasm false genv)\n  | EWASM_RUNTIME -> print_endline (ewasm true genv)\n\nlet main () =\n  if (Array.length Sys.argv) = 1 then usage ();\n  let mode =\n    if (Array.length Sys.argv) >= 3 then mode_of_string Sys.argv.(2)\n    else PRINT in\n  minic mode Sys.argv.(1)\n\nlet () = main ()\n"
  },
  {
    "path": "src/minic/src/ast.ml",
    "content": "open Backend\n\ntype p_type =\n  | Pvoid\n  | Pint of string\n  | Pbool\n  | Ppointer of p_type\n  | Parray of p_type * int\n  | Pmapping of p_type * p_type\n  | Pstruct of string * p_variable_declaration list\n  | Punion of string * p_variable_declaration list\n  | Puserstruct of string\nand p_variable_declaration = bool * p_type * string\n\ntype p_expr =\n  (* Econst_int or Econst_int256 *)\n  | Pconst of string\n  (* Eglob, Evar and Etempvar *)\n  | Pvar of string\n  | Pderef of p_expr\n  | Punop of Cop.unary_operation * p_expr\n  | Pbinop of p_expr * Cop.binary_operation * p_expr\n  | Pfield of p_expr * string\n  (* Earrayderef and Ehashderef *)\n  | Parrayderef of p_expr * p_expr\n  | Pcall0 of MachineModel.builtin0\n  | Pcall1 of MachineModel.builtin1 * p_expr\n\ntype p_statement =\n  (* Sassign, Sset, Stransfer *)\n  | Passign of p_expr * p_expr\n  | Pifthenelse of p_expr * p_statements * p_statements option\n  | Ploop of p_statements\n  | Pbreak\n  | Preturn of p_expr option\n  | Ptransfer of p_expr * p_expr\n  | Prevert\n  | Pcall of string option * string * p_expr list\n  | Plog of p_expr list * p_expr list\n  | Pcallmethod of p_expr * p_expr list * p_expr * p_expr * p_expr option * p_expr list\nand p_statements = p_statement list\n\n\ntype visibility = Public | Private\n\ntype p_function = { p_fn_visibility: visibility option;\n                    p_fn_name: string;\n                    p_fn_return : p_type;\n                    p_fn_params : p_variable_declaration list;\n                    p_fn_temps : p_variable_declaration list;\n                    p_fn_body : p_statement list }\n\ntype p_declaration =\n  | Ptype_decl of p_type\n  | Pvar_decl of p_variable_declaration\n  | Pfunc of p_function\n\ntype p_file = p_declaration list\n"
  },
  {
    "path": "src/minic/src/astExt.ml",
    "content": "open Ast\nopen Backend\n  open CopExt\n  open Printf\n  open MachineModelExt\n\nlet rec show_p_expr = function\n  | Pconst s -> s\n  | Pvar s -> s\n  | Pderef e -> \"*\" ^ (show_p_expr e)\n  | Punop (unop, e) -> (show_unop_symb unop) ^ (show_p_expr e)\n  | Pbinop (e1, binop, e2) -> sprintf \"(%s %s %s)\" (show_p_expr e1) (show_binop_symb binop) (show_p_expr e2)\n  | Pfield (e, s) -> sprintf \"%s.%s\" (show_p_expr e) s\n  | Parrayderef (e1, e2) -> sprintf \"%s[%s]\" (show_p_expr e1) (show_p_expr e2)\n  | Pcall0 b -> show_builtin0 b\n  | Pcall1 (b, e) -> sprintf \"%s(%s)\" (show_builtin1 b) (show_p_expr e)\n"
  },
  {
    "path": "src/minic/src/dune",
    "content": "(library\n  (name minic)\n  (libraries backend core)\n)\n\n(ocamllex lexer)\n\n(menhir\n  (modules parser)\n  (flags --unused-precedence-levels)\n)\n"
  },
  {
    "path": "src/minic/src/lexer.mll",
    "content": "{\nopen Parser\nopen Backend.AST\n\nlet trim s n =\n  String.sub s n ((String.length s) - n)\n\n}\n\nlet letter = ['A'-'Z' 'a'-'z' '_']\nlet digit = ['0'-'9']\nlet whitespace = [' ' '\\t' '\\r']\nlet decimal = ['1'-'9'] digit* | '0'\n\nrule token = parse\n  | \"\\n\" { Lexing.new_line lexbuf; token lexbuf }\n  | whitespace+ { token lexbuf }\n  | decimal as d { NUM d }\n  | \";\" { SEMICOLON }\n  | \",\" { COMMA }\n  | \"[\" { LBRACKET }\n  | \"]\" { RBRACKET }\n  | \"{\" { LBRACE }\n  | \"}\" { RBRACE }\n  | \"(\" { LPAREN }\n  | \")\" { RPAREN }\n  | \"#\" { HASH }\n  | \"=\" { EQUAL }\n  | \"<-\" { LARROW }\n  | \"//\" { comment lexbuf }\n  | \"/*\" { multi_comment 0 lexbuf }\n  | \"+\" { ADD }\n  | \"-\" { SUB }\n  | \"*\" { MUL }\n  | \"/\" { DIV }\n  | \"%\" { MOD }\n  | \"**\" { EXP }\n  | \"&\" { AND }\n  | \"|\" { OR }\n  | \"^\" { XOR }\n  | \"<<\" { SHL }\n  | \">>\" { SHR }\n  | \"==\" { EQ }\n  | \"!=\" { NE }\n  | \"<\" { LT }\n  | \">\" { GT }\n  | \"<=\" { LE }\n  | \">=\" { GE }\n  | \"!\" { NOTBOOL }\n  | \"~\" { NOTINT }\n  | \".\" { DOT }\n  | \"sha1\" { SHA1 }\n  | \"sha2\" { SHA2 }\n  | \"if\" { IF }\n  | \"else\" { ELSE }\n  | \"void\" { VOID }\n  | \"int\" decimal? as s { INT (trim s 3) }\n  | \"bool\" { BOOL }\n  | \"public\" { PUBLIC }\n  | \"private\" { PRIVATE }\n  | \"while\" { WHILE }\n  | \"break\" { BREAK }\n  | \"return\" { RETURN }\n  | \"address\" { ADDRESS }\n  | \"origin\" { ORIGIN }\n  | \"caller\" { CALLER }\n  | \"callvalue\" { CALLVALUE }\n  | \"coinbase\" { COINBASE }\n  | \"timestamp\" { TIMESTAMP }\n  | \"number\" { NUMBER }\n  | \"balance\" { BALANCE }\n  | \"blockhash\" { BLOCKHASH }\n  | \"transfer\" { TRANSFER }\n  | \"revert\" { REVERT }\n  | \"struct\" { STRUCT }\n  | \"union\" { UNION }\n  | \"emit\" { EMIT }\n  | \"callmethod\" { CALLMETHOD }\n  | \"memory\" { MEMORY }\n  | \"chainid\" { CHAINID }\n  | \"selfbalance\" { SELFBALANCE }\n  | letter (letter | digit)* as s { IDENT s }\n  | eof { EOF }\n\nand comment = parse\n  | '\\n' { Lexing.new_line lexbuf; token lexbuf }\n  | _    { comment lexbuf }\n\nand multi_comment count = parse\n  | \"/*\" { multi_comment (count+1) lexbuf }\n  | \"*/\" { if count > 0 then multi_comment (count-1) lexbuf else token lexbuf }\n  | '\\n' { Lexing.new_line lexbuf; multi_comment count lexbuf }\n  | _    { multi_comment count lexbuf }\n"
  },
  {
    "path": "src/minic/src/parser.mly",
    "content": "%{\nopen Ast\nopen Printf\n\nopen Backend\n  open AST\n  open BinNumsExt\n  open Ctypes\n  open Cop\n  module D = Datatypes\n  open Integers\n  open Language\n\n%}\n\n%token<string> NUM\n%token SEMICOLON\n%token COMMA\n%token LBRACKET\n%token RBRACKET\n%token LBRACE\n%token RBRACE\n%token LPAREN\n%token RPAREN\n%token HASH\n%token EQUAL\n%token LARROW\n\n%token ADD\n%token SUB\n%token MUL\n%token DIV\n%token MOD\n%token EXP\n%token AND\n%token OR\n%token XOR\n%token SHL\n%token SHR\n%token EQ\n%token NE\n%token LT\n%token GT\n%token LE\n%token GE\n\n%token NOTBOOL\n%token NOTINT\n\n%token DOT\n\n%token IF\n%token ELSE\n%token VOID\n%token<string> INT\n%token BOOL\n%token PUBLIC\n%token PRIVATE\n%token WHILE\n%token BREAK\n%token RETURN\n\n%token ADDRESS\n%token ORIGIN\n%token CALLER\n%token CALLVALUE\n%token COINBASE\n%token TIMESTAMP\n%token NUMBER\n\n%token SHA1\n%token SHA2\n\n%token BALANCE\n%token BLOCKHASH\n\n%token TRANSFER\n%token REVERT\n\n%token UNION\n%token STRUCT\n\n%token EMIT\n%token CALLMETHOD\n%token MEMORY\n\n%token<string> IDENT\n%token EOF\n\n%token CHAINID\n%token SELFBALANCE\n\n%token STRUCT_DEF\n%token STRUCT_INSTANCE\n%nonassoc STRUCT_INSTANCE\n%nonassoc STRUCT_DEF\n\n%nonassoc EQ NE LT LE GT GE\n%left SHA2\n%left OR\n%left XOR\n%left AND\n%left MOD\n%left SHL SHR\n%left ADD SUB\n%left MUL DIV\n%left EXP\n%right NOTBOOL\n\n%start<Ast.p_file> file\n\n%%\n\nfile:\n  d=declaration* EOF { d }\n\ndeclaration:\n  | t = type_declaration { Ptype_decl t }\n  | v = variable_declaration { Pvar_decl v }\n  | f = function_definition { Pfunc f }\n\ntype_declaration:\n  | t=struct_type_expression SEMICOLON { t }\n\nvariable_declaration:\n  | v=variable SEMICOLON { v }\n\nfunction_definition:\n  | v=ioption(visibility) t=type_expression i=IDENT\n    LPAREN p=separated_list(COMMA, variable) RPAREN\n    LBRACE tmps=variable_declaration* body=statement* RBRACE {\n      {\n        p_fn_visibility = v;\n        p_fn_name = i;\n        p_fn_return = t;\n        p_fn_params = p;\n        p_fn_temps = tmps;\n        p_fn_body = body;\n      }}\n\nvisibility:\n  | PUBLIC { Public }\n  | PRIVATE { Private }\n\nstatement:\n  | s=semicolon_statement SEMICOLON { s }\n  | LBRACE s=statement RBRACE { s }\n  | IF LPAREN e=expression RPAREN s1=then_clause s2=else_clause? { Pifthenelse (e, s1, s2) }\n  | WHILE s=then_clause { Ploop s }\n\n\nthen_clause:\n  | s=statement { [s] }\n  | LBRACE s=statement* RBRACE { s }\n\nelse_clause:\n  | ELSE s=then_clause { s }\n\nsemicolon_statement:\n  | e1=expression EQUAL e2=expression { Passign (e1, e2) }\n  | BREAK { Pbreak }\n  | RETURN e=expression? { Preturn e }\n  | TRANSFER LPAREN e1=expression COMMA e2=expression RPAREN { Ptransfer (e1, e2) }\n  | REVERT { Prevert }\n  | EMIT LPAREN e1=separated_list(COMMA, expression) SEMICOLON e2=separated_list(COMMA, expression) RPAREN { Plog (e1, e2) }\n  | i=ioption(terminated(IDENT, LARROW)) func=IDENT LPAREN e=separated_list(COMMA, expression) RPAREN\n    { Pcall (i, func, e) }\n  | CALLMETHOD LPAREN\n    addr=expression SEMICOLON\n    ret=separated_list(COMMA, expression) SEMICOLON\n    signature=expression SEMICOLON\n    value=expression SEMICOLON\n    gas=expression? SEMICOLON\n    args=separated_list(COMMA, expression)\n    RPAREN\n    { Pcallmethod (addr, ret, signature, value, gas, args) }\n\nexpression:\n  | LPAREN e=expression RPAREN { e }\n  | i=IDENT { Pvar i }\n  | n=NUM { Pconst n }\n  | MUL e=expression { Pderef e } %prec NOTBOOL\n  | u=unop e=expression { Punop (u, e) } %prec NOTBOOL\n  | e1=expression b=binop e2=expression { Pbinop (e1, b, e2) }\n  | e1=expression LBRACKET e2=expression RBRACKET { Parrayderef (e1, e2) }\n  | b=builtin0 { Pcall0 b }\n  | b=builtin1 LPAREN e=expression RPAREN { Pcall1 (b, e) }\n  | e=expression DOT i=IDENT { Pfield (e, i) }\n\n%inline binop:\n  | ADD { Oadd }\n  | SUB { Osub }\n  | MUL { Omul }\n  | DIV { Odiv }\n  | MOD { Omod }\n  | EXP { Oexp }\n  | AND { Oand }\n  | OR { Oor }\n  | XOR { Oxor }\n  | SHL { Oshl }\n  | SHR { Oshr }\n  | EQ { Oeq }\n  | NE { One }\n  | LT { Olt }\n  | GT { Ogt }\n  | LE { Ole }\n  | GE { Oge }\n  | SHA2 { Osha_2 }\n\ntype_expression:\n  | VOID { Pvoid }\n  | BOOL { Pbool }\n  | i=INT { Pint i }\n  | t=type_expression LBRACKET n=NUM RBRACKET { Parray (t, int_of_string n) }\n  | t1=type_expression HASH t2=delimited(LBRACKET, type_expression, RBRACKET)\n      { Pmapping (t1, t2) }\n  | t=type_expression MUL { Ppointer t }\n  | t=struct_type_expression { t } %prec STRUCT_DEF\n  | STRUCT i=IDENT { Puserstruct i } %prec STRUCT_INSTANCE\n  | UNION i=IDENT { Puserstruct i } %prec STRUCT_INSTANCE\n\n\nstruct_type_expression:\n  | STRUCT i=IDENT LBRACE v=variable_declaration* RBRACE { Pstruct (i, v) }\n  | UNION i=IDENT LBRACE v=variable_declaration* RBRACE { Punion (i, v) }\n\nvariable:\n  | m=ioption(MEMORY) t=type_expression i=IDENT { Option.is_some m, t, i }\n\nunop:\n  | NOTBOOL { Onotbool }\n  | NOTINT { Onotint }\n  | SUB { Oneg }\n  | SHA1 { Osha_1 }\n\nbuiltin0:\n  | ADDRESS { Baddress }\n  | ORIGIN { Borigin }\n  | CALLER { Bcaller }\n  | CALLVALUE { Bcallvalue }\n  | COINBASE { Bcoinbase }\n  | TIMESTAMP { Btimestamp }\n  | NUMBER { Bnumber }\n  | CHAINID { Bchainid }\n  | SELFBALANCE { Bselfbalance }\n\nbuiltin1:\n  | BALANCE { Bbalance }\n  | BLOCKHASH { Bblockhash }\n"
  },
  {
    "path": "src/minic/src/typecheck.ml",
    "content": "(* TODO: Change var store to glob store *)\n\nopen Ast\nopen AstExt\nopen Printf\n\nopen Backend\n  open Ctypes\n  open CtypesExt\n  open BinNums\n  open BinNumsExt\n  module D = Datatypes\n  open DatatypesExt\n  open Globalenvs\n  open Language\n  open LanguageExt\n  open ExpMiniC\n  open StmtMiniC\n\nlet raise_msg s = Core.raise_s (Core.Sexp.Atom s)\n\nlet match_intsize = function\n  | \"8\" -> I8\n  | \"16\" -> I16\n  | \"32\" -> I32\n  | \"256\" | \"\" -> I256\n  | _ as s -> raise_msg (sprintf \"invalid intsize: %s\" s)\n\ntype ('a, 'b) ident_store = {\n  tbl: ('a, 'b) Hashtbl.t;\n  mutable lst: 'a List.t\n}\n\nlet glob_store = { tbl = Hashtbl.create 0; lst = [] }\nlet func_store = { tbl = Hashtbl.create 0; lst = [] }\nlet method_store = { tbl = Hashtbl.create 0; lst = [] }\n\nlet constructor = ref None\n\nlet struct_field_tbl = Hashtbl.create 0\nlet struct_type_tbl = Hashtbl.create 0\nlet struct_name_tbl = Hashtbl.create 0\n\nlet name_tbls = NameTablesExt.empty_name_tables\n\nlet flip_tbl tbl =\n  let new_tbl = Hashtbl.create (Hashtbl.length tbl) in\n  Hashtbl.iter (fun name (ident, _) -> Hashtbl.add new_tbl ident name) tbl;\n  new_tbl\n\nlet strip_prefix prefix name =\n  let prefix_len = String.length prefix in\n  let name_len = String.length name in\n  if name_len > prefix_len &&\n    String.sub name 0 prefix_len = prefix\n  then\n    Some (int_of_string (String.sub name prefix_len (name_len - prefix_len)))\n  else\n    None\n\nlet rec match_type = function\n    | Pvoid -> Tvoid\n    | Pint i -> Tint (match_intsize i, Unsigned)\n    | Pbool -> Tint (IBool, Unsigned)\n    | Ppointer t -> Tpointer (Coq_mem, (match_type t)) (* Coq_mem is a dummy val *)\n    | Parray (t, n) -> Tarray (match_type t, Zpos (positive_of_int n))\n    | Pmapping (t1, t2) -> Thashmap (match_type t1, match_type t2)\n    | Pstruct (i, v) -> let (i', f) = add_struct i v in\n      let t = Tstruct (i', f) in Hashtbl.add struct_type_tbl i t; t\n    | Punion (i, v) -> let (i', f) = add_struct i v in\n      let t = Tunion (i', f) in Hashtbl.add struct_type_tbl i t; t\n    | Puserstruct s -> Hashtbl.find struct_type_tbl s\n(* add a struct or union *)\nand add_struct i v =\n  (* let _, t, i = v in *)\n  (* can try: store by ident, and have an ident->name table for checking duplicates *)\n  (* if Hashtbl.mem struct_field_tbl i then *)\n  (*   raise_msg (sprintf \"redeclaration of struct type %s\" i); *)\n  let field_tbl = Hashtbl.create 0 in\n  List.iter (fun (_, t, i') ->\n    let field_num = (match strip_prefix \"field_\" i' with \n    | Some n -> positive_of_int n\n    | None -> positive_of_int ((Hashtbl.length field_tbl) + 1)\n    ) in\n    Hashtbl.add field_tbl i' (field_num, match_type t)) v;\n  let struct_num = positive_of_int ((Hashtbl.length struct_name_tbl)+1) in\n  Hashtbl.add struct_field_tbl i field_tbl;\n  Hashtbl.add struct_name_tbl struct_num i;\n  let field_list = Hashtbl.fold (fun _ (n, t) prev -> Fcons (n, t, prev)) field_tbl Fnil in\n  struct_num, field_list\n\nlet process_var store prefix var =\n  let m, t, i = var in\n  if Hashtbl.mem store.tbl i then\n    raise_msg (sprintf \"redeclaration of variable %s\" i);\n  let i' = match strip_prefix prefix i with\n    | Some i -> positive_of_int i\n    | None -> positive_of_int ((Hashtbl.length store.tbl) + 1) in\n  let t' = match_type t in\n  Hashtbl.add store.tbl i (i', (t', m));\n  store.lst <- store.lst @ [i]\n\nlet process_glob store var =\n  let m, t, i = var in\n  if Hashtbl.mem store.tbl i then\n    raise_msg (sprintf \"redeclaration of variable %s\" i);\n  let i' = match strip_prefix \"global_\" i with\n    | Some i -> positive_of_int i\n    | None -> positive_of_int ((Hashtbl.length store.tbl) + 1) in\n  let t' = match_type t in\n  Hashtbl.add store.tbl i (i', t');\n  store.lst <- store.lst @ [i]\n\nlet process_param store prefix var =\n  let () = process_var store prefix var in\n  let _, _, i = var in let i', (t', m) = Hashtbl.find store.tbl i in\n  D.Coq_pair (i', t')\n\nlet process_temp store prefix var =\n  let () = process_var store prefix var in\n  let _, _, i = var in let i', (t', m) = Hashtbl.find store.tbl i in\n  m, D.Coq_pair (i', t')\n\nlet func_defined name =\n  if (Hashtbl.mem func_store.tbl name)\n    || (Hashtbl.mem method_store.tbl name)\n    || (name = \"constructor\" && (Option.is_some !constructor)) then\n    raise_msg (sprintf \"redefinition of function %s\" name)\n\nlet add_func name =\n  let () = func_defined name in\n  let i = match strip_prefix \"func_\" name with\n    | Some n -> positive_of_int n\n    | None -> positive_of_int ((Hashtbl.length func_store.tbl) + 1) in\n  Hashtbl.add func_store.tbl name (i, empty_coq_function);\n  func_store.lst <- func_store.lst @ [name]\n\nlet replace_func name f =\n  let (i, _) = Hashtbl.find func_store.tbl name in\n  Hashtbl.replace func_store.tbl name (i, f);\n  i\n\nlet add_method name =\n  let () = func_defined name in\n  let i = match strip_prefix \"method_\" name with\n    | Some n -> coq_Z_of_int n\n    | None -> coq_Z_of_int ((Hashtbl.length method_store.tbl) + 1) in\n  Hashtbl.add method_store.tbl name (i, empty_coq_function);\n  method_store.lst <- method_store.lst @ [name]\n\nlet replace_method name f =\n  let (i, _) = Hashtbl.find method_store.tbl name in\n  Hashtbl.add method_store.tbl name (i, f);\n  i\n\nlet rec match_expression tmp_tbl e =\n  let match_ex = match_expression tmp_tbl in\n  match e with\n  (* currently setting to the default int: unsigned 256 *)\n  | Pconst s ->\n      Econst_int256 (coq_Z_of_Z (Z.of_string s), match_type (Pint \"\"))\n  | Pvar s ->\n    if Hashtbl.mem tmp_tbl s then\n      let i, (t, m) = Hashtbl.find tmp_tbl s in\n      (match m with\n      | true -> Evar (i, t)\n      | false -> Etempvar (i, t))\n    else if Hashtbl.mem glob_store.tbl s then\n      let i, t = Hashtbl.find glob_store.tbl s in\n        Eglob (i, t)\n    else\n      raise_msg (sprintf \"undefined variable %s\" s)\n  | Pderef e -> (match e with\n    | Pvar _ -> let e' = match_ex e in Ederef (e', typeof e')\n    | _ -> raise_msg (sprintf \"cannot deref non-variable %s\" (show_p_expr e)) )\n  | Punop (u, e) -> let e' = match_ex e in Eunop (u, e', typeof e')\n  | Pbinop (e1, b, e2) ->\n    let e1' = match_ex e1 in\n    let e2' = match_ex e2 in\n    if ((typeof e1') <> (typeof e2')) then\n      raise_msg (sprintf \"types of %s and %s incompatible: %s and %s\"\n        (show_p_expr e1) (show_p_expr e2)\n        (show_type (typeof e1')) (show_type (typeof e2')));\n    Ebinop (b, e1', e2', typeof e1')\n  | Pfield (e, i) ->\n    let e' = match_ex e in\n    let n = match typeof e' with\n      | Tstruct (i, _) -> i\n      | Tunion (i, _) -> i\n      | _ -> raise_msg (sprintf \"not a struct: %s\" (show_p_expr e)) in\n    (* Hashtbl.iter (fun a b -> print_endline ((show_pos a) ^ b)) struct_name_tbl; *)\n    let s = Hashtbl.find struct_name_tbl n in\n    let n', t = Hashtbl.find (Hashtbl.find struct_field_tbl s) i in\n    Efield (e', n', t)\n  | Parrayderef (e1, e2) -> let e1' = match_ex e1 in (\n    match typeof e1' with\n    | Tarray (t, _) -> Eindex (e1', match_ex e2, t)\n    | Thashmap (_, t) -> Eindex (e1', match_ex e2, t)\n    | _ -> raise_msg (sprintf \"%s: not an array or hashmap\" (show_p_expr e1)))\n  | Pcall0 b -> Ecall0 (b, match_type (Pint \"256\"))\n  | Pcall1 (b, e) -> Ecall1 (b, match_ex e, match_type (Pint \"256\"))\n\n\nlet matach_ex_opt tmp_tbl = function\n  | None -> D.None\n  | Some e -> D.Some (match_expression tmp_tbl e)\n\nlet rec flatten_statements match_func = function\n  | [] -> Sskip\n  | hd::tl -> Ssequence (match_func hd, flatten_statements match_func tl)\n\nlet rec match_statement tmp_tbl in_loop stmt =\n  let match_ex = match_expression tmp_tbl in\n  let match_ex_list e = coqlist_of_list (List.map match_ex e) in\n  let loop = match stmt with Ploop _ -> true | _ -> false in\n  let in_loop' = loop || in_loop in\n  let flat_stmts = flatten_statements (match_statement tmp_tbl in_loop') in\n  match stmt with\n  | Passign (e1, e2) -> (\n      let e1' = match_ex e1 in\n      let e2' = match_ex e2 in\n      match e1' with\n      | Etempvar (i, _) -> Sset (i, e2')\n      | Evar _ | Eglob _ | Eindex _ | Efield _ -> Sassign (e1', e2')\n      | _ -> raise_msg (sprintf \"cannot assign to nonvariable %s\" (show_p_expr e1)\n      )\n    )\n  | Pifthenelse (e, s1, s2) ->\n    let s2' = match s2 with\n      | None -> Sskip\n      | Some s -> flat_stmts s in\n    Sifthenelse (match_ex e, flat_stmts s1, s2')\n  | Ploop s -> Sloop (flat_stmts s)\n  | Pbreak -> if not in_loop then raise_msg (\"break statment must be in a loop\");\n    Sbreak\n  | Preturn e -> (match e with\n    | None -> Sreturn None\n    | Some e' -> (match match_ex e' with\n      | Etempvar (i, _) -> Sreturn (Some i)\n      | _ -> raise_msg (sprintf \"not a tempvar: %s\" (show_p_expr e'))\n      )\n    )\n  | Ptransfer (e1, e2) -> Stransfer (match_ex e1, match_ex e2)\n  | Prevert -> Srevert\n  | Pcall (i, f, e) ->\n    let i' = match i with\n    | None -> D.None\n    | Some s -> D.Some (fst (Hashtbl.find tmp_tbl s)) in\n      let f' = fst (Hashtbl.find func_store.tbl f) in\n      let e' = coqlist_of_list (List.map match_ex e) in\n      Scall(i', f', e')\n  | Plog (e1, e2) ->  Slog (match_ex_list e1, match_ex_list e2)\n  | Pcallmethod (addr, ret, signature, value, gas, args) ->\n    let ret' = coqlist_of_list (List.map (fun e -> match match_ex e with\n        | Etempvar (i, _) -> i\n        | _ -> raise_msg (sprintf \"Not a temp variable: %s\" (show_p_expr e))\n      )\n      ret) in\n    let signature' = match match_ex signature with\n      | Econst_int256 (i, _) -> i\n      | _ -> raise_msg (sprintf \"Not an int: %s\" (show_p_expr signature))\n    in\n    Scallmethod (match_ex addr, ret', signature', match_ex value,\n      matach_ex_opt tmp_tbl gas, match_ex_list args)\n\nlet preprocess_func f =\n  match f.p_fn_name with\n  | \"constructor\" -> ()\n  | _ -> match f.p_fn_visibility with\n    | None -> add_method f.p_fn_name\n    (* default to public *)\n    | Some v -> match v with\n      | Private -> add_func f.p_fn_name\n      | Public -> add_method f.p_fn_name\n\nlet append_return body =\n  let rev = List.rev body in\n  let appended = match rev with\n  | [] -> [ Sreturn None ]\n  | hd::_ -> match hd with\n    | Sreturn _ -> rev\n    | _ -> (Sreturn None) :: rev\n  in\n  List.rev appended\n\nlet process_func f =\n  let tmp_store = { tbl = Hashtbl.create 0; lst = [] } in\n  let params = List.map (process_param tmp_store \"tmp_\") f.p_fn_params in\n  let vars = List.map (process_temp tmp_store \"tmp_\") f.p_fn_temps in\n  let filter flip (m, it) = match flip m with\n    | true -> Some it\n    | false -> None in\n  let temps = List.filter_map (filter (fun b -> not b)) vars in\n  let locals = List.filter_map (filter (fun b -> b)) vars in\n  let body = List.map (match_statement tmp_store.tbl false) f.p_fn_body in\n  let body' = append_return body in\n  let f' = { fn_return = (match_type f.p_fn_return);\n    fn_params = coqlist_of_list params;\n    fn_temps = coqlist_of_list temps;\n    fn_locals = coqlist_of_list locals;\n    fn_body = flatten_statements (fun x -> x) body';\n  } in\n  match f.p_fn_name with\n  | \"constructor\" -> func_defined f.p_fn_name;\n    constructor := Some f';\n    name_tbls.constructor_tmps_tbl <- flip_tbl tmp_store.tbl\n  | _ ->\n    let process_method () = let i = replace_method f.p_fn_name f' in\n      Hashtbl.add name_tbls.methods_tmps_tbl i (flip_tbl tmp_store.tbl) in\n    match f.p_fn_visibility with\n    | None -> process_method ()\n    (* default to public *)\n    | Some v -> match v with\n      | Private -> let i = replace_func f.p_fn_name f' in\n       Hashtbl.add name_tbls.funcs_tmps_tbl i (flip_tbl tmp_store.tbl)\n      | Public -> process_method ()\n\n(* We're not really using these, but leaving them here in case we ever want to\n * inculde struct typedefs as a language feature of minic *)\nlet process_type t = let _ = match t with\n  | Pstruct _ | Punion _ -> match_type t\n  | _ -> raise_msg \"invalid type declaration\" in ()\n\nlet add_name_tables () =\n  name_tbls.funcs_tbl <- flip_tbl func_store.tbl;\n  name_tbls.methods_tbl <- flip_tbl method_store.tbl;\n  name_tbls.vars_tbl <- flip_tbl glob_store.tbl\n\nlet map_store store =\n  let f tbl name =\n    let (i, t) = Hashtbl.find tbl name in\n    D.Coq_pair (i, t) in\n  coqlist_of_list (List.map (f store.tbl) store.lst)\n\nlet typecheck parsed =\n  let preprocess_declaration = function\n    | Ptype_decl t -> ()\n    | Pvar_decl v -> ()\n    | Pfunc f -> preprocess_func f in\n  let process_declaration = function\n    | Ptype_decl t -> process_type t\n    | Pvar_decl v -> process_glob glob_store v\n    | Pfunc f -> process_func f in\n  let () = List.iter preprocess_declaration parsed in\n  let () = List.iter process_declaration parsed in\n  add_name_tables ();\n  let vars = map_store glob_store in\n  let funcs = map_store func_store in\n  let methods = map_store method_store in\n  let constructor = coq_option !constructor in\n  name_tbls, Genv.new_genv vars funcs methods constructor\n"
  },
  {
    "path": "src/opam",
    "content": "opam-version: \"2.0\"\nname: \"deepsea-dependencies\"\nmaintainer: \"Vilhelm Sjöberg <vilhelm.sjoberg@certik.io>\"\ndescription: \"\"\ndepends: [ \"ocaml\"           { = \"4.09.0\"    }\n           \"menhir\"          { >= \"20200612\" }\n           \"cryptokit\"       { >= \"1.14\"     }\n           \"cppo\"            { = \"1.6.6\"     }\n           \"yojson\"\n           \"extlib\"\n           \"core\"\n           \"dune\"            { >= \"2.7.0\"     }\n]\n\n"
  },
  {
    "path": "unittests/.gitignore",
    "content": "amm_with_addresses.ds\nerc20Token0.ds\nerc20Token1.ds\nliquidityToken.ds\nnode_modules\nbuild\n"
  },
  {
    "path": "unittests/README.md",
    "content": "To run the tests:\n  1. `npm install` to get Node.js dependencies\n  2. `./start_conflux.sh` in a separate terminal, and start Ganache (for Ethereum tests)\n    -  Be sure to clone the `conflux-rust` repo, and within `start_conflux.sh`, set `conflux` to the location of your repo clone.\n    -  Ganache can be run with `npm run ganache` if `npm install` was used to install dependencies.\n  3. `./run_unittests.sh`\n"
  },
  {
    "path": "unittests/amm_test.ts",
    "content": "import { Chain } from './chain'\nimport { ethers } from 'ethers'\nimport { execSync } from 'child_process';\n\nexport async function runTest(chains: Chain[]) {\n  const [\n    liquidity_chain,\n    erc0_chain,\n    erc1_chain,\n    amm_chain\n  ] = chains\n\n  await Promise.all([\n    erc0_chain.deployContract('./erc20Token0'),\n    erc1_chain.deployContract('./erc20Token1'),\n    liquidity_chain.deployContract('./liquidityToken'),\n  ])\n\n  const addresses = [\n    erc0_chain.getContractAddress(),\n    erc1_chain.getContractAddress(),\n    liquidity_chain.getContractAddress(),\n  ]\n\n  console.log(addresses.join(\" \"))\n  execSync('echo ' + addresses.join(\" \") + ' | ./replace_addresses.sh')\n  await amm_chain.deployContract('./amm_with_addresses')\n\n  const amm_address = amm_chain.getContractAddress()\n  const liquidity_provider = ethers.Wallet.createRandom()\n  const user = ethers.Wallet.createRandom()\n\n  try {\n    let response = await erc0_chain.callMethod(\"balanceOf\", [await erc0_chain.getAccountAddress()])\n    console.log(\"response (balanceOf):\", response.toString())\n\n    response = await erc0_chain.callMethod(\"transfer\", [liquidity_provider.address, 60000])\n    console.log(\"response (transfer erc0 -> liq_prov):\", response)\n\n    response = await erc0_chain.callMethod(\"balanceOf\", [liquidity_provider.address])\n    console.log(\"response (balanceOf liq_prov in erc0):\", response.toString())\n\n    response = await erc1_chain.callMethod(\"transfer\", [liquidity_provider.address, 40000])\n    console.log(\"response (transfer erc1 -> liq_prov):\", response)\n\n    response = await erc0_chain.callMethod(\"transfer\", [amm_address, 500])\n    console.log(\"response (transfer erc0 -> AMM):\", response)\n\n    response = await erc1_chain.callMethod(\"transfer\", [amm_address, 500])\n    console.log(\"response (transfer erc1 -> AMM):\", response)\n\n    response = await amm_chain.callMethod(\"mint\", [liquidity_provider.address])\n    console.log(\"response (mint):\", response)\n\n    // Pretend the user has some erc0 that they want to transfer to AMM\n    // (actually going straight from erc0 contract to AMM)\n    response = await erc0_chain.callMethod(\"transfer\", [amm_address, 200])\n    console.log(\"response (transfer erc0 -> AMM):\", response)\n\n    response = await amm_chain.callMethod(\"getReserve0\")\n    console.log(\"response (getReserve0):\", response.toString())\n\n    response = await amm_chain.callMethod(\"getBalance0\")\n    console.log(\"response (getBalance0):\", response.toString())\n\n    response = await erc0_chain.callMethod(\"balanceOf\", [user.address])\n    console.log(\"response (balanceOf user in erc0):\", response.toString())\n    response = await erc1_chain.callMethod(\"balanceOf\", [user.address])\n    console.log(\"response (balanceOf user in erc1):\", response.toString())\n\n    response = await amm_chain.callMethod(\"simpleSwap0\", [user.address])\n    console.log(\"response (simpleSwap0):\", response)\n\n    response = await erc0_chain.callMethod(\"balanceOf\", [user.address])\n    console.log(\"response (balanceOf user in erc0):\", response.toString())\n    response = await erc1_chain.callMethod(\"balanceOf\", [user.address])\n    console.log(\"response (balanceOf user in erc1):\", response.toString())\n\n  }\n  catch (e) {\n    console.log(e)\n  }\n}\n\nexport default { runTest }\n"
  },
  {
    "path": "unittests/builtins_test.ts",
    "content": "import { Chain } from './chain'\nimport { printTest } from './utils'\n\nexport async function runTest(chain: Chain) {\n  await chain.deployContract('builtins')\n\n  const _value = 5;\n\n  let blockNumber = await chain.callMethod('f', [], {value: _value})\n\n  const [\n    _address,\n    _origin,\n    _caller,\n    _callvalue,\n    _coinbase,\n    _timestamp,\n    _number,\n    _balance_this,\n    _blockhash_prev\n  ] = await Promise.all([\n    chain.callMethod('get_address'),\n    chain.callMethod('get_origin'),\n    chain.callMethod('get_caller'),\n    chain.callMethod('get_callvalue'),\n    chain.callMethod('get_coinbase'),\n    chain.callMethod('get_timestamp'),\n    chain.callMethod('get_number'),\n    chain.callMethod('get_balance_this'),\n    chain.callMethod('get_blockhash_prev')\n  ])\n\n  printTest(\"address\", _address == chain.getContractAddress());\n  printTest(\"origin\", _origin == await chain.getAccountAddress());\n  printTest(\"caller\", _caller == await chain.getAccountAddress());\n  printTest(\"callvalue\", _callvalue == _value);\n  printTest(\"timestamp\", _timestamp == await chain.getBlockTimestamp(blockNumber));\n  printTest(\"number\", _number == blockNumber);\n  printTest(\"balance(this_address)\", _balance_this == _value);\n  printTest(\"blockhash(parent)\", chain.hashToString(_blockhash_prev)\n                                 == await chain.getBlockParentHash(blockNumber));\n  // the hash of the current block is not available, you just get 0x0 if you try, so we query the parent\n}\n\nexport default { runTest }\n"
  },
  {
    "path": "unittests/chain.ts",
    "content": "export interface Chain {\n  deployContract(jsonFilename: string, constructorArgs?: any[]): Promise<void>\n  callMethod(func: string, args?: any[], options?: {}): any\n\n  getContractAddress(): string\n  getAccountAddress(): Promise<string>\n  getBlockTimestamp(blockNumber: number): Promise<number>\n  getBlockParentHash(blockNumber: number): Promise<string>\n  getEvents(): Promise<Event[]>\n\n  hashToString(hash: any): string\n}\n\nexport interface Event {\n  signature: string \n  args: {}\n}\n"
  },
  {
    "path": "unittests/conflux-chain.ts",
    "content": "import { Conflux, Account } from 'js-conflux-sdk'\nimport { Chain, Event } from './chain'\nimport { cleanCombined, getJsonFilename } from './utils'\nimport _ from 'lodash'\n\n\nexport class ConfluxChain implements Chain {\n  private _conflux: Conflux\n  private _contract: any\n  private _genesisAccount: Account\n  private _abi: any[]\n\n  constructor(verbose=false) {\n    let logger = this.getLogger(verbose)\n\n    this._conflux = new Conflux({\n      url: 'http://localhost:12537',\n      // defaultGasPrice: 1000,\n      // defaultGas: 1000,\n      // logger: this._logger,\n      logger: logger,\n    })\n\n    const genesisPrivateKey =\n      '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'\n    this._genesisAccount = this._conflux.wallet.addPrivateKey(genesisPrivateKey)\n  }\n  private getLogger(verbose: boolean): Logger {\n    if (verbose)\n      return console\n\n    let logger: Logger = {\n      info: function() {}, // Output nothing.\n      error: function() {}\n    }\n    return logger\n  }\n\n  async deployContract(jsonFilename: string, constructorArgs=[]) {\n    const combined = require(getJsonFilename(jsonFilename))\n    const {abi, bytecode} = cleanCombined(combined)\n    this._contract = this._conflux.Contract({ abi, bytecode })\n    this._abi = abi\n\n    const receipt = await this._contract\n      .constructor(...constructorArgs)\n      .sendTransaction({ from: this._genesisAccount })\n      .executed();\n    this._contract.address = receipt.contractCreated;\n  }\n\n  async callRead(func: string, args=[]){\n    return await this._contract[func](...args)\n  }\n\n  async callWrite(func: string, args=[], options={}) {\n    // console.log(\"func: \" + func)\n    // console.log(\"args: \" + args)\n    // console.log(\"options: \" + JSON.stringify(options))\n    let receipt = await this._contract[func](...args)\n      .sendTransaction({ from: this._genesisAccount, ...options })\n      .executed();\n    return receipt.epochNumber\n  }\n\n  isRead(func: string): boolean {\n    const f = this._abi.find(element => element.name == func)\n    let readStates = [ \"view\", \"pure\" ]\n    return readStates.includes(f.stateMutability)\n  }\n\n  async callMethod(func: string, args=[], options={}) {\n    if (this.isRead(func)) {\n        if (!_.isEmpty(options))\n          throw Error(\"Options specified but ignored.\")\n        return this.callRead(func, args) // returns the read value\n      } else\n        return this.callWrite(func, args, options) // returns the block number\n  }\n\n  // Getter functions\n  getContractAddress(): string {\n    return this._contract.address\n  }\n\n  async getAccountAddress(): Promise<string> {\n    return this._genesisAccount.toString()\n  }\n\n  async getBlockTimestamp(blockNumber: number): Promise<number> {\n    let receipt: any = await this._conflux.getBlockByEpochNumber(blockNumber)\n    return receipt.timestamp\n  }\n\n  async getBlockParentHash(blockNumber: number): Promise<string> {\n    let receipt: any = await this._conflux.getBlockByEpochNumber(blockNumber)\n    return receipt.parentHash\n  }\n\n  hashToString(hash: any): string {\n    return hash\n  }\n\n  async getEvents(): Promise<Event[]> {\n    const logs = await this._conflux.getLogs({address: this._contract.address})\n    let decoded = logs.map(l => this._contract.abi.decodeLog(l))\n    return decoded.map(o => {\n      if (!o) return o\n        let substitutions = {type: \"signature\", object: \"args\"}\n        for (const old_key in substitutions) {\n          const new_key = substitutions[old_key]\n            Object.defineProperty(o, new_key,\n              Object.getOwnPropertyDescriptor(o, old_key))\n            delete o[old_key];\n          }\n        return o\n      }\n    )\n  }\n}\n\ninterface Logger {\n  info(): any\n  error(): any\n}\n"
  },
  {
    "path": "unittests/contracts/address.ds",
    "content": "object signature SimpleAddressInterface = {\n  init : unit -> unit;\n  const get : unit -> address;\n  set : address -> unit\n}\n\nobject SimpleAddress : SimpleAddressInterface {\n  let _val : address := address(0xefca)\n\n  let init () =  \n    _val := address(0xefca);\n    ()\n\n  let get () =\n    let val = _val in\n    val\n\n  let set x =\n    _val := x\n}\n    \nlayer signature SIMPLEADDRESSCONTRACTSig = {\n  simpleAddress : SimpleAddressInterface\n}\n\nlayer SIMPLEADDRESSCONTRACT : [{}] SIMPLEADDRESSCONTRACTSig = {\n  simpleAddress = SimpleAddress\n}\n"
  },
  {
    "path": "unittests/contracts/amm.ds",
    "content": "(* TODO: add emit Events *)\n\n(* PROOFS:\n   1. change re-defined layers\n   2. balance tracks reserve\n   3. increasing k -> algebra\n   4. no path independence, splitting trades is strictly more expensive -> algebra, appendix D\n   5. liquidity token economics is right, i.e., UNI-V2 tracks the actual share of pool --> actually, where is the trading of UNI-V2 Pair tokens? What is its value?\n   6. MOD: slippage control\n   7. ... cost of manipulation (hard)\n*)\n\nobject signature ERC20Interface = {\n  constructor : unit -> unit;\n  mint : address * int -> unit;\n  burn : address * int -> unit;\n  totalSupply : unit -> int;\n  balanceOf : address -> int;\n  transfer : address * int -> bool;\n  approve : address * int -> bool;\n  transferFrom : address * address * int -> bool\n}\n\nobject LiquidityToken : ERC20Interface {\n  let _totalSupply : int := 0\n  let balances : mapping[address] int := mapping_init\n  let allowances : mapping[address] mapping[address] int := mapping_init\n\n  let constructor () =\n    balances[msg_sender] := 100000\n\n  let mint (toA, value) =\n    let totalSupply = _totalSupply in\n    _totalSupply := totalSupply + value;\n    let to_bal = balances[toA] in\n    balances[toA] := to_bal + value\n\n  let burn (fromA, value) =\n    let totalSupply = _totalSupply in\n    _totalSupply := totalSupply - value;\n    let from_bal = balances[fromA] in\n    balances[fromA] := from_bal - value\n\n  let totalSupply () =\n    let bal0 = balances[address(0x0)] in\n    let totalSupply = _totalSupply in\n    let resultU = totalSupply - bal0 in\n    resultU\n\n  let balanceOf tokenOwner =\n    let bal = balances[tokenOwner] in\n    let resultU = bal in\n    resultU\n\n  let transfer(toA, tokens) =\n    let fromA = msg_sender in\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n\n  let approve (spender, tokens) =\n    allowances[msg_sender][spender] := tokens;\n    let resultU = true in\n    resultU\n\n  let transferFrom (fromA, toA, tokens) =\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    let allowed = allowances[fromA][toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens /\\ allowed >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n}\n\nobject signature FixedERC20Interface = {\n  constructor : unit -> unit;\n  const totalSupply : unit -> int;\n  const balanceOf : address -> int;\n  transfer : address * int -> bool;\n  approve : address * int -> bool;\n  transferFrom : address * address * int -> bool\n}\n\nobject FixedSupplyToken : FixedERC20Interface {\n  let _totalSupply : int := 100000\n  let balances : mapping[address] int := mapping_init\n  let allowances : mapping[address] mapping[address] int := mapping_init\n\n  let constructor () =\n    _totalSupply := 100000;\n    balances[msg_sender] := 100000\n\n  let totalSupply () =\n    let bal0 = balances[address(0x0)] in\n    let totalSupply = _totalSupply in\n    let resultU = totalSupply - bal0 in\n    resultU\n\n  let balanceOf tokenOwner =\n    let bal = balances[tokenOwner] in\n    let resultU = bal in\n    resultU\n\n  let transfer(toA, tokens) =\n    let fromA = msg_sender in\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n\n  let approve (spender, tokens) =\n    allowances[msg_sender][spender] := tokens;\n    let resultU = true in\n    resultU\n\n  let transferFrom (fromA, toA, tokens) =\n    let from_bal = balances[fromA] in\n    let to_bal   = balances[toA] in\n    let allowed = allowances[fromA][toA] in\n    assert (fromA <> toA /\\ from_bal >= tokens /\\ allowed >= tokens);\n    balances[fromA] := from_bal-tokens;\n    balances[toA] := to_bal+tokens;\n    let resultU = true in\n    resultU\n}\n\n(* this AMM supports ERC20 tokens, ETH can be incorporated as WETH for trading *)\nobject signature AMMInterface = {\n  constructor : unit -> unit;\n  (* swap : int * int * address -> unit; *)\n\n  coarsed simpleSwap0 : address -> int; (* transfer token0 to amm, results number of token1 swapped *)\n\n  (* router *)\n  (* swapTokensForExactTokens\n  swapExactTokensForTokens\n  addLiquidity (* why restrain the liquidity to not depreciating an asset too much? *)\n  removeLiquidity *)\n\n\tconst getReserve0 : unit -> int;\n\tconst getReserve1 : unit -> int;\n\tconst getBalance0 : unit -> int;\n\n  (* fund management functions *)\n  coarsed mint : address -> unit; (* provide liquidity to this pair *)\n  coarsed burn : address -> unit; (* remove liquidity from this pair *)\n\n  coarsed skim : address -> unit; (* arbitrage to force balances to match reserves *)\n  coarsed sync : unit -> unit; (* force reserves to match balances *)\n  k : unit -> int; (* get the constant product *)\n\n  (* oracles *)\n  (* we do not provide Uniswap V2 version of smoothed oracles at this moment *)\n  quote0 : int -> int; (* given some amount of an asset and pair reserves, returns an equivalent amount of the other asset *)\n  getAmountOut0 : int -> int; (* given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset *)\n  getAmountIn0 : int -> int; (* given an output amount of an asset and pair reserves, returns a required input amount of the other asset *)\n}\n\n(* assuming 0.3% txn fee, excluding the 0.05% additional fee in Uniswap V2 design *)\n(* we do not support liquidity tokens at the moment *)\nobject AutomatedMarketMaker\n  ( liquidityToken: ERC20Interface,\n    erc20Token0: FixedERC20Interface,\n    erc20Token1: FixedERC20Interface) : AMMInterface {\n\n  let _token0 : address := address(0xdac17f958d2ee523a2206206994597c13d831ec7) (* USDT *)\n  let _token1 : address := address(0x6b175474e89094c44da98b954eedeac495271d0f) (* DAI *)\n  let _owner : address := address(0x0)\n  let _reserve0 : int := 0\n  let _reserve1 : int := 0\n  let blockTimestampLast : int := 0 (* new oracle *)\n  let price0CumulativeLast : int := 0 (* new oracle *)\n  let price1CumulativeLast : int := 0 (* new oracle *)\n  let kLast : int := 0 (* reserve0 * reserve1, as of immediately after the most recent liquidity event *)\n\n  let constructor () =\n    _owner := msg_sender\n\n\tlet getReserve0 () =\n\t\tlet reserve0 = _reserve0 in\n\t\treserve0\n\n\tlet getReserve1 () =\n\t\tlet reserve1 = _reserve1 in\n\t\treserve1\n\n\tlet getBalance0 () =\n    let balance0 = erc20Token0.balanceOf(this_address) in\n\t\tbalance0\n\n  (* transfer token0 and token1 to this contract, then mint liquidity tokens *)\n  let mint (toA) =\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let amount0 = balance0 - reserve0 in\n    let amount1 = balance1 - reserve1 in\n    (* update reserve 0 and reserve 1 *)\n    let totalSupply = liquidityToken.totalSupply() in\n    let liquidity = if totalSupply = 0\n      then\n        begin\n          liquidityToken.mint(address(0x0), 1000); (* lock the first liquidity tokens*)\n          amount0 * amount1 - 1000 (* in Uniswap this should be square-rooted *)\n        end\n      else\n        let x = amount0 * totalSupply / reserve0 in\n        let y = amount1 * totalSupply / reserve1 in\n        if x < y then x else y\n    in\n    assert (liquidity > 0);\n    liquidityToken.mint(toA, liquidity);\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  (* need toA first transfer liquidity tokens to this contract, then operate *)\n  (* it does not use ERC20 style allowances, just direct transfer *)\n  let burn (toA) =\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let liquidity = liquidityToken.balanceOf(this_address) in\n    let totalSupply = liquidityToken.totalSupply() in\n    let amount0 = liquidity * balance0 / totalSupply in\n    let amount1 = liquidity * balance1 / totalSupply in\n    assert (amount0 > 0 /\\ amount1 > 0);\n    liquidityToken.burn(this_address, liquidity);\n    let success = erc20Token0.transfer(toA, amount0) in\n    assert (success);\n    let success = erc20Token1.transfer(toA, amount1) in\n    assert (success);\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  (* adhere to the stanford paper formalization, targeted for vanilla proof *)\n  let simpleSwap0 (toA) =\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let amount0In = balance0 - reserve0 in\n    let token0 = _token0 in\n    let token1 = _token1 in\n    assert (toA <> token0 /\\ toA <> token1);\n    assert (amount0In > 0);\n    assert (reserve0 > 0 /\\ reserve1 > 0);\n    let amountInWithFee = amount0In * 997 in\n    let numerator = amountInWithFee * reserve1 in\n    let denominator = reserve0 * 1000 + amountInWithFee in\n    let result = numerator / denominator in\n    let success = erc20Token1.transfer(toA, result) in\n    assert (success);\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    _reserve0 := balance0;\n    _reserve1 := balance1;\n    let resultU = result in\n    resultU\n\n  (* derives from Uniswap V2 flashswap, but not flashswap since DeepSEA does not allow control-flow aggregation  *)\n  (* first transfer tokens to this contract, then call swap to swap them *)\n  (* notice this does not refund, so possibly not optimal rate *)\n  (* let swap (amount0Out, amount1Out, toA) =\n    assert (amount0Out > 0 \\/ amount1Out > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let token0 = _token0 in\n    let token1 = _token1 in\n    assert (amount0Out < reserve0 /\\ amount1Out < reserve1);\n    assert (toA <> token0 /\\ toA <> token1);\n    (* check the assets satisfy what is wanted *)\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    (* we can prove that balance > reserve here *)\n    let amount0In = helper.getAmountIn(balance0, 0, reserve0) in (* balance0 - reserve0 *)\n    let amount1In = helper.getAmountIn(balance1, 0, reserve1) in\n    assert (amount0In > 0 \\/ amount1In > 0);\n    let balance0Adjusted = helper.getBalanceAdjusted(balance0 - amount0Out, amount0In) in\n    let balance1Adjusted = helper.getBalanceAdjusted(balance1 - amount1Out, amount1In) in\n    assert (balance0Adjusted * balance1Adjusted > reserve0 * reserve1 * 1000 * 1000);\n\n    (* sending money *)\n    let _ = if amount0Out > 0 then\n      let success = erc20Token0.transfer(toA, amount0Out) in\n      assert (success);\n      ()\n    else\n      ()\n    in\n    let _ = if amount1Out > 0 then\n      let success = erc20Token1.transfer(toA, amount1Out) in\n      assert (success);\n      ()\n    else\n      ()\n    in\n    (* flash swap style: sent money (amount0Out, amount1Out) to msg_sender, now wait to get back *)\n    (* after got money back *)\n    (* let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let amount0In = helper.getAmountIn(balance0, amount0Out, reserve0) in\n    let amount1In = helper.getAmountIn(balance1, amount1Out, reserve1) in\n    assert (amount0In > 0 \\/ amount1In > 0);\n    let balance0Adjusted = helper.getBalanceAdjusted(balance0, amount0In) in\n    let balance1Adjusted = helper.getBalanceAdjusted(balance1, amount1In) in\n    assert (balance0Adjusted * balance1Adjusted > reserve0 * reserve1 * 1000 * 1000); *)\n    (* update the reserves, also update the oracle if possible *)\n    _reserve0 := balance0;\n    _reserve1 := balance1 *)\n\n  let skim (toA) =\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    let skim0 = balance0 - reserve0 in\n    let skim1 = balance1 - reserve1 in\n    let success = erc20Token0.transfer(toA, skim0) in\n    assert (success);\n    let success = erc20Token1.transfer(toA, skim1) in\n    assert (success)\n\n  let sync () =\n    let balance0 = erc20Token0.balanceOf(this_address) in\n    let balance1 = erc20Token1.balanceOf(this_address) in\n    _reserve0 := balance0;\n    _reserve1 := balance1\n\n  let k () =\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    let resultU = reserve0 * reserve1 in\n    resultU\n\n  (* Uniswap did not use Q112 library to do this computation *)\n\n  (* given amount0 of token0, the equivalent value in token1 *)\n  let quote0 (amount0) =\n    assert (amount0 > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    assert (reserve0 > 0 /\\ reserve1 > 0); (* prove that this can be dropped? *)\n    let resultU = amount0 * reserve1 / reserve0 in\n    resultU\n\n  let getAmountOut0 (amount0In) =\n    assert (amount0In > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    assert (reserve0 > 0 /\\ reserve1 > 0);\n    let amountInWithFee = amount0In * 997 in\n    let numerator = amountInWithFee * reserve1 in\n    let denominator = reserve0 * 1000 + amountInWithFee in\n    let resultU = numerator / denominator in\n    resultU\n\n  let getAmountIn0 (amount0Out) =\n    assert (amount0Out > 0);\n    let reserve0 = _reserve0 in\n    let reserve1 = _reserve1 in\n    assert (reserve0 > 0 /\\ reserve1 > 0);\n    let numerator = reserve1 * amount0Out * 1000 in\n    let denominator = (reserve0 - amount0Out) * 997 in\n    let resultU = (numerator / denominator) + 1 in\n    resultU\n}\n\nlayer signature AMMLibSig = {\n  erc20Token0 : FixedERC20Interface;\n  erc20Token1 : FixedERC20Interface;\n  liquidityToken : ERC20Interface;\n}\n\nlayer AMMLIB : [{}] AMMLibSig = {\n  erc20Token0 = address(0x10033) <: FixedSupplyToken;\n  erc20Token1 = address(0x10032) <: (clone FixedSupplyToken); (* cloned an object *)\n  liquidityToken = address(0x10031) <: LiquidityToken;\n}\n\nlayer signature AMMSig = {\n  amm : AMMInterface\n}\n\nlayer AMM : [AMMLibSig] AMMSig = {\n  amm = address(0x10030) <: AutomatedMarketMaker\n}\n\nlayer COMPLETE = AMM @ AMMLIB\n"
  },
  {
    "path": "unittests/contracts/asserts.ds",
    "content": "object signature OS = {\n  f : unit -> unit;\n  g : unit -> unit;\n  h : unit -> unit;\n  i : unit -> unit;\n  j : unit -> unit\n}\n\nobject O : OS {\n  (* should succeed *)\n  let f () =\n    assert (2+2 = 4)\n\n  (* should revert *)\n  let g () =\n    assert (2+2 = 5)\n\n  (* should revert *)\n  let h () =\n    deny (2+2 = 4)\n    \n  (* should succeed *)\n  let i () =\n    deny (2+2 = 5)\n\n  (* should revert *)\n  let j () =\n    fail\n\n}\n\nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "unittests/contracts/builtins.ds",
    "content": "object signature OS = {\n  f : unit -> bool;\n    \n  const get_address : unit -> address;\n  const get_origin : unit -> address;\n  const get_caller : unit -> address;\n  const get_callvalue : unit -> uint;\n  const get_coinbase : unit -> uint;\n  const get_timestamp : unit -> uint;\n  const get_number : unit -> uint;\n  (* const get_chainid : unit -> uint; *) (*Not supported by our ethereum test yet*)\n  (* const get_selfbalance : unit -> uint; *)\n  const get_balance_this : unit -> uint;\n  const get_blockhash_prev : unit -> uint\n}\n\nobject O : OS {\n  let _address : address := address(0)\n  let _origin : address := address(0)\n  let _caller : address := address(0)\n  let _callvalue : uint := 0u0\n  let _coinbase : uint := 0u0\n  let _timestamp : uint := 0u0\n  let _number : uint := 0u0\n  (* let _chainid : uint := 0u0 *)\n  (* let _selfbalance : uint := 0u0 *)\n  let _balance_this : uint := 0u0\n  let _blockhash_prev : uint := 0u0\n  \n    \n  let get_address () = let x = _address in x\n  let get_origin () = let x = _origin in x\n  let get_caller () = let x = _caller in x\n  let get_callvalue () = let x = _callvalue in x\n  let get_coinbase () = let x = _coinbase in x\n  let get_timestamp () = let x = _timestamp in x\n  let get_number () = let x = _number in x\n  (* let get_chainid () = let x = _chainid in x *)\n  (* let get_selfbalance () = let x = _selfbalance in x *)\n  let get_balance_this () = let x = _balance_this in x\n  let get_blockhash_prev () = let x = _blockhash_prev in x\n    \n  let f () =\n    _address := this_address; \n    _origin := tx_origin;\n    _caller := msg_sender;\n    _callvalue := msg_value;\n    _coinbase := block_coinbase; \n    _timestamp := block_timestamp;\n    _number := block_number;\n    (* _chainid := chain_id; *)\n    (* _selfbalance := self_balance; *)\n    _balance_this := balance(this_address);\n    _blockhash_prev := blockhash(block_number-0u1);\n    true\n }\n\nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "unittests/contracts/constructor.ds",
    "content": "type addr := int\n\ntype Test_struct = {\n  ts_int_val : int;\n  ts_addr_val : addr\n}\n\nobject signature LowerInterface = {\n  constructor : int -> unit;\n  test_val : unit -> unit;\n  const get_x : unit -> int;\n  const get_y : unit -> uint;\n  const get_temp_val : unit -> int \n}\n\nobject Lower : LowerInterface {\n  let x : int := 6\n  let y : uint := 0u123\n  let temp_val : int := 1\n\n  let constructor y = \n     let temp_test_val = 2 in\n      temp_val := temp_test_val;\n     x := y\n\n  let test_val () = \n    let a = x in\n      assert(a = 6)\n\n  let get_x () =\n    let _x = x in\n      _x\n\n  let get_y () =\n    let _y = y in\n      _y \n\n  let get_temp_val () =\n    let _temp_val = temp_val in\n    _temp_val\n}\n\nlayer LOWER : [ { } ] { lower : LowerInterface }  = {\n  lower = Lower\n}\n\nobject signature UpperInterface = {\n  constructor : int -> unit;\n  const get : unit -> unit\n}\n\nobject Upper (lower : LowerInterface) : UpperInterface  {\n  let int_val : int := 10\n  let uint_val : uint := 0u10\n  let bool_val : bool := false\n  let address_val : address := address(0xefca)\n  let mapping_val : mapping[address] uint := mapping_init\n  let array_val : array[64] int := array_init\n  let struct_val : Test_struct := { ts_int_val=5; ts_addr_val=6 }\n  let hash_val : hashvalue := null_hash\n  let constructor_int_val : int := 123\n  let constructor_temp_intval : int := 1234\n\n  let constructor z =\n      let temp_test_int = 20 in\n        constructor_temp_intval := temp_test_int;\n      constructor_int_val := z\n\n  let get () =\n   let a = uint_val in \n      assert(a = 0u10);\n\n    let b = int_val in\n      assert(b = 10);\n\n    let c = bool_val in\n      assert(c = false);\n\n    let d = address_val in\n      assert(d = address(0xefca));\n\n    let e = mapping_val[msg_sender] in\n      assert(e = 0u0);\n\n    let f = array_val[0] in\n      assert(f = 0);\n\n    let i = struct_val.ts_int_val in\n      assert(i = 5);\n\n    let j = struct_val.ts_addr_val in\n      assert(j = 6);\n\n    let l = lower.get_y() in\n      assert(l = 0u123);\n\n    (* in lower layer, the x value firstly initialize as 6, and update in constructor to 100 by input argument *)\n    let g = lower.get_x() in\n      assert(g = 100);\n\n    (* the constructor code overwrite the initializer's value, should be 321 here by input argument *)\n    let k = constructor_int_val in\n      assert(k = 321);\n\n    let o = constructor_temp_intval in\n      assert(o = 20);\n\n    let m = lower.get_temp_val() in\n      assert(m = 2)\n\n}\n\nlayer UPPER : [{ lower : LowerInterface }]\n    { upper : UpperInterface    }\n= {\n  upper = Upper\n}\n\nlayer CONTRACT = UPPER @ LOWER\n"
  },
  {
    "path": "unittests/contracts/constructor2.ds",
    "content": "(* An example where the constructors take more than one argument. *)\n\nobject signature LowerInterface = {\n  constructor : int * int -> unit; \n  test_lower : unit -> unit; \n}\n\nobject Lower : LowerInterface {\n  let x : int := 0\n  let y : int := 0\n\n  let constructor (_x, _y) =\n    x := _x;\n    y := _y  \n\n  let test_lower () = \n    let _x = x in\n    let _y = y in\n    assert(_x = 6 /\\ _y = 7) \n\n}\n\nlayer LOWER : [ { } ] { lower : LowerInterface }  = {\n  lower = Lower\n}\n\nobject signature UpperInterface = {\n  constructor : int * int -> unit; \n  test_upper : unit -> unit;\n  const get_w : unit -> int    \n}\n\nobject Upper (lower : LowerInterface) : UpperInterface  {\n  let z : int := 0\n  let w : int := 0\n\n  let constructor (_z, _w) =\n    z := _z;\n    w := _w  \n\n  let test_upper () =\n    lower.test_lower(); \n    let _z = z in\n    let _w = w in\n    assert (_z = 8 /\\ _w = 9);\n    ()\n\n  let get_w () =\n    let _w = w in\n    w\n}\n\nlayer UPPER : [{ lower : LowerInterface }]\n    { upper : UpperInterface    }\n= {\n  upper = Upper\n}\n\nlayer CONTRACT = UPPER @ LOWER\n"
  },
  {
    "path": "unittests/contracts/events.ds",
    "content": "event\n  | E0\n\nevent\n  | E1 (v : uint)\n\nevent\n    E2 (v1 : uint) (v2 : bool)\n\nevent\n  | IE1 (v : uint indexed)\n  | IE2 (v1 : uint) (v2 : bool indexed)      \n\nevent\n  | Transfer (fromA : uint indexed) (toA: uint indexed) (value: int)\n  | Approval (owner: uint indexed) (spender: uint indexed) (value: int) \n\nobject signature OS = {\n  f : unit -> bool    \n}\n\nobject O : OS {    \n  let f () =\n    emit E0();\n    emit E1(0u42);\n    emit E2(0u1, false);\n    emit IE1(0u13);\n    emit IE2(0u2, false);\n    emit Transfer(0u1, 0u2, 42);\n    emit Approval(0u1, 0u2, 42);\n    true\n }\n\nlayer L = {\n  o = O\n}\n    \n"
  },
  {
    "path": "unittests/contracts/forloop.ds",
    "content": "object signature OS = {\n  multiply : int * int -> unit\n}\n\nobject O : OS {\n\n  let _val : int := 0\n  \n  (* a can be negative;\n     b must be positive *)\n  let multiply (a, b) =\n    for i = 0 to b do\n      begin\n        let val = _val in\n        _val := val + a\n      end;\n    let val = _val in assert(val = a*b);\n    _val := 0\n\n}\n\nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "unittests/contracts/keccak256.ds",
    "content": "object signature OS = {\n  const hash1 : uint -> hashvalue;\n  const hash2 : uint * uint -> hashvalue;\n  const hash2_1 : uint * hashvalue -> hashvalue;\n  const hash2_2 : hashvalue * uint -> hashvalue;\n  const hash2_3 : hashvalue * hashvalue -> hashvalue;\n\n  const hash1a : address -> hashvalue;\n  const hash2a : address * address -> hashvalue;\n  const hash2_1a : address * hashvalue -> hashvalue;      \n}\n\nobject O : OS {\n\n  let blah : hashvalue := null_hash\n    \n  let hash1 x =\n    keccak256(x)\n\n  let hash2 (x, y) =\n    keccak256 (x, y)\n\n  let hash2_1 (x, y) =\n    keccak256 (x, y)\n\n  let hash2_2 (x, y) =\n    keccak256 (x, y)\n\n  let hash2_3 (x, y) =\n    keccak256 (x, y)\n\n  let hash1a x =\n    keccak256(x)\n\n  let hash2a (x, y) =\n    keccak256 (x, y)\n\n  let hash2_1a (x, y) =\n    keccak256 (x, y)\n      \n }\n\n\n    \nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "unittests/contracts/layers1.ds",
    "content": "object signature LowerInterface = {\n  incr : unit -> unit; \n  const get : unit -> int\n}\n\nobject Lower : LowerInterface {\n  let n : int := 0 \n\n  let incr () =\n    let _n = n in\n    n := _n + 1 \n\n  let get () =\n    let _n = n in\n    _n\n\n}\n\nlayer LOWER : [ { } ] { lower : LowerInterface }  = {\n  lower = Lower\n}\n\nobject signature UpperInterface = {\n  f : unit -> int;\n  const get : unit -> int\n}\n\nobject Upper (lower : LowerInterface) : UpperInterface  {\n  let f () =\n    lower.incr();\n    lower.incr(); \n    let n = lower.get() in\n    assert (n = 2);\n    n\n\n  let get() =\n    lower.get()\n\n}\n\nlayer UPPER : [{ lower : LowerInterface }]\n    { upper : UpperInterface    }\n= {\n  upper = Upper\n}\n\nlayer CONTRACT = UPPER @ LOWER"
  },
  {
    "path": "unittests/contracts/match-int.ds",
    "content": "type Status [[int]] =\n  | Ok        [[= 0]]\n  | Triggered [[= 1]]\n  | Finalized [[= 2]]\n\nobject signature OS = {\n  f : unit -> int\n}\n\nobject O : OS {\n  let f () =\n    let x = Ok in\n    let v = match x with\n    | Ok =>\n       40\n    | Triggered =>\n       41\n    | Finalized =>\n       42 \n    end \n    in\n    begin\n      assert (v = 40);\n      v\n    end\n }\n\nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "unittests/contracts/simple_call.ds",
    "content": "object signature FixedERC20Interface = {\n  const getNum : unit -> int;\n  doubleNum : unit -> unit;\n  const sum : int * int -> int;\n}\n\nobject FixedSupplyToken : FixedERC20Interface {\n  let myNum : int := 5\n\n  let getNum () =\n    let num = myNum in\n    num\n\n  let doubleNum () =\n    let num = myNum in\n    myNum := num * 2;\n    ()\n\n\tlet sum (num1, num2) =\n\t\tlet ret = (2 * num1) + num2 in\n\t\tret\n}\n\nobject signature AMMInterface = {\n  call_double : unit -> unit;\n  const call_get : unit -> int;\n  const call_sum : int * int -> int;\n  const stress_call : int * int -> int;\n}\n\nobject AutomatedMarketMaker (erc20Token0: FixedERC20Interface) : AMMInterface {\n  let call_double () =\n    erc20Token0.doubleNum()\n\n  let call_get () =\n    let ret = erc20Token0.getNum() in\n    ret\n\n\tlet call_sum (num1, num2) =\n\t\tlet ret = erc20Token0.sum(num1, num2) in\n\t\tret\n\n\tlet stress_call (num1, num2) =\n\t\tlet temp1 = 1 in\n\t\tlet temp2 = 2 in\n\t\tlet temp3 = 3 in\n\t\tlet temp4 = 4 in\n\t\tlet temp5 = 5 in\n\t\t(*let temp6 = 6 in (* breaks down *)\n\t\tlet temp7 = 7 in\n\t\tlet temp8 = 8 in\n\t\tlet temp9 = 9 in\n\t\tlet temp10 = 10 in\n\t\tlet temp11 = 11 in\n\t\tlet temp12 = 12 in\n\t\tlet temp13 = 13 in\n\t\tlet temp14 = 14 in\n\t\tlet temp15 = 15 in\n\t\tlet temp16 = 16 in\n\t\tlet temp16 = 16 in*)\n\t\tlet ret = erc20Token0.sum(num1, num2) in\n\t\tret\n}\n\n(* CUT *)\n\nlayer signature AMMLibSig = {\n  erc20Token0 : FixedERC20Interface;\n}\n\nlayer AMMLIB : [{}] AMMLibSig = {\n  erc20Token0 = address(0x10033) <: FixedSupplyToken;\n}\n\nlayer signature AMMSig = {\n  amm : AMMInterface\n}\n\nlayer AMM : [AMMLibSig] AMMSig = {\n  amm = address(0x10030) <: AutomatedMarketMaker\n}\n\nlayer COMPLETE = AMM @ AMMLIB\n"
  },
  {
    "path": "unittests/contracts/struct.ds",
    "content": "type addr := int\n\nobject signature OS = {\n  initialize : int * int -> unit;\n  hasOwner : unit -> unit;\n  hasSupply : int -> unit;\n}\n\ntype Token = {\n  totalSupply : int;\n  owner : addr\n}\n\nobject O : OS {\n  let token : Token := { totalSupply=0; owner=0 }\n\n  let initialize (_totalSupply, _owner) = \n    token.totalSupply := _totalSupply;\n    token.owner := _owner;\n    ()\n\n  let hasOwner () =\n    let _owner = token.owner in\n      assert (_owner <> 0)\n\n  let hasSupply (amount) =\n    let _totalSupply = token.totalSupply in\n      assert (_totalSupply >= amount)\n  \n}\n\nlayer L = {\n  o = O\n}\n"
  },
  {
    "path": "unittests/cut_amm.sh",
    "content": "#!/bin/bash\n\namm=\"contracts/amm.ds\"\n\nfixed_supply_token='\nlayer L = {\n  o = FixedSupplyToken\n}'\n\nliquidity_token='\nlayer L = {\n  o = LiquidityToken \n}'\n\namm_cut=$( gsed '/\\(\\* CUT \\*\\)/Q' \"$amm\")\n\necho \"$amm_cut\" \"$fixed_supply_token\" | tee erc20Token0.ds erc20Token1.ds >/dev/null\necho \"$amm_cut\" \"$liquidity_token\" > liquidityToken.ds\n"
  },
  {
    "path": "unittests/ethereum-chain.ts",
    "content": "import { ethers } from 'ethers'\nimport { Chain, Event } from './chain'\nimport { cleanCombined, getJsonFilename } from './utils'\nimport _ from 'lodash'\n\n\nexport class EthereumChain implements Chain {\n  private _provider: ethers.providers.JsonRpcProvider\n  private _contract: ethers.Contract\n  private _contracts: ethers.Contract[]\n  private _abi: any[]\n  private _signer: ethers.providers.JsonRpcSigner\n  private _creator: string\n\n  constructor() {\n    const endpoint = \"http://localhost:8545\";\n    this._provider = new ethers.providers.JsonRpcProvider(endpoint);\n\n    this._signer = this._provider.getSigner(0);\n    this._contracts = []\n  }\n\n  async deployContract(jsonFilename: string, constructorArgs=[]) {\n    const combined = require(getJsonFilename(jsonFilename))\n    const {abi, bytecode} = cleanCombined(combined)\n    this._abi = abi\n\n    let factory = new ethers.ContractFactory(abi, bytecode, this._signer);\n    this._contract = await (factory.deploy.apply(factory, constructorArgs));\n    await this._contract.deployed();\n  }\n\n  async deployContracts(jsonFilenames: string[], constructorArgs: any[][]) {\n    for (const i in jsonFilenames) {\n      const combined = require(getJsonFilename(jsonFilenames[i]))\n      const {abi, bytecode} = cleanCombined(combined)\n\n      let factory = new ethers.ContractFactory(abi, bytecode, this._signer);\n      let contract = await (factory.deploy.apply(factory, constructorArgs[i]))\n      this._contracts.push(contract);\n      await this._contracts[i].deployed(); // TODO: parallelize this loop\n    }\n  }\n\n  async callRead(func: string, args=[]) {\n    return await this._contract[func](...args)\n  }\n\n  async callWrite(func: string, args=[], options={}) {\n    let receipt = await this._contract[func](...args, options)\n    return receipt.blockNumber\n  }\n\n  isRead(func: string): boolean {\n    const f = this._abi.find(element => element.name == func)\n    let readStates = [ \"view\", \"pure\" ]\n    return readStates.includes(f.stateMutability)\n  }\n\n  async callMethod(func: string, args=[], options={}) {\n    if (this.isRead(func)) {\n      if (!_.isEmpty(options))\n        throw Error(\"Options specified but ignored.\")\n      return this.callRead(func, args) // returns the read value\n    } else\n    return this.callWrite(func, args, options) // returns the block number\n  }\n\n  getContractAddress(): string {\n    return this._contract.address\n  }\n\n  getContractAddresses(): string[] {\n    return this._contracts.map(c => c.address)\n  }\n\n  async getAccountAddress(): Promise<string> {\n    if (typeof this._creator === 'undefined' || this._creator === null) {\n      this._creator = await this._signer.getAddress();\n    }\n\n    return this._creator\n  }\n\n  async getBlockTimestamp(blockNumber: number): Promise<number> {\n    let block = await this._provider.getBlock(blockNumber)\n    return block.timestamp\n  }\n\n  async getBlockParentHash(blockNumber: number): Promise<string> {\n    let block = await this._provider.getBlock(blockNumber)\n    return block.parentHash\n  }\n\n  hashToString(hash: any): string {\n    return hash.toHexString()\n  }\n\n  async getEvents(): Promise<Event[]> {\n    const logs = await this._provider.getLogs({address: this._contract.address});\n    let iface = new ethers.utils.Interface(this._abi);\n    return logs.map((log) => iface.parseLog(log))\n  }\n}\n"
  },
  {
    "path": "unittests/events_test.ts",
    "content": "import { Chain } from './chain'\nimport { printTest } from './utils'\n\nexport async function runTest(chain: Chain) {\n  await chain.deployContract('events')\n\n  await chain.callMethod(\"f\");\n\n  let events = await chain.getEvents();\n\n  printTest(\"E0 signature\",       events[0].signature == \"E0()\");\n  printTest(\"E1 signature\",       events[1].signature == \"E1(uint256)\");\n  printTest(\"E1 values\",          events[1].args['v'] == 42);\n  printTest(\"E2 signature\",       events[2].signature == \"E2(uint256,bool)\");\n  printTest(\"E2 values\",          events[2].args['v1'] == 1\n                               && events[2].args['v2'] == false);\n  printTest(\"IE1 signature\",      events[3].signature == \"IE1(uint256)\");\n  printTest(\"IE1 values\",         events[3].args['v'] == 13);\n  printTest(\"IE2 signature\",      events[4].signature == \"IE2(uint256,bool)\");\n  printTest(\"IE2 values\",         events[4].args['v1'] == 2\n                               && events[4].args['v2'] == false);\n  printTest(\"Transfer signature\", events[5].signature == \"Transfer(uint256,uint256,uint256)\");\n  printTest(\"Transfer values\",    events[5].args['fromA'] == 1\n                               && events[5].args['toA'] == 2\n                               && events[5].args['value'] == 42);\n  printTest(\"Approval signature\", events[6].signature == \"Approval(uint256,uint256,uint256)\");\n  printTest(\"Approval values\",    events[6].args['owner'] == 1\n                               && events[6].args['spender'] == 2\n                               && events[6].args['value'] == 42);\n}\n\nexport default { runTest }\n"
  },
  {
    "path": "unittests/keccak256_test.ts",
    "content": "import { ethers } from 'ethers'\nimport { Chain } from './chain'\nimport { printTest } from './utils'\n\nfunction checkHash(chain: Chain, hash1, vals: string[]) {\n  return chain.hashToString(hash1) == ethers.utils.keccak256(ethers.utils.concat(vals))\n}\n\nexport async function runTest(chain: Chain) {\n  await chain.deployContract('keccak256')\n\n  let x = \"0x000000000000000000000000000000000000000000000000000000000000002a\";\n  let x_hash = await chain.callMethod(\"hash1\", [x])\n  printTest(\"hash1\", checkHash(chain, x_hash, [x]))\n\n  let y = \"0x000000000000000000000000000000000000000000000000000000000000002b\";\n  let xy_hash = await chain.callMethod(\"hash2\", [x,y]);\n  printTest(\"hash2\", checkHash(chain, xy_hash, [x,y]))\n\n  let xy_hash_1 = await chain.callMethod(\"hash2_1\", [x,y]);\n  printTest(\"hash2_1\", checkHash(chain, xy_hash_1, [x,y]))\n\n  let xy_hash_2 = await chain.callMethod(\"hash2_2\", [x,y]);\n  printTest(\"hash2_2\", checkHash(chain, xy_hash_2, [x,y]))\n\n  let xy_hash_3 = await chain.callMethod(\"hash2_3\", [x,y]);\n  printTest(\"hash2_3\", checkHash(chain, xy_hash_3, [x,y]))\n\n  // Note that below, we get different results for the hashes of addresses than Solidity would give,\n  // becuase we have more zero-padding.\n\n  let xa = ethers.utils.getAddress(\"0x000000000000000000000000000000000000002a\");\n  let xa_hash = await chain.callMethod(\"hash1a\", [xa]);\n  printTest(\"hash1a\", checkHash(chain, xa_hash, [x])) //note: x, not xa.\n\n  let xy_hash_1a = await chain.callMethod(\"hash2_1a\", [xa,y]);\n  printTest(\"hash2_1a\", checkHash(chain, xy_hash_1, [x,y])) //note: x, not xa.\n\n}\n\nexport default { runTest }\n"
  },
  {
    "path": "unittests/package.json",
    "content": "{\n  \"name\": \"unittests\",\n  \"version\": \"1.0.0\",\n  \"dependencies\": {\n    \"@types/node\": \"^14.14.9\",\n    \"ethers\": \"^5.0.20\",\n    \"ganache-cli\": \"^6.12.1\",\n    \"js-conflux-sdk\": \"^1.1.1\",\n    \"js-yaml\": \"^3.14.0\",\n    \"lodash\": \"^4.17.20\",\n    \"typescript\": \"^4.1.2\"\n  },\n  \"scripts\": {\n    \"ganache\": \"ganache-cli\",\n    \"tsc\": \"tsc\"\n  },\n  \"devDependencies\": {\n    \"@types/js-yaml\": \"^4.0.0\",\n    \"@types/lodash\": \"^4.14.167\"\n  }\n}\n"
  },
  {
    "path": "unittests/reference/README.md",
    "content": "This directory has Solidity programs doing the \"same thing\" as some of the unit\ntests, they were created to check that our behaviour is abi-compatible with\nSolidity.\n"
  },
  {
    "path": "unittests/reference/events.sol",
    "content": "pragma solidity ^0.5.12;\n\ncontract O {\n    event E1 (uint v);\n    event E2 (uint v1, bool v2);\n    event IE1 (uint indexed v);\n    event IE2 (uint v1, bool indexed v2);\n    event Transfer (uint indexed fromA, uint indexed toA, uint value);\n    event Approval (uint indexed owner, uint indexed spender, uint value);\n    \n\n    function f() public {\n       emit E1(42);\n       emit E2(1, false);\n       emit IE1(13);\n       emit IE2(2, false);\n       emit Transfer(1, 2, 42);\n       emit Approval(1, 2, 42);\n    }\n\n}\n"
  },
  {
    "path": "unittests/reference/keccak256.sol",
    "content": "pragma solidity ^0.5.12;\n\ncontract O {\n    function hash1(uint x ) public pure returns (uint) {\n       return uint256(keccak256(abi.encodePacked(x))); \n    }\n    \n    function hash2(uint x, uint y) public pure returns (uint) {\n       return uint256(keccak256(abi.encodePacked(x,y))); \n    }\n\n    function hash1a(address x) public pure returns (uint) {\n       return uint256(keccak256(abi.encodePacked(uint(x)))); \n    }\n\n}\n"
  },
  {
    "path": "unittests/replace_addresses.sh",
    "content": "#!/bin/bash\n\nset -x\n\ndsc='../binaries/MacOS/dsc'\namm='contracts/amm.ds'\namm_basename=$(basename $amm)\namm_with_addresses=${amm_basename%.ds}_with_addresses.ds\n\naddresses=$(</dev/stdin)\naddr1=$(echo $addresses | cut -d \" \" -f 1)\naddr2=$(echo $addresses | cut -d \" \" -f 2)\naddr3=$(echo $addresses | cut -d \" \" -f 3)\n\nsed \\\n\t-e \"s/erc20Token0.*=.*address(.*)/erc20Token0 = address($addr1)/\" \\\n\t-e \"s/erc20Token1.*=.*address([^)]*)/erc20Token1 = address($addr2)/\" \\\n\t-e \"s/liquidityToken.*=.*address(.*)/liquidityToken = address($addr3)/\" \\\n\t\"$amm\" > \"$amm_with_addresses\"\n\n\"$dsc\" \"$amm_with_addresses\" combined-json > \"build/${amm_with_addresses%.ds}.json\"\n"
  },
  {
    "path": "unittests/run_unittests.sh",
    "content": "#!/bin/bash\n\ndsc=../binaries/MacOS/dsc\n\nif [[ ! -d  build ]]; then mkdir build; fi\n\n./cut_amm.sh\n\nfor deepsea in ./contracts/*.ds; do\n\tbasename=${deepsea##*/}\n  echo Compiling $basename\n  $dsc $deepsea combined-json > build/${basename%.ds}.json\ndone\n\nnpm run tsc\nnode build/tests.js\n"
  },
  {
    "path": "unittests/start_conflux.sh",
    "content": "#!/bin/bash\n\n# Set this to the location of the conflux repo.\nconflux=~/Documents/conflux-rust\n\ncp ./tethys.toml $conflux/run\ngenPrivateKey=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ngenesis_secrets=$conflux/run/genesis_secrets.txt\nif [[ -f $genesis_secrets ]]; then rm $genesis_secrets; fi\necho $genPrivateKey > $genesis_secrets\ncd $conflux/run\n./clear_state.sh\n$conflux/target/release/conflux --config tethys.toml\n"
  },
  {
    "path": "unittests/test-unittest.ts",
    "content": "import { Chain } from './chain'\nimport { padName } from './utils'\n\nexport async function runTest(\n  chain: Chain, name: string, calls: any[], constructorArgs=[], verbose=false) {\n\n  await chain.deployContract(name, constructorArgs)\n\n  for (const func of calls) {\n    let padded = padName(func.name)\n    await chain.callMethod(func.name, func.args, func.options)\n    .then((result) => {\n      if (func.expectValue) {\n        if (result == func.expectValue)\n          console.log(padded, \"pass✅ (with correct value)\");\n        else\n          console.log(padded, \"fail❌ (expected \"\n                                + func.expectValue\n                                + \" but got \" + result + \")\");\n      }\n      else if (func.expectSuccess)\n        console.log(padded, \"pass✅\");\n      else\n        console.log(padded, \"fail❌\");\n\n      if (verbose)  console.log(JSON.stringify(result, null, 2));\n    }, (error) => {\n      if (!func.expectSuccess)\n        console.log(padded, \"pass✅\");\n      else\n        console.log(padded, \"fail❌\");\n\n      if (verbose) console.log(JSON.stringify(error, null, 2));\n    })\n  }\n}\n"
  },
  {
    "path": "unittests/tests.ts",
    "content": "import { ConfluxChain } from './conflux-chain'\nimport { EthereumChain } from './ethereum-chain'\nimport { runTest } from './test-unittest'\nimport yaml from 'js-yaml'\nimport fs from 'fs'\n\nimport builtin from './builtins_test'\nimport keccak256 from './keccak256_test'\nimport events from './events_test'\nimport amm from './amm_test'\n\nasync function main() {\n  const tests = yaml.load(fs.readFileSync('./tests.yml', 'utf8'))\n\n  const chains = [\n    new EthereumChain,\n    new ConfluxChain\n  ]\n\n  const specialTests = {\n    builtin: builtin,\n    keccak256: keccak256,\n    events: events,\n  }\n\n  for (const chain of chains) {\n    console.log(chain.constructor.name.padEnd(37, '*'))\n\n    // Special tests each have their own file, because they have results that\n    // need to be checked against non-constant values, or they look at event\n    // logs.\n    for (const t in specialTests) {\n      console.log(t.padEnd(30, '-'))\n      await specialTests[t].runTest(chain)\n    }\n\n    if (! (tests instanceof Object)) {\n      return // type assertion so `tests` can be looped over\n    }\n    // These are tests that can be described in the `tests.json` file. They\n    // either check whether a method call passes/reverts or the result of a\n    // method's return value against a constant expected value.\n    for (const t in tests) {\n      console.log(t.padEnd(30, '-'))\n      await runTest(chain, t, tests[t].calls, tests[t].constructorArgs);\n    }\n  }\n\n  amm.runTest(new Array(4).fill(null).map(() => (new EthereumChain)))\n  // amm.runTest(new Array(4).fill(null).map(() => (new ConfluxChain)))\n\n}\n\nmain()\n"
  },
  {
    "path": "unittests/tests.yml",
    "content": "address:\n  calls:\n  - args: []\n    expectSuccess: true\n    name: init\n  - args: []\n    expectValue: 0x000000000000000000000000000000000000efca\n    name: get\n  - args: [\"0xd115bffabbdd893a6f7cea402e7338643ced44a6\"]\n    expectSuccess: true\n    name: set\n  - args: []\n    expectValue: 0xd115bffabbdd893a6f7cea402e7338643ced44a6\n    name: get\nasserts:\n  calls:\n  - args: []\n    expectSuccess: true\n    name: f\n  - args: []\n    expectSuccess: false\n    name: g\n  - args: []\n    expectSuccess: false\n    name: h\n  - args: []\n    expectSuccess: true\n    name: i\n  - args: []\n    expectSuccess: false\n    name: j\nconstructor:\n  calls:\n  - args: []\n    expectSuccess: true\n    name: get\n  constructorArgs: [100, 321]\nconstructor2:\n  calls:\n  - args: []\n    expectSuccess: true\n    name: test_upper\n  - args: []\n    expectValue: 9\n    name: get_w\n  constructorArgs: [6, 7, 8, 9]\nforloop:\n  calls:\n  - args:\n    - 3\n    - 5\n    expectSuccess: true\n    name: multiply\n  - args:\n    - 100\n    - 5\n    expectSuccess: true\n    name: multiply\nlayers1:\n  calls:\n  - args: []\n    expectSuccess: true\n    name: f\n  constructorArgs: []\nmatch-int:\n  calls:\n  - args: []\n    expectSuccess: true\n    name: f\nstruct:\n  calls:\n  - args:\n    - 0\n    - 0\n    expectSuccess: true\n    name: initialize\n  - args: []\n    expectSuccess: false\n    name: hasOwner\n  - args:\n    - 5\n    expectSuccess: false\n    name: hasSupply\n  - args:\n    - 5\n    - 17\n    expectSuccess: true\n    name: initialize\n  - args:\n    - 4\n    expectSuccess: true\n    name: hasSupply\n  - args:\n    - 5\n    expectSuccess: true\n    name: hasSupply\n  - args:\n    - 6\n    expectSuccess: false\n    name: hasSupply\n  - args: []\n    expectSuccess: true\n    name: hasOwner\n"
  },
  {
    "path": "unittests/tethys.toml",
    "content": "# bootnodes is a list of nodes that a conflux node trusts, and will be used to sync the blockchain when a node starts. \n# The value is a string divided by comma without space, and every entry is a node\n# A node is identified by cfxnode://NODEID@PUBLICIP:PORT\n# By default, no bootnodes are provided. What's provided here is a list of nodes that Conflux Team maintains across the world.\n\n# bootnodes=\"cfxnode://dc79bc70833e797ba41eff5bda67c0484abca4918ef38289b5f96acd3daa890eadc85d46fc71f250a8ac51b0c4ab70b3812b1ed3c8f10a9e996b6663be34f1f1@47.88.79.174:32323,cfxnode://28d3cdf07b7deb41bb52dee0a952fc599f46f6b89cc513ecfd1020d5a66e73e7cfe68543e64962aefbcae7123a6c390a43144f5900f0bc181c3c89ffdf9ff81b@39.97.225.254:32323,cfxnode://9991bd3f5d0e614a3fcc8640fdfcbefbc0e95de7fa68baff4cb95f8614fa162b080a497bca5037196920bf68ed2554605f29b38ba2390b4bc8de91dac91eab34@35.177.114.1:32323,cfxnode://f94343e4c806b2968c5e4bf4cbc49736d04af03fab4b797bc11aea2af2cb23d706d1d9c5dfae430a2df1d7fe6a6a988aff43c50898dc087161e51fa69d603997@13.69.186.42:32323,cfxnode://ce6c447f1e6f8e43e07f9ee8d5b49180663ad934f7fffa0db654e69522a234628f966fc8ea0285c4357285885f188804ae09b5303a6c8e627149c2a41d5156a3@52.68.192.218:32323,cfxnode://012d0f7e59f62220e2a90e458cf0d65e5690d09dad59ce05f03f5878a7142bef9f412decdbefa7716e8331e94d68f05c2ce943db4ffa5440e496f2130d3feb50@23.96.108.96:32323,cfxnode://4eb526348481292722188664543d3dc80a5f2a35b578b2d72d54293ccc400fa87efb69e728dc56ef924be708ec8b33fa3648eca2a81e9e95f44cd0b3252fea77@34.201.56.239:32323,cfxnode://72d0736cc9fffc21306f097b8ce5099f62d72ec05bd94ceff5bd6ec6783801f2f7ad17a16f57499243925ed9633654081d3b4cb95bab7474144e92ffe39c9cc4@34.216.73.138:32323,cfxnode://7e2e4918d3aff819afdb8782c13544ea63193d82d9529dfbab3efb101754b322fc161c771a784e1b0420da8f78dbb127fbac24d1d626b634b462542ad8953bd7@52.231.28.50:32323,cfxnode://448839f2900f4a22ce611bd66a4fc93f8fa02a4b185679ba89078c0bf9c6c9328d3df77c4c8451fca12f2a8daab53b8f38762c14d6f24ba6897a9ddd79988474@18.228.10.237:32323,cfxnode://54e1d46b03527d79986e3c884e6ef6cec09cfc548f7ad20d8f0c996396cbe04bead6f689822eae2ab78b08e2be360371679d94f41fc75645ae166c557c3cd7e4@15.185.81.4:32323,cfxnode://5ec498fd7c8ff5389024f6a6e80ed75539c89dda8e655cae48c8ae883590acb940d856a601e7f788d5a2cf417eb5dee0fa9ae6c0a2ac8e6d8253cb7ac986a651@18.163.111.230:32323,cfxnode://8949669b26e015acd6c3e1ba5f87e2a7242a8611eec224428d5553005e45b4c6b2e352721be6334a445340441c8d6f8dfeab20472fbb0ce9733c293f0c1c781c@13.67.73.51:32323,cfxnode://3a25050e4d896b22a265170a8795ae5b22c48822a81c0c4a43fd3856f979b03c20abadaec90ffd083abac278cfc38087ef6902b1825b7f7c2fcc639f9e931bfb@13.209.20.158:32323,cfxnode://af63f3129791ab9afb1f74aeb0c9cf5931f8fb18f905f783c4bc7dff0421bfc83acc56ff41e3904bf0ad0477fb13d06cacbb8f337dcab10b9ae7efe787c02809@13.112.176.199:32323,cfxnode://c2b7613cdece4dd73f5107ab77c5c30663ac67366177bd4d4349b882e64cd6f62dd379d31e534b168421a76d3e84b9213894e58687b8c659718ce97d7a2148e7@50.18.129.125:32323,cfxnode://4c0a46dee4e1d2db9e0e1ce935f41edccfe0602efa7823713d93aea55bb5174ca957fcd27e1aa1b4d8d020565183ebc53674a73eb800ecc741d7aa853ab845eb@18.197.60.158:32323,cfxnode://4ff47d5a384f945628530a5015e766855f4085655fcb3bb1bbaa4048941cdac30924b2ba5b4a42445748bc64cc4fc04375e9a6f8a3a9f5833ef7b61c155a5176@13.94.59.99:32323,cfxnode://3ec541c53224053294900568366e2c89851ff83f23aa45c8cafd3eb250cf1202afdf0bb62966e013176861c9165b6871e3cc522011074b20be863a43951af91c@35.178.198.71:32323,cfxnode://f31e7d2fdcffa1b25a6a6c9c1357a6804f8f426caf81ccda16291200055c46affdbfbfebebcca996ea7861631c9a0b11d70f07afeed71efa0a4f12aa8acfb55e@54.255.160.38:32323,cfxnode://d3c11b60ff63c959db2aa5e2946fea7a12fb8967faff00e9a233ed6973dff13ac78429d77fab7d49ea0927362c367b648f9ba0cd9db3e65748f5647820aaf7a9@35.183.19.30:32323,cfxnode://49ff58db6b4c5f92c2145e69ea0625134cbe35885f0e5979191ba9c67e4c9374234ed7fbeb65f82d4d197568110a4f100f078bfbac896f391b362bec77be19ea@212.64.63.38:32323,cfxnode://97497107e94ac463f6bad526d74e0058d46154e97cbf758edaf3d360e2f3347ae5946ca337eb0d201df8f625e7ae5bfc32e8394d2ce37bd2dc35fa5a4bcecd01@8.131.69.64:32323,cfxnode://c22ad0736f5cc2cc3b11ce5f43345213c2e44994dfaa5e3b0cebe8bd9c78cc52e1a22949ff5953aea80476f648e42b502172e04629c172f4400a0af4caf97efb@8.131.68.192:32323,cfxnode://04cee414977f68a0c2f0215199dde4ec1c27350e447ea855ce000054336f4ccb1c43f0c5ebe8172ad51c7d7b88ac98c037a85ae949e79734449ac38a23fd1d60@212.64.62.252:32323,cfxnode://f1750b818c5828fc5f22667f4b45d4a39b17a1cf40f71ae8f74b6195485a93bf16892a3785bda36132ebae64b83b91b216eaccb7a02185a01f37c7ad89c513ad@101.132.133.254:32323,cfxnode://72a21ec3d2d7c5545b4a46656eaca6ab4ec3ac85628f665bd205e7c52273d345d1583efface277b967fca963a81fbf8b7a81ae97f0a46234cd5fb34853c95fd2@47.101.39.91:32323,cfxnode://b7aeba1f1b2b3e5dfdc7ac93df4281a440ccbdc89894444e094f15242ffa1578d90f9fd447b899be89a57542616e26a82180bd2bfb3b81f82a4dffdfe180f44e@8.210.110.149:32323,cfxnode://07faaf8be8bff4243b496363fb02bd0a21be97e291febcd9aabb29996de90d0a10065f3383beff09f05cb0bdfaa9655d90550c8abcbf97be0658ce6efd8f9b64@47.254.67.249:32323\"\n\n# Some preset develepment configurations.\n# It should not be set in production environment.\n#\n# For both `test` and `dev` modes, we will\n#     * Set initial difficulty to 4\n#     * Allow calling test and debug rpc from public port\n#\n# `test` mode is for Conflux testing and debugging, we will\n#     * Add latency to peer connections\n#     * Skip handshake encryption check\n#     * Skip header timestamp verification\n#     * Handle NewBlockHash even in catch-up mode\n#     * Allow data propagation test\n#     * Allow setting genesis accounts and generate tx from secrets\n#\n# `dev` mode is for users to run a single node that automatically\n#     generates blocks with fixed intervals\n#     * Open port 12535 for ws rpc if `jsonrpc_ws_port` is not provided.\n#     * Open port 12536 for tcp rpc if `jsonrpc_tcp_port` is not provided.\n#     * Open port 12537 for http rpc if `jsonrpc_http_port` is not provided.\n#     * generate blocks automatically without PoW\n#     * Skip catch-up mode even there is no peer\n#\n# mode = \"\"\n\n# If you want to setup a single node running Conflux for development. You should\n# COMMENT the bootnodes setting and you should use the following parameters:\n#\nmode = \"dev\"\n\n# Note that ``dev_block_interval_ms'' controls the mining rate in the dev mode.\n#\ndev_block_interval_ms = 250\n\n# ----------------- Mining Configuration -----------------\n\n# `mining_author` is the address to receive mining rewards.\n# If set, `mining_type` will be \"stratum\" by default.\n# The value is a 40-digit hex string.\n# By default, the value is not set.\n#\n# mining_author=\"1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n\n# `mining_type` controls whether the mining process goes through the\n# stratum protocol, uses CPU-mining, or disable mining.\n# Possible values are \"stratum\", \"cpu\", and \"disable\".\n# The default value is \"stratum\" if `mining_author` is set.\n# If the value is set and not \"disable\", `mining_author` must be set.\n#\n# mining_type = \"stratum\"\n\n# Listen address for stratum\n#\n# stratum_listen_address = \"127.0.0.1\"\n\n# Port for stratum.\n#\n# stratum_port = 32525\n\n# Window size for PoW manager\n#\n# pow_problem_window_size = 1\n\n# Secret key for stratum.\n# The value is 64-digit hex string.\n# If not set, the RPC subscription will not check the authorization.\n#\n# stratum_secret = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n\n# -------------- Log-related Configuration -------------\n\n# `log_conf` the path of the log4rs configuration file. The configuration in the file will overwrite the value set by `log_level`.\n# By default, the value is not set.\n#\nlog_conf=\"log.yaml\"\n\n# `log_file` is the path of the log file\"\n# If not set, the log will only be printed to stdout, and not persisted to files.\n# By default, the value is not set.\n#\n# log_file=\"conflux.log\"\n\n# `log_level` is the printed log level.\n# The value should be one of \"error\", \"warn\", \"info\", \"debug\", \"trace\", \"off\"\n#\n# log_level=\"info\"\n\n# -------------- Network Configuration -------------\n\n# `public_address` is the address of this node used for other nodes to connect to.\n# If not set, the process will try to find out the public IP with best effort, and use `tcp_port` as public port.\n# However, it's HIGHLY RECOMMENDED to set the value manually, especially for machines with IP translated by NAT.\n#\n# public_address=\"1.1.1.1\"\n\n# `tcp_port` is the TCP port that the process listens for P2P messages. The default is 32323.\n#\n# tcp_port=32323\n\n# `public_tcp_port` is the public TCP port that other nodes should connect to. It might be different from \n# the tcp_port in case the machine is behind a NAT. The default is as same as `tcp_port`.\n#\n# public_tcp_port=32323\n\n# `udp_port` is the UDP port used for node discovery.\n# If not set, it will be the same as `port`.\n#\n# udp_port=32323\n\n# `jsonrpc_http_keep_alive` is used to control whether to set KeepAlive for rpc HTTP connections.\n#\n# jsonrpc_http_keep_alive=false\n\n# `jsonrpc_cors` is used to control the rpc domain validation policies.\n# The value should be \"none\", \"all\", or a list string split by commas without space.\n# If not set, domain validation is disabled.\n# By default, the values are not set. \n#\n# jsonrpc_cors=\"all\"\n\n# The following parameters are the ports for the node to provide rpc service. If not set,\n# the node will not start rpc services. By default, the `jsonrpc_local_http_port` is set,\n# so as to support the Conflux CLI subcommands. What's provided here is the recommended\n# value if you want to start rpc services for other front-end applications.\n# Note that to serve transaction-related RPCs, `persist_tx_index` should also be set to `true` or\n# the node will only be able to handle very recent transactions.\n#\n# jsonrpc_ws_port=12535\n# jsonrpc_tcp_port=12536\n# jsonrpc_http_port=12537\n# jsonrpc_local_tcp_port=12538\njsonrpc_local_http_port=12539\n\n# --------------- Performance-related Network Parameters ----------------------\n\n# Timeout for block-related requests (GetBlock, GetCmpctBlock, GetBlockTxn)\n#\n# blocks_request_timeout_ms = 20_000\n\n# Time interval to check timeout requests periodically.\n#\n# check_request_period_ms=5000\n\n# Chunk size for snapshot retrieval\n#\n# chunk_size_byte = 4194304\n\n# Control whether to demote peers to unstrusted\n#\n# demote_peer_for_timeout = false\n\n# Maximum network queue size. When reached, the queue will refuse any new data.\n# The unit is MB.\n#\n# egress_queue_capacity = 256\n\n# Minimum queue size for throttling in manner of ratio.\n# The unit is MB.\n#\n# egress_min_throttle = 10\n\n# Maximum queue size for throttling in manner of ratio.\n# The unit is MB.\n#\n# egress_max_throttle = 10\n\n# Time interval to to garbage-collect not block-graph-ready blocks periodically.\n#\n# expire_block_gc_period_s = 900\n\n# Timeout for header-related requests (GetBlockHeaders)\n#\n# headers_request_timeout_ms=10_000\n\n# Time interval to broadcast Status as heartbeat periodically\n#\n# heartbeat_period_interval_ms = 30_000\n\n# Time to maintain transaction digests inflight status.\n#\n# inflight_pending_tx_index_maintain_timeout_ms = 30_000\n\n# Maximum number of timeout allowed in `timeout_observing_period_s`.\n# If the max is reached, the peer will be disconnected.\n# `demote_peer_for_timeout` controls if the peer will be demoted in this case.\n#\n# max_allowed_timeout_in_observing_period = 10\n\n# Maximum number of peers to download state chunks from.\n#\n# max_download_state_peers = 8\n\n# Maximum number of handshaking sessions at the same time.\n#\n# max_handshakes = 64\n\n# Maximum number of incoming connections.\n#\n# max_incoming_peers = 64\n\n# Maximum number of outgoing connections.\n#\n# max_outgoing_peers = 16\n\n# Maximum number of outgoing connections to archive nodes. 0 represents\n# not required to connect to archive nodes. E.g. light node or full node\n# need not to connect to archive nodes.\n#\n# max_outgoing_peers_archive = 0\n\n# Maximum number of inflight requests for each peer.\n# If the max is reached, requests will be buffered until inflight requests are responded or timeout.\n#\n# max_inflight_request_count = 64\n\n# Maximum number of peers to broadcast transaction digests.\n#\n# max_peers_tx_propagation = 128\n\n# Maximum cached received block size waiting to be processed.\n#\n# max_unprocessed_block_size_mb = 128\n\n# Minimum number of peers to broadcast transaction digests.\n#\n# min_peers_tx_propagation = 8\n\n# The time to maintain received transactions to avoid duplicated requests.\n#\n# received_tx_index_maintain_timeout_ms = 300_000\n\n# Whether to request blocks with public key during catch-up to avoid recovering\n# the public keys for transactions.\n#\n# request_block_with_public = false\n\n# Time interval to broadcast transaction digests periodically.\n#\n# send_tx_period_ms = 1300\n\n# Timeout for requesting snapshot candidate.\n#\n# snapshot_candidate_request_timeout_ms = 10_000\n\n# Timeout for requesting snapshot chunks.\n#\n# snapshot_chunk_request_timeout_ms = 30_000\n\n# Timeout for requesting snapshot manifests.\n#\n# snapshot_manifest_request_timeout_ms = 30_000\n\n# `throttling_conf` is configuration file in TOML format to throttle RPCs, P2P messages.\n# Throttling is enabled only when the parameter specified.\n#\n# throttling_conf=\"throttling.toml\"\n\n# The time period to observe if a peers has too many timeouts.\n#\n# timeout_observing_period_s = 600\n\n# Timeout for transaction requests.\n#\n# transaction_request_timeout_ms = 30_000\n\n# Time to maintain information of sent-out transactions for answering requests.\n#\n# tx_maintained_for_peer_timeout_ms = 600_000\n\n# --------------- Peer Management Parameters -------------\n\n# Timeout duration for refreshing discovery protocol when there are NOT enough outgoing connections.\n#\n# discovery_fast_refresh_timeout_ms = 10_000\n\n# Timeout duration for initiating peer connection management.\n#\n# discovery_housekeeping_timeout_ms = 1_000\n\n# Period between consecutive rounds of the same current discovery process.\n#\n# discovery_round_timeout_ms = 500\n\n# `enable_discovery` is used to control whether the node will ask its neighbors for new peers\n# and whether it will respond to other nodes' discovery requests.\n#\n# enable_discovery=true\n\n# `netconf_dir` is the directory to store network related persistent data, including `net_key`,\n# a list of trusted nodes and a list of untrusted nodes.\n#\n# netconf_dir=\"./net_config\"\n\n# `net_key` is the 256-bit private key to generate a unique node id for this node.\n# The value is a 64-digit hex string.\n# If not set, the node will try to read from the file \"key\" under the directory `netconf_dir`.\n# If the file is not found, the node will generate a random key.\n# By default, the value is not set.\n# If a node is restarted, it's suggested to keep the key unchanged.\n#\n# net_key=\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n\n# Timeout duration for persisting node table.\n#\n# node_table_timeout_s = 300\n\n# Connection lifetime threshold for promotion.\n#\n# node_table_promotion_timeout_s = 259200\n\n\n# `session_ip_limits` limits the number of TCP connections per IP address or subnet for security consideration.\n# Its format is \"n1,n2,n3,n4\", where n1 is the quota of TCP connections for a single IP address, and n2/n3/n4\n# are the quotas for subnet a/b/c. The default value is \"1,8,4,2\", which means:\n#   1) Only 1 TCP connection allowed for a single IP address.\n#   2) 8 TCP connections allowd for subnet a, e.g. 192.xxx.xxx.xxx/8\n#   3) 4 TCP connections allowd for subnet b, e.g. 192.168.xxx.xxx/16\n#   4) 2 TCP connections allowd for subnet c, e.g. 192.169.0.xxx/24\n# Note, 0 represents unlimited.\n#\n# session_ip_limits=\"1,8,4,2\"\n\n# `subnet_quota` limits the number of nodes for a subnet B (e.g. 192.168.xxx.xxx/16) stored in database.\n# Nodes in database are used to establish outgoing TCP connections for P2P communications.\n# Note, 0 represents unlimited.\n#\n# subnet_quota=32\n\n# ---------------- Transaction Cache Parameters -----------------\n\n# Whether to persist transaction indices.\n# This only needs to be enabled if you want to reliably answer transaction-related RPCs.\n#\n# persist_tx_index = false\n\n# Time to keep transactions in in-memory transaction cache.\n#\n# tx_cache_index_maintain_timeout_ms = 300_000\n\n# Maximum number of transactions allowed in the transaction pool.\n#\n# tx_pool_size = 500_000\n\n# Minimum allowed transaction gas price in the transaction pool.\n#\n# tx_pool_min_tx_gas_price = 1\n\n# ------------------ Storage Parameters ----------------------\n\n# The number of additional snapshot before the current stable checkpoint that we will maintain.\n# If it's 0, all snapshot before stable genesis will be deleted and the states are unavailable.\n#\n# additional_maintained_snapshot_count = 0\n\n# Time interval to evict old data from in-memory data cache.\n#\n# block_cache_gc_period_ms = 5_000\n\n# Database type to store block-related data.\n# Supported: rocksdb, sqlite.\n#\n# block_db_type = \"rocksdb\"\n\n# The root directory of all data (block data, state data, log files, node database).\n#\n# conflux_data_dir = \"./\"\n\n# The directory to store block-related data.\n#\n# block_db_dir = \"./blockchain_db\"\n\n# Maximum size of cached ledger data (block, receipts, e.t.c.)\n# The unit is MB.\n#\n# ledger_cache_size = 1024\n\n# Rocksdb cache size.\n# Only applies if `block_db_type = \"rocksdb\"`.\n#\n# rocksdb_cache_size = 128\n\n# Rocksdb compaction file path.\n# Only applies if `block_db_type = \"rocksdb\"`.\n# If not set, compaction configuration will be set automatically by rocksdb.\n#\n# rocksdb_compaction_profile = \"./compact_file.conf\"\n\n# State storage parameters.\n# Refer to the documentation for details.\n#\n# storage_delta_mpts_cache_recent_lfu_factor=4.0\n# storage_delta_mpts_cache_size=20000000\n# storage_delta_mpts_cache_start_size=1000000\n# storage_delta_mpts_node_map_vec_size=80000000\n# storage_delta_mpts_slab_idle_size=200000\n\n# ------------------ Light Node Parameters ----------------------\n\n# Header sync parameters.\n# ln_header_request_batch_size = 30\n# ln_header_request_timeout_sec = 2\n# ln_max_headers_in_flight = 1000\n\n# Epoch sync parameters.\n# ln_epoch_request_batch_size = 100\n# ln_epoch_request_timeout_sec = 2\n# ln_max_parallel_epochs_to_request = 10\n# ln_num_epochs_to_request = 200\n# ln_num_waiting_headers_threshold = 1000\n\n# -------------------- Others -------------------\n\n# Time (in milliseconds) after which accounts are re-read from disk.\n#\n# account_provider_refresh_time_ms = 1000\n\n# Whether to allow execution without deferring if the execution thread is idle.\n#\n# enable_optimistic_execution = true\n\n# Maximum number of blocks whose timestamp is in the near future is maintained in memory.\n#\n# future_block_buffer_capacity = 32768\n\n# Maximum number of log entries returned from cfx_getLogs.\n# If not set, cfx_getLogs will not limit the number of logs returned.\n#\n# get_logs_filter_max_limit = 10\n\n# Epoch batch size used in log filtering.\n# Larger batch sizes may improve performance but might also prevent consensus from making progress under high RPC load.\n#\n# get_logs_epoch_batch_size = 32\n\n# The maximal allowed number of epochs between `from_epoch` and `to_epoch` in the filter to call `cfx_getLogs`.\n# If not set, there is no limit on the gap.\n# By default it is not set.\n#\n# get_logs_filter_max_epoch_range = 10000\n\n# Maximum number of transactions allowed for peers to send to a catch-up node.\n#\n# max_trans_count_received_in_catch_up = 60_000\n\n# The chain_id of conflux network\n# 1 for testnet\n# 1029 for Tethys\n#\nchain_id = 1029\n\ngenesis_secrets = \"genesis_secrets.txt\"\n"
  },
  {
    "path": "unittests/tsconfig.json",
    "content": "{\n  \"compilerOptions\" : {\n    \"target\": \"esnext\",\n    \"module\": \"commonjs\",\n    \"outDir\": \"build\",\n    \"watch\" : false,\n    \"resolveJsonModule\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  }\n}\n"
  },
  {
    "path": "unittests/utils.ts",
    "content": "export function getJsonFilename(filename: string): string {\n  if (!filename.startsWith('./'))\n    filename = './' + filename\n  if (!filename.endsWith('.json'))\n    filename = filename + '.json'\n  return filename\n}\n\n\nexport function padName(name: string): string {\n  return (\"  \" + name + \":\").padEnd(30, ' ')\n}\n\nexport function printTest(name: string, success: boolean) {\n  console.log(padName(name), (success? \"pass✅\" : \"fail❌\"));\n}\n\nexport function cleanCombined(combined: {}): abiBytecode {\n\tconst contracts = combined[\"contracts\"]\n\tconst name = Object.keys(contracts)[0]\n\tconst contract = contracts[name]\n\treturn {\n\t\tabi: JSON.parse(contract[\"abi\"]),\n\t\tbytecode: '0x' + contract[\"bin\"]\n\t}\n}\n\ninterface abiBytecode {\n\tabi\n\tbytecode: string\n}\n"
  }
]